Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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-Matrix
Merge requests
!46
Couldn't fetch the linked file.
Update .prettierignore
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update .prettierignore
check/update-prettier-ignore
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Aleksolotl
requested to merge
check/update-prettier-ignore
into
master
10 months ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Automatically created by the almighty Aleksolotl.
0
0
Merge request reports
Compare
version 1
version 1
69bb3945
10 months ago
master (base)
and
latest version
latest version
e67b58e8
1 commit,
1 month ago
version 1
69bb3945
1 commit,
10 months ago
Show latest version
1 file
+
19
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
aleksis/apps/matrix/filters.py
+
19
−
2
Options
from
aleksis.core.filters
import
GroupFilter
from
django.utils.translation
import
gettext
as
_
from
django_filters
import
ModelChoiceFilter
,
ModelMultipleChoiceFilter
from
material
import
Layout
,
Row
class
GroupMatrixRoomFilter
(
GroupFilter
):
from
aleksis.core.filters
import
MultipleCharFilter
from
aleksis.core.models
import
Group
,
GroupType
,
SchoolTerm
class
GroupMatrixRoomFilter
:
"""
Custom filter for groups on Matrix room overview.
"""
school_term
=
ModelChoiceFilter
(
queryset
=
SchoolTerm
.
objects
.
all
())
group_type
=
ModelChoiceFilter
(
queryset
=
GroupType
.
objects
.
all
())
parent_groups
=
ModelMultipleChoiceFilter
(
queryset
=
Group
.
objects
.
all
())
search
=
MultipleCharFilter
([
"
name__icontains
"
,
"
short_name__icontains
"
],
label
=
_
(
"
Search
"
))
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
self
.
form
.
layout
=
Layout
(
Row
(
"
search
"
),
Row
(
"
school_term
"
,
"
group_type
"
,
"
parent_groups
"
))
self
.
form
.
initial
=
{
"
school_term
"
:
SchoolTerm
.
current
}
Loading