mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-20 17:52:30 +02:00
Compare commits
7 Commits
dcc5373247
...
0b07e3bcd9
Author | SHA1 | Date | |
---|---|---|---|
|
0b07e3bcd9 | ||
|
af453bc772 | ||
|
e13674e886 | ||
|
e3e856b826 | ||
|
9d1cd23a8f | ||
|
148f7c116f | ||
|
33e7134d6f |
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class AnalyticsConfig(AppConfig):
|
||||
name = 'allianceauth.analytics'
|
||||
label = 'analytics'
|
||||
verbose_name = _('Analytics')
|
||||
|
@ -1,10 +1,12 @@
|
||||
from django.apps import AppConfig
|
||||
from django.core.checks import register, Tags
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class AuthenticationConfig(AppConfig):
|
||||
name = "allianceauth.authentication"
|
||||
label = "authentication"
|
||||
verbose_name = _("Authentication")
|
||||
|
||||
def ready(self):
|
||||
from allianceauth.authentication import checks, signals # noqa: F401
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class CorpUtilsConfig(AppConfig):
|
||||
name = 'allianceauth.corputils'
|
||||
label = 'corputils'
|
||||
verbose_name = _('Corporation Stats')
|
||||
|
@ -3,6 +3,7 @@ Crontab App Config
|
||||
"""
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class CrontabConfig(AppConfig):
|
||||
@ -12,3 +13,4 @@ class CrontabConfig(AppConfig):
|
||||
|
||||
name = "allianceauth.crontab"
|
||||
label = "crontab"
|
||||
verbose_name = _("Crontab")
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class EveonlineConfig(AppConfig):
|
||||
name = 'allianceauth.eveonline'
|
||||
label = 'eveonline'
|
||||
verbose_name = _('EVE Online')
|
||||
|
@ -1,9 +1,11 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class EveAutogroupsConfig(AppConfig):
|
||||
name = 'allianceauth.eveonline.autogroups'
|
||||
label = 'eve_autogroups'
|
||||
verbose_name = _('EVE Online Autogroups')
|
||||
|
||||
def ready(self):
|
||||
import allianceauth.eveonline.autogroups.signals
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class FatConfig(AppConfig):
|
||||
name = 'allianceauth.fleetactivitytracking'
|
||||
label = 'fleetactivitytracking'
|
||||
verbose_name = _('Fleet Activity Tracking')
|
||||
|
@ -3,6 +3,7 @@ Framework App Config
|
||||
"""
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class FrameworkConfig(AppConfig):
|
||||
@ -12,3 +13,4 @@ class FrameworkConfig(AppConfig):
|
||||
|
||||
name = "allianceauth.framework"
|
||||
label = "framework"
|
||||
verbose_name = _("Framework")
|
||||
|
@ -1,10 +1,11 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class GroupManagementConfig(AppConfig):
|
||||
name = 'allianceauth.groupmanagement'
|
||||
label = 'groupmanagement'
|
||||
verbose_name = 'Group Management'
|
||||
verbose_name = _('Group Management')
|
||||
|
||||
def ready(self):
|
||||
from . import signals # noqa: F401
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class HRApplicationsConfig(AppConfig):
|
||||
name = 'allianceauth.hrapplications'
|
||||
label = 'hrapplications'
|
||||
verbose_name = _('HR Applications')
|
||||
|
@ -1,6 +1,7 @@
|
||||
import logging
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -12,6 +13,7 @@ logger = logging.getLogger(__name__)
|
||||
class MenuConfig(AppConfig):
|
||||
name = "allianceauth.menu"
|
||||
label = "menu"
|
||||
verbose_name = _("Menu")
|
||||
|
||||
def ready(self):
|
||||
from allianceauth.menu.core import smart_sync
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class NotificationsConfig(AppConfig):
|
||||
name = 'allianceauth.notifications'
|
||||
label = 'notifications'
|
||||
verbose_name = _('Notifications')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class OptimerConfig(AppConfig):
|
||||
name = 'allianceauth.optimer'
|
||||
label = 'optimer'
|
||||
verbose_name = _('Fleet Operations')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class PermissionsToolConfig(AppConfig):
|
||||
name = 'allianceauth.permissions_tool'
|
||||
label = 'permissions_tool'
|
||||
verbose_name = _('Permissions Audit')
|
||||
|
@ -1,9 +1,11 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class ServicesConfig(AppConfig):
|
||||
name = 'allianceauth.services'
|
||||
label = 'services'
|
||||
verbose_name = _('Services')
|
||||
|
||||
def ready(self):
|
||||
from . import signals
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class DiscordServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.discord'
|
||||
label = 'discord'
|
||||
verbose_name = _('Discord Service')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class DiscourseServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.discourse'
|
||||
label = 'discourse'
|
||||
verbose_name = _('Discourse Service')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class ExampleServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.example'
|
||||
label = 'example_service'
|
||||
verbose_name = _('Example Service')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class Ips4ServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.ips4'
|
||||
label = 'ips4'
|
||||
verbose_name = _('IPS4 Service')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class MumbleServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.mumble'
|
||||
label = 'mumble'
|
||||
verbose_name = _('Mumble Service')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class OpenfireServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.openfire'
|
||||
label = 'openfire'
|
||||
verbose_name = _('Openfire Service')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class Phpbb3ServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.phpbb3'
|
||||
label = 'phpbb3'
|
||||
verbose_name = _('phpBB3 Service')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class SmfServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.smf'
|
||||
label = 'smf'
|
||||
verbose_name = _('SMF Service')
|
||||
|
@ -1,9 +1,11 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class Teamspeak3ServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.teamspeak3'
|
||||
label = 'teamspeak3'
|
||||
verbose_name = _('TeamSpeak 3 Service')
|
||||
|
||||
def ready(self):
|
||||
from . import signals
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class XenforoServiceConfig(AppConfig):
|
||||
name = 'allianceauth.services.modules.xenforo'
|
||||
label = 'xenforo'
|
||||
verbose_name = _('Xenforo Service')
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class SRPConfig(AppConfig):
|
||||
name = 'allianceauth.srp'
|
||||
label = 'srp'
|
||||
verbose_name = _('Ship Replacement')
|
||||
|
@ -12,11 +12,7 @@
|
||||
<ul class="list-group">
|
||||
{% for notif in notifications %}
|
||||
<li class="list-group-item">
|
||||
{% if notif.state == 'opened' %}
|
||||
<span class="badge bg-success me-2">{% translate "Open" %}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger me-2">{% translate "Closed" %}</span>
|
||||
{% endif %}
|
||||
<span class="badge bg-success me-2">{% translate "Open" %}</span>
|
||||
<a href="{{ notif.web_url }}" target="_blank">#{{ notif.iid }} {{ notif.title }}</a>
|
||||
</li>
|
||||
{% empty %}
|
||||
|
@ -67,6 +67,26 @@ def get_datatables_language_static(language: str) -> str:
|
||||
|
||||
return static_url
|
||||
|
||||
@register.simple_tag
|
||||
def get_relative_datatables_language_path(language: str) -> str:
|
||||
"""
|
||||
Get the correct language code URL for DataTables (relative path to the static folder)
|
||||
|
||||
:param language: Django's language code
|
||||
:type language: str
|
||||
:return: Mapped language code
|
||||
:rtype: str
|
||||
"""
|
||||
|
||||
mapped_language = get_datatable_language_code(language)
|
||||
static_url = (
|
||||
f"allianceauth/libs/DataTables/Plugins/2.2.1/i18n/{mapped_language}.json"
|
||||
if mapped_language
|
||||
else ""
|
||||
)
|
||||
|
||||
return static_url
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def get_momentjs_language_static(language: str) -> str:
|
||||
@ -88,3 +108,24 @@ def get_momentjs_language_static(language: str) -> str:
|
||||
)
|
||||
|
||||
return static_url
|
||||
|
||||
@register.simple_tag
|
||||
def get_relative_momentjs_language_path(language: str) -> str:
|
||||
"""
|
||||
Get the correct language code URL for Moment.JS (relative path to the static folder)
|
||||
|
||||
:param language: Django's language code
|
||||
:type language: str
|
||||
:return: Mapped language code path
|
||||
:rtype: str
|
||||
"""
|
||||
|
||||
mapped_language = get_momentjs_language_code(language)
|
||||
|
||||
static_url = (
|
||||
f"allianceauth/libs/moment.js/2.29.4/locale/{mapped_language}.js"
|
||||
if mapped_language
|
||||
else ""
|
||||
)
|
||||
|
||||
return static_url
|
||||
|
@ -1,6 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class TimerBoardConfig(AppConfig):
|
||||
name = 'allianceauth.timerboard'
|
||||
label = 'timerboard'
|
||||
verbose_name = _('Structure Timers')
|
||||
|
Loading…
x
Reference in New Issue
Block a user