v4 Template fixes

This commit is contained in:
Peter Pfeufer
2023-10-24 02:04:49 +00:00
committed by Ariel Rin
parent 07e85727ea
commit ee24706e43
55 changed files with 791 additions and 665 deletions

View File

@@ -1,101 +1,114 @@
{% load i18n %}
{% load humanize %}
{% if notifications %}
<div class="col-12 align-self-stretch p-2">
<div class="card">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="w-100 align-self-stretch">
<h4 class="ms-auto me-auto">
{% translate "Alliance Auth Notifications" %}
</h4>
<div class="card-body">
<ul class="list-group">
{% for notif in notifications %}
<li class="list-group-item">
{% if notif.state == 'opened' %}
<span class="badge badge-success">{% translate "Open" %}</span>
{% else %}
<span class="badge badge-danger">{% translate "Closed" %}</span>
{% endif %}
<a href="{{ notif.web_url }}" target="_blank">#{{ notif.iid }} {{ notif.title }}</a>
</li>
{% empty %}
<div class="alert alert-primary" role="alert">
{% translate "No notifications at this time" %}
<div class="col-12 align-self-stretch pb-2">
<div class="card">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="w-100 align-self-stretch">
<h4 class="ms-auto me-auto text-center">
{% translate "Alliance Auth Notifications" %}
</h4>
<div class="card-body">
<ul class="list-group">
{% for notif in notifications %}
<li class="list-group-item">
{% if notif.state == 'opened' %}
<span class="badge bg-success">{% translate "Open" %}</span>
{% else %}
<span class="badge bg-danger">{% translate "Closed" %}</span>
{% endif %}
<a href="{{ notif.web_url }}" target="_blank">#{{ notif.iid }} {{ notif.title }}</a>
</li>
{% empty %}
<div class="alert alert-primary" role="alert">
{% translate "No notifications at this time" %}
</div>
{% endfor %}
</ul>
<div class="text-end">
<a href="https://gitlab.com/allianceauth/allianceauth/issues" target="_blank" class="me-1">
<span class="badge" style="background-color: rgb(230 83 40);">
<i class="fab fa-gitlab" aria-hidden="true"></i>
{% translate 'Powered by GitLab' %}
</span>
</a>
<a href="https://discord.com/invite/fjnHAmk" target="_blank">
<span class="badge" style="background-color: rgb(110 133 211);">
<i class="fab fa-discord" aria-hidden="true"></i>
{% translate 'Support Discord' %}
</span>
</a>
</div>
{% endfor %}
</ul>
</div>
<div class="text-end" style="position: absolute; bottom: 5px; right: 5px;">
<a href="https://gitlab.com/allianceauth/allianceauth/issues" target="_blank" style="margin-right: 0.5rem;">
<span class="badge" style="background-color: #e65328;">
<i class="fab fa-gitlab" aria-hidden="true"></i>
{% translate 'Powered by GitLab' %}
</span>
</a>
<a href="https://discord.com/invite/fjnHAmk" target="_blank">
<span class="badge" style="background-color: rgb(110,133,211);">
<i class="fab fa-discord" aria-hidden="true"></i>
{% translate 'Support Discord' %}
</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
<div class="col-12 align-self-stretch p-2">
<div class="col-12 align-self-stretch py-2">
<div class="card">
<div class="card-body d-flex flex-row flex-wrap">
<div class="col-xl-6 col-lg-12 col-md-12 col-sm-12">
<h4 class="ms-auto me-auto text-center">
{% translate "Software Version" %}
</h4>
<div class="card-body pb-0">
<ul class="list-group list-group-horizontal w-100" role="group" aria-label="Basic example">
<li type="button" class="list-group-item w-100">
<h5 class="list-group-item-heading">{% translate "Current" %}</h5>
<p class="list-group-item-text">
{{ current_version }}
</p>
<div class="card-body">
<ul class="list-group list-group-horizontal w-100" role="group" aria-label="{% translate 'Software Version' %}">
<li class="list-group-item w-100">
<div class="btn w-100 cursor-default">
<h5 class="list-group-item-heading">{% translate "Current" %}</h5>
<p class="list-group-item-text">{{ current_version }}</p>
</div>
</li>
<li class="list-group-item list-group-item-{% if latest_patch %}success{% elif latest_minor %}warning{% else %}danger{% endif %} w-100" href="https://gitlab.com/allianceauth/allianceauth/-/tags/v{{ latest_patch_version }}">
<li class="list-group-item list-group-item-{% if latest_patch %}success{% elif latest_minor %}warning{% else %}danger{% endif %} w-100">
<a class="btn w-100" href="https://gitlab.com/allianceauth/allianceauth/-/releases/v{{ latest_patch_version }}">
<h5 class="list-group-item-heading">{% translate "Latest Stable" %}</h5>
<p class="list-group-item-text">
<i class="fab fa-gitlab hidden-xs" aria-hidden="true"></i>
{{ latest_patch_version }}
{% if not latest_patch %}<br>{% translate "Update available" %}{% endif %}
</p>
</li>
{% if latest_beta %}
<li>
<a type="button" class="btn btn-info w-100" href="https://gitlab.com/allianceauth/allianceauth/-/tags/v{{ latest_beta_version }}">
<h5 class="list-group-item-heading">{% translate "Latest Pre-Release" %}</h5>
<p class="list-group-item-text">
<i class="fab fa-gitlab hidden-xs" aria-hidden="true"></i>
{{ latest_beta_version }}
<br>{% translate "Pre-Release available" %}
{{ latest_patch_version }}
{% if not latest_patch %}<br>{% translate "Update available" %}{% endif %}
</p>
</a>
</li>
{% if latest_beta %}
<li class="list-group-item list-group-item-info w-100">
<a class="btn w-100" href="https://gitlab.com/allianceauth/allianceauth/-/releases/v{{ latest_beta_version }}">
<h5 class="list-group-item-heading">{% translate "Latest Pre-Release" %}</h5>
<p class="list-group-item-text">
<i class="fab fa-gitlab hidden-xs" aria-hidden="true"></i>
{{ latest_beta_version }}
<br>{% translate "Pre-Release available" %}
</p>
</a>
</li>
{% endif %}
</ul>
</div>
</div>
<div class="d-xl-none d-lg-show d-md-show d-sm-show m-2"></div>
<div class="col-xl-6 col-lg-12 col-md-12 col-sm-12">
<h4 class="ms-auto me-auto text-center">
{% translate "Task Queue" %}
</h4>
<div class="card-body pb-0">
<div class="card-body">
<p>
{% blocktranslate with total=tasks_total|intcomma latest=earliest_task|timesince|default:"?" %}
Status of {{ total }} processed tasks • last {{ latest }}
{% endblocktranslate %}
{% blocktranslate with total=tasks_total|intcomma latest=earliest_task|timesince|default:"?" %}
Status of {{ total }} processed tasks • last {{ latest }}
{% endblocktranslate %}
</p>
<div
class="progress"
style="height: 21px;"
@@ -105,6 +118,7 @@
{% include "allianceauth/admin-status/celery_bar_partial.html" with label="retried" level="info" tasks_count=tasks_retried %}
{% include "allianceauth/admin-status/celery_bar_partial.html" with label="failed" level="danger" tasks_count=tasks_failed %}
</div>
<p>
<span id="task-counts">?</span> {% translate 'running' %} |
<span id="queued-tasks-count">?</span> {% translate 'queued' %}

View File

@@ -12,7 +12,7 @@
<!-- End Required meta tags -->
<!-- Meta tags -->
<!-- TODO Bundle all the site specific stuff up into its own template for easy overide -->
<!-- TODO Bundle all the site specific stuff up into its own template for easy override -->
<meta name="description" content="">
<meta name="author" content="">
{% include 'allianceauth/icons.html' %}
@@ -22,14 +22,18 @@
{% theme_css %}
{% include 'bundles/fontawesome.html' %}
{% include 'bundles/auth-base-bs5-css.html' %}
<style>
.navbar-toggler.collapsed{
transform: rotate(180deg);
}
.nav-padding {
padding-top: {% header_padding_size %} !important;
}
{% if user.is_authenticated %}
.nav-padding {
padding-top: {% header_padding_size %} !important;
}
{% endif %}
.auth-logo {
background-position: bottom;
@@ -40,79 +44,93 @@
{% block extra_css %}{% endblock extra_css %}
</head>
<body class="overflow-none">
<body>
{% if user.is_authenticated %}
<!-- Top Menu, Blocks don't work in "include" tagged views -->
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-primary">
<div class="container-fluid justify-content-start">
<a class="navbar-brand" data-bs-toggle="collapse" data-bs-target="#sidebar" role="button">
<i class="fas fa-solid fa-bars ms-2 me-2"></i>
</a>
<a class="navbar-brand">{% block header_nav_brand %}{{ SITE_NAME }}{% endblock %}</a>
<div class="collapse navbar-collapse" id="navbarexpand">
<div class="m-2"></div>
<ul id="nav-left" class="navbar-nav nav me-auto">
{% block header_nav_collapse_left %}
{% endblock %}
</ul>
<ul id="nav-right" class="navbar-nav">
{% block header_nav_collapse_right %} <!-- Default to add char and swap main -->
{% include 'allianceauth/top-menu-rh-default.html' %}
{% endblock %}
{% include 'menu/menu-notification-block.html' %}
</ul>
</div>
{% if user.is_authenticated %}
<a class="navbar-brand" data-bs-toggle="collapse" data-bs-target="#sidebar" role="button">
<i class="fas fa-solid fa-bars ms-2 me-2"></i>
</a>
{% endif %}
<a class="navbar-toggler navbar-brand border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#navbarexpand" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation" style="margin-left: auto;">
<i class="fas fa-solid fa-chevron-up"></i>
</a>
<div class="navbar-brand">{% block header_nav_brand %}{{ SITE_NAME }}{% endblock %}</div>
<div class="collapse navbar-collapse" id="navbarexpand">
<div class="m-2"></div>
<ul id="nav-left" class="navbar-nav nav me-auto">
{% block header_nav_collapse_left %}
{% endblock %}
</ul>
<ul id="nav-right" class="navbar-nav">
{% block header_nav_collapse_right %} <!-- Default to add char and swap main -->
{% include 'allianceauth/top-menu-rh-default.html' %}
{% endblock %}
{% include 'menu/menu-notification-block.html' %}
</ul>
</div>
<a class="navbar-toggler navbar-brand border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#navbarexpand" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation" style="margin-left: auto;">
<i class="fas fa-solid fa-chevron-up"></i>
</a>
</div>
</nav>
<!-- End Top Menu -->
<!-- Body -->
<main class="row flex-nowrap m-0">
{% include 'menu/sortable-side-menu.html' %}
<div class="nav-padding col flex-nowrap px-0 m-0 vh-100 overflow-auto">
<div class="p-2">
{% include 'allianceauth/messages-bs5.html' %}
{% block content %}
{% endblock content %}
</div>
</div>
</main>
<!-- End Body -->
{% endif %}
<!-- End Top Menu -->
<!-- Body -->
<main class="row flex-nowrap m-0">
{% include 'menu/sortable-side-menu.html' %}
<div class="nav-padding col flex-nowrap vh-100 overflow-auto">
<div class="my-4">
{% include 'allianceauth/messages-bs5.html' %}
{% block content %}
{% endblock content %}
</div>
</div>
</main>
<!-- End Body -->
<script>
(function () {
(() => {
// TODO Extend this to the groups in the sidebar too.
// TODO Move to own JS file
var sidebar = document.getElementById('sidebar')
const sidebar = document.getElementById('sidebar');
sidebar.addEventListener("shown.bs.collapse", function () {
sidebar.addEventListener("shown.bs.collapse", () => {
localStorage.removeItem("sidebar_" + sidebar.id);
});
sidebar.addEventListener("hidden.bs.collapse", function () {
sidebar.addEventListener("hidden.bs.collapse", () => {
localStorage.setItem("sidebar_" + sidebar.id, true);
});
if (localStorage.getItem("sidebar_" + sidebar.id) === "true") {
sidebar.classList.remove("show")
}
else {
} else {
sidebar.classList.add("show")
}
})();
</script>
{% include 'bundles/jquery-js.html' %}
{% theme_js %}
<script type="application/javascript">
let notificationUPdateSettings = {
notificationsListViewUrl: "{% url 'notifications:list' %}",
notificationsRefreshTime: "{% notifications_refresh_time %}",
userNotificationsCountViewUrl: "{% url 'notifications:user_notifications_count' request.user.pk %}"
};
</script>
{% if user.is_authenticated %}
<script type="application/javascript">
let notificationUPdateSettings = {
notificationsListViewUrl: "{% url 'notifications:list' %}",
notificationsRefreshTime: "{% notifications_refresh_time %}",
userNotificationsCountViewUrl: "{% url 'notifications:user_notifications_count' request.user.pk %}"
};
</script>
{% endif %}
{% block extra_javascript %}
{% endblock extra_javascript %}
<script>

View File

@@ -22,6 +22,6 @@
/>
</svg>
</div>
<p class="text-center"></p>>{{ error_message }}</p>
<p class="text-center">{{ error_message }}</p>
</div>
{% endblock content %}

View File

@@ -12,7 +12,7 @@
</button>
<a class="navbar-brand">
<img src="{% static 'allianceauth/icons/favicon-32x32.png' %}" style="display: inline-block;" height="32" width="32" alt="{{ SITE_NAME }}"/>
<img src="{% static 'allianceauth/icons/favicon-32x32.png' %}" style="display: inline-block;" height="32" width="32" alt="{{ SITE_NAME }}">
{{ SITE_NAME }}
</a>
</div>

View File

@@ -0,0 +1,3 @@
{% load static %}
<link href="{% static 'allianceauth/css/auth-base-bs5.css' %}" rel="stylesheet">

View File

@@ -1,3 +1,3 @@
{% load static %}
<link href="{% static 'allianceauth/css/auth-base.css' %}" rel="stylesheet"/>
<link href="{% static 'allianceauth/css/auth-base.css' %}" rel="stylesheet">

View File

@@ -3,18 +3,18 @@
{% if NIGHT_MODE %}
{% if debug %}
<!-- In template debug, loading less file instead of CSS -->
<link rel="stylesheet/less" href="{% static 'allianceauth/css/themes/darkly/darkly.less' %}"/>
<link rel="stylesheet/less" href="{% static 'allianceauth/css/themes/darkly/darkly.less' %}">
<script src='https://cdnjs.cloudflare.com/ajax/libs/less.js/4.1.3/less.min.js' integrity='sha512-6gUGqd/zBCrEKbJqPI7iINc61jlOfH5A+SluY15IkNO1o4qP1DEYjQBewTB4l0U4ihXZdupg8Mb77VxqE+37dg==' crossorigin='anonymous' referrerpolicy="no-referrer"></script>
{% else %}
<link rel="stylesheet" href="{% static 'allianceauth/css/themes/darkly/darkly.min.css' %}"/>
<link rel="stylesheet" href="{% static 'allianceauth/css/themes/darkly/darkly.min.css' %}">
{% endif %}
{% else %}
{% if debug %}
<!-- In template debug, loading less file instead of CSS -->
<link rel="stylesheet/less" href="{% static 'allianceauth/css/themes/flatly/flatly.less' %}"/>
<link rel="stylesheet/less" href="{% static 'allianceauth/css/themes/flatly/flatly.less' %}">
<script src='https://cdnjs.cloudflare.com/ajax/libs/less.js/4.1.3/less.min.js' integrity='sha512-6gUGqd/zBCrEKbJqPI7iINc61jlOfH5A+SluY15IkNO1o4qP1DEYjQBewTB4l0U4ihXZdupg8Mb77VxqE+37dg==' crossorigin='anonymous' referrerpolicy="no-referrer"></script>
{% else %}
<link rel="stylesheet" href="{% static 'allianceauth/css/themes/flatly/flatly.min.css' %}"/>
<link rel="stylesheet" href="{% static 'allianceauth/css/themes/flatly/flatly.min.css' %}">
{% endif %}
{% endif %}
<!-- End Bootstrap CSS -->

View File

@@ -1,3 +1,3 @@
{% load static %}
<link href="{% static 'allianceauth/css/checkbox.css' %}" rel="stylesheet"/>
<link href="{% static 'allianceauth/css/checkbox.css' %}" rel="stylesheet">

View File

@@ -1,3 +1,3 @@
<!-- Start Datatables-css from cdnjs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/datatables.net-bs5/1.13.4/dataTables.bootstrap5.min.css" integrity="sha512-zY8EbjNubt5sVVeNIxLQuU6lrDn0zYpaxCtS6mBBaqQREH1ZNQLdUxhHZjPaZhrw1CbEZkNdShEbIInJxzs9dQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/datatables.net-bs5/1.13.4/dataTables.bootstrap5.min.css" integrity="sha512-zY8EbjNubt5sVVeNIxLQuU6lrDn0zYpaxCtS6mBBaqQREH1ZNQLdUxhHZjPaZhrw1CbEZkNdShEbIInJxzs9dQ==" crossorigin="anonymous" referrerpolicy="no-referrer">
<!-- End Datatables-css from cdnjs -->

View File

@@ -1,3 +1,3 @@
<!-- Start Datatables-css from cdnjs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/datatables.net-bs/1.13.4/dataTables.bootstrap.min.css" integrity="sha512-LNQbjsbyJFucRxb1nbmwGxOlsO3ttrO7sE9mHMsbVCXakH/sUYbvfGveW800lXcbR2GMgpL1dDaY1xBv1jFDZw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/datatables.net-bs/1.13.4/dataTables.bootstrap.min.css" integrity="sha512-LNQbjsbyJFucRxb1nbmwGxOlsO3ttrO7sE9mHMsbVCXakH/sUYbvfGveW800lXcbR2GMgpL1dDaY1xBv1jFDZw==" crossorigin="anonymous" referrerpolicy="no-referrer">
<!-- End Datatables-css from cdnjs -->

View File

@@ -1,3 +1,3 @@
<!-- Start FontAwesome CSS from cdnjs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer">
<!-- End FontAwesome CSS from cdnjs -->

View File

@@ -1,3 +1,3 @@
<!-- Start jQuery-DateTimePicker CSS from cdnjs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.min.css" integrity="sha512-f0tzWhCwVFS3WeYaofoLWkTP62ObhewQ1EZn65oSYDZUg1+CyywGKkWzm8BxaJj5HGKI72PnMH9jYyIFz+GH7g==" crossorigin="anonymous" referrerpolicy="no-referrer"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.min.css" integrity="sha512-f0tzWhCwVFS3WeYaofoLWkTP62ObhewQ1EZn65oSYDZUg1+CyywGKkWzm8BxaJj5HGKI72PnMH9jYyIFz+GH7g==" crossorigin="anonymous" referrerpolicy="no-referrer">
<!-- End jQuery-DateTimePicker CSS from cdnjs -->

View File

@@ -1,5 +1,5 @@
{% load static %}
<!-- Start jQuery UI CSS from Alliance Auth -->
<!-- CDNs all contain theme.css, which is not supposed to be in the base CSS, Which is why this is uniquely bundled in not using a CDN -->
<link rel="stylesheet" href="{% static 'allianceauth/js/jquery-ui/1.13.2/css/jquery-ui.min.css' %}" integrity="VEqAhOZvZrx/WaxlpMoLvZDSLeLNYhkL5LU2R4/ihPJb/+qkGoMrA15SqEGtI+PCLgKwCDiby7tgdvdiAZkJGg==" crossorigin="anonymous" referrerpolicy="no-referrer"/>
<link rel="stylesheet" href="{% static 'allianceauth/js/jquery-ui/1.13.2/css/jquery-ui.min.css' %}" integrity="VEqAhOZvZrx/WaxlpMoLvZDSLeLNYhkL5LU2R4/ihPJb/+qkGoMrA15SqEGtI+PCLgKwCDiby7tgdvdiAZkJGg==" crossorigin="anonymous" referrerpolicy="no-referrer">
<!-- End jQuery UI CSS from aa-gdpr -->

View File

@@ -1,5 +1,5 @@
<!-- Start Moment.js from cdnjs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js" integrity="sha512-CryKbMe7sjSCDPl18jtJI5DR5jtkUWxPXWaLCst6QjH8wxDexfRJic2WRmRXmstr2Y8SxDDWuBO6CQC6IE4KTA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js" integrity="sha512-+H4iLjY3JsKiF2V6N366in5IQHj2uEsGV7Pp/GRcm0fn76aPAk5V8xB6n8fQhhSonTqTXs/klFz4D0GIn6Br9g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
{% if locale and LANGUAGE_CODE != 'en' %}
<!-- Moment.JS Not EN-en -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/locale/{{ LANGUAGE_CODE }}.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

View File

@@ -1,3 +1,3 @@
<!-- Start X-editable CSS from cdnjs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.1/bootstrap3-editable/css/bootstrap-editable.css" integrity="sha512-e0rbO6UJET0zDdXOHjwc6D44UpeKumn7cU7XR/fa4S0/Jso0bZqcCqlIF6mtvcimMbf846mkv8aSWFnTwABr/g==" crossorigin="anonymous" referrerpolicy="no-referrer"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.1/bootstrap3-editable/css/bootstrap-editable.css" integrity="sha512-e0rbO6UJET0zDdXOHjwc6D44UpeKumn7cU7XR/fa4S0/Jso0bZqcCqlIF6mtvcimMbf846mkv8aSWFnTwABr/g==" crossorigin="anonymous" referrerpolicy="no-referrer">
<!-- End X-editable CSS from cdnjs -->