Commit f73321d1 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Merge branch 'origin/156-protokolle-ubersichtseite-umbauen' into...

Merge branch 'origin/156-protokolle-ubersichtseite-umbauen' into '156-protokolle-ubersichtseite-umbauen'

Fix syntax

See merge request !9
parents 2deb901d 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment