diff --git a/allianceauth/groupmanagement/auth_hooks.py b/allianceauth/groupmanagement/auth_hooks.py index 6d11e41d..e077110b 100644 --- a/allianceauth/groupmanagement/auth_hooks.py +++ b/allianceauth/groupmanagement/auth_hooks.py @@ -9,15 +9,20 @@ from .managers import GroupManager class GroupManagementMenuItem(MenuItemHook): """ This class ensures only authorized users will see the menu entry """ + def __init__(self): # setup menu entry for sidebar MenuItemHook.__init__( self, - text=_('Group Management'), - classes='fas fa-users-cog fa-fw', - url_name='groupmanagement:management', + text=_("Group Management"), + classes="fas fa-users-cog fa-fw", + url_name="groupmanagement:management", order=50, - navactive=['groupmanagement:management'] + navactive=[ + "groupmanagement:management", # group requests view + "groupmanagement:membership", # group membership view + "groupmanagement:audit_log", # group audit log view + ], ) def render(self, request): @@ -25,14 +30,14 @@ class GroupManagementMenuItem(MenuItemHook): app_count = GroupManager.pending_requests_count_for_user(request.user) self.count = app_count if app_count and app_count > 0 else None return MenuItemHook.render(self, request) - return '' + return "" -@hooks.register('menu_item_hook') +@hooks.register("menu_item_hook") def register_menu(): return GroupManagementMenuItem() -@hooks.register('url_hook') +@hooks.register("url_hook") def register_urls(): - return UrlHook(urls, 'group', r'^group/') + return UrlHook(urls, "group", r"^groups/") diff --git a/allianceauth/groupmanagement/migrations/0015_make_descriptions_great_again.py b/allianceauth/groupmanagement/migrations/0015_make_descriptions_great_again.py new file mode 100644 index 00000000..63b3807f --- /dev/null +++ b/allianceauth/groupmanagement/migrations/0015_make_descriptions_great_again.py @@ -0,0 +1,22 @@ +# Generated by Django 3.1.2 on 2020-10-25 11:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("groupmanagement", "0014_auto_20200918_1412"), + ] + + operations = [ + migrations.AlterField( + model_name="authgroup", + name="description", + field=models.TextField( + blank=True, + help_text="Short description (max. 512 characters) of the group shown to users.", + max_length=512, + ), + ), + ] diff --git a/allianceauth/groupmanagement/models.py b/allianceauth/groupmanagement/models.py index 035b9ba2..861872ef 100644 --- a/allianceauth/groupmanagement/models.py +++ b/allianceauth/groupmanagement/models.py @@ -107,7 +107,7 @@ class AuthGroup(models.Model): help_text="States listed here will have the ability to join this group provided " "they have the proper permissions.") - description = models.CharField(max_length=512, blank=True, help_text="Description of the group shown to users.") + description = models.TextField(max_length=512, blank=True, help_text="Short description (max. 512 characters) of the group shown to users.") def __str__(self): return self.group.name diff --git a/allianceauth/groupmanagement/templates/groupmanagement/audit.html b/allianceauth/groupmanagement/templates/groupmanagement/audit.html index 51cc2ef5..7273107e 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/audit.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/audit.html @@ -8,58 +8,65 @@
+ +
{% trans "Date/Time" %} | -{% trans "Requestor" %} | -{% trans "Character" %} | -{% trans "Corporation" %} | -{% trans "Type" %} | -{% trans "Action" %} | -{% trans "Actor" %} | +{% trans "Date/Time" %} | +{% trans "Requestor" %} | +{% trans "Character" %} | +{% trans "Corporation" %} | +{% trans "Type" %} | +{% trans "Action" %} | +{% trans "Actor" %} | + {% for entry in entries %}||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ entry.date|date:"Y-M-d, H:i" }} | -{{ entry.requestor }} | -{{ entry.req_char }} | -{{ entry.req_char.corporation_name }} | -{{ entry.type_to_str }} | +{{ entry.date|date:"Y-M-d, H:i" }} | +{{ entry.requestor }} | +{{ entry.req_char }} | +{{ entry.req_char.corporation_name }} | +{{ entry.type_to_str }} | + {% if entry.request_type is None %} -Removed | +{% trans "Removed" %} | {% else %} -{{ entry.action_to_str }} | +{{ entry.action_to_str }} | {% endif %} -{{ entry.request_actor }} | + +{{ entry.request_actor }} |
- All times displayed are EVE/UTC. + {% trans "All times displayed are EVE/UTC." %}
+ +
{% trans "Portrait" %} | -{% trans "Character" %} | -{% trans "Organization" %} | -+ | |
---|---|---|---|---|
{% trans "Character" %} | +{% trans "Organization" %} | +|||
- {% if member.is_leader %}
-
- {% endif %}
- |
- + | |||
+ |
- + + |
{% if member.main_char %}
{{ member.main_char.corporation_name }}
{{ member.main_char.alliance_name|default_if_none:"" }} {% else %} - (unknown) + {% trans "(unknown)" %} {% endif %} - |
- - - + | + ++ + |
: Group leader
+ ++ : {% trans "Group leader" %} +