Updates for templates
This commit is contained in:
parent
63a187fea3
commit
a768cbf0d2
2 changed files with 23 additions and 8 deletions
|
@ -125,12 +125,17 @@
|
|||
</div>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#assign htmlExcerpt = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#htmlExcerpt")!>
|
||||
<#if htmlExcerpt.statements?has_content && htmlExcerpt.type == "data">
|
||||
<div class="htmlExcerpt" style="list-style:none;">
|
||||
<@p.dataPropertyList htmlExcerpt editable />
|
||||
<#-- object property -->
|
||||
</div>
|
||||
<#if htmlExcerpt?has_content >
|
||||
<#if htmlExcerpt.statements?has_content && htmlExcerpt.type == "data">
|
||||
<div class="htmlExcerpt" style="list-style:none;">
|
||||
<@p.dataPropertyList htmlExcerpt editable />
|
||||
<#-- object property -->
|
||||
</div>
|
||||
<#else>
|
||||
<div class="label">Текст отрывка: <@p.addLink htmlExcerpt editable /> <@p.verboseDisplay htmlExcerpt /> </div>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#assign works = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#works")!>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<#if !rubric.parentUri??>
|
||||
<#assign childs = rubric.childs?number>
|
||||
<button type="button" style="border:none;padding: 15px;text-align:left; width:100%;" class="collapsible">
|
||||
<#if childs > 0>+</#if><a style="padding-left:15px;" href="individual?uri=${rubric.uri?url}">${rubric.name}</a></button>
|
||||
<@openButton childs=childs/><a style="padding-left:15px;" href="individual?uri=${rubric.uri?url}">${rubric.name}</a></button>
|
||||
<div class="rubricContents" style="display:none;">
|
||||
<#if (childs > 0) >
|
||||
<@nestedRubrics allrubrics=rubrics parentUri=rubric.uri deep=10 level=1 />
|
||||
|
@ -20,22 +20,32 @@
|
|||
coll[i].addEventListener("click", function() {
|
||||
this.classList.toggle("active");
|
||||
var content = this.nextElementSibling;
|
||||
if (content.style.display === "block") {
|
||||
if (content.style.display === "block") {
|
||||
content.style.display = "none";
|
||||
$(this).children('.collapsibleSign').text('+');
|
||||
} else {
|
||||
content.style.display = "block";
|
||||
$(this).children('.collapsibleSign').text('–');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<#macro openButton childs>
|
||||
<#if childs > 0>
|
||||
<div class="collapsibleSign" style="display:inline-block;width:10px;">+</div>
|
||||
<#else>
|
||||
<div style="display:inline-block;width:10px;"></div>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro nestedRubrics allrubrics parentUri deep level>
|
||||
<#assign count = 0>
|
||||
<#list allrubrics as innerRubric>
|
||||
<#if innerRubric.parentUri?? && innerRubric.parentUri == parentUri>
|
||||
<#assign childs = innerRubric.childs?number>
|
||||
<#assign count = count + 1 >
|
||||
<button type="button" style="border:none;padding: 15px 0px 15px ${15+15*level}px;width: 100%; text-align:left;" class="collapsible"><#if childs > 0>+</#if><a style="padding-left:15px;" href="individual?uri=${innerRubric.uri?url}">${innerRubric.name}</a></button>
|
||||
<button type="button" style="border:none;padding: 15px 0px 15px ${15+15*level}px;width: 100%; text-align:left;" class="collapsible"><@openButton childs=childs /><a style="padding-left:15px;" href="individual?uri=${innerRubric.uri?url}">${innerRubric.name}</a></button>
|
||||
<div class="rubricContents" style="display:none;">
|
||||
<#if (deep > 1) && (childs > 0)>
|
||||
<@nestedRubrics allrubrics=rubrics parentUri=innerRubric.uri deep=deep-1 level=level+1 />
|
||||
|
|
Loading…
Add table
Reference in a new issue