{{ notif.timestamp }} |
{{ notif.title }} |
diff --git a/allianceauth/optimer/templates/optimer/dashboard.ops.html b/allianceauth/optimer/templates/optimer/dashboard.ops.html
index 1adb5d52..b271c591 100644
--- a/allianceauth/optimer/templates/optimer/dashboard.ops.html
+++ b/allianceauth/optimer/templates/optimer/dashboard.ops.html
@@ -7,7 +7,7 @@
{% translate "Upcoming Fleets" %}
-
+
{% translate "Operation" %} |
diff --git a/allianceauth/permissions_tool/tests.py b/allianceauth/permissions_tool/tests.py
index 97f8e7b4..97222d67 100644
--- a/allianceauth/permissions_tool/tests.py
+++ b/allianceauth/permissions_tool/tests.py
@@ -3,7 +3,7 @@ from django import urls
from django.contrib.auth.models import Group, Permission
from allianceauth.tests.auth_utils import AuthUtils
-
+from allianceauth.menu.models import MenuItem
class PermissionsToolViewsTestCase(WebTest):
def setUp(self):
@@ -34,13 +34,19 @@ class PermissionsToolViewsTestCase(WebTest):
self.member.user_permissions.add(self.permission)
AuthUtils.connect_signals()
+ # TODO find a nicer way to do this later
+ MenuItem.sync_hook_models()
+
def test_menu_item(self):
+ # If we change the side menu again this will fail again.
self.app.set_user(self.member)
response = self.app.get(urls.reverse('permissions_tool:overview'))
- response_content = response.content.decode('utf-8')
+ response_content = response.content.decode(response.charset)
- self.assertInHTML(' Permissions Audit', response_content)
+ self.assertIn("fa-id-card", response_content)
+ self.assertIn('href="/permissions/overview/"', response_content)
+ self.assertIn("Permissions Audit", response_content)
def test_permissions_overview(self):
self.app.set_user(self.member)
diff --git a/allianceauth/services/templatetags/__init__.py b/allianceauth/services/templatetags/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/allianceauth/services/templatetags/menu_items.py b/allianceauth/services/templatetags/menu_items.py
deleted file mode 100644
index 6485641a..00000000
--- a/allianceauth/services/templatetags/menu_items.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from django import template
-
-from allianceauth.hooks import get_hooks
-
-register = template.Library()
-
-
-def process_menu_items(hooks, request):
- _menu_items = list()
- items = [fn() for fn in hooks]
- items.sort(key=lambda i: i.order)
- for item in items:
- _menu_items.append(item.render(request))
- return _menu_items
-
-
-@register.inclusion_tag('public/menublock.html', takes_context=True)
-def menu_items(context):
- request = context['request']
-
- return {
- 'menu_items': process_menu_items(get_hooks('menu_item_hook'), request),
- }
diff --git a/allianceauth/static/allianceauth/css/auth-base-bs5.css b/allianceauth/static/allianceauth/css/auth-base-bs5.css
deleted file mode 100644
index 44315df2..00000000
--- a/allianceauth/static/allianceauth/css/auth-base-bs5.css
+++ /dev/null
@@ -1,49 +0,0 @@
-/* BS 5 Additions
-
-Helpful CSS classes that are missing in BS5
-------------------------------------------------------------------------------------- */
-@media all {
- .cursor-auto {
- cursor: auto;
- }
-
- .cursor-default {
- cursor: default;
- }
-
- .cursor-pointer {
- cursor: pointer;
- }
-
- .cursor-wait {
- cursor: wait;
- }
-
- .cursor-text {
- cursor: text;
- }
-
- .cursor-move {
- cursor: move;
- }
-
- .cursor-help {
- cursor: help;
- }
-
- .cursor-not-allowed {
- cursor: not-allowed;
- }
-
- .cursor-inherit {
- cursor: inherit;
- }
-
- .cursor-zoom-in {
- cursor: zoom-in;
- }
-
- .cursor-zoom-out {
- cursor: zoom-out;
- }
-}
diff --git a/allianceauth/static/allianceauth/css/auth-framework.css b/allianceauth/static/allianceauth/css/auth-framework.css
new file mode 100644
index 00000000..830baa70
--- /dev/null
+++ b/allianceauth/static/allianceauth/css/auth-framework.css
@@ -0,0 +1,101 @@
+/**
+ * Alliance Auth CSS Framework
+ *
+ * This provides some CSS classes together with a couple of Bootstrap fixes
+ * to be used throughout Alliance Auth and its Community Apps
+ */
+
+/* Bootstrap fixes
+------------------------------------------------------------------------------------- */
+@media all {
+ .table {
+ --bs-table-bg: transparent;
+ }
+}
+
+/* Cursor classes
+------------------------------------------------------------------------------------- */
+@media all {
+ .cursor-auto {
+ cursor: auto;
+ }
+
+ .cursor-default {
+ cursor: default;
+ }
+
+ .cursor-pointer {
+ cursor: pointer;
+ }
+
+ .cursor-wait {
+ cursor: wait;
+ }
+
+ .cursor-text {
+ cursor: text;
+ }
+
+ .cursor-move {
+ cursor: move;
+ }
+
+ .cursor-help {
+ cursor: help;
+ }
+
+ .cursor-not-allowed {
+ cursor: not-allowed;
+ }
+
+ .cursor-inherit {
+ cursor: inherit;
+ }
+
+ .cursor-zoom-in {
+ cursor: zoom-in;
+ }
+
+ .cursor-zoom-out {
+ cursor: zoom-out;
+ }
+}
+
+/* Callouts
+ *
+ * Not quite alerts, but custom and helpful notes for folks.
+ * Requires a base and modifier class.
+------------------------------------------------------------------------------------- */
+@media all {
+ /* Common styles for all types */
+ .aa-callout {
+ border: 1px solid var(--bs-border-color);
+ border-left-width: 0.25rem;
+ border-radius: 0.25rem;
+ margin-bottom: 1.25rem;
+ margin-top: 1.25rem;
+ padding: 1.25rem;
+ }
+
+ /* Last item bottom margin should be 0 */
+ .aa-callout :last-child {
+ margin-bottom: 0;
+ }
+
+ /* Variations */
+ .aa-callout.aa-callout-danger {
+ border-left-color: var(--bs-danger);
+ }
+
+ .aa-callout.aa-callout-info {
+ border-left-color: var(--bs-info);
+ }
+
+ .aa-callout.aa-callout-success {
+ border-left-color: var(--bs-success);
+ }
+
+ .aa-callout.aa-callout-warning {
+ border-left-color: var(--bs-warning);
+ }
+}
diff --git a/allianceauth/templates/allianceauth/base-bs5.html b/allianceauth/templates/allianceauth/base-bs5.html
index fdff5fa3..20b0cb83 100644
--- a/allianceauth/templates/allianceauth/base-bs5.html
+++ b/allianceauth/templates/allianceauth/base-bs5.html
@@ -22,7 +22,7 @@
{% theme_css %}
{% include 'bundles/fontawesome.html' %}
- {% include 'bundles/auth-base-bs5-css.html' %}
+ {% include 'bundles/auth-framework-css.html' %}
|