Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
1bee2b3e
Verified
Commit
1bee2b3e
authored
2 years ago
by
Julian
Committed by
Jonathan Weth
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Change icon choices of Group roles
parent
40c6c049
No related branches found
No related tags found
1 merge request
!292
Resolve "Use iconify for Material Icons instead of icon font"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/alsijil/models.py
+7
-0
7 additions, 0 deletions
aleksis/apps/alsijil/models.py
aleksis/apps/alsijil/templates/alsijil/group_role/chip.html
+1
-1
1 addition, 1 deletion
aleksis/apps/alsijil/templates/alsijil/group_role/chip.html
with
8 additions
and
1 deletion
aleksis/apps/alsijil/models.py
+
7
−
0
View file @
1bee2b3e
...
...
@@ -5,6 +5,7 @@ from urllib.parse import urlparse
from
django.db
import
models
from
django.db.models.constraints
import
CheckConstraint
from
django.db.models.query_utils
import
Q
from
django.urls
import
reverse
from
django.utils.formats
import
date_format
from
django.utils.translation
import
gettext_lazy
as
_
...
...
@@ -31,6 +32,7 @@ from aleksis.apps.alsijil.managers import (
from
aleksis.apps.chronos.managers
import
GroupPropertiesMixin
from
aleksis.apps.chronos.mixins
import
WeekRelatedMixin
from
aleksis.apps.chronos.models
import
Event
,
ExtraLesson
,
LessonPeriod
,
TimePeriod
from
aleksis.core.data_checks
import
field_validation_data_check_factory
from
aleksis.core.mixins
import
ExtensibleModel
,
GlobalPermissionModel
from
aleksis.core.models
import
SchoolTerm
from
aleksis.core.util.core_helpers
import
get_site_preferences
...
...
@@ -450,6 +452,8 @@ class ExtraMark(ExtensibleModel):
class
GroupRole
(
ExtensibleModel
):
data_checks
=
[
field_validation_data_check_factory
(
"
alsijil
"
,
"
GroupRole
"
,
"
icon
"
)]
objects
=
GroupRoleManager
.
from_queryset
(
GroupRoleQuerySet
)()
name
=
models
.
CharField
(
max_length
=
255
,
verbose_name
=
_
(
"
Name
"
))
...
...
@@ -467,6 +471,9 @@ class GroupRole(ExtensibleModel):
]
permissions
=
((
"
assign_group_role
"
,
_
(
"
Can assign group role
"
)),)
def
get_absolute_url
(
self
)
->
str
:
return
reverse
(
"
edit_group_role
"
,
args
=
[
self
.
id
])
class
GroupRoleAssignment
(
GroupPropertiesMixin
,
ExtensibleModel
):
objects
=
GroupRoleAssignmentManager
.
from_queryset
(
GroupRoleAssignmentQuerySet
)()
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/templates/alsijil/group_role/chip.html
+
1
−
1
View file @
1bee2b3e
{# -*- engine:django -*- #}
<div
class=
"chip white-text"
style=
"background-color: {{ role.colour|default:"
black
"
}};"
>
<i
class=
"material-icons
left"
>
{{ role.icon|default:"assignment_
in
d
" }}
</i>
<i
class=
"material-icons
iconify left"
data-icon=
"mdi:{{ role.icon|default:"
clipboard-account-outl
in
e
"
}}
"
>
</i>
{{ role.name }}
{% if small %}
<small>
({{ small }})
</small>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment