{% extends 'creme_core/detailview.html' %} {% load i18n creme_bricks creme_perms creme_widgets %} {% block page_title %}«{{object}}» - {% endblock %} {% block body_classes %}{% if not object.enabled %}is_deleted{% endif %}{% endblock %} {% block global_buttons %}
  • {% translate 'Go to the configuration of types' as list_label %} {% widget_icon name='listview' size='global-button' label=list_label %} {{list_label}}
  • {% widget_icon name='add' size='global-button' label=_('Create') %} {{object.creation_label}}
  • {% endblock %} {% block view_title %} {% brick_declare bricks.hat %} {% brick_declare bricks.main %} {% brick_display bricks.hat %} {% endblock %} {% block instance_buttons_container %}{% endblock %} {% block main_content %} {% brick_display bricks.main %} {% brick_end %} {% endblock %} {% comment %} {% extends 'creme_core/detailview.html' %} {% load i18n creme_bricks creme_perms creme_widgets %} {% block page_title %}«{{object}}» - {% endblock %} {% block body_classes %}{% if not object.enabled %}is_deleted{% endif %}{% endblock %} {% block global_buttons %}
  • {% translate 'Go to the configuration of types' as list_label %} {% widget_icon name='listview' size='global-button' label=list_label %} {{list_label}}
  • {% if user|has_perm_to_admin:'creme_config' %}{# TODO: creme_core ?! #} {% else %} {% endif %} {% widget_icon name='add' size='global-button' label=_('Create') %} {{object.creation_label}}
  • {% endblock %} {% block logo %}{% widget_icon name='property' size='brick-hat-bar' label=_('Property type') %}{% endblock %} {% block title %} {% translate 'Property type' %} : {{object|capfirst}} {% if not object.enabled %}[{% translate 'Disabled' context 'creme_core-property_type' %}]{% endif %} {% endblock %} {# BEWARE : NOT IN A BRICK. Actions that needs a brick reload will not work (page redirections are fine) #} {% block title_buttons %} {% if object.is_custom %} {% with admin_perm=user|has_perm_to_admin:'creme_core' %} {% if object.enabled %}
    {% if admin_perm %} {% widget_icon name='edit' size='brick-hat-bar-button' label=_('Edit') %} {% else %} {% widget_icon name='edit' size='brick-hat-bar-button' label=_('Edit') %} {% endif %}
    {% endif %}
    {# TODO: disable button if related entities + tooltip. Share stats with PropertyTypeInfoBrick #} {% brick_bar_button action='creme_core-hatmenubar-update-redirect' label=_('Delete') url=object.get_delete_absolute_url icon='delete' confirm=_('Do you really want to delete this property type?') enabled=admin_perm __redirect=object.get_lv_absolute_url %}
    {% endwith %} {% endif %} {% endblock %} {% block main_content %} {% brick_declare bricks %} {% brick_display bricks %} {% brick_end %} {% endblock %} {% endcomment %}