{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks %} {% load print_field url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} activities-related-calendars-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('Present in {count} of my calendars') plural=_('Present in {count} of my calendars') empty=_('My calendars') icon='calendar' %} {% endblock %} {% block brick_header_actions %} {# TODO: solve the problem of multi-calendar (which calendar changes ?) #} {% if page.paginator.count == 1 %} {% brick_header_action id='edit' url='activities__link_calendar'|url:object.id label=_('Change calendar') %} {% endif %} {% endblock %} {% block brick_table_columns %} {% brick_table_column_for_field ctype=objects_ctype field='name' status='primary nowrap' %} {% brick_table_column_for_field ctype=objects_ctype field='is_default' status='action' %} {% brick_table_column_for_field ctype=objects_ctype field='is_public' status='action' %} {% endblock %} {% block brick_table_rows %} {% for calendar in page.object_list %}
{{calendar.name}} {% print_field object=calendar field='is_default' %} {% print_field object=calendar field='is_public' %} {% endfor %} {% endblock %} {% block brick_table_empty %} {% translate "The activity is not present in any of your calendars, you don't participate to it" %} {% endblock %}