{% extends 'admin.html' %} {% macro render_sort_item(item,num=0,edit_link=false) %}

{% if item.title %} {{item.title}} {% if item.block_id %} ({{item.block_id}}){% endif %} {% else %} Item{:{ kwargs.pop('num') }} {% endif %}

{% if edit_link %} Edit  Delete 
{% endif %} {% if item is callable %} {{ item() }} {% endif %}


{% if item is callable %} {{ item()|safe }} {% endif %}
{% if editable %}
{% set text = item() %}
{% endif %}
{% endmacro %} {% macro sortable(items,edit_link=false) %}
{% for item in items %} {{ render_sort_item(item,num=loop.index,edit_link=edit_link) }} {% endfor %}
{% endmacro %} {% block extra_head %} {{ super() }} {% endblock extra_head %} {% block content %} {% if list_items %} {{ sortable(list_items,edit_link=true) }} {% endif %} {% endblock content %} {% block footer_js %} {{ super() }} {% endblock footer_js %}