Coverage for gui/templates/gui/base.html: 100%

101 statements  

« prev     ^ index     » next       coverage.py v7.2.1, created at 2023-03-14 06:24 +0000

1{% load static %} 

2{% load bootstrap3 %} 

3{% load account %} 

4{% url 'index' as home_url %} 

5{% url 'members' as members_url %} 

6{% url 'about' as about_url %} 

7<!DOCTYPE html> 

8<html lang="en"> 

9 <head> 

10 <meta charset="utf-8"> 

11 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 

12 <meta name="viewport" content="width=device-width, initial-scale=1"> 

13 <meta name="description" content="X.Org Foundation Membership"> 

14 <meta name="author" content=""> 

15 <link rel="icon" href="favicon.ico"> 

16  

17 <title>X.Org Foundation Membership</title> 

18  

19 {% bootstrap_css %} 

20 {% bootstrap_javascript %} 

21 <link rel="stylesheet" href="{% static 'css/gui.css' %}"> 

22 <script src="{% static 'js/helpers.js' %}"></script> 

23 </head> 

24  

25 <body class="navbar_fixed"> 

26 <nav class="navbar navbar-default navbar-fixed-top"> 

27 <div class="container container-full-width"> 

28 <div class="navbar-header"> 

29 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> 

30 <span class="sr-only">Toggle navigation</span> 

31 <span class="icon-bar"></span> 

32 <span class="icon-bar"></span> 

33 <span class="icon-bar"></span> 

34 </button> 

35 <a class="navbar-brand" href="{{home_url}}"><img src="{% static 'images/logo.png' %}" alt='X.org logo'/> </a> 

36 </div> 

37 <div id="navbar" class="navbar-collapse collapse"> 

38 <ul class="nav navbar-nav"> 

39 <li {% if request.path == home_url %}class="active"{% endif %}><a href="{% url 'index' %}">Home</a></li> 

40 {% if user.is_authenticated and user.profile.membership.is_approved %}<li {% if request.path == members_url %}class="active"{% endif %}><a href="{% url 'members' %}">Members</a></li>{% endif %} 

41 <li {% if request.path == about_url %}class="active"{% endif %}><a href="{% url 'about' %}">About</a></li> 

42 </ul> 

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

44 {% if user.is_superuser %} 

45 <li class="dropdown"> 

46 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Admin <span class="badge">{{admin_tasks_count}}</span> <span class="caret"></span></a> 

47 <ul class="dropdown-menu"> 

48 <li><a href="{% url 'membership-approval' %}">Approve memberships <span class="badge">{{admin_tasks_count}}</span></a></li> 

49 <li class="divider"></li> 

50 <li><a href="{% url 'membership-period-create' %}">Create new period</a></li> 

51 <li><a href="{% url 'admin:gui_link_changelist' %}">Edit links</a></li> 

52 <li class="divider"></li> 

53 <li class="dropdown-submenu multi-level"> 

54 <a tabindex="-1" href="#">Ballots</a> 

55 <ul class="dropdown-menu"> 

56 <li><a tabindex="-1" href="{% url 'ballot-list' %}">Ballot history</a></li> 

57 <li class="divider"></li> 

58 <li><a href="{% url 'admin:gui_ballot_add' %}">Create new ballot</a></li> 

59 <li><a href="{% url 'admin:gui_ballotselectquestion_add' %}">New select question</a></li> 

60 <li><a href="{% url 'admin:gui_ballotrankingquestion_add' %}">New ranking question</a></li> 

61 </ul> 

62 </li> 

63 <li class="divider"></li> 

64 <li><a href="{% url 'admin:index' %}">Full Admin</a></li> 

65 </ul> 

66 </li> 

67 {% endif %} 

68  

69 {% if user.is_authenticated %} 

70 <li class="dropdown"> 

71 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% user_display user %}<span class="caret"></span></a> 

72 <ul class="dropdown-menu"> 

73 <li><a href="{% url 'account-profile' %}">Your Profile</a></li> 

74 <li><a href="{% url 'account_email' %}">Change E-mail</a></li> 

75 <li><a href="{% url 'socialaccount_connections' %}">Auth providers</a></li> 

76 <li><a href="{% url 'account-delete' %}">Delete your account</a></li> 

77 <li><a href="{% url 'account_logout' %}">Sign Out</a></li> 

78 </ul> 

79 </li> 

80 {% else %} 

81 <li><a href="{% url 'account_login' %}">Sign In</a></li> 

82 <li><a href="{% url 'account_signup' %}">Sign Up</a></li> 

83 {% endif %} 

84 </ul> 

85 </div> 

86 </div> 

87 </nav> 

88  

89 <div class="container container-full-width main_body container-fluid"> 

90 {% bootstrap_messages %} 

91 {% block content %}{% endblock %} 

92 </div> 

93  

94 <footer class="small text-muted text-center"> 

95 {% if website.version is not None %}<a href="{{website.project_url}}">Xorg Membership</a> version <a href="{{website.version_url}}">{{website.version}}</a>{% endif %} 

96 <p>Generated on the {% now "jS F Y H:i:s" %} (UTC). 

97 <a href="https://gitlab.freedesktop.org/xorgfoundation/xorg_membership/issues/new">Report a bug</a> or 

98 <a href="{% url "about" %}">contact us</a>.</p> 

99 </footer> 

100 </body> 

101</html>