{% extends 'creme_core/bricks/base/paginated-list.html' %} {% load i18n creme_widgets creme_bricks %} {% load has_perm_to url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} creme_config-customforms-brick{% endblock %} {% block brick_script %} {% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Configured type of resource') plural=_('{count} Configured types of resource') icon='config' %} {% endblock %} {% block brick_content %} {% has_perm_to admin 'creme_core' as admin_perm %}{% url 'creme_config__delete_custom_form' as delete_url %}{% url 'creme_config__reset_custom_form' as reset_url %} {% for ctw in page.object_list %} {% with ctype=ctw.ctype %}
{% translate 'Drag and drop the groups to order them.' %}
{% for descriptor in ctw.descriptors %}
{% if layout == LAYOUT_REGULAR %}
{% brick_action id='update' url=layout_url __layout='dual_second' icon='next' label=_('Display this group on the second half only') enabled=admin_perm %}
{% elif layout == LAYOUT_DUAL_SECOND %}
{% brick_action id='update' url=layout_url __layout='regular' icon='previous' label=_('Display this group on the whole width') enabled=admin_perm %}
{% endif %}
{{group.name}}
{% if not group.extra_group_id %}{% url 'creme_config__edit_custom_form_group' item.id form_group_id as edit_url %}
{% brick_action id='edit' url=edit_url label=_('Edit this group') enabled=admin_perm %}
{% endif %}
{% brick_action id='delete' url='creme_config__delete_custom_form_group'|url:item.id __group_id=form_group_id label=_('Delete this group') enabled=admin_perm %}
{% if layout == LAYOUT_REGULAR %}
{% brick_action id='update' url=layout_url __layout='dual_first' icon='previous' label=_('Display this group on the first half only') enabled=admin_perm %}
{% elif layout == LAYOUT_DUAL_FIRST %}
{% brick_action id='update' url=layout_url __layout='regular' icon='next' label=_('Display this group on the whole width') enabled=admin_perm %}
{% endif %}
|