Coverage for templates/_account_bar.html: 88%

33 statements  

« prev     ^ index     » next       coverage.py v7.5.1, created at 2024-05-18 23:09 +0000

1{% load i18n %} 

2  

3<ul class="nav navbar-nav navbar-right"> 

4 <li class="dropdown" id="tab_account"> 

5 <a class="dropdown-toggle" href="#" id="account_dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 

6 {% if request.user.is_authenticated %} 

7 <i class="fa fa-user" aria-hidden="true"></i> {{ request.user }} 

8 {% else %} 

9 <i class="fa fa-sign-in" aria-hidden="true"></i> Login 

10 {% endif %} 

11 </a> 

12 <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> 

13 {% if request.user.is_authenticated %} 

14 <li><a href="{% url 'profile' %}"><i class="fa fa-fw fa-image" aria-hidden="true"></i> {% trans 'Profile' %}</a></li> 

15 <li><a href="{% url 'user_preference' %}"><i class="fa fa-fw fa-cog" aria-hidden="true"></i> {% trans 'Preferences' %}</a></li> 

16 <li><a href="{% url 'import_photo' %}"><i class="fa fa-fw fa-envelope-square" aria-hidden="true"></i> {% trans 'Import photo via mail address' %}</a></li> 

17 <li><a href="{% url 'upload_export' %}"><i class="fa fa-fw fa-file-archive-o" aria-hidden="true"></i> {% trans 'Import libravatar XML export' %}</a></li> 

18 <li><a href="{% url 'export' %}"><i class="fa fa-fw fa-file-archive-o" aria-hidden="true"></i> {% trans 'Download your libravatar data' %}</a></li> 

19 <li><a href="{% url 'password_change' %}"><i class="fa fa-fw fa-key" aria-hidden="true"></i> {% trans 'Change password' %}</a></li> 

20 <li><a href="{% url 'password_reset' %}"><i class="fa fa-fw fa-unlock-alt" aria-hidden="true"></i> {% trans 'Reset password' %}</a></li> 

21 <li>{% include '_account_logout.html' %}</li> 

22 {% else %} 

23 <li><a href="{% url 'login' %}"><i class="fa fa-fw fa-sign-in" aria-hidden="true"></i> {% trans 'Local' %}</a></li> 

24 <li><a href="{% url 'new_account' %}"><i class="fa fa-fw fa-user-plus" aria-hidden="true"></i> {% trans 'Create account' %}</a></li> 

25 {% endif %} 

26 </ul> 

27 </li> 

28 {% if user.is_staff %} 

29 <li> 

30 <a href="{% url 'admin:index' %}" target="_new"><i class="fa fa-fw fa-user-secret" aria-hidden="true"></i> {% trans 'Admin' %}</a> 

31 </li> 

32 {% endif %} 

33</ul>