Differentiated sources and literature lists for excerpts and complex texts

This commit is contained in:
Georgy Litvinov 2021-04-15 17:03:10 +02:00
parent 8fadf30f2f
commit d5721d1d48
2 changed files with 24 additions and 3 deletions

View file

@ -107,3 +107,8 @@ faculty_memberships = Faculty Memberships
edit_mailing_address = Edit Mailing Address edit_mailing_address = Edit Mailing Address
add_capitalized = Add add_capitalized = Add
literature_excerpt_button_text = Литература
literature_all_button_text = Сводная литература
sources_excerpt_button_text = Источники
sources_all_button_text = Сводные источники

View file

@ -1,4 +1,3 @@
<#macro showRubrics> <#macro showRubrics>
<#assign currentRubrics = propertyGroups.pullProperty("https://iph.ras.ru/relationships#belongsTo")!> <#assign currentRubrics = propertyGroups.pullProperty("https://iph.ras.ru/relationships#belongsTo")!>
<#if currentRubrics?? && currentRubrics?has_content> <#if currentRubrics?? && currentRubrics?has_content>
@ -124,7 +123,15 @@
<#macro arrangeSources sources counter identifier filter="none"> <#macro arrangeSources sources counter identifier filter="none">
<#if sources?? && sources?has_content && counter &gt; 0> <#if sources?? && sources?has_content && counter &gt; 0>
<button type="button" class="collapsible" style="border: none; color: #8B4513;width: 100%;text-align:left; background-color: #ffffff; background-image: url(${urls.base}/themes/iph/images/book_icon.png); background-repeat: no-repeat; background-position: left center;">Источники</button> <@compress single_line=true>
<button type="button" class="collapsible" style="border: none; color: #8B4513;width: 100%;text-align:left; background-color: #ffffff; background-image: url(${urls.base}/themes/iph/images/book_icon.png); background-repeat: no-repeat; background-position: left center;">
<#if filter="none">
${i18n().sources_all_button_text}
<#else>
${i18n().sources_excerpt_button_text}
</#if>
</button>
</@compress>
<div class="autoExpand documentPart works" id="anchor-${identifier}-sources" style="display:block;"> <div class="autoExpand documentPart works" id="anchor-${identifier}-sources" style="display:block;">
<#assign lastSource = ""/> <#assign lastSource = ""/>
<#list sources as source> <#list sources as source>
@ -140,8 +147,17 @@
</#macro> </#macro>
<#macro arrangeLiterature literature counter identifier filter="none"> <#macro arrangeLiterature literature counter identifier filter="none">
<#if literature?? && literature?has_content && counter &gt; 0> <#if literature?? && literature?has_content && counter &gt; 0>
<button type="button" class="collapsible" style="border:none; color: #8B4513;width: 100%; text-align: left; background-color: #ffffff; background-image: url(${urls.base}/themes/iph/images/book_icon.png); background-repeat: no-repeat; background-position: left center;">Литература</button> <@compress single_line=true>
<button type="button" class="collapsible" style="border:none; color: #8B4513;width: 100%; text-align: left; background-color: #ffffff; background-image: url(${urls.base}/themes/iph/images/book_icon.png); background-repeat: no-repeat; background-position: left center;">
<#if filter="none">
${i18n().literature_all_button_text}
<#else>
${i18n().literature_excerpt_button_text}
</#if>
</button>
</@compress>
<div class="autoExpand documentPart bibliography" id="anchor-${identifier}-literature" style="display:block;"> <div class="autoExpand documentPart bibliography" id="anchor-${identifier}-literature" style="display:block;">
<#assign lastLiterature = ""/> <#assign lastLiterature = ""/>
<#list literature as literatureItem> <#list literature as literatureItem>