{# Order -- A base template used to render a generic order page. The template assumes the following variables exist in the context: - documents (the documents to order, in order) - document_ids (an ordered list of Ids for the documents to order) By default the information displayed for a document based on the conversion of the document to a string, but this can be modified by defining a `orderable` macro in the extended template. -------------------------------------------------------------------------------- {%- extends "/list.html" -%} {% macro orderable(item) -%}
...
{%- endmacro %} -------------------------------------------------------------------------------- #} {%- extends "manage/base.html" -%} {%- import "manhattan/manage/components/boxes.html" as _boxes -%} {%- import "manhattan/manage/components/form.html" as _form -%} {% macro orderable(item) -%}
{{ item }}
{%- endmacro %} {%- block main -%} {%- call _boxes.box() -%}
{# If the HTTP method is CSRF protected then add the current CSRF token as a hidden field to the form. #} {%- if csrf_token -%} {%- endif -%}
{%- for document in get_context()[manage_config.var_name_plural] -%} {{- orderable(document) -}} {% endfor %}
{% call _form.buttons() %} {{ _form.button('Apply') }} {% endcall %}
{%- endcall -%} {%- endblock -%}