hbnet/web/templates/flask_user_layout.html

149 lines
5.9 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<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>{{ user_manager.USER_APP_NAME }}</title>
<!-- Bootstrap -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- In-lining styles to avoid needing a separate .css file -->
<style>
hr { border-color: #cccccc; margin: 0; }
.no-margins { margin: 0px; }
.with-margins { margin: 10px; }
.col-centered { float: none; margin: 0 auto; }
</style>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
<![endif]-->
{# *** Allow sub-templates to insert extra html to the head section *** #}
{% block extra_css %}{% endblock %}
</head>
<body>
2021-08-06 22:54:11 -04:00
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand">{{ user_manager.USER_APP_NAME }}</a>
</div>
<ul class="nav navbar-nav">
<li><a href="/"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li><a href="{{url}}/talkgroups"><span class="glyphicon glyphicon-list"></span> Talkgroups</a></li>
<li><a href="{{url}}/aprs"><span class="glyphicon glyphicon-list"></span> APRS</a></li>
<li><a href="{{url}}/news"><span class="glyphicon glyphicon-list-alt"></span> News</a></li>
<li><a href="{{url}}/help"><span class="glyphicon glyphicon-question-sign"></span> Help</a></li>
2021-08-06 22:54:11 -04:00
</ul>
<ul class="nav navbar-nav navbar-right">
{% if not call_or_get(current_user.is_authenticated) %}
<li><a href="{{ url_for('user.login') }}"><span class="glyphicon glyphicon-log-in"></span> Sign In</a></li>
<li><a href="{{ url_for('user.register') }}"><span class="glyphicon glyphicon-user"></span> Register</a></li>
{% endif %}
{% if call_or_get(current_user.is_authenticated) %}
2021-08-07 19:15:32 -04:00
<li><a href="{{url}}/map"><span class="glyphicon glyphicon-map-marker"></span> Map</a></li>
2021-08-06 22:54:11 -04:00
<li><a href="{{url}}/generate_passphrase"><span class="glyphicon glyphicon-lock"></span> Passphrase(s)</a></li>
<li><a href="{{ url_for('user.edit_user_profile') }}"><span class="glyphicon glyphicon-user"></span> Edit {{ current_user.username or current_user.email }}</a></li>
<li><a href="{{ url_for('user.logout') }}"><span class="glyphicon glyphicon-remove"></span> Sign Out</a></li>
</ul>
{% endif%}
2021-08-06 22:54:11 -04:00
<!--Admin Menu -->
{% if call_or_get(current_user.is_authenticated) %}
{% if call_or_get(current_user.has_roles('Admin')) %}
2021-08-06 22:54:11 -04:00
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">MMDVM Admin
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{url}}/manage_servers">Manage Servers</a></li>
<li><a href="{{url}}/manage_peers">Manage Peers</a></li>
<li><a href="{{url}}/manage_masters">Manage Masters</a></li>
<li><a href="{{url}}/manage_rules">Manage Rules</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">User Admin
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{url}}/add_user">Add User</a></li>
<li><a href="{{url}}/list_users">Manage Users</a></li>
<li><a href="{{url}}/approve_users">Waiting Approval</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Other
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{url}}/manage_news">Manage News</a></li>
<li><a href="{{url}}/misc_settings">Misc Options</a></li>
2021-08-07 19:15:32 -04:00
<li><a href="{{url}}/auth_log">Authorization Log</a></li>
2021-08-06 22:54:11 -04:00
</ul>
</li>
</ul>
{% endif %}
{% endif %}
</div>
</nav>
2021-08-06 23:28:56 -04:00
<p><img class="img-responsive" style="display: block; margin-left: auto; margin-right: auto;" src="{{ url_for('static', filename='HBnet.png') }}" alt="Logo" width="300" height="144" /></p>
<hr />
2021-08-06 22:54:11 -04:00
{% block body %}
<hr class="no-margins"/>
<div id="main-div" class="with-margins">
{# One-time system messages called Flash messages #}
{% block flash_messages %}
{%- with messages = get_flashed_messages(with_categories=true) -%}
{% if messages %}
{% for category, message in messages %}
{% if category=='error' %}
{% set category='danger' %}
{% endif %}
<div class="alert alert-{{category}}">{{ message|safe }}</div>
{% endfor %}
{% endif %}
{%- endwith %}
{% endblock %}
{% block main %}
{% block content %}
{{markup_content}}
{% endblock %}
{% endblock %}
</div>
<br/>
<hr class="no-margins"/>
<div id="footer-div" class="clearfix with-margins">
<p style="text-align: center;"><strong>{{ user_manager.USER_APP_NAME }}<br /></strong><a href="https://hbnet.xyz">HBNet Project</a><br /></p>
</div>
{% endblock %}
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<!-- Bootstrap -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
{# *** Allow sub-templates to insert extra html to the bottom of the body *** #}
{% block extra_js %}{% endblock %}
</body>
</html>