Pi2-FGABreja/FGABrejaWeb

View on GitHub
FGABreja/defaults/templates/topbar.html

Summary

Maintainability
Test Coverage
{% load i18n %}

{% if user.is_authenticated %}
  <ul id="profile_dropdown" class="dropdown-content">
    <li><a href="{% url 'user_profile' %}">{% trans 'Profile' %}</a></li>
    <li><a href="{% url 'logout' %}">{% trans 'Logout' %}</a></li>
  </ul>
{% endif %}

<nav>
  <div class="nav-wrapper">
  {% load staticfiles %}
    <a href="/" class="fgabreja-topbar center">FGA Breja</a>
    <a href="#" data-activates="mobile-demo" class="button-collapse" id="menu-topbar">
      <i class="material-icons">menu</i>
    </a>

    <ul id="nav-mobile" class="left hide-on-med-and-down">
      {% if user.is_authenticated %}
        <li><a href="{% url 'new_process' %}"><i class="material-icons left">add_circle</i>{% trans "New Process" %}</a></li>
      {% endif %}
    </ul>

    <ul id="nav-mobile" class="right hide-on-med-and-down">
      {% if user.is_authenticated %}
        <li><a class="dropdown-button" href="#!" data-activates="profile_dropdown">{% trans "Hi, " %}{{user.username}}<i class="material-icons right">arrow_drop_down</i></a></li>
      {% else %}
        <li><a href="{% url 'login' %}">{% trans 'Sign In' %}</a></li>
        <li><a class="active" href="{% url 'register_user' %}">{% trans 'Sign Up' %}</a></li>
      {% endif %}
    </ul>
    <ul class="side-nav" id="mobile-demo">
      {% if user.is_authenticated %}
        <li><a href="{% url 'logout' %}">{% trans 'Logout' %}</a></li>
        <li><a href="{% url 'user_profile' %}">{% trans 'Profile' %}</a></li>
      {% endif %}
    </ul>
  </div>
</nav>