blob: fabe2f6117a485e0fd9f44a02b43fcddb2867f59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
<link rel="stylesheet" type="text/css" href="/static/bootstrap.css">
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=14">
<link rel="search" type="application/opensearchdescription+xml" href="/static/opensearch.xml" title="ContentDB" />
<link rel="shortcut icon" href="/favicon-16.png" sizes="16x16">
<link rel="icon" href="/favicon-128.png" sizes="128x128">
<link rel="icon" href="/favicon-32.png" sizes="32x32">
{% block headextra %}{% endblock %}
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="/">{{ config.USER_APP_NAME }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto">
{% for item in current_menu.children recursive %}
{% if item.visible %}
<li class="nav-item {% if item.children %} dropdown{% endif %}">
<a class="nav-link" href="{{ item.url }}"
{% if item.children %}
class="dropdown-toggle"
data-toggle="dropdown"
role="button"
aria-expanded="false"
{% endif %}>
{{ item.text }}
{% if item.children %}
<span class="caret"></span>
{% endif %}
</a>
{% if item.children %}
<ul class="dropdown-menu" role="menu">
{{ loop(item.children) }}
</ul>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
<form class="form-inline my-2 my-lg-0" method="GET" action="/packages/">
{% if type %}<input type="hidden" name="type" value="{{ type }}" />{% endif %}
<input class="form-control mr-sm-2" name="q" type="text" placeholder="Search {{ title | lower or 'all packages' }}" value="{{ query or ''}}">
<input class="btn btn-secondary my-2 my-sm-0 mr-sm-2" type="submit" value="Search" />
<!-- <input class="btn btn-secondary my-2 my-sm-0"
data-toggle="tooltip" data-placement="bottom"
title="Go to the first found result for this query."
type="submit" name="lucky" value="First" /> -->
</form>
<ul class="navbar-nav ml-auto">
{% if current_user.is_authenticated %}
{% if todo_list_count is not none %}
<li class="nav-item">
<a class="nav-link notification-icon"
href="{{ url_for('todo.view') }}"
title="{{ _('Work Queue') }}">
{% if todo_list_count > 0 %}
<i class="fas fa-inbox"></i>
<span class="badge badge-pill badge-notify" style="font-size:10px;">{{ todo_list_count }}</span>
{% else %}
<i class="fas fa-inbox" ></i>
{% endif %}
</a>
</li>
{% endif %}
<li class="nav-item">
<a class="nav-link notification-icon"
href="{{ url_for('notifications.list_all') }}"
title="{{ _('Notifications') }}">
{% if current_user.notifications %}
<i class="fas fa-bell"></i>
<span class="badge badge-pill badge-notify" style="font-size:10px;">{{ current_user.notifications | length }}</span>
{% else %}
<i class="fas fa-bell" ></i>
{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link"
href="{{ url_for('packages.create_edit') }}"
title="{{ _('Add Package') }}">
<i class="fas fa-plus"></i>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle"
data-toggle="dropdown"
role="button"
aria-expanded="false">{{ current_user.display_name }}
<span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li class="nav-item">
<a class="nav-link" href="{{ url_for('users.profile', username=current_user.username) }}">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('users.profile', username=current_user.username) }}#unadded-topics">Your unadded topics</a>
</li>
{% if current_user.canAccessTodoList() %}
<li class="nav-item"><a class="nav-link" href="{{ url_for('todo.view') }}">{{ _("Work Queue") }}</a></li>
{% endif %}
<li class="nav-item"><a class="nav-link" href="{{ url_for('users.list_all') }}">{{ _("User list") }}</a></li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('todo.topics') }}">{{ _("All unadded topics") }}</a>
</li>
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) %}
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.audit') }}">{{ _("Audit Log") }}</a></li>
{% endif %}
{% if current_user.rank == current_user.rank.ADMIN %}
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.admin_page') }}">{{ _("Admin") }}</a></li>
{% else %}
{% if check_global_perm(current_user, "EDIT_TAGS") %}
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.tag_list') }}">{{ _("Tag Editor") }}</a></li>
{% elif check_global_perm(current_user, "CREATE_TAG") %}
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.create_edit_tag') }}">{{ _("Create Tag") }}</a></li>
{% endif %}
{% if current_user.rank == current_user.rank.MODERATOR %}
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.license_list') }}">{{ _("License Editor") }}</a></li>
{% endif %}
{% endif %}
<li class="nav-item"><a class="nav-link" href="{{ url_for('user.logout') }}">{{ _("Sign out") }}</a></li>
</ul>
</li>
{% else %}
<li><a class="nav-link" href="{{ url_for('user.login') }}">{{ _("Sign in") }}</a></li>
{% endif %}
</ul>
</div>
</div>
</nav>
{% block flash_messages %}
{%- with messages = get_flashed_messages(with_categories=true) -%}
{% if messages %}
<ul id="alerts">
{% for category, message in messages %}
<li class="alert alert-{{category}} container">
<span class="icon_message"></span>
{{ message }}
<div style="clear: both;"></div>
</li>
{% endfor %}
</ul>
{% endif %}
{%- endwith %}
{% endblock %}
{% block container %}
<main class="container mt-4">
{% block content %}
{% endblock %}
</main>
{% endblock %}
<footer class="container footer-copyright my-5 page-footer font-small text-center">
ContentDB © 2018-20 to <a href="https://rubenwardy.com/">rubenwardy</a> |
<a href="https://github.com/minetest/contentdb">GitHub</a> |
<a href="{{ url_for('flatpage', path='help') }}">{{ _("Help") }}</a> |
<a href="{{ url_for('flatpage', path='policy_and_guidance') }}">{{ _("Policy and Guidance") }}</a> |
<a href="{{ url_for('flatpage', path='help/reporting') }}">{{ _("Report / DMCA") }}</a> |
<a href="{{ url_for('users.list_all') }}">{{ _("User List") }}</a>
{% if debug %}
<p style="color: red">
DEBUG MODE ENABLED
</p>
{% endif %}
</footer>
<script src="/static/jquery.min.js"></script>
<script src="/static/popper.min.js"></script>
<script src="/static/bootstrap.min.js"></script>
<script src="/static/easymde.min.js"></script>
<link rel="stylesheet" type="text/css" href="/static/easymde.min.css">
<link href="/static/fa/css/all.css" rel="stylesheet">
<script src="/static/markdowntextarea.js"></script>
{% block scriptextra %}{% endblock %}
</body>
</html>
|