<%namespace name="components" file="/components.html"/> <%def name="smallrow(tile, page)">
${h.page.link(page)|n}
<%! from adhocracy.lib import sorting %> <%def name="row(tile, page, level=0)">
  • %if c.is_hierarchical and level == 0 and len(page.subpages) > 0 and not page.is_sectionpage(): %endif

    ${page.title}

    %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(): %endif
  • <%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: %else: %endif <%def name="inline(tile, page, text, subpages_pager=None, hide_discussion=False)"> ## FIXME: better text, translate ${tiles.text.minimal(text, missing_translation=_('No text.'))} <%def name="header(tile, page, active, text, variant)">
    %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)}

    %if text.variant != text.HEAD: %if c.variant: ${_("Variant %s of %s") % (text.variant_html, text.title)|n} %else: ${_("Variant of %s") % (text.title,)} %endif %else: ${text.title} %endif