Commit 816e4e04 authored by Bert Leunis's avatar Bert Leunis

ESSENTIALS-1033 change markup of faq templates so the result is always a single dom element

parent 8ef8640a
......@@ -2,40 +2,42 @@
<#-- @ftlvariable name="document" type="{{beansPackage}}.FaqList" -->
<#if document??>
<#if document.FAQ??>
<div class="has-edit-button">
<@hst.cmseditlink hippobean=document/>
<h1>${document.title?html}</h1>
<@hst.html hippohtml=document.description/>
<div class="panel-group" id="faqitems" role="tablist" aria-multiselectable="true">
<#list document.faqItems as faq>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading${faq_index}">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#faqitems" href="#faq_${faq_index}" aria-expanded="false" aria-controls="collapse${faq_index}">
${faq.question?html}
</a>
</h4>
</div>
<div id="faq_${faq_index}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading${faq_index}">
<div class="panel-body">
<@hst.html hippohtml=faq.answer/>
</div>
</div>
</div>
</#list>
<#if document.FAQ??>
<div class="has-edit-button">
<@hst.cmseditlink hippobean=document/>
<h1>${document.title?html}</h1>
<@hst.html hippohtml=document.description/>
<div class="panel-group" id="faqitems" role="tablist" aria-multiselectable="true">
<#list document.faqItems as faq>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading${faq_index}">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#faqitems" href="#faq_${faq_index}" aria-expanded="false" aria-controls="collapse${faq_index}">
${faq.question?html}
</a>
</h4>
</div>
</div>
<@hst.headContribution category="htmlBodyEnd">
<script type="text/javascript" src="<@hst.webfile path="/js/jquery-2.1.0.min.js"/>"></script>
</@hst.headContribution>
<@hst.headContribution category="htmlBodyEnd">
<script type="text/javascript" src="<@hst.webfile path="/js/bootstrap.min.js"/>"></script>
</@hst.headContribution>
<#else>
<div class="alert alert-danger">The selected document should be of type FAQ list.</div>
</#if>
<div id="faq_${faq_index}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading${faq_index}">
<div class="panel-body">
<@hst.html hippohtml=faq.answer/>
</div>
</div>
</div>
</#list>
</div>
</div>
<@hst.headContribution category="htmlBodyEnd">
<script type="text/javascript" src="<@hst.webfile path="/js/jquery-2.1.0.min.js"/>"></script>
</@hst.headContribution>
<@hst.headContribution category="htmlBodyEnd">
<script type="text/javascript" src="<@hst.webfile path="/js/bootstrap.min.js"/>"></script>
</@hst.headContribution>
<#else>
<div class="alert alert-danger">The selected document should be of type FAQ list.</div>
</#if>
<#-- @ftlvariable name="editMode" type="java.lang.Boolean"-->
<#elseif editMode>
<div>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/faq.png" />"> Click to edit FAQ
</div>
</#if>
\ No newline at end of file
......@@ -2,23 +2,25 @@
<#-- @ftlvariable name="document" type="{{beansPackage}}.FaqList" -->
<#if document??>
<#if document.FAQ??>
<div class="has-edit-button">
<@hst.cmseditlink hippobean=document/>
<h1>${document.title?html}</h1>
<div>
<@hst.html hippohtml=document.description/>
</div>
<#list document.faqItems as faq>
<div>
<h3><a href="<@hst.link hippobean=faq />">${faq.question?html}</a></h3>
<@hst.html hippohtml=faq.answer/>
</div>
</#list>
<#if document.FAQ??>
<div class="has-edit-button">
<@hst.cmseditlink hippobean=document/>
<h1>${document.title?html}</h1>
<div>
<@hst.html hippohtml=document.description/>
</div>
<#list document.faqItems as faq>
<div>
<h3><a href="<@hst.link hippobean=faq />">${faq.question?html}</a></h3>
<@hst.html hippohtml=faq.answer/>
</div>
<#else>
<div class="alert alert-danger">The selected document should be of type FAQ list.</div>
</#if>
</#list>
</div>
<#else>
<div class="alert alert-danger">The selected document should be of type FAQ list.</div>
</#if>
<#elseif editMode>
<div>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/faq.png" />"> Click to edit FAQ
</div>
</#if>
\ No newline at end of file
......@@ -21,7 +21,9 @@
</c:choose>
</div>
</c:if>
<%--@elvariable id="editMode" type="java.lang.Boolean"--%>
<%--@elvariable id="editMode" type="java.lang.Boolean"--%>
<c:if test="${requestScope.editMode && (requestScope.document eq null)}">
<img src="<hst:link path='/images/essentials/catalog-component-icons/faq.png'/>"> Click to edit FAQ
<div>
<img src="<hst:link path='/images/essentials/catalog-component-icons/faq.png'/>"> Click to edit FAQ
</div>
</c:if>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment