2018-03-18 18:43:30 +01:00
|
|
|
<!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>
|
2021-02-05 15:19:29 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="/static/libs/bootstrap.min.css">
|
2021-07-24 02:14:28 +02:00
|
|
|
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=31">
|
2019-02-02 18:05:18 +01:00
|
|
|
<link rel="search" type="application/opensearchdescription+xml" href="/static/opensearch.xml" title="ContentDB" />
|
2019-06-07 17:54:33 +02:00
|
|
|
<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">
|
2018-05-11 16:04:17 +02:00
|
|
|
{% block headextra %}{% endblock %}
|
2018-03-18 18:43:30 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
2018-12-21 15:45:54 +01:00
|
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
2018-05-18 01:16:10 +02:00
|
|
|
<div class="container">
|
2018-12-21 15:45:54 +01:00
|
|
|
<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 }}
|
2018-05-18 01:16:10 +02:00
|
|
|
{% if item.children %}
|
2018-12-21 15:45:54 +01:00
|
|
|
<span class="caret"></span>
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
2018-03-21 20:24:45 +01:00
|
|
|
{% if item.children %}
|
2018-12-21 15:45:54 +01:00
|
|
|
<ul class="dropdown-menu" role="menu">
|
|
|
|
{{ loop(item.children) }}
|
|
|
|
</ul>
|
2018-05-18 01:16:10 +02:00
|
|
|
{% endif %}
|
2018-12-21 15:45:54 +01:00
|
|
|
</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" />
|
2018-12-23 18:34:44 +01:00
|
|
|
<!-- <input class="btn btn-secondary my-2 my-sm-0"
|
2018-12-23 18:11:52 +01:00
|
|
|
data-toggle="tooltip" data-placement="bottom"
|
|
|
|
title="Go to the first found result for this query."
|
2018-12-23 18:34:44 +01:00
|
|
|
type="submit" name="lucky" value="First" /> -->
|
2018-12-21 15:45:54 +01:00
|
|
|
</form>
|
|
|
|
<ul class="navbar-nav ml-auto">
|
|
|
|
{% if current_user.is_authenticated %}
|
2020-09-19 20:30:33 +02:00
|
|
|
{% if todo_list_count is not none %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link notification-icon"
|
2021-01-29 20:38:14 +01:00
|
|
|
href="{{ url_for('todo.view_editor') }}"
|
2020-09-19 20:30:33 +02:00
|
|
|
title="{{ _('Work Queue') }}">
|
|
|
|
{% if todo_list_count > 0 %}
|
|
|
|
<i class="fas fa-inbox"></i>
|
2021-07-21 03:31:51 +02:00
|
|
|
<span class="badge badge-pill badge-notify">{{ todo_list_count }}</span>
|
2020-09-19 20:30:33 +02:00
|
|
|
{% else %}
|
|
|
|
<i class="fas fa-inbox" ></i>
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
</li>
|
2021-01-29 20:38:14 +01:00
|
|
|
{% else %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link notification-icon"
|
|
|
|
href="{{ url_for('todo.view_user', username=current_user.username) }}"
|
|
|
|
title="{{ _('To do list') }}">
|
|
|
|
<i class="fas fa-tasks" ></i>
|
|
|
|
</a>
|
|
|
|
</li>
|
2020-09-19 20:30:33 +02:00
|
|
|
{% endif %}
|
2021-01-29 20:38:14 +01:00
|
|
|
|
2020-09-19 20:30:33 +02:00
|
|
|
<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>
|
2021-07-21 03:31:51 +02:00
|
|
|
{% set num_notifs = current_user.notifications | length %}
|
|
|
|
{% if num_notifs > 60 %}
|
|
|
|
<span class="badge badge-pill badge-notify badge-emoji">
|
|
|
|
😢
|
|
|
|
</span>
|
|
|
|
{% else %}
|
|
|
|
<span class="badge badge-pill badge-notify">
|
|
|
|
{{ num_notifs }}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
2020-09-19 20:30:33 +02:00
|
|
|
{% 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>
|
2018-12-21 15:45:54 +01:00
|
|
|
<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>
|
|
|
|
|
2020-07-14 05:28:27 +02:00
|
|
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
2018-12-21 15:45:54 +01:00
|
|
|
<li class="nav-item">
|
2019-11-16 00:51:42 +01:00
|
|
|
<a class="nav-link" href="{{ url_for('users.profile', username=current_user.username) }}">Profile</a>
|
2018-12-27 16:32:15 +01:00
|
|
|
</li>
|
2018-12-25 18:56:51 +01:00
|
|
|
<li class="nav-item">
|
2021-01-29 20:38:14 +01:00
|
|
|
<a class="nav-link" href="{{ url_for('todo.view_user', username=current_user.username) }}">To do list</a>
|
2018-12-27 16:32:15 +01:00
|
|
|
</li>
|
2020-07-11 03:32:17 +02:00
|
|
|
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) %}
|
2020-12-22 17:08:59 +01:00
|
|
|
<div class="dropdown-divider"></div>
|
2020-07-11 03:32:17 +02:00
|
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.audit') }}">{{ _("Audit Log") }}</a></li>
|
2021-01-29 20:38:14 +01:00
|
|
|
{% 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 %}
|
2020-07-15 20:54:33 +02:00
|
|
|
{% endif %}
|
2018-12-21 15:45:54 +01:00
|
|
|
{% endif %}
|
2020-12-05 22:14:48 +01:00
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="{{ url_for('users.profile_edit', username=current_user.username) }}">Settings</a>
|
|
|
|
</li>
|
2020-12-04 23:05:10 +01:00
|
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('users.logout') }}">{{ _("Sign out") }}</a></li>
|
2018-05-18 01:16:10 +02:00
|
|
|
</ul>
|
|
|
|
</li>
|
2018-12-21 15:45:54 +01:00
|
|
|
{% else %}
|
2020-12-04 23:05:10 +01:00
|
|
|
<li><a class="nav-link" href="{{ url_for('users.login') }}">{{ _("Sign in") }}</a></li>
|
2018-05-18 01:16:10 +02:00
|
|
|
{% endif %}
|
2018-12-21 15:45:54 +01:00
|
|
|
</ul>
|
|
|
|
</div>
|
2018-05-18 01:16:10 +02:00
|
|
|
</div>
|
2018-03-18 18:43:30 +01:00
|
|
|
</nav>
|
|
|
|
|
|
|
|
{% block flash_messages %}
|
|
|
|
{%- with messages = get_flashed_messages(with_categories=true) -%}
|
|
|
|
{% if messages %}
|
|
|
|
<ul id="alerts">
|
|
|
|
{% for category, message in messages %}
|
2018-12-22 14:14:08 +01:00
|
|
|
<li class="alert alert-{{category}} container">
|
2018-03-18 18:43:30 +01:00
|
|
|
<span class="icon_message"></span>
|
|
|
|
|
2020-01-25 00:19:06 +01:00
|
|
|
{{ message }}
|
2018-03-18 18:43:30 +01:00
|
|
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{%- endwith %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block container %}
|
2018-12-21 15:45:54 +01:00
|
|
|
<main class="container mt-4">
|
2018-03-18 18:43:30 +01:00
|
|
|
{% block content %}
|
|
|
|
{% endblock %}
|
|
|
|
</main>
|
|
|
|
{% endblock %}
|
2018-05-18 02:27:11 +02:00
|
|
|
|
2020-12-22 12:14:16 +01:00
|
|
|
<footer class="my-5">
|
|
|
|
<p class="pt-5 mb-1">
|
2021-01-30 17:59:42 +01:00
|
|
|
ContentDB © 2018-21 to <a href="https://rubenwardy.com/">rubenwardy</a>
|
2020-12-22 12:14:16 +01:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<ul class="list-inline my-1">
|
|
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='help') }}">{{ _("Help") }}</a></li>
|
|
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='policy_and_guidance') }}">{{ _("Policy and Guidance") }}</a></li>
|
2021-02-26 00:03:32 +01:00
|
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='help/api') }}">{{ _("API") }}</a></li>
|
2020-12-22 12:14:16 +01:00
|
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='privacy_policy') }}">{{ _("Privacy Policy") }}</a></li>
|
|
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='help/reporting') }}">{{ _("Report / DMCA") }}</a></li>
|
2021-02-26 00:03:32 +01:00
|
|
|
<li class="list-inline-item"><a href="https://monitor.rubenwardy.com/d/3ELzFy3Wz/contentdb">{{ _("Stats / Monitoring") }}</a></li>
|
2020-12-22 12:14:16 +01:00
|
|
|
<li class="list-inline-item"><a href="{{ url_for('users.list_all') }}">{{ _("User List") }}</a></li>
|
|
|
|
<li class="list-inline-item"><a href="https://github.com/minetest/contentdb">{{ _("Source Code") }}</a></li>
|
|
|
|
</ul>
|
2019-11-15 00:38:11 +01:00
|
|
|
|
|
|
|
{% if debug %}
|
|
|
|
<p style="color: red">
|
|
|
|
DEBUG MODE ENABLED
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2018-05-18 02:27:11 +02:00
|
|
|
</footer>
|
2018-12-21 15:45:54 +01:00
|
|
|
|
2021-02-05 15:19:29 +01:00
|
|
|
<script src="/static/libs/jquery.min.js"></script>
|
|
|
|
<script src="/static/libs/bootstrap.min.js"></script>
|
|
|
|
<script src="/static/libs/easymde.min.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/static/libs/easymde.min.css">
|
2020-01-21 23:40:51 +01:00
|
|
|
<link href="/static/fa/css/all.css" rel="stylesheet">
|
2021-02-05 17:19:34 +01:00
|
|
|
<script src="/static/markdowntextarea.js?v=2"></script>
|
2020-01-23 00:10:02 +01:00
|
|
|
|
2018-12-22 12:23:58 +01:00
|
|
|
{% block scriptextra %}{% endblock %}
|
2018-12-21 15:45:54 +01:00
|
|
|
</body>
|
2018-03-18 18:43:30 +01:00
|
|
|
</html>
|