2024-06-20 08:52:49 +00:00
|
|
|
<?php get_header(); ?>
|
|
|
|
|
|
|
|
<!-- Article Content -->
|
|
|
|
<section class="container my-5">
|
|
|
|
<div class="row">
|
2024-08-02 21:13:53 +00:00
|
|
|
<div class="col-lg-10 mx-auto">
|
2024-06-20 08:52:49 +00:00
|
|
|
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
|
|
|
<h1 class="display-4"><?php the_title(); ?></h1>
|
|
|
|
<p class="text-muted">
|
|
|
|
<?php
|
|
|
|
$authors = get_post_meta(get_the_ID(), 'article_authors', true);
|
|
|
|
if (!empty($authors)) {
|
|
|
|
echo implode('; ', array_map('esc_html', $authors));
|
|
|
|
}
|
2024-06-20 09:10:31 +00:00
|
|
|
?>
|
2024-06-20 12:44:20 +00:00
|
|
|
<p class="text-muted">
|
2024-06-20 13:24:22 +00:00
|
|
|
<strong>DOI:</strong>
|
|
|
|
<a href="#" id="doi-link" data-doi="<?php echo esc_attr(get_post_meta(get_the_ID(), 'article_doi', true)); ?>">
|
|
|
|
<?php echo esc_html(get_post_meta(get_the_ID(), 'article_doi', true)); ?>
|
|
|
|
</a>
|
|
|
|
<span id="doi-copy-message" style="display: none; color: green; margin-left: 10px;"><?php _e('Copied!', 'duck-behavior-journal'); ?></span>
|
2024-06-20 12:44:20 +00:00
|
|
|
</p>
|
2024-06-20 09:28:29 +00:00
|
|
|
<p class="text-muted">
|
2024-08-03 15:12:13 +00:00
|
|
|
<strong>Status:</strong>
|
|
|
|
<?php display_publication_status_terms(get_the_ID()); ?>
|
2024-06-20 08:52:49 +00:00
|
|
|
</p>
|
2024-06-22 07:18:59 +00:00
|
|
|
<?php if (has_excerpt()) : ?>
|
|
|
|
<p class="text-muted"><strong>Abstract:</strong> <?php echo get_the_excerpt(); ?></p>
|
2024-06-20 09:28:29 +00:00
|
|
|
<?php endif; ?>
|
2024-09-17 13:54:00 +00:00
|
|
|
<?php
|
|
|
|
$keywords = get_post_meta(get_the_ID(), 'article_keywords', true);
|
|
|
|
if (!empty($keywords)) :
|
|
|
|
echo '<p class="text-muted"><strong>Keywords:</strong> ' . implode(', ', array_map('esc_html', $keywords)) . '</p>';
|
|
|
|
endif;
|
|
|
|
?>
|
2024-06-22 07:18:59 +00:00
|
|
|
<?php
|
|
|
|
$attachment_id = get_post_meta(get_the_ID(), 'article_attachment_id', true);
|
2024-06-22 07:50:04 +00:00
|
|
|
$attachment_url = $attachment_id ? esc_url(home_url('/download/' . $attachment_id)) : '';
|
2024-06-22 07:18:59 +00:00
|
|
|
$open_access = get_post_meta(get_the_ID(), 'article_open_access', true);
|
|
|
|
if ($attachment_url) :
|
|
|
|
if ($open_access == '1' || is_user_logged_in()) :
|
|
|
|
?>
|
|
|
|
<p><a href="<?php echo esc_url($attachment_url); ?>" class="btn btn-primary"><?php _e('Download Full Article', 'duck-behavior-journal'); ?></a></p>
|
|
|
|
<?php else : ?>
|
2024-06-22 07:26:09 +00:00
|
|
|
<p class="text-muted"><strong>Note:</strong> <?php _e('The full paper is available for download for subscribers only.', 'duck-behavior-journal'); ?></p>
|
2024-06-22 07:18:59 +00:00
|
|
|
<?php endif;
|
|
|
|
endif; ?>
|
2024-08-02 19:48:07 +00:00
|
|
|
<?php if (is_tcpdf_available()) : ?>
|
|
|
|
<p><a href="<?php echo esc_url(home_url('/download-pdf/' . get_the_ID())); ?>" class="btn btn-primary"><?php _e('Download PDF', 'duck-behavior-journal'); ?></a></p>
|
|
|
|
<?php endif; ?>
|
2024-06-22 07:18:59 +00:00
|
|
|
<hr>
|
2024-06-20 08:52:49 +00:00
|
|
|
<?php the_content(); ?>
|
|
|
|
<?php endwhile;
|
|
|
|
endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
2024-06-20 13:24:22 +00:00
|
|
|
<script src="<?php echo get_template_directory_uri(); ?>/assets/js/clipboard.js"></script>
|
|
|
|
|
2024-06-20 08:52:49 +00:00
|
|
|
<?php get_footer(); ?>
|