Merge branch 'prepare-base-template-for-public-views' into 'master'

[FIX] Templates prepared for public views

See merge request allianceauth/allianceauth!1525
This commit is contained in:
Ariel Rin 2023-08-10 04:23:48 +00:00
commit 1786f3a642
5 changed files with 42 additions and 29 deletions

View File

@ -32,10 +32,13 @@ INSTALLED_APPS += [
# To change the logging level for extensions, uncomment the following line.
# LOGGING['handlers']['extension_file']['level'] = 'DEBUG'
# By default apps are prevented from having public views for security reasons.
# If you want to allow specific apps to have public views
# you can put there names here (same name as in INSTALLED_APPS):
APPS_WITH_PUBLIC_VIEWS = []
# By default, apps are prevented from having public views for security reasons.
# To allow specific apps to have public views, add them to APPS_WITH_PUBLIC_VIEWS
# » The format is the same as in INSTALLED_APPS
# » The app developer must also explicitly allow public views for their app
APPS_WITH_PUBLIC_VIEWS = [
]
# Enter credentials to use MySQL/MariaDB. Comment out to use sqlite3
DATABASES['default'] = {

View File

@ -122,7 +122,7 @@ ul.list-group.list-group-horizontal > li.list-group-item {
padding-top: 0.5rem;
}
.navbar-nav > li.top-user-menu.with-main-character a {
.navbar-nav > li.top-user-menu a {
padding: 14px;
}

View File

@ -21,33 +21,37 @@
</head>
<body class="{% if NIGHT_MODE %}template-dark-mode{% else %}template-light-mode{% endif %}">
{% if user.is_authenticated %}
<div id="wrapper" class="container">
<!-- Navigation -->
{% include 'allianceauth/top-menu.html' %}
<div class="row" id="site-body-wrapper">
<div id="wrapper" class="container">
<!-- Navigation -->
{% include 'allianceauth/top-menu.html' %}
<div class="clearfix{% if user.is_authenticated %} row{% endif %}" id="site-body-wrapper">
{% if user.is_authenticated %}
{% include 'allianceauth/side-menu.html' %}
<div class="col-sm-10">
{% include 'allianceauth/messages.html' %}
{% block content %}
{% endblock content %}
</div>
<div class="clearfix"></div>
{% endif %}
<div class="{% if user.is_authenticated %}col-sm-10{% else %}col-sm-12{% endif %}">
{% include 'allianceauth/messages.html' %}
{% block content %}
{% endblock content %}
</div>
</div>
{% endif %}
</div>
{% include 'bundles/bootstrap-js.html' %}
{% include 'bundles/jquery-visibility-js.html' %}
<script>
let notificationUPdateSettings = {
notificationsListViewUrl: "{% url 'notifications:list' %}",
notificationsRefreshTime: "{% notifications_refresh_time %}",
userNotificationsCountViewUrl: "{% url 'notifications:user_notifications_count' request.user.pk %}"
};
</script>
{% include 'bundles/refresh-notifications-js.html' %}
{% if user.is_authenticated %}
<script>
let notificationUPdateSettings = {
notificationsListViewUrl: "{% url 'notifications:list' %}",
notificationsRefreshTime: "{% notifications_refresh_time %}",
userNotificationsCountViewUrl: "{% url 'notifications:user_notifications_count' request.user.pk %}"
};
</script>
{% include 'bundles/refresh-notifications-js.html' %}
{% endif %}
{% include 'bundles/evetime-js.html' %}
{% block extra_javascript %}

View File

@ -11,7 +11,10 @@
</span>
{% endwith %}
{% else %}
{% translate "User Menu" %}
<img class="img-rounded ra-avatar" src="{{ 1|character_portrait_url:32 }}" alt="{{ main.character_name }}">
<span class="hidden-sm hidden-md hidden-lg">
{% translate "User Menu" %}
</span>
{% endif %}
<span class="caret"></span>
</a>

View File

@ -22,9 +22,12 @@
<li class="nav-item-eve-time">
<div class="eve-time-wrapper">{% translate "Eve Time" %}: <span class="eve-time-clock"></span></div>
</li>
<li class="{% navactive request 'notifications:' %}" id="menu_item_notifications">
{% include 'allianceauth/notifications_menu_item.html' %}
</li>
{% if user.is_authenticated %}
<li class="{% navactive request 'notifications:' %}" id="menu_item_notifications">
{% include 'allianceauth/notifications_menu_item.html' %}
</li>
{% endif %}
{% include 'allianceauth/top-menu-user-dropdown.html' %}
</ul>