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