base.html 2.34 KB
Newer Older
1
{% extends "base.html" %}
2
{% load staticfiles %}
3
{% load i18n %}
4

5
{% block title-site %}Dashboard | CIRCLE{% endblock %}
6 7 8


{% block extra_link %}
9
  {% block extra_link_2 %}{% endblock %}
10 11 12 13 14
{% endblock %}


{% block navbar-brand %}
  <a class="navbar-brand" href="{% url "dashboard.index" %}" style="padding: 10px 15px;">
15
    {% include "branding.html" %}
16 17 18 19
  </a>
{% endblock %}

{% block navbar %}
20
{% if user.is_authenticated and user.pk and not request.token_user %}
21
  <ul class="nav navbar-nav navbar-right" id="dashboard-menu">
22
    {% if user.is_superuser %}
23
    {% if ADMIN_ENABLED %}
24 25 26
    <li>
      <a href="/admin/"><i class="fa fa-cogs"></i> {% trans "Admin" %}</a>
    </li>
27
    {% endif %}
28
    <li>
29 30 31 32 33
      <a href="{% url "dashboard.views.storage" %}"><i class="fa fa-database"></i>
        {% trans "Storage" %}
      </a>
    </li>
    <li>
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
      <a href="/network/"><i class="fa fa-globe"></i> {% trans "Network" %}</a>
    </li>
    {% endif %}
    <li>
      <a href="{% url "dashboard.views.profile-preferences" %}">
        <i class="fa fa-user"></i>
        {% include "dashboard/_display-name.html" with user=user show_org=True %}
      </a>
    </li>
    <li>
      <a href="{% url "logout" %}?next={% url "login" %}">
        <i class="fa fa-sign-out"></i> {% trans "Log out" %}
      </a>
    </li>
    <li class="visible-xs">
      <a href="{% url "dashboard.views.notifications" %}">
        {% trans "Notifications" %}
        {% if NEW_NOTIFICATIONS_COUNT > 0 %}
          <span class="badge badge-pulse">{{ NEW_NOTIFICATIONS_COUNT }}</span>
        {% endif %}
      </a>
    </li>
    <li class="dropdown hidden-xs" id="notification-button">
57
      <a href="{% url "dashboard.views.notifications" %}"
58 59
        class="dropdown-toggle" data-toggle="dropdown"
        id="notification_count" data-notifications="{{ NEW_NOTIFICATIONS_COUNT }}">
60 61
        {% trans "Notifications" %}
        {% if NEW_NOTIFICATIONS_COUNT > 0 %}
62 63 64
          <span class="badge badge-pulse">
            {{ NEW_NOTIFICATIONS_COUNT }}
          </span>
65 66
        {% endif %}
      </a>
67
      <ul class="dropdown-menu" id="notification-messages">
68 69 70 71
          <li>{% trans "Loading..." %}</li>
      </ul>
    </li>
  </ul>
72 73

{% else %}
74
  <a class="navbar-brand pull-right" href="{% url "login" %}?next={{ request.path }}"><i class="fa fa-sign-in"></i> {% trans "Log in " %}</a>
75 76 77
{% endif %}

{% endblock %}