cmsmanage/templates/base.dj.html

76 lines
2.7 KiB
HTML
Raw Normal View History

{% load static %}
2023-04-14 01:07:35 -04:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
2022-01-23 23:03:08 -05:00
<meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href="{% static 'bootstrap.min.css' %}" rel="stylesheet">
<!-- Tabulator CSS -->
<link href="{% static 'tabulator_bootstrap5.min.css' %}" rel="stylesheet">
2022-01-23 23:03:08 -05:00
<title>
{% block title %}Claremont MakerSpace{% endblock %}
2022-01-23 23:03:08 -05:00
</title>
</head>
<body>
2023-02-02 15:14:20 -05:00
<nav class="navbar navbar-expand-sm navbar-light bg-light">
2021-05-20 17:44:13 -04:00
<div class="container-fluid">
<a class="navbar-brand" href="{% url 'dashboard:dashboard' %}">Claremont MakerSpace</a>
2022-01-23 23:03:08 -05:00
<button class="navbar-toggler"
type="button"
2023-02-02 15:14:20 -05:00
data-bs-toggle="collapse"
data-bs-target="#user-nav"
2022-01-23 23:03:08 -05:00
aria-controls="user-nav"
aria-expanded="false"
aria-label="Toggle navigation">
2021-05-20 17:44:13 -04:00
<span class="navbar-toggler-icon"></span>
</button>
<div id="user-nav" class="collapse navbar-collapse justify-content-end">
<div class="navbar-nav">
{% block nav_extra %}{% endblock %}
2021-05-20 17:44:13 -04:00
{% if user.is_staff %}
2022-01-23 23:03:08 -05:00
<a class="nav-item nav-link"
href="{% block admin_link %}{% url 'admin:index' %}{% endblock %}">Admin</a>
2021-05-20 17:44:13 -04:00
{% endif %}
{% if user.is_authenticated %}
<form method="post" action="{% url 'logout' %}">
{% csrf_token %}
<button class="btn" type="submit">Logout: {{ user }}</button>
</form>
2021-05-20 17:44:13 -04:00
{% else %}
2022-01-23 23:03:08 -05:00
<a class="nav-item nav-link"
href="{% url 'login' %}?next={{ request.get_full_path }}">Login</a>
2021-05-20 17:44:13 -04:00
{% endif %}
</div>
</div>
</div>
</nav>
2022-02-07 19:48:08 -05:00
{% if messages %}
<div class="messages m-3">
{% for message in messages %}
{# TODO: should use tags correctly for bootstrap alerts #}
<div role="alert"
2023-04-14 01:07:35 -04:00
class="alert alert-info alert-dismissible fade show {% if message.tags %}{{ message.tags }}{% endif %}">
2022-02-07 19:48:08 -05:00
{{ message }}
<button type="button"
class="btn-close"
data-bs-dismiss="alert"
aria-label="Close"></button>
2022-02-07 19:48:08 -05:00
</div>
{% endfor %}
</div>
{% endif %}
<div id="content" class="m-3">
{% block content %}{% endblock %}
</div>
2022-05-05 17:05:39 -04:00
{% block footer %}{% endblock %}
2021-05-20 17:44:13 -04:00
<!-- Bootstrap JS -->
<script src="{% static 'bootstrap.bundle.min.js' %}"></script>
<!-- Tabulator JS -->
<script src="{% static 'tabulator.min.js' %}"></script>
{% block script %}{% endblock %}
</body>
</html>