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): ...@@ -113,14 +113,22 @@ class ProtocolsTable(Table):
login_part1="" login_part1=""
login_part2="" login_part2=""
if state != "pencil": 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>' document = protocol.get_compiled_document()
if protocol.protocoltype.has_admin_right(user): if document is not None:
login_part2 = '<a href=url_for("delete_protocol"," class="btn btn-danger" confirm="Bist du dir sicher, dass du das Protokoll {} löschen möchtest?"> <span class="glyphicon glyphicon-trash"></span> </a>' login_part1 = Table.button(
result.append(Markup('<div class="btn-group btn-group-xs"> {} </div>'.format(login_part1.join(login_part2)))) icon="download", style="")
if protocol.protocoltype.has_admin_right(user):
login_part2 = Table.button(
confirm="Bist du dir sicher, dass du das Protokoll {} löschen möchtest?")
'<div class="btn-group btn-group-xs"> {} </div>'.format(
"".join((login_part1, login_part2)))))
return result 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