Skip to content

Commit

Permalink
Override CSL plugin template and move the markup from the article lan…
Browse files Browse the repository at this point in the history
…ding page
  • Loading branch information
Vitaliy-1 committed Aug 8, 2023
1 parent 7381f86 commit 71beb79
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 40 deletions.
40 changes: 0 additions & 40 deletions templates/frontend/objects/article_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -291,46 +291,6 @@
</div>
{/if}

{* How to cite *}
{if $citation}
<div class="article-details-block article-details-how-to-cite">
<h2 class="article-details-heading">
{translate key="submission.howToCite"}
</h2>
<div id="citationOutput" class="article-details-how-to-cite-citation" role="region" aria-live="polite">
{$citation}
</div>
<div class="dropdown">
<button class="btn dropdown-toggle" type="button" id="cslCitationFormatsButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-csl-dropdown="true">
{translate key="submission.howToCite.citationFormats"}
</button>
<div class="dropdown-menu" aria-labelledby="cslCitationFormatsButton">
{foreach from=$citationStyles item="citationStyle"}
<a
class="dropdown-item"
aria-controls="citationOutput"
href="{url page="citationstylelanguage" op="get" path=$citationStyle.id params=$citationArgs}"
data-load-citation
data-json-href="{url page="citationstylelanguage" op="get" path=$citationStyle.id params=$citationArgsJson}"
>
{$citationStyle.title|escape}
</a>
{/foreach}
{if count($citationDownloads)}
<h3 class="dropdown-header">
{translate key="submission.howToCite.downloadCitation"}
</h3>
{foreach from=$citationDownloads item="citationDownload"}
<a class="dropdown-item" href="{url page="citationstylelanguage" op="download" path=$citationDownload.id params=$citationArgs}">
{$citationDownload.title|escape}
</a>
{/foreach}
{/if}
</div>
</div>
</div>
{/if}

{* PubIds (other than DOI; requires plugins) *}
{foreach from=$pubIdPlugins item=pubIdPlugin}
{if $pubIdPlugin->getPubIdType() == 'doi'}
Expand Down
38 changes: 38 additions & 0 deletions templates/plugins/generic/citationStyleLanguage/citationblock.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{if $citation}
<div class="article-details-block article-details-how-to-cite">
<h2 class="article-details-heading">
{translate key="submission.howToCite"}
</h2>
<div id="citationOutput" class="article-details-how-to-cite-citation" role="region" aria-live="polite">
{$citation}
</div>
<div class="dropdown">
<button class="btn dropdown-toggle" type="button" id="cslCitationFormatsButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-csl-dropdown="true">
{translate key="submission.howToCite.citationFormats"}
</button>
<div class="dropdown-menu" aria-labelledby="cslCitationFormatsButton">
{foreach from=$citationStyles item="citationStyle"}
<a
class="dropdown-item"
aria-controls="citationOutput"
href="{url page="citationstylelanguage" op="get" path=$citationStyle.id params=$citationArgs}"
data-load-citation
data-json-href="{url page="citationstylelanguage" op="get" path=$citationStyle.id params=$citationArgsJson}"
>
{$citationStyle.title|escape}
</a>
{/foreach}
{if count($citationDownloads)}
<h3 class="dropdown-header">
{translate key="submission.howToCite.downloadCitation"}
</h3>
{foreach from=$citationDownloads item="citationDownload"}
<a class="dropdown-item" href="{url page="citationstylelanguage" op="download" path=$citationDownload.id params=$citationArgs}">
{$citationDownload.title|escape}
</a>
{/foreach}
{/if}
</div>
</div>
</div>
{/if}

0 comments on commit 71beb79

Please sign in to comment.