]> git.parisson.com Git - teleforma.git/commitdiff
Change menu (set profile and logout link outside user menu)
authorYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 6 Feb 2020 17:19:06 +0000 (18:19 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 6 Feb 2020 17:19:06 +0000 (18:19 +0100)
teleforma/templates/telemeta/base.html

index 80487b4c3f1761b3c09d349cd59b9e8d746f915b..003543452f4d0556d7e62158169a70fe02f1bd58 100644 (file)
@@ -150,6 +150,7 @@ alt="logo" />
    <li><a href="{% url teleforma-help %}" class="blue">{% trans "Help" %}</a></li>
  {% endif %}
 
+ {% if user.is_staff or user.is_superuser %}
  <li style="a.active{background-image:/static/telemeta/images/user_tr_bk.png; background-repeat: no-repeat; background-position: 1ex .5ex;}">
     <a href="#accounts#" class="blue">{% if user.first_name and user.last_name %}{{ user.first_name }} {{ user.last_name }}{% else %}{{ user.username }}{% endif %}</a>
     <ul>
@@ -161,6 +162,10 @@ alt="logo" />
     <li><a href="{% url telemeta-logout %}">{% trans "Sign out" %}</a></li>
     </ul>
  </li>
+ {% else %}
+ <li><a href="{% url telemeta-profile-detail user.username %}" class="darkblue">{% trans "Profile" %}</a></li>
+ <li><a href="{% url telemeta-logout %}" class="black">{% trans "Sign out" %}</a></li>
+ {% endif %}
 
  {% endif %}
 {% endif %}