{# -*- coding: utf-8 -*- #} {% extends "form.html" %} {% load exfiltry %} {% load exsyntax %} {% block list_content_title %} {% if parent_pk > 0 %}

{{title|wiki_href|safe}} {% if parent_obj %} {% if parent_obj.title %} - {{parent_obj.title}} {% else %} - {{parent_obj}} {% endif %} {% endif %}

{% else %}

{{title|wiki_href|safe}}

{% endif %} {% endblock %} {% block list_content_actions %} {% with gtree=get|get_or_tree %} {% if standard_web_browser %} {% if parent_pk > 0 and base_filter != parent_pk|to_str %} {% if base_filter %} {% action "home-refresh_frame" "/" url=table_path_and_base_filter|append_str:base_filter|append_str:'/form/{{gtree}}/' %} {% else %} {% action "home-refresh_frame" "/" url=table_path_and_base_filter|append_str:'0/form/{{gtree}}/' %} {% endif %} {% else %} {% action "home-refresh_frame" "/" url=table_path_and_base_filter|append_str:'0/form/tree/' tag_class="+disabled" %} {% endif %} {% else %} {% if parent_pk > 0 and base_filter != parent_pk|to_str %} {% else %} {% endif %} / {% endif %} {% for pos in parent_obj|get_all_model_parents reversed %} {% if not forloop.last %} {% action "back-refresh_frame" pos.code url=table_path_and_base_filter|append_str:'{{pos.id}}/form/{{gtree}}/' %} {% endif %} {% endfor %} {% block list_content_actions_new_row %} {% if not readonly %} {% if parent_pk > 0 %} {% new_row "New element" url=table_path|append_str:'%d/this/-/add/'|format:parent_obj.id %} {% else %} {% new_row "New element" url=table_path|append_str:'0/this/-/add/' %} {% endif %} {% endif %} {% endblock %} {% endwith %} {% endblock %} {% block list_row_header_start %} {% if not no_id %} {% if standard_web_browser %} {% with gtree=get|get_or_tree %} {% if parent_pk > 0 and base_filter != parent_pk|to_str %} {% action "back-refresh_frame" ".." url=table_path_and_base_filter|append_str:'-{{parent_pk}}/form/{{ro}}{{gtree}}/' %} {% else %} {% action "back-refresh_frame" ".." url=table_path_and_base_filter|append_str:'-{{parent_pk}}/form/{{ro}}{{gtree}}/' tag_class="+disabled" attrs="+disabled='disabled'" %} {% endif %} {% endwith %} {% id_num 'Id' %} {% endif %} {% endif %} {% endblock %} {% block id_extra %} {% with gtree=get|get_or_tree %} {% if object|model_has_children %} {% else %} {% if get %} {% else %} {% endif %} {% endif %} {{ block.super }} {% endwith %} {% endblock %} {% block tabsort_class %} {% if table_type == 'datatable' %} class="tabsort table datatable table-hover table-striped table-condensed {%if get %}table_get{% endif %}" data-url="{{table_path_and_filter}}json/{% if get %}{{get}}/{% else %}tree/{% endif %}" data-side-pagination="server" data-pagination="true" data-page-size="64" data-page-list="[64]" data-search="true" data-sortable="true" data-toolbar="#{{uuid}}_toolbar" data-locale="pl-PL" data-show-columns="true" data-icons-prefix="fa" data-id-field="cid" data-icons="icons" {% else %} class="tabsort table table-hover table-striped {%if get %}table_get{% endif %}" {% endif %} {% endblock %}