Skip to content

Commit

Permalink
Override CSL plugin template and move the markup from article landing…
Browse files Browse the repository at this point in the history
… page
  • Loading branch information
Vitaliy-1 committed Aug 8, 2023
1 parent a17cf8d commit 1627f8b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 46 deletions.
4 changes: 4 additions & 0 deletions resources/less/components/article.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@
.article__rorImage {
padding-left: 5px;
}

#citationOutput .csl-left-margin {
display: none;
}
46 changes: 0 additions & 46 deletions templates/frontend/objects/article_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -232,52 +232,6 @@
</section>
{/if}

{* How to cite *}
{if $citation}
<section>
<h2>{translate key="submission.howToCite"}</h2>
<p></p>
<div id="citationOutput" role="region" aria-live="polite" style="margin-bottom: 1.25rem;">
{$citation}
</div>
<div class="dropdown">
<button class="btn btn-primary 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>
<ul class="dropdown-menu" aria-labelledby="cslCitationFormatsButton">
{foreach from=$citationStyles item="citationStyle"}
<li class="dropdown-item">
<a
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>
</li>
{/foreach}
</ul>
</div>

{if count($citationDownloads)}
<hr>
<h3>
{translate key="submission.howToCite.downloadCitation"}
</h3>
<ul>
{foreach from=$citationDownloads item="citationDownload"}
<li>
<a href="{url page="citationstylelanguage" op="download" path=$citationDownload.id params=$citationArgs}">
{$citationDownload.title|escape}
</a>
</li>
{/foreach}
</ul>
{/if}
</section>
{/if}

{* Licensing info *}
{assign 'licenseTerms' $currentContext->getLocalizedData('licenseTerms')}
{assign 'copyrightHolder' $publication->getLocalizedData('copyrightHolder')}
Expand Down
44 changes: 44 additions & 0 deletions templates/plugins/generic/citationStyleLanguage/citationblock.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{if $citation}
<section>
<h2>{translate key="submission.howToCite"}</h2>
<p></p>
<div id="citationOutput" role="region" aria-live="polite" style="margin-bottom: 1.25rem;">
{$citation}
</div>
<div class="dropdown">
<button class="btn btn-primary 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>
<ul class="dropdown-menu" aria-labelledby="cslCitationFormatsButton">
{foreach from=$citationStyles item="citationStyle"}
<li class="dropdown-item">
<a
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>
</li>
{/foreach}
</ul>
</div>

{if count($citationDownloads)}
<hr>
<h3>
{translate key="submission.howToCite.downloadCitation"}
</h3>
<ul>
{foreach from=$citationDownloads item="citationDownload"}
<li>
<a href="{url page="citationstylelanguage" op="download" path=$citationDownload.id params=$citationArgs}">
{$citationDownload.title|escape}
</a>
</li>
{/foreach}
</ul>
{/if}
</section>
{/if}

0 comments on commit 1627f8b

Please sign in to comment.