]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/base.html
Move create and work queue to user drop down
[cheatdb.git] / app / templates / base.html
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5         <meta charset="utf-8">
6         <meta http-equiv="X-UA-Compatible" content="IE=edge">
7         <meta name="viewport" content="width=device-width, initial-scale=1">
8         <title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
9         <link rel="stylesheet" type="text/css" href="/static/main.css">
10         {% block headextra %}{% endblock %}
11 </head>
12
13 <body>
14         <nav>
15                 <ul class="nav navbar-nav navbar-left">
16                         <li><a href="/"><img src="/static/logo_dark.svg" /></a></li>
17                         {% for item in current_menu.children recursive %}
18                                 {% if item.visible %}
19                                         <li{% if item.children %} class="dropdown"{% endif %}>
20                                                 <a href="{{ item.url }}"
21                                                                 {% if item.children %}
22                                                                         class="dropdown-toggle"
23                                                                         data-toggle="dropdown"
24                                                                         role="button"
25                                                                         aria-expanded="false"
26                                                                 {% endif %}>
27                                                         {{ item.text }}
28                                                         {% if item.children %}
29                                                                 <span class="caret"></span>
30                                                         {% endif %}
31                                                 </a>
32                                                 {% if item.children %}
33                                                 <ul class="dropdown-menu" role="menu">
34                                                         {{ loop(item.children) }}
35                                                 </ul>
36                                                 {% endif %}
37                                         </li>
38                                 {% endif %}
39                         {% endfor %}
40                 </ul>
41                 <ul class="nav navbar-nav navbar-right">
42                         {% if current_user.is_authenticated %}
43                                 <li><a href="{{ url_for('notifications_page') }}">({{ current_user.notifications | length }})</a></li>
44                                 <li><a href="{{ url_for('create_edit_package_page') }}">+</a></li>
45                                 <li class="dropdown">
46                                         <a href="{{ url_for('user_profile_page', username=current_user.username) }}"
47                                                 class="dropdown-toggle"
48                                                 data-toggle="dropdown"
49                                                 role="button"
50                                                 aria-expanded="false">{{ current_user.display_name }}
51                                                         <span class="caret"></span></a>
52
53                                         <ul class="dropdown-menu" role="menu">
54                                                 <li>
55                                                         <a href="{{ url_for('user_profile_page', username=current_user.username) }}">Profile</a>
56                                                 </li>
57                                                 {% if current_user.canAccessTodoList() %}
58                                                         <li><a href="{{ url_for('todo_page') }}">Work Queue</a></li>
59                                                 {% endif %}
60                                                 {% if current_user.rank == current_user.rank.ADMIN %}
61                                                         <li><a href="{{ url_for('admin_page') }}">Admin</a></li>
62                                                 {% endif %}
63                                                 <li><a href="{{ url_for('user.logout') }}">Sign out</a></li>
64                                         </ul>
65                                 </li>
66                         {% else %}
67                                 <li><a href="{{ url_for('user.login') }}">Sign in</a></li>
68                         {% endif %}
69                 </ul>
70                 <div style="clear:both;"></div>
71         </nav>
72
73
74         {% block flash_messages %}
75                 {%- with messages = get_flashed_messages(with_categories=true) -%}
76                         {% if messages %}
77                                 <ul id="alerts">
78                                         {% for category, message in messages %}
79                                                 <li class="box box_grey alert alert-{{category}}">
80                                                         <span class="icon_message"></span>
81
82                                                         {{ message|safe }}
83
84                                                         <div style="clear: both;"></div>
85                                                 </li>
86                                         {% endfor %}
87                                 </ul>
88                         {% endif %}
89                 {%- endwith %}
90         {% endblock %}
91
92         {% block container %}
93         <main>
94                 {% block content %}
95                 {% endblock %}
96         </main>
97         {% endblock %}
98 </html>