Forked from
ICS Control System Infrastructure / csentry
493 commits behind the upstream repository.
-
Benjamin Bertrand authored
Use endpoint argument to avoid collision with flask-admin Network
Benjamin Bertrand authoredUse endpoint argument to avoid collision with flask-admin Network
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
base.html 3.00 KiB
{%- extends "bootstrap/base.html" %}
{% import "bootstrap/utils.html" as utils %}
{% from "_helpers.html" import is_active %}
{% block styles %}
{{super()}}
<link href="{{ url_for('static', filename='css/open-iconic-bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/dataTables.bootstrap4.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/csentry.css') }}" rel="stylesheet">
{% endblock %}
{% block title %}CSEntry{% endblock %}
{% block navbar %}
<!-- Fixed navbar -->
<div class="navbar fixed-top navbar-expand-lg navbar-light bg-light" role="navigation">
<a class="navbar-brand" href="{{ url_for('main.index') }}">CSEntry</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<div class="navbar-nav mr-auto">
{% set path = request.path %}
<a class="nav-item nav-link {{ is_active(path.startswith("/inventory")) }}" href="{{ url_for('inventory.list_items') }}">Inventory</a>
<a class="nav-item nav-link {{ is_active(path.startswith("/network")) }}" href="{{ url_for('network.list_hosts') }}">Network</a>
{% if current_user.is_authenticated and current_user.is_admin %}
<a class="nav-item nav-link" href="{{ url_for('admin.index') }}">Admin</a>
{% endif %}
</div>
<div class="navbar-nav">
{% if current_user.is_authenticated %}
<div class="dropdown {{ is_active(path == "/users/profile") }}">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{current_user}}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="{{ url_for('users.profile') }}">Profile</a>
<a class="dropdown-item" href="{{ url_for('users.logout') }}">Logout</a>
</div>
</div>
{% endif %}
{% block navbar_right %}{% endblock %}
</div>
</div>
</div>
{% endblock %}
{% block content %}
<div class="container">
{{utils.flashed_messages(messages, container=False, dismissible=True)}}
{% block main %}{% endblock %}
</div>
{% endblock %}
{% block scripts %}
{{super()}}
<script src="{{ url_for('static', filename='js/jquery.dataTables.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/dataTables.bootstrap4.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/clipboard.min.js') }}"></script>
<script type=text/javascript>
$SCRIPT_ROOT = {{ request.script_root|tojson|safe }};
</script>
{% block csentry_scripts %}{% endblock %}
{% endblock %}