Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
proto3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
protokollsystem
proto3
Commits
66ead555
Commit
66ead555
authored
7 years ago
by
marco
Browse files
Options
Downloads
Patches
Plain Diff
Add get_state_name get_state_glyph to class Protocol
parent
f73321d1
No related branches found
No related tags found
1 merge request
!10
Resolve "Protokolle Übersichtseite umbauen"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/database.py
+18
-0
18 additions, 0 deletions
models/database.py
with
18 additions
and
0 deletions
models/database.py
+
18
−
0
View file @
66ead555
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment