<%def name="row(tile, selection)">

## ${selection.page.title} ## ##%if tile.selected and tile.selected != 'HEAD': ## - ${tile.selected} ##%endif ##


%if tile.selected is None:
${_("There is a tie between variants, thus none is included at the moment.")}
%else: %if tile.selected_text.is_head:
${_("Status quo has the most votes, resulting in no proposed change to this norm.")}
%else:
${_("Selected variant: %s") % ("%s" % (h.entity_url(tile.selected_text), tile.selected_text.variant_html))|n} %if can.variant.edit(selection.page, tile.selected): · ${_("edit")} %endif
%endif
${diff.norm_texts_history_compare(tile.selected_text, selection.page.head)|n} %endif
${self.variants(tile, selection)}
%if tile.show_new_variant_link: ${_("new variant")} %endif %if can.selection.delete(selection): ${_("remove from proposal")} %endif


%if tile.selected: ${_("discuss %s (%s comments) »") % (tile.selected_text.variant_html, len(selection.page.variant_comments(tile.selected_text.variant)))|n}
${tiles.comment.list(selection.page, variant=tile.selected_text.variant)}
%endif

<%def name="variants(tile, selection)">
    %for row in tile.variant_rows(): <% if not row.show: break %>
  1. ${row.text.variant_html|n} %if row.text.is_head: ${_("(this proposal should not change this norm)")} %elif row.selected and not row.text.is_head and not tile.frozen: · ${_("Currently selected for inclusion in this proposal")} %endif
    ${ungettext("%s comment", "%s comments", row.num_comments) % row.num_comments} · ${_("view")} %if row.can_edit: · ${_("edit")} %endif %if can.variant.delete(selection.page, row.text.variant): · ${_("purge variant")} %endif %if tile.selected_text and row.text.id != tile.selected_text.id: · ${_("compare")} %endif
    %if row.text.has_text: %if tile.selected_text: %if row.selected: ${diff.norm_texts_history_compare(row.text, selection.page.head)|n} %else: ${diff.norm_texts_history_compare(row.text, tile.selected_text)|n} %endif %else: ${row.text.render()|n} %endif %else:
    ${_("This variant has no text.")}
    %endif
  2. %endfor