Commit 501cd1f1 authored by Administrator's avatar Administrator
Browse files

Do not show empty delete row

parent 9d333224
...@@ -58,16 +58,20 @@ class ProtocolsTable(Table): ...@@ -58,16 +58,20 @@ class ProtocolsTable(Table):
self.search_results = search_results self.search_results = search_results
def headers(self): def headers(self):
user = current_user()
result = ["ID", "Sitzung", "Sitzung", "Datum"] result = ["ID", "Sitzung", "Sitzung", "Datum"]
state_part = ["Status"] state_part = ["Status"]
search_part = ["Suchergebnis"] search_part = ["Suchergebnis"]
login_part = ["Typ", "Löschen"] login_part = ["Typ"]
admin_part = ["Löschen"]
if self.search_results is None: if self.search_results is None:
result.extend(state_part) result.extend(state_part)
else: else:
result.extend(search_part) result.extend(search_part)
if check_login(): if check_login():
result.extend(login_part) result.extend(login_part)
if protocol.protocoltype.has_admin_right(user):
return result return result
def classes(self): def classes(self):
Supports Markdown
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