Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Abi
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
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
magicfelix
AlekSIS-App-Abi
Commits
75e2def7
Verified
Commit
75e2def7
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Set orderable=False for all non-orderable table columns
parent
aa6d0aeb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/abi/tables.py
+14
-2
14 additions, 2 deletions
aleksis/apps/abi/tables.py
with
14 additions
and
2 deletions
aleksis/apps/abi/tables.py
+
14
−
2
View file @
75e2def7
...
@@ -75,12 +75,14 @@ class AbiGroupTable(tables.Table):
...
@@ -75,12 +75,14 @@ class AbiGroupTable(tables.Table):
args
=
[
tables
.
A
(
"
id
"
)],
args
=
[
tables
.
A
(
"
id
"
)],
text
=
_
(
"
Edit
"
),
text
=
_
(
"
Edit
"
),
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-orange orange-text
"
}},
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-orange orange-text
"
}},
orderable
=
False
,
)
)
delete
=
tables
.
LinkColumn
(
delete
=
tables
.
LinkColumn
(
"
delete_abi_group
"
,
"
delete_abi_group
"
,
args
=
[
tables
.
A
(
"
id
"
)],
args
=
[
tables
.
A
(
"
id
"
)],
text
=
_
(
"
Delete
"
),
text
=
_
(
"
Delete
"
),
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-red red-text
"
}},
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-red red-text
"
}},
orderable
=
False
,
)
)
...
@@ -92,18 +94,22 @@ class RankingCategoryTable(tables.Table):
...
@@ -92,18 +94,22 @@ class RankingCategoryTable(tables.Table):
group
=
tables
.
Column
()
group
=
tables
.
Column
()
number_of_persons
=
tables
.
Column
()
number_of_persons
=
tables
.
Column
()
number_of_votes
=
tables
.
Column
(
verbose_name
=
_
(
"
Number of persons which voted
"
))
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
=
tables
.
LinkColumn
(
"
edit_ranking_category
"
,
"
edit_ranking_category
"
,
args
=
[
tables
.
A
(
"
id
"
)],
args
=
[
tables
.
A
(
"
id
"
)],
text
=
_
(
"
Edit
"
),
text
=
_
(
"
Edit
"
),
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-orange orange-text
"
}},
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-orange orange-text
"
}},
orderable
=
False
,
)
)
delete
=
tables
.
LinkColumn
(
delete
=
tables
.
LinkColumn
(
"
delete_ranking_category
"
,
"
delete_ranking_category
"
,
args
=
[
tables
.
A
(
"
id
"
)],
args
=
[
tables
.
A
(
"
id
"
)],
text
=
_
(
"
Delete
"
),
text
=
_
(
"
Delete
"
),
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-red red-text
"
}},
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-red red-text
"
}},
orderable
=
False
,
)
)
def
render_ranking
(
self
,
value
,
record
):
def
render_ranking
(
self
,
value
,
record
):
...
@@ -122,12 +128,14 @@ class CommentTable(tables.Table):
...
@@ -122,12 +128,14 @@ class CommentTable(tables.Table):
args
=
[
tables
.
A
(
"
id
"
)],
args
=
[
tables
.
A
(
"
id
"
)],
text
=
_
(
"
Edit
"
),
text
=
_
(
"
Edit
"
),
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-orange orange-text
"
}},
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-orange orange-text
"
}},
orderable
=
False
,
)
)
delete
=
tables
.
LinkColumn
(
delete
=
tables
.
LinkColumn
(
"
delete_comment
"
,
"
delete_comment
"
,
args
=
[
tables
.
A
(
"
id
"
)],
args
=
[
tables
.
A
(
"
id
"
)],
text
=
_
(
"
Delete
"
),
text
=
_
(
"
Delete
"
),
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-red red-text
"
}},
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-red red-text
"
}},
orderable
=
False
,
)
)
...
@@ -143,12 +151,14 @@ class QuotesTable(tables.Table):
...
@@ -143,12 +151,14 @@ class QuotesTable(tables.Table):
args
=
[
tables
.
A
(
"
id
"
)],
args
=
[
tables
.
A
(
"
id
"
)],
text
=
_
(
"
Edit
"
),
text
=
_
(
"
Edit
"
),
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-orange orange-text
"
}},
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-orange orange-text
"
}},
orderable
=
False
,
)
)
delete
=
tables
.
LinkColumn
(
delete
=
tables
.
LinkColumn
(
"
delete_quote
"
,
"
delete_quote
"
,
args
=
[
tables
.
A
(
"
id
"
)],
args
=
[
tables
.
A
(
"
id
"
)],
text
=
_
(
"
Delete
"
),
text
=
_
(
"
Delete
"
),
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-red red-text
"
}},
attrs
=
{
"
a
"
:
{
"
class
"
:
"
btn-flat waves-effect waves-red red-text
"
}},
orderable
=
False
,
)
)
...
@@ -156,7 +166,9 @@ class ReviewCommentTable(CommentTable):
...
@@ -156,7 +166,9 @@ class ReviewCommentTable(CommentTable):
class
Meta
:
class
Meta
:
exclude
=
(
"
person
"
,
"
edit
"
,
"
delete
"
)
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
):
def
render_review
(
self
,
value
,
record
):
return
render_to_string
(
"
abi/comment/review_column.html
"
,
dict
(
comment
=
record
))
return
render_to_string
(
"
abi/comment/review_column.html
"
,
dict
(
comment
=
record
))
...
...
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