Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lloyd Meins
AlekSIS-App-Abi
Commits
75e2def7
Verified
Commit
75e2def7
authored
Jan 27, 2022
by
Jonathan Weth
⌨
Browse files
Set orderable=False for all non-orderable table columns
parent
aa6d0aeb
Pipeline
#51851
passed with stages
in 29 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
aleksis/apps/abi/tables.py
View file @
75e2def7
...
...
@@ -75,12 +75,14 @@ class AbiGroupTable(tables.Table):
args
=
[
tables
.
A
(
"id"
)],
text
=
_
(
"Edit"
),
attrs
=
{
"a"
:
{
"class"
:
"btn-flat waves-effect waves-orange orange-text"
}},
orderable
=
False
,
)
delete
=
tables
.
LinkColumn
(
"delete_abi_group"
,
args
=
[
tables
.
A
(
"id"
)],
text
=
_
(
"Delete"
),
attrs
=
{
"a"
:
{
"class"
:
"btn-flat waves-effect waves-red red-text"
}},
orderable
=
False
,
)
...
...
@@ -92,18 +94,22 @@ class RankingCategoryTable(tables.Table):
group
=
tables
.
Column
()
number_of_persons
=
tables
.
Column
()
number_of_votes
=
tables
.
Column
(
verbose_name
=
_
(
"Number of persons which voted"
))
ranking
=
tables
.
Column
(
accessor
=
tables
.
A
(
"pk"
),
verbose_name
=
_
(
"Current ranking"
))
ranking
=
tables
.
Column
(
accessor
=
tables
.
A
(
"pk"
),
verbose_name
=
_
(
"Current ranking"
),
orderable
=
False
)
edit
=
tables
.
LinkColumn
(
"edit_ranking_category"
,
args
=
[
tables
.
A
(
"id"
)],
text
=
_
(
"Edit"
),
attrs
=
{
"a"
:
{
"class"
:
"btn-flat waves-effect waves-orange orange-text"
}},
orderable
=
False
,
)
delete
=
tables
.
LinkColumn
(
"delete_ranking_category"
,
args
=
[
tables
.
A
(
"id"
)],
text
=
_
(
"Delete"
),
attrs
=
{
"a"
:
{
"class"
:
"btn-flat waves-effect waves-red red-text"
}},
orderable
=
False
,
)
def
render_ranking
(
self
,
value
,
record
):
...
...
@@ -122,12 +128,14 @@ class CommentTable(tables.Table):
args
=
[
tables
.
A
(
"id"
)],
text
=
_
(
"Edit"
),
attrs
=
{
"a"
:
{
"class"
:
"btn-flat waves-effect waves-orange orange-text"
}},
orderable
=
False
,
)
delete
=
tables
.
LinkColumn
(
"delete_comment"
,
args
=
[
tables
.
A
(
"id"
)],
text
=
_
(
"Delete"
),
attrs
=
{
"a"
:
{
"class"
:
"btn-flat waves-effect waves-red red-text"
}},
orderable
=
False
,
)
...
...
@@ -143,12 +151,14 @@ class QuotesTable(tables.Table):
args
=
[
tables
.
A
(
"id"
)],
text
=
_
(
"Edit"
),
attrs
=
{
"a"
:
{
"class"
:
"btn-flat waves-effect waves-orange orange-text"
}},
orderable
=
False
,
)
delete
=
tables
.
LinkColumn
(
"delete_quote"
,
args
=
[
tables
.
A
(
"id"
)],
text
=
_
(
"Delete"
),
attrs
=
{
"a"
:
{
"class"
:
"btn-flat waves-effect waves-red red-text"
}},
orderable
=
False
,
)
...
...
@@ -156,7 +166,9 @@ class ReviewCommentTable(CommentTable):
class
Meta
:
exclude
=
(
"person"
,
"edit"
,
"delete"
)
review
=
tables
.
Column
(
accessor
=
tables
.
A
(
"pk"
),
verbose_name
=
_
(
"Review status"
))
review
=
tables
.
Column
(
accessor
=
tables
.
A
(
"pk"
),
verbose_name
=
_
(
"Review status"
),
orderable
=
False
)
def
render_review
(
self
,
value
,
record
):
return
render_to_string
(
"abi/comment/review_column.html"
,
dict
(
comment
=
record
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment