mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Merge branch 'template-stuff' into 'v4.x'
Auth Menu Changes and Other Template Fixes See merge request allianceauth/allianceauth!1586
This commit is contained in:
commit
2815ebaa07
@ -1,5 +1,5 @@
|
||||
{% load i18n %}
|
||||
<div class="col-12 col-xl-8 align-self-stretch p-2 ps-0 pe-0 ps-xl-0 pe-xl-2">
|
||||
<div id="aa-dashboard-panel-characters" class="col-12 col-xl-8 align-self-stretch p-2 ps-0 pe-0 ps-xl-0 pe-xl-2">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center">
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% load i18n %}
|
||||
<div class="col-12 col-xl-4 align-self-stretch py-2 ps-xl-2">
|
||||
<div id="aa-dashboard-panel-membership" class="col-12 col-xl-4 align-self-stretch py-2 ps-xl-2">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-center">{% translate "Membership" %}</h4>
|
||||
|
@ -16,7 +16,7 @@
|
||||
{% translate "This page is a best attempt, but backups or database logs can still contain your tokens. Always revoke tokens on https://community.eveonline.com/support/third-party-applications/ where possible."|urlize %}
|
||||
</p>
|
||||
|
||||
<table class="table" id="table_tokens" style="width: 100%;">
|
||||
<table class="table w-100" id="table_tokens">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Scopes" %}</th>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends 'public/base.html' %}
|
||||
|
||||
{% load bootstrap %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Registration" %}{% endblock %}
|
||||
@ -12,16 +12,20 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="panel panel-default panel-transparent">
|
||||
<div class="panel-body">
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Register" %}</button>
|
||||
</form>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<div class="card card-login border-secondary p-3">
|
||||
<div class="card-body">
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<button class="btn btn-primary btn-block" type="submit">{% translate "Register" %}</button>
|
||||
</form>
|
||||
|
||||
{% include 'public/lang_select.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'public/lang_select.html' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
<div class="card card-default mt-4">
|
||||
<div class="card-header clearfix" role="tablist">
|
||||
<ul class="nav nav-pills text-right float-start">
|
||||
<ul class="nav nav-pills float-start">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a
|
||||
class="nav-link active"
|
||||
|
@ -13,6 +13,36 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Side Navigation
|
||||
------------------------------------------------------------------------------------- */
|
||||
@media all {
|
||||
#sidebar > div {
|
||||
width: 325px;
|
||||
}
|
||||
|
||||
#sidebar-menu li > a,
|
||||
#sidebar-menu li > ul > li > a {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
max-width: 210px;
|
||||
}
|
||||
|
||||
#sidebar-menu li > ul > li > a {
|
||||
max-width: 189px;
|
||||
}
|
||||
|
||||
#sidebar-menu [data-bs-toggle="collapse"] > i.fa-chevron-down,
|
||||
#sidebar-menu [data-bs-toggle="collapse"].collapsed > i.fa-chevron-right {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#sidebar-menu [data-bs-toggle="collapse"] > i.fa-chevron-right,
|
||||
#sidebar-menu [data-bs-toggle="collapse"].collapsed > i.fa-chevron-down {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Cursor classes
|
||||
------------------------------------------------------------------------------------- */
|
||||
@media all {
|
||||
|
@ -30,7 +30,11 @@
|
||||
<tr>
|
||||
<th>{% translate "Name" %}</th>
|
||||
<th>{% translate "Description" %}</th>
|
||||
<th>{% translate "Leaders" %}<span class="m-1 fw-lighter badge bg-primary">{% translate "User" %}</span><span class="m-1 fw-lighter badge bg-secondary ">{% translate "Group" %}</span></th>
|
||||
<th>
|
||||
{% translate "Leaders" %}<br>
|
||||
<span class="my-1 me-1 fw-lighter badge bg-primary">{% translate "User" %}</span>
|
||||
<span class="my-1 me-1 fw-lighter badge bg-secondary">{% translate "Group" %}</span>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -39,13 +43,23 @@
|
||||
{% for g in groups %}
|
||||
<tr>
|
||||
<td>{{ g.group.name }}</td>
|
||||
<td>{{ g.group.authgroup.description|linebreaks|urlize }}</td>
|
||||
<td>
|
||||
{% if g.group.authgroup.description %}
|
||||
{{ g.group.authgroup.description|linebreaks|urlize }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td style="max-width: 30%;">
|
||||
{% if g.group.authgroup.group_leaders.all.count %}
|
||||
{% for leader in g.group.authgroup.group_leaders.all %}{% if leader.profile.main_character %}<span class="m-1 badge bg-primary">{{leader.profile.main_character}}</span>{% endif %}{% endfor %}
|
||||
{% for leader in g.group.authgroup.group_leaders.all %}
|
||||
{% if leader.profile.main_character %}
|
||||
<span class="my-1 me-1 badge bg-primary">{{leader.profile.main_character}}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if g.group.authgroup.group_leaders.all.count %}
|
||||
{% for group in g.group.authgroup.group_leader_groups.all %}<span class="badge bg-secondary">{{group.name}}</span>{% endfor %}
|
||||
{% for group in g.group.authgroup.group_leader_groups.all %}
|
||||
<span class="my-1 me-1 badge bg-secondary">{{group.name}}</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
|
@ -10,21 +10,24 @@
|
||||
</a>
|
||||
|
||||
{% if item.count >= 1 %}
|
||||
<span class="badge bg-primary m-2 align-self-center {% if item.items|length == 0 %}me-4{% endif %}">
|
||||
<span class="badge bg-primary m-2 align-self-center {% if item.items|length == 0 %}me-2{% endif %}">
|
||||
{{ item.count }}
|
||||
</span>
|
||||
{% elif item.url %}
|
||||
<span class="pill m-2 me-4 align-self-center fas fa-external-link-alt"></span>
|
||||
<span class="pill m-2 me-2 align-self-center fas fa-external-link-alt" title="{% translate 'External link' %}"></span>
|
||||
{% endif %}
|
||||
|
||||
{% if item.items|length > 0 %}
|
||||
<span
|
||||
class="pill m-2 me-4 align-self-center fas fa-solid fa-chevron-down"
|
||||
class="pill m-2 me-2 align-self-center collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#id-{{ item.text|slugify }}"
|
||||
aria-expanded="false"
|
||||
aria-controls="">
|
||||
aria-controls=""
|
||||
>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</span>
|
||||
<!--<hr class="m-0 w-100">-->
|
||||
<ul class="collapse ps-1 w-100 border-start rounded-start border-light border-3" id="id-{{ item.text|slugify }}">
|
||||
|
@ -1,4 +1,3 @@
|
||||
{% load static %}
|
||||
<div class="align-items-center text-center">
|
||||
<img src="{% static 'allianceauth/images/auth-logo.svg' %}" widht="128px" height="128px">
|
||||
{% include "bundles/image-auth-logo.html" %}
|
||||
</div>
|
||||
|
@ -2,35 +2,43 @@
|
||||
{% load evelinks %}
|
||||
{% load theme_tags %}
|
||||
|
||||
<div style="z-index:5;" class="w100 d-flex flex-column justify-content-center align-items-center text-center pb-2 border-top border-secondary">
|
||||
<div class="d-flex mb-0 w-100 bg-dark text-light">
|
||||
<div id="aa-user-info" class="w-100 d-flex flex-column justify-content-center align-items-center text-center py-1 border-top border-secondary {% if not user.is_authenticated %}position-absolute bottom-0{% endif %}">
|
||||
<div class="d-flex mb-0 w-100">
|
||||
<div class="p-2 position-relative m-2">
|
||||
{% with request.user.profile.main_character as main %}
|
||||
<img class="rounded-circle" src="{{ main.character_id|character_portrait_url:64 }}" alt="{{ main.character_name }}">
|
||||
<img class="rounded-circle position-absolute bottom-0 start-0" src="{{ main.corporation_logo_url_32 }}" alt="{{ main.corporation_name }}">
|
||||
{% if main.alliance_id %}
|
||||
<img class="rounded-circle position-absolute bottom-0 end-0" src="{{ main.alliance_logo_url_32 }}" alt="{{ main.alliance_name }}">
|
||||
{% elif main.faction_id %}
|
||||
<img class="rounded-circle position-absolute bottom-0 end-0" src="{{ main.faction_logo_url_32 }}" alt="{{ main.faction_name }}">
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% if user.is_authenticated %}
|
||||
{% with request.user.profile.main_character as main %}
|
||||
<img class="rounded-circle" src="{{ main.character_id|character_portrait_url:64 }}" alt="{{ main.character_name }}">
|
||||
<img class="rounded-circle position-absolute bottom-0 start-0" src="{{ main.corporation_logo_url_32 }}" alt="{{ main.corporation_name }}">
|
||||
{% if main.alliance_id %}
|
||||
<img class="rounded-circle position-absolute bottom-0 end-0" src="{{ main.alliance_logo_url_32 }}" alt="{{ main.alliance_name }}">
|
||||
{% elif main.faction_id %}
|
||||
<img class="rounded-circle position-absolute bottom-0 end-0" src="{{ main.faction_logo_url_32 }}" alt="{{ main.faction_name }}">
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% include "bundles/image-auth-logo.html" with logo_width="64px" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="align-self-center text-start">
|
||||
{% with request.user.profile.main_character as main %}
|
||||
<h5 class="m-0">{{ main.character_name }}</h5>
|
||||
<p class="m-0 small">{{ main.corporation_name }}</p>
|
||||
{% if main.alliance_id %}
|
||||
<p class="m-0 small">{{ main.alliance_name }}</p>
|
||||
{% elif main.faction_id %}
|
||||
<p class="m-0 small">{{ main.faction_name }}</p>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% if user.is_authenticated %}
|
||||
{% with request.user.profile.main_character as main %}
|
||||
<h5 class="m-0">{{ main.character_name }}</h5>
|
||||
<p class="m-0 small">{{ main.corporation_name }}</p>
|
||||
{% if main.alliance_id %}
|
||||
<p class="m-0 small">{{ main.alliance_name }}</p>
|
||||
{% elif main.faction_id %}
|
||||
<p class="m-0 small">{{ main.faction_name }}</p>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<h5 class="m-0">{{ SITE_NAME }}</h5>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ms-auto dropup">
|
||||
<button type="button" class="h-100 btn" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa-solid fa-gear fa-fw text-light"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<ul class="dropdown-menu" style="min-width: 200px;">
|
||||
<li><h6 class="dropdown-header">{% translate "Language" %}</h6></li>
|
||||
<li>
|
||||
<a class="dropdown-item">{% include "public/lang_select.html" %}</a>
|
||||
@ -76,8 +84,6 @@
|
||||
<a class="dropdown-item text-success" href="{% url 'authentication:login' %}" title="{% translate 'Sign In' %}"> <i class="fa-solid fa-right-to-bracket fa-fw "></i> {% translate 'Sign In' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
<div class="col-auto px-0">
|
||||
<div class="collapse collapse-horizontal" tabindex="-1" id="sidebar">
|
||||
<div style="width: 350px;">
|
||||
<div class="nav-padding navbar-dark bg-dark text-light px-0 d-flex flex-column overflow-hidden vh-100">
|
||||
<div>
|
||||
<div class="nav-padding navbar-dark bg-dark text-light px-0 d-flex flex-column overflow-hidden vh-100 {% if not user.is_authenticated %}position-relative{% endif %}">
|
||||
{% if user.is_authenticated %}
|
||||
<ul style="z-index:5;" id="sidebar-menu" class="navbar-nav flex-column mb-auto overflow-auto pt-2">
|
||||
<ul id="sidebar-menu" class="navbar-nav flex-column mb-auto overflow-auto pt-2">
|
||||
<li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
|
||||
<i class="nav-link fas fa-tachometer-alt fa-fw align-self-center me-3 {% navactive request 'authentication:dashboard' %}"></i>
|
||||
<a class="nav-link flex-fill align-self-center" href="{% url 'authentication:dashboard' %}">
|
||||
@ -17,8 +17,10 @@
|
||||
|
||||
{% sorted_menu_items %}
|
||||
</ul>
|
||||
|
||||
{% include 'menu/menu-logo.html' %}
|
||||
{% endif %}
|
||||
{% include 'menu/menu-logo.html' %}
|
||||
|
||||
{% include 'menu/menu-user.html' %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,7 +23,7 @@
|
||||
</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="tab_permissions_audit" style="width: 100%;">
|
||||
<table class="table table-striped w-100" id="tab_permissions_audit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% translate "Group" %}</th>
|
||||
|
@ -23,7 +23,7 @@
|
||||
</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="tab_permissions_overview" style="width: 100%;">
|
||||
<table class="table table-striped w-100" id="tab_permissions_overview">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% translate "App" %}</th>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
{% if generated != "" %}
|
||||
<div class="text-right mb-3">
|
||||
<div class="text-end mb-3">
|
||||
<textarea class="form-control" rows="10" cols="60">{{ generated }}</textarea>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="card text-center m-3" style="min-width: 18rem; min-height: 18rem;">
|
||||
<div class="card text-center m-2" style="min-width: 18rem; min-height: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{% block title %}{% endblock title %}</h5>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% load humanize %}
|
||||
|
||||
{% if notifications %}
|
||||
<div class="col-12 align-self-stretch pb-2">
|
||||
<div id="aa-dashboard-panel-admin-notifications" class="col-12 align-self-stretch pb-2">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center">
|
||||
@ -51,10 +51,10 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-12 align-self-stretch py-2">
|
||||
<div class="col-12 align-self-stretch pb-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">
|
||||
<div id="aa-dashboard-panel-software-version" 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>
|
||||
@ -97,7 +97,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6 col-lg-12 col-md-12 col-sm-12">
|
||||
<div id="aa-dashboard-panel-task-queue" 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>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% load i18n %}
|
||||
|
||||
<li class="nav-item active">
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'authentication:add_character' %}" class="nav-link" title="{% translate 'Add Character' %}">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
<span class="d-lg-none d-md-inline m-2">{% translate "Add Character" %}</span>
|
||||
|
3
allianceauth/templates/bundles/image-auth-logo.html
Normal file
3
allianceauth/templates/bundles/image-auth-logo.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% load static %}
|
||||
|
||||
<img src="{% static 'allianceauth/images/auth-logo.svg' %}" width="{{ logo_width|default:"128px" }}" height="{% if logo_height %}{{ logo_ }}{% else %}{{ logo_width|default:"128px" }}{% endif %}" alt="{{ SITE_NAME }}">
|
@ -1,9 +1,13 @@
|
||||
{% load i18n %}
|
||||
|
||||
<form action="{% url 'theme' %}?next={{ next|urlencode }}" method="post">
|
||||
{% csrf_token %}
|
||||
<select name="theme" value="theme" class="form-select" aria-label="" onchange="this.form.submit()">
|
||||
<option selected>Select Theme</option>
|
||||
|
||||
<select name="theme" class="form-select" aria-label="" onchange="this.form.submit()">
|
||||
<option selected>{% translate "Select Theme" %}</option>
|
||||
|
||||
{% for theme in themes %}
|
||||
<option value="{{ theme.get_name }}">{{ theme.name }}</option>
|
||||
<option value="{{ theme.get_name }}"{% if selected_theme.name == theme.name %} selected="selected"{% endif %}>{{ theme.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
|
@ -72,5 +72,6 @@ def theme_select(context):
|
||||
request = context['request']
|
||||
return {
|
||||
'next': request.path,
|
||||
'themes': get_hooks('theme_hook')
|
||||
'themes': get_hooks('theme_hook'),
|
||||
'selected_theme': get_theme(request)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user