byceps/blueprints/admin/more/templates/admin/more/view_brand.html
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin/dashboard.html' import render_cell %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'more_admin_brand' %}
{% set current_page_brand = brand %}
{% set page_title = _('More') %}
{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='style/admin_dashboard.css') }}">
{%- endblock %}
{% block body %}
<div class="grid">
{%- with items = [
(_('Newsletter Subscriptions'), 'email', url_for('newsletter_admin.view_subscriptions', list_id=brand.id), 'newsletter.view_subscriptions'),
(_('Discussion Boards'), 'board', url_for('board_admin.board_index_for_brand', brand_id=brand.id), 'board_category.view'),
(_('Galleries'), 'gallery', url_for('gallery_admin.gallery_index_for_brand', brand_id=brand.id), 'gallery.administrate'),
(_('Most Frequent Attendees'), 'users', url_for('attendance_admin.view_for_brand', brand_id=brand.id), 'admin.access'),
(_('Brand Snippets'), 'snippet', url_for('snippet_admin.index_for_scope', scope_type='brand', scope_name=brand.id), 'snippet.view'),
(_('Required Consents'), 'consent', url_for('consent_admin.requirement_index', brand_id=brand.id), 'consent.administrate'),
] %}
{%- for label, icon, url, required_permission in items|sort(attribute='0') %}
{%- if has_current_user_permission(required_permission) %}
{%- call render_cell(icon_name=icon, href=url) %}
{{ render_icon(icon) }} <span>{{ label }}</span>
{%- endcall %}
{%- endif %}
{%- endfor %}
{%- endwith %}
</div>
{%- endblock %}