byceps/byceps

View on GitHub
byceps/blueprints/admin/dashboard/templates/admin/dashboard/view_global.html

Summary

Maintainability
Test Coverage
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin/dashboard.html' import render_bigstats_cell, render_cell %}
{% from 'macros/misc.html' import render_notification_block %}
{% set current_page = 'admin_dashboard_global' %}
{% set page_title = _('Dashboard') %}

{% block head %}
    <link rel="stylesheet" href="{{ url_for('static', filename='style/admin_dashboard.css') }}">
{%- endblock %}

{% block body %}

  {%- if not demo_data_exists %}
{%- call render_notification_block(category='info', icon='info') -%}
  <p>{{ _('This looks like a brand-new installation of BYCEPS. Do you want to <a href="%(url)s">create demonstration data</a>?', url=url_for('demo_data_admin.index')) }}</p>
{%- endcall %}
  {%- endif %}

{% include 'admin/dashboard/_active_brands.html' %}

  {%- with show_brand_avatar = True %}
{% include 'admin/dashboard/_active_parties.html' %}
{% include 'admin/dashboard/_active_shops.html' %}
  {%- endwith %}


  <div class="row row--space-between row--wrap">
    <div style="flex: 1;">

      <h2>{{ _('Users') }}</h2>
      <div class="grid">
        {{ render_bigstats_cell(recent_users_count, ngettext('new user in the last 7 days', 'new users in the last 7 days', recent_users_count), href=url_for('user_admin.index'), icon_name='users', color='#008800') }}
        {%- call render_cell('users', 'cell--higher') %}
{% include 'admin/dashboard/_recent_users.html' %}
        {%- endcall %}
        {{ render_bigstats_cell(uninitialized_user_count, ngettext('uninitialized user', 'uninitialized users', uninitialized_user_count), href=url_for('user_admin.index', only='uninitialized'), icon_name='users', color='#1199ff') }}
      </div>

    </div>
    <div style="flex: 1;">

      <h2>{{ _('Upcoming Birthdays') }}</h2>
      <div class="grid">
        {%- call render_cell('birthday', 'cell--wider') %}
{% include 'admin/dashboard/_birthdays.html' %}
        {%- endcall %}
      </div>

    </div>
  </div>

{%- endblock %}