Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hansegucker/AlekSIS-Core
  • pinguin/AlekSIS-Core
  • AlekSIS/official/AlekSIS-Core
  • sunweaver/AlekSIS-Core
  • sggua/AlekSIS-Core
  • edward/AlekSIS-Core
  • magicfelix/AlekSIS-Core
7 results
Show changes
Commits on Source (22)
Showing
with 31 additions and 6 deletions
......@@ -18,6 +18,15 @@ Fixed
~~~~~
* Correctly update theme colours on change again
* Use correct favicon as default AlekSIS favicon
* Show all years in a 200 year range around the current year in date pickers
Removed
~~~~~~~
* Remove old generated AlekSIS icons
* Imprint is now called "Imprint" and not "Impress".
* Logo files weren't uploaded to public namespace.
`2.3.1`_ – 2021-12-17
---------------------
......
# flake8: noqa: DJ12
import os
from datetime import datetime
from typing import Any, Callable, List, Optional, Union
......@@ -21,6 +22,8 @@ from django.views.generic import CreateView, UpdateView
from django.views.generic.edit import DeleteView, ModelFormMixin
import reversion
from dynamic_preferences.settings import preferences_settings
from dynamic_preferences.types import FilePreference
from guardian.admin import GuardedModelAdmin
from guardian.core import ObjectPermissionChecker
from jsonstore.fields import IntegerField, JSONFieldMixin
......@@ -529,3 +532,14 @@ class SchoolTermRelatedExtensibleForm(ExtensibleForm):
kwargs["initial"] = {"school_term": SchoolTerm.current}
super().__init__(*args, **kwargs)
class PublicFilePreferenceMixin(FilePreference):
"""Uploads a file to the public namespace."""
upload_path = "public"
def get_upload_path(self):
return os.path.join(
self.upload_path, preferences_settings.FILE_PREFERENCE_UPLOAD_DIR, self.identifier()
)
......@@ -16,6 +16,7 @@ from dynamic_preferences.types import (
)
from oauth2_provider.models import AbstractApplication
from .mixins import PublicFilePreferenceMixin
from .models import Group, Person
from .registries import person_preferences_registry, site_preferences_registry
from .util.notifications import get_notification_choices_lazy
......@@ -78,7 +79,7 @@ class ColourSecondary(StringPreference):
@site_preferences_registry.register
class Logo(FilePreference):
class Logo(PublicFilePreferenceMixin, FilePreference):
"""Logo of your AlekSIS instance."""
section = theme
......@@ -88,7 +89,7 @@ class Logo(FilePreference):
@site_preferences_registry.register
class Favicon(FilePreference):
class Favicon(PublicFilePreferenceMixin, FilePreference):
"""Favicon of your AlekSIS instance."""
section = theme
......@@ -98,7 +99,7 @@ class Favicon(FilePreference):
@site_preferences_registry.register
class PWAIcon(FilePreference):
class PWAIcon(PublicFilePreferenceMixin, FilePreference):
"""PWA-Icon of your AlekSIS instance."""
section = theme
......
......@@ -664,7 +664,7 @@ if _settings.get("dev.uwsgi.celery", DEBUG):
DEFAULT_FAVICON_PATHS = {
"pwa_icon": os.path.join(STATIC_ROOT, "img/aleksis-icon.png"),
"favicon": os.path.join(STATIC_ROOT, "img/aleksis-icon.png"),
"favicon": os.path.join(STATIC_ROOT, "img/aleksis-favicon.png"),
}
PWA_ICONS_CONFIG = {
"android": [192, 512],
......
aleksis/core/static/icons/android_192.png

12.3 KiB

aleksis/core/static/icons/android_512.png

37.5 KiB

aleksis/core/static/icons/apple_114.png

7.19 KiB

aleksis/core/static/icons/apple_152.png

9.67 KiB

aleksis/core/static/icons/apple_180.png

11.4 KiB

aleksis/core/static/icons/apple_76.png

4.9 KiB

aleksis/core/static/icons/favicon_16.png

830 B

aleksis/core/static/icons/favicon_32.png

1.36 KiB

......@@ -19,7 +19,8 @@ function initDatePicker(sel) {
// Set monday as first day of week
firstDay: get_format('FIRST_DAY_OF_WEEK'),
autoClose: true
autoClose: true,
yearRange: [new Date().getFullYear() - 100, new Date().getFullYear() + 100],
});
el.datepicker("setDate", $(sel).val());
return el;
......
......@@ -180,7 +180,7 @@
<span id="doit"></span>
{% if request.site.preferences.footer__imprint_url %}
<a class="blue-text text-lighten-4" href="{{ request.site.preferences.footer__imprint_url }}">
{% trans "Impress" %}
{% trans "Imprint" %}
</a>
{% endif %}
{% if request.site.preferences.footer__privacy_url and request.site.preferences.footer__imprint_url %}
......