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
Compare revisions
3f46d5f3df29360f0cc5df31acd7a6509a9b18e7 to 04e892b87b915734a2144dd3907d2d682b71759c
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
AlekSIS/official/AlekSIS-App-Matrix
Select target project
No results found
04e892b87b915734a2144dd3907d2d682b71759c
Select Git revision
Swap
Target
AlekSIS/official/AlekSIS-App-Matrix
Select target project
AlekSIS/official/AlekSIS-App-Matrix
1 result
3f46d5f3df29360f0cc5df31acd7a6509a9b18e7
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Move GroupFilter from Core
· 107b8339
magicfelix
authored
3 months ago
107b8339
Merge branch '33-move-groupfilter-from-core' into 'master'
· 04e892b8
Jonathan Weth
authored
2 months ago
Resolve "Move GroupFilter from Core" Closes
#33
See merge request
!49
04e892b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/matrix/filters.py
+19
-2
19 additions, 2 deletions
aleksis/apps/matrix/filters.py
with
19 additions
and
2 deletions
aleksis/apps/matrix/filters.py
View file @
04e892b8
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.
"""
"""
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
}
This diff is collapsed.
Click to expand it.