Skip to content
Snippets Groups Projects
Verified Commit 33563126 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Make site title (used in title and nav header) configurable by constance settings

Close #155
parent fadb4da8
No related branches found
Tags 2.0rc7
1 merge request!120Make site title (used in title and nav header) configurable by constance settings
Pipeline #644 failed
......@@ -298,6 +298,7 @@ TEMPLATE_VISIBLE_SETTINGS = ["ADMINS", "DEBUG"]
CONSTANCE_BACKEND = "constance.backends.database.DatabaseBackend"
CONSTANCE_ADDITIONAL_FIELDS = {
"char_field": ["django.forms.CharField", {}],
"image_field": ["django.forms.ImageField", {}],
"email_field": ["django.forms.EmailField", {}],
"url_field": ["django.forms.URLField", {}],
......@@ -314,6 +315,7 @@ CONSTANCE_ADDITIONAL_FIELDS = {
}],
}
CONSTANCE_CONFIG = {
"SITE_TITLE": ("AlekSIS", _("Site title"), "char_field"),
"COLOUR_PRIMARY": ("#007bff", _("Primary colour")),
"COLOUR_SECONDARY": ("#007bff", _("Secondary colour")),
"MAIL_OUT_NAME": ("AlekSIS", _("Mail out name")),
......@@ -323,6 +325,7 @@ CONSTANCE_CONFIG = {
"ADRESSING_NAME_FORMAT": ("german", _("Name format of adresses"), "adressing-select")
}
CONSTANCE_CONFIG_FIELDSETS = {
"General settings": ("SITE_TITLE",),
"Theme settings": ("COLOUR_PRIMARY", "COLOUR_SECONDARY"),
"Mail settings": ("MAIL_OUT_NAME", "MAIL_OUT", "ADRESSING_NAME_FORMAT"),
"Footer settings": ("PRIVACY_URL", "IMPRINT_URL"),
......
......@@ -12,7 +12,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="{% blocktrans %}AlekSIS is a web-based school information system (SIS) which can be used to manage and/or publish organisational data of educational in titutions.{% endblocktrans %}">
<title>{% blocktrans %}AlekSIS - School Information System{% endblocktrans %}</title>
<title>{{ config.SITE_TITLE }}</title>
{# Favicons #}
<link href="{% static "icons/favicon_16.png" %}" rel="icon" type="image/png" sizes="16x16">
......@@ -43,7 +43,7 @@
<!-- Nav bar (logged in as, logout) -->
<nav>
<a class="brand-logo" href="/">AlekSIS</a>
<a class="brand-logo" href="/">{{ config.SITE_TITLE }}</a>
<div class="nav-wrapper">
<ul id="nav-mobile" class="right hide-on-med-and-down">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment