{% extends 'admin/model/list.html' %} {% import 'bukuserver/lib.html' as buku with context %} {% block head %} {{ super() }} {{ buku.close_if_popup() }} {{ buku.brand_dbname() }} {% endblock %} {% block model_menu_bar_before_filters %} {{ super() }} {% if data %} {% set _random = url_for('.details_view', modal=True, id='random', url=return_url, **(request.args|flt)) %}
  • {{ _('Random') }}
  • {% endif %} {% endblock %} {% macro swap_rows_action(icon, row_id, step=None) %} {# based on admin/model/row_actions.delete_row() #}
    {% if csrf_token %} {% endif %} {% set _input = 'swap' + row_id|string %}
    {% endmacro %} {% block list_row_actions scoped %} {% for action in list_row_actions %} {{ action.render_ctx(get_pk_value(row), row) }} {% endfor %} {% if request.args|flt|length == 0 %} {# only shown when filters/ordering are disabled #}
    {% if row.id < 2 %}
    {% else %} {{ swap_rows_action('arrow-up', row.id, -1) }} {% endif %} {{ swap_rows_action('transfer', row.id) }} {% if row.id < count %} {{ swap_rows_action('arrow-down', row.id, +1) }} {% endif %}
    {% endif %} {% endblock %} {% block tail %} {{ buku.fix_translations('bookmarks') }} {{ super() }} {{ buku.page_size_custom() }} {{ buku.script('buku_filter.js') }} {{ buku.focus(None) }} {{ buku.link_saved() }} {% endblock %}