{% extends 'creme_core/bricks/base/base.html' %} {% load i18n creme_bricks creme_ctype creme_perms creme_widgets %} {% load get_cloning_info get_deletion_info has_max_pins is_pinned url from creme_core_tags %} {% block brick_extra_class %}brick-hat brick-hat-card{% endblock %} {% block brick_header %}{% endblock %} {% block brick_content %}
{% block card_icon %}
{% widget_icon instance=object size='brick-hat-card' %}
{% endblock %}
{% block card_intro %}
{% block card_intro_name %}{{object.entity_type}}{% endblock %}
{% block card_intro_content %}{# OVERRIDE !! --------------------------------- #} Last action {# {% widget_icon instance=last_activity size='brick-hat-card-intro' %} #} Foobar 31-12-2000 at 12:36 by Fulbert C. {% endblock %}{# OVERRIDE !! [end] -------------------------------- #}
{% endblock %} {% block card_main %}
{% block card_title %}{{object}}{% endblock %} {% block card_title_indicators %}{% include 'creme_core/bricks/frags/hat-card-title-indicators.html' %}{% endblock %}
{% block card_indicators %}{# OVERRIDE !! --------------------------------- #}
I am very important
{% endblock %}{# OVERRIDE !! [end] -------------------------------- #}
{% endblock %} {% block card_secondary %}{# OVERRIDE !! --------------------------------- #} {% endblock %}{# OVERRIDE !! [end] -------------------------------- #}
{% block card_fields_title %}{% translate 'Fields' %}{% endblock %} {% block card_fields %}{# OVERRIDE !! --------------------------------- #}
Field #1 Blablabla
Field #2
{% endblock %}{# OVERRIDE !! [end] -------------------------------- #}
{% block card_summary_title %}{% translate 'Strategic summary' %}{% endblock %} {% block card_summary %}{# OVERRIDE !! --------------------------------- #}
Next action {# {% widget_icon instance=next_activity size='brick-hat-card-summary' %} #} Meeting 01-01-2040 at 13:25
{% endblock %}{# OVERRIDE !! [end] -------------------------------- #}
{% block card_buttons %} {% block edit_button %} {% with edit_url=object.get_edit_absolute_url %} {% if edit_url and not object.is_deleted %}
{% brick_card_button action='redirect' icon='edit' label=_('Edit') url=edit_url enabled=user|has_perm_to_change:object comeback=True %}
{% endif %} {% endwith %} {% endblock %} {% block pin_button %}
{% if object|is_pinned:user %} {% brick_card_button action='update' icon='pin' url='creme_core__unpin_entity'|url:object.id label=_('Unpin') %} {% else %} {% if user|has_max_pins %} {% brick_card_button action='update' icon='pin' url='' label=_('Pin') help_text=_('You already have the maximum of pinned entities') enabled=False %} {% else %} {% brick_card_button action='update' icon='pin' url='creme_core__pin_entity'|url:object.id label=_('Pin') help_text=_('Pin this entity to put it in the menu entry «Quick access»') %} {% endif %} {% endif %}
{% endblock %} {% block clone_button %} {% get_cloning_info entity=object user=user as cloning %} {% if cloning.enabled %}
{% if cloning.error %} {% blocktranslate asvar clone_button_help with error=cloning.error %}Cloning is forbidden ({{error}}){% endblocktranslate %} {% brick_card_button action='' label=_('Clone') help_text=clone_button_help url='#' icon='clone' enabled=False %} {% else %} {% brick_card_button action='creme_core-detailview-clone' label=_('Clone') url=cloning.url icon='clone' __id=object.id confirm=_('Do you really want to clone this entity?') enabled=True %} {% endif %}
{% endif %} {% endblock %} {% block merge_button %} {% if object.entity_type|ctype_can_be_merged and not object.is_deleted %}
{% brick_card_button action='creme_core-detailview-merge' label=_('Merge') url='creme_core__merge_entities'|url icon='merge' __id=object.id __selection_url='creme_core__select_entity_for_merge'|url enabled=user|has_perm_to_change:object %}
{% endif %} {% endblock %} {% block restore_button %} {% if object.is_deleted %}
{% brick_card_button action='creme_core-detailview-restore' label=_('Restore') url='creme_core__restore_entity'|url:object.id icon='restore' confirm=_('Do you really want to restore this entity?') enabled=user|has_perm_to_delete:object %}
{% endif %} {% endblock %} {% block delete_button %} {% get_deletion_info entity=object user=user as deletion %} {% if deletion.enabled %}
{% if deletion.error %} {% brick_card_button action='creme_core-detailview-delete' label=deletion.label help_text=deletion.error url='#' icon='delete' enabled=False %} {% else %} {% brick_card_button action='creme_core-detailview-delete' label=deletion.label url=deletion.url icon='delete' confirm=deletion.confirmation enabled=True %} {% endif %}
{% endif %} {% endblock %} {% endblock %}
{% block card_history %} {% include 'creme_core/bricks/frags/hat-card-history.html' %} {% endblock %}
{% endblock %} {% comment %} {% block brick_script %} {% endblock %} {% endcomment %}