Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Resint
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
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-Resint
Commits
be45ba11
Verified
Commit
be45ba11
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Show more information in the LiveDocument table
parent
f3007ba0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!16
Resolve "Provide infrastructure for live documents"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/resint/tables.py
+6
-1
6 additions, 1 deletion
aleksis/apps/resint/tables.py
with
6 additions
and
1 deletion
aleksis/apps/resint/tables.py
+
6
−
1
View file @
be45ba11
from
django.utils.translation
import
gettext
as
_
from
django.utils.translation
import
gettext
as
_
from
django_tables2
import
A
,
Column
,
LinkColumn
,
Table
from
django_tables2
import
A
,
BooleanColumn
,
Column
,
DateTime
Column
,
LinkColumn
,
Table
class
LiveDocumentTable
(
Table
):
class
LiveDocumentTable
(
Table
):
...
@@ -12,6 +12,8 @@ class LiveDocumentTable(Table):
...
@@ -12,6 +12,8 @@ class LiveDocumentTable(Table):
document_name
=
Column
(
accessor
=
"
pk
"
)
document_name
=
Column
(
accessor
=
"
pk
"
)
name
=
LinkColumn
(
"
edit_live_document
"
,
args
=
[
A
(
"
id
"
)])
name
=
LinkColumn
(
"
edit_live_document
"
,
args
=
[
A
(
"
id
"
)])
filename
=
LinkColumn
(
"
show_live_document
"
,
args
=
[
A
(
"
slug
"
)])
filename
=
LinkColumn
(
"
show_live_document
"
,
args
=
[
A
(
"
slug
"
)])
last_update
=
DateTimeColumn
(
accessor
=
A
(
"
last_update
"
))
last_update_triggered_manually
=
BooleanColumn
()
edit
=
LinkColumn
(
edit
=
LinkColumn
(
"
edit_live_document
"
,
"
edit_live_document
"
,
args
=
[
A
(
"
id
"
)],
args
=
[
A
(
"
id
"
)],
...
@@ -29,3 +31,6 @@ class LiveDocumentTable(Table):
...
@@ -29,3 +31,6 @@ class LiveDocumentTable(Table):
def
render_document_name
(
self
,
value
,
record
):
def
render_document_name
(
self
,
value
,
record
):
return
record
.
_meta
.
verbose_name
return
record
.
_meta
.
verbose_name
def
value_last_update
(
self
,
value
,
record
):
return
record
.
last_update
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