kotti/templates/edit/contents.pt
<!DOCTYPE html>
<html metal:use-macro="api.macro('kotti:templates/view/master.pt')"
i18n:domain="Kotti">
<div metal:fill-slot="content" class="document-view content">
<h1>${context.title}</h1>
<p class="description">
${context.description}
</p>
<div class="body">
<div id="contents-path"
tal:define="items python: reversed(api.lineage)">
<tal:repeat tal:repeat="item items">
<a tal:define="first repeat.item.start; last repeat.item.end;"
class="btn btn-default btn-small" name="${item.name}"
href="${request.resource_url(item, '@@contents')}">
<i tal:condition="first" class="glyphicon glyphicon-home"></i>
<i tal:condition="not: first or last" class="glyphicon glyphicon-folder-close"></i>
<i tal:condition="last and not first" class="glyphicon glyphicon-folder-open"></i>
${item.title}
</a>
</tal:repeat>
</div>
<form id="form-contents" method="post"
action="${request.resource_url(context, '@@contents')}">
<tal:no-content tal:condition="not:children">
<span class="text-info" i18n:translate="">No content items are contained here.</span>
</tal:no-content>
<table id="contents-table"
class="table table-condensed table-striped table-hover"
tal:condition="children">
<thead>
<tr>
<th><input type="checkbox" id="toggle-all" title="Select / deselect all" i18n:attributes="title" /></th>
<th i18n:translate="">Title</th>
<th i18n:translate="">Type</th>
<th i18n:translate="">State</th>
<th i18n:translate="">Visibility</th>
<th i18n:translate="">Creation Date</th>
<th i18n:translate="">Modification Date</th>
</tr>
</thead>
<tbody>
<tr tal:repeat="child children" id="${child.position}">
<td>
<input name="children" type="checkbox" value="${child.id}" title="Select item" i18n:attributes="title" />
</td>
<td>
<a href="${request.resource_url(child, '@@contents')}">
${child.title}
</a>
<br tal:condition="child.type_info.name == 'Image'" />
<img src="${request.resource_url(child, 'image', 'span1')}"
class="thumb" title="${child.title}"
data-content="<img src='${request.resource_url(child, 'image', 'span4')}' />"
tal:condition="child.type_info.name == 'Image'" />
</td>
<td>
${child.type_info.title}
</td>
<td>
<ul style="list-style-type: none; padding: 0; margin: 0;">
<div tal:replace="api.render_view('workflow-dropdown', context=child)"></div>
</ul>
</td>
<td>
<tal:visibility tal:switch="child.in_navigation">
<tal:visible tal:case="True">
<i class="glyphicon glyphicon-eye-open"></i>
<span i18n:translate="">Visible</span>
</tal:visible>
<tal:hidden tal:case="False">
<i class="glyphicon glyphicon-eye-close"></i>
<span i18n:translate="">Hidden</span>
</tal:hidden>
</tal:visibility>
</td>
<td tal:content="api.format_datetime(child.creation_date) | None"></td>
<td tal:content="api.format_datetime(child.modification_date) | None"></td>
</tr>
</tbody>
</table>
<tal:button tal:repeat="button buttons">
<button name="${button.name}" type="submit" class="${button.css_class}"
tal:condition="children or button.no_children">
${button.title}
</button>
</tal:button>
</form>
</div>
</div>
</html>