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

4
{% block title-site %}Dashboard | CIRCLE{% endblock %}
5 6 7 8 9 10 11 12 13 14



{% block navbar-brand %}
  <a class="navbar-brand" href="{% url "dashboard.index" %}" style="padding: 10px 15px;">
    <img src="{{ STATIC_URL}}dashboard/img/logo.png" style="height: 25px;"/>
  </a>
{% endblock %}

{% block navbar %}
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
{% if user.is_authenticated and user.pk and not request.token_user %}
  <ul class="nav navbar-nav pull-right">
    <li class="dropdown" id="notification-button">
      <a href="{% url "dashboard.views.notifications" %}" style="color: white; font-size: 12px;"
        class="dropdown-toggle" data-toggle="dropdown">
        {% trans "Notifications" %}
        {% if NEW_NOTIFICATIONS_COUNT > 0 %}
          <span class="badge badge-pulse">{{ NEW_NOTIFICATIONS_COUNT }}</span>
        {% endif %}
      </a>
      <ul class="dropdown-menu notification-messages">
          <li>{% trans "Loading..." %}</li>
      </ul>
    </li>
  </ul>
30 31

  <a class="navbar-brand pull-right" href="{% url "logout" %}?next={% url "login" %}" style="color: white; font-size: 10px;">
32
    <i class="fa fa-sign-out"></i> {% trans "Log out" %}
33 34
  </a>
  <a class="navbar-brand pull-right" href="{% url "dashboard.views.profile-preferences" %}" title="{% trans "User profile" %}" style="color: white; font-size: 10px;">
35
    <i class="fa fa-user"></i>
36 37 38 39
    {% include "dashboard/_display-name.html" with user=user show_org=True %}
  </a>

  {% if user.is_superuser %}
40 41
    <a class="navbar-brand pull-right" href="/network/" style="color: white; font-size: 10px;"><i class="fa fa-globe"></i> {% trans "Network" %}</a>
    <a class="navbar-brand pull-right" href="/admin/" style="color: white; font-size: 10px;"><i class="fa fa-cogs"></i> {% trans "Admin" %}</a>
42 43
  {% endif %}
{% else %}
44
  <a class="navbar-brand pull-right" href="{% url "login" %}?next={{ request.path }}" style="color: white; font-size: 10px;"><i class="fa fa-sign-in"></i> {% trans "Log in " %}</a>
45 46 47
{% endif %}

{% endblock %}