Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
79103066
Commit
79103066
authored
Feb 20, 2018
by
Robin Sonnabend
Browse files
Fix syntax
parent
2deb901d
Changes
1
Hide whitespace changes
Inline
Side-by-side
views/tables.py
View file @
79103066
...
...
@@ -113,14 +113,22 @@ class ProtocolsTable(Table):
login_part1
=
""
login_part2
=
""
if
state
!=
"pencil"
:
login_part1
=
'<a href=url_for("download_document", document_id=protocol.get_compiled_document().id)" class="btn"> <span class="glyphicon glyphicon-download"></span> </a>'
if
protocol
.
protocoltype
.
has_admin_right
(
user
):
login_part2
=
'<a href=url_for("delete_protocol", protocol_id=protocol.id)" class="btn btn-danger" confirm="Bist du dir sicher, dass du das Protokoll {} löschen möchtest?"> <span class="glyphicon glyphicon-trash"></span> </a>'
result
.
append
(
Markup
(
'<div class="btn-group btn-group-xs"> {} </div>'
.
format
(
login_part1
.
join
(
login_part2
))))
document
=
protocol
.
get_compiled_document
()
if
document
is
not
None
:
login_part1
=
Table
.
button
(
url_for
(
"download_document"
,
document_id
=
document
.
id
),
icon
=
"download"
,
style
=
""
)
if
protocol
.
protocoltype
.
has_admin_right
(
user
):
login_part2
=
Table
.
button
(
url_for
(
"delete_protocol"
,
protocol_id
=
protocol
.
id
),
icon
=
"trash"
,
style
=
"danger"
,
confirm
=
"Bist du dir sicher, dass du das Protokoll {} löschen möchtest?"
)
result
.
append
(
Markup
(
'<div class="btn-group btn-group-xs"> {} </div>'
.
format
(
""
.
join
((
login_part1
,
login_part2
)))))
return
result
...
...
Write
Preview
Markdown
is supported
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