Skip to content
Snippets Groups Projects
Commit 66ead555 authored by marco's avatar marco
Browse files

Add get_state_name get_state_glyph to class Protocol

parent f73321d1
No related branches found
No related tags found
1 merge request!10Resolve "Protokolle Übersichtseite umbauen"
...@@ -236,6 +236,24 @@ class Protocol(DatabaseModel): ...@@ -236,6 +236,24 @@ class Protocol(DatabaseModel):
def is_done(self): def is_done(self):
return self.done return self.done
def get_state_glyph(self):
if self.is_done():
state = "unchecked" #"Fertig"
if self.public:
state = "check" #"Veröffentlicht"
else:
state = "pencil" #"Geplant"
return state
def get_state_name(self):
if self.is_done():
state = "Fertig"
if self.public:
state = "Veröffentlicht"
else:
state = "Geplant"
return state
def get_identifier(self): def get_identifier(self):
if self.pad_identifier is not None: if self.pad_identifier is not None:
return self.pad_identifier return self.pad_identifier
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment