base.html 2.16 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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
    {% if user.is_superuser %}
    <li>
      <a href="/admin/"><i class="fa fa-cogs"></i> {% trans "Admin" %}</a>
    </li>
    <li>
      <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">
50
      <a href="{% url "dashboard.views.notifications" %}"
51 52
        class="dropdown-toggle" data-toggle="dropdown"
        id="notification_count" data-notifications="{{ NEW_NOTIFICATIONS_COUNT }}">
53 54
        {% trans "Notifications" %}
        {% if NEW_NOTIFICATIONS_COUNT > 0 %}
55 56 57
          <span class="badge badge-pulse">
            {{ NEW_NOTIFICATIONS_COUNT }}
          </span>
58 59
        {% endif %}
      </a>
60
      <ul class="dropdown-menu" id="notification-messages">
61 62 63 64
          <li>{% trans "Loading..." %}</li>
      </ul>
    </li>
  </ul>
65 66

{% else %}
67
  <a class="navbar-brand pull-right" href="{% url "login" %}?next={{ request.path }}"><i class="fa fa-sign-in"></i> {% trans "Log in " %}</a>
68 69 70
{% endif %}

{% endblock %}