Commit 740b40ba authored by Bert Leunis's avatar Bert Leunis

ESSENTIALS-1033 change markup of content plugin templates so the result is...

ESSENTIALS-1033 change markup of content plugin templates so the result is always a single dom element
parent 01bcca28
......@@ -3,30 +3,33 @@
<#-- @ftlvariable name="pageable" type="org.onehippo.cms7.essentials.components.paging.Pageable" -->
<#-- @ftlvariable name="item" type="{{beansPackage}}.ContentDocument" -->
<#if pageable?? && pageable.items?has_content>
<div>
<#list pageable.items as item>
<div class="media has-edit-button">
<@hst.cmseditlink hippobean=item/>
<div class="media-body">
<h4 class="media-heading">
<@hst.link var="link" hippobean=item/>
<a href="${link}">${item.title?html}</a>
<#if item.publicationDate?? && item.publicationDate.time??>
<span class="label label-success pull-right">
<@fmt.formatDate value=item.publicationDate.time
type="both" dateStyle="medium" timeStyle="short"/>
</span>
</#if>
</h4>
<#if item.introduction??>
<p>${item.introduction?html}</p>
</#if>
</div>
<div class="media has-edit-button">
<@hst.cmseditlink hippobean=item/>
<div class="media-body">
<h4 class="media-heading">
<@hst.link var="link" hippobean=item/>
<a href="${link}">${item.title?html}</a>
<#if item.publicationDate?? && item.publicationDate.time??>
<span class="label label-success pull-right">
<@fmt.formatDate value=item.publicationDate.time type="both" dateStyle="medium" timeStyle="short"/>
</span>
</#if>
</h4>
<#if item.introduction??>
<p>${item.introduction?html}</p>
</#if>
</div>
</div>
</#list>
<#if cparam.showPagination>
<#include "../../include/pagination.ftl">
<#include "../../include/pagination.ftl">
</#if>
</div>
<#-- @ftlvariable name="editMode" type="java.lang.Boolean"-->
<#elseif editMode>
<img src="<@hst.link path='/images/essentials/catalog-component-icons/generic-list.png'/>"> Click to edit list
<div>
<img src="<@hst.link path='/images/essentials/catalog-component-icons/generic-list.png'/>"> Click to edit Content list
</div>
</#if>
......@@ -3,25 +3,29 @@
<#-- @ftlvariable name="pageable" type="org.onehippo.cms7.essentials.components.paging.Pageable" -->
<#-- @ftlvariable name="item" type="{{beansPackage}}.ContentDocument" -->
<#if pageable?? && pageable.items?has_content>
<div>
<#list pageable.items as item>
<article class="has-edit-button">
<@hst.cmseditlink hippobean=item/>
<@hst.link var="link" hippobean=item/>
<h3><a href="${link}">${item.title?html}</a></h3>
<#if item.publicationDate??>
<p>
<@fmt.formatDate value=item.publicationDate.time type="both" dateStyle="medium" timeStyle="short"/>
</p>
</#if>
<#if item.introduction??>
<p>${item.introduction?html}</p>
</#if>
</article>
<article class="has-edit-button">
<@hst.cmseditlink hippobean=item/>
<@hst.link var="link" hippobean=item/>
<h3><a href="${link}">${item.title?html}</a></h3>
<#if item.publicationDate??>
<p>
<@fmt.formatDate value=item.publicationDate.time type="both" dateStyle="medium" timeStyle="short"/>
</p>
</#if>
<#if item.introduction??>
<p>${item.introduction?html}</p>
</#if>
</article>
</#list>
<#if cparam.showPagination>
<#include "../include/pagination.ftl">
<#include "../include/pagination.ftl">
</#if>
</div>
<#-- @ftlvariable name="editMode" type="java.lang.Boolean"-->
<#elseif editMode>
<img src="<@hst.link path='/images/essentials/catalog-component-icons/generic-list.png'/>"> Click to edit list
<div>
<img src="<@hst.link path='/images/essentials/catalog-component-icons/generic-list.png'/>"> Click to edit Content list
</div>
</#if>
......@@ -2,19 +2,21 @@
<#-- @ftlvariable name="document" type="{{beansPackage}}.ContentDocument" -->
<#if document??>
<article class="has-edit-button">
<@hst.cmseditlink hippobean=document/>
<h3>${document.title?html}
<#if document.publicationDate??>
<small><@fmt.formatDate value=document.publicationDate.time type="date" dateStyle="medium"/></small>
</#if>
</h3>
<#if document.introduction??>
<p class="lead">${document.introduction?html}</p>
</#if>
<@hst.html hippohtml=document.content/>
</article>
<article class="has-edit-button">
<@hst.cmseditlink hippobean=document/>
<h3>${document.title?html}
<#if document.publicationDate??>
<small><@fmt.formatDate value=document.publicationDate.time type="date" dateStyle="medium"/></small>
</#if>
</h3>
<#if document.introduction??>
<p class="lead">${document.introduction?html}</p>
</#if>
<@hst.html hippohtml=document.content/>
</article>
<#-- @ftlvariable name="editMode" type="java.lang.Boolean"-->
<#elseif editMode>
<div>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/simple-content.png" />"> Click to edit Simple Content
</div>
</#if>
\ No newline at end of file
......@@ -19,5 +19,7 @@
</article>
<#-- @ftlvariable name="editMode" type="java.lang.Boolean"-->
<#elseif editMode>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/simple-content.png" />"> Click to edit Simple Content
<div>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/simple-content.png" />"> Click to edit Simple Content
</div>
</#if>
\ No newline at end of file
......@@ -3,19 +3,21 @@
<%--@elvariable id="item" type="{{beansPackage}}.ContentDocument"--%>
<%--@elvariable id="pageable" type="org.onehippo.cms7.essentials.components.paging.Pageable"--%>
<c:forEach var="item" items="${requestScope.pageable.items}" varStatus="status">
<hst:link var="link" hippobean="${item}"/>
<article class="has-edit-button">
<hst:cmseditlink hippobean="${item}"/>
<h3><a href="${link}"><c:out value="${item.title}"/></a></h3>
<c:if test="${hst:isReadable(item, 'publicationDate.time')}">
<p>
<fmt:formatDate value="${item.publicationDate.time}" type="both" dateStyle="medium" timeStyle="short"/>
</p>
</c:if>
<p><c:out value="${item.introduction}"/></p>
</article>
</c:forEach>
<c:if test="${requestScope.cparam.showPagination}">
<%@ include file="/WEB-INF/jsp/include/pagination.jsp" %>
</c:if>
<div>
<c:forEach var="item" items="${requestScope.pageable.items}" varStatus="status">
<hst:link var="link" hippobean="${item}"/>
<article class="has-edit-button">
<hst:cmseditlink hippobean="${item}"/>
<h3><a href="${link}"><c:out value="${item.title}"/></a></h3>
<c:if test="${hst:isReadable(item, 'publicationDate.time')}">
<p>
<fmt:formatDate value="${item.publicationDate.time}" type="both" dateStyle="medium" timeStyle="short"/>
</p>
</c:if>
<p><c:out value="${item.introduction}"/></p>
</article>
</c:forEach>
<c:if test="${requestScope.cparam.showPagination}">
<%@ include file="/WEB-INF/jsp/include/pagination.jsp" %>
</c:if>
</div>
\ No newline at end of file
......@@ -20,5 +20,7 @@
</c:if>
<%--@elvariable id="editMode" type="java.lang.Boolean"--%>
<c:if test="${requestScope.editMode && empty requestScope.document}">
<img src="<hst:link path='/images/essentials/catalog-component-icons/simple-content.png'/>"> Click to edit Simple Content
<div>
<img src="<hst:link path='/images/essentials/catalog-component-icons/simple-content.png'/>"> Click to edit Simple Content
</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