%namespace name="components" file="/components.html"/>
<%def name="smallrow(tile, page)">
%if c.is_hierarchical and level == 0 and len(page.subpages) > 0 and not page.is_sectionpage():
%endif
%if page.function == page.NORM:
<% selection_count = page.selection_count(recursive=page.sectionpage) %>
${ungettext("%s proposal", "%s proposals", selection_count) % selection_count}
·
%endif
<% comment_count = page.comment_count(recursive=page.sectionpage) %>
${ungettext("%s comment", "%s comments", comment_count) % comment_count}
·
<% latest_comment_time = page.find_latest_comment_time(recursive=page.sectionpage)%>
${_("latest %s") % h.datetime_tag(latest_comment_time)|n}
%if c.is_hierarchical and len(page.subpages) > 0 and not page.is_sectionpage():
%for page in sorting.delegateable_title(page.subpages):
${row(None, page, level=level + 1)}
%endfor
%endif
%def>
<%def name="select_page(tile, field_name, select, exclude, functions,
list_limit, initial_option=None, allow_empty=True, include_sectionpages=False)">
%if list_limit is not None and model.Page.count(instance=c.instance, exclude=exclude, functions=functions) > list_limit:
%if can.norm.create() and active == 'view':
${_("new norm")}
%endif
%if can.variant.edit(page, "") and page.has_variants and active == 'diff':
${_("branch new variant")}
%endif
%if variant==model.Text.HEAD and can.variant.edit(page, variant):
${_("edit")}
%elif can.variant.edit(page, variant):
${_("edit")}
%endif
%if can.variant.delete(page, variant) and active == 'diff' and c.variant:
${_("purge variant")}
%endif
%if can.page.delete(page) and active != 'diff':
${_("delete")}
%endif
${components.watch(page)}