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
22841431
Commit
22841431
authored
8 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Index page
parent
8685fc76
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
server.py
+26
-1
26 additions, 1 deletion
server.py
templates/index.html
+79
-2
79 additions, 2 deletions
templates/index.html
templates/protocol-new.html
+1
-1
1 addition, 1 deletion
templates/protocol-new.html
templates/protocol-show.html
+5
-1
5 additions, 1 deletion
templates/protocol-show.html
with
111 additions
and
5 deletions
server.py
+
26
−
1
View file @
22841431
...
...
@@ -77,7 +77,32 @@ app.jinja_env.globals.update(dir=dir)
@app.route
(
"
/
"
)
def
index
():
return
render_template
(
"
index.html
"
)
user
=
current_user
()
protocols
=
[
protocol
for
protocol
in
Protocol
.
query
.
all
()
if
protocol
.
protocoltype
.
has_public_view_right
(
user
)
]
def
_sort_key
(
protocol
):
if
protocol
.
date
is
not
None
:
return
protocol
.
date
return
datetime
.
now
().
date
()
open_protocols
=
sorted
(
[
protocol
for
protocol
in
protocols
if
not
protocol
.
done
],
key
=
_sort_key
)
finished_protocols
=
sorted
(
[
protocol
for
protocol
in
protocols
if
protocol
.
done
],
key
=
_sort_key
)
protocol
=
finished_protocols
[
0
]
if
len
(
finished_protocols
)
>
0
else
None
todos
=
None
if
check_login
():
todos
=
[
todo
for
todo
in
Todo
.
query
.
filter
(
Todo
.
done
==
False
).
all
()
if
todo
.
protocoltype
.
has_public_view_right
(
user
)
]
todos_table
=
TodosTable
(
todos
)
if
todos
is
not
None
else
None
return
render_template
(
"
index.html
"
,
open_protocols
=
open_protocols
,
protocol
=
protocol
,
todos
=
todos
,
todos_table
=
todos_table
)
@login_required
@app.route
(
"
/types/list
"
)
...
...
This diff is collapsed.
Click to expand it.
templates/index.html
+
79
−
2
View file @
22841431
{% extends "layout.html" %}
{% block title %}Hauptseite{% endblock %}
{% from "macros.html" import render_table %}
{% block title %}Startseite{% endblock %}
{% block content %}
Dies ist die Startseite
{% if protocol is not none %}
<div
class=
"row"
>
<div
id=
"left-column"
class=
"col-lg-6"
>
{% endif %}
<h3>
Anstehende Sitzungen
{% if check_login() %}
<a
href=
"{{url_for("
new_protocol
")}}"
>
Neu
</a>
{% endif %}
</h3>
<ul>
{% if open_protocols|length > 0 %}
{% for protocol in open_protocols %}
<li><a
href=
"{{url_for("
show_protocol
",
protocol_id=
protocol.id)}}"
>
{{protocol.protocoltype.name}}
</a>
am {{protocol.date|datify}}
</li>
{% endfor %}
{% else %}
<li>
Keine anstehenden Sitzungen
</li>
{% endif %}
</ul>
{% if check_login() %}
<h3>
Offene Todos
<a
href=
"{{url_for("
list_todos
")}}"
>
Alle
</a></h3>
<ul>
{% if todos|length > 0 %}
{% for todo in todos %}
<li>
{{todo.render_html()|safe}}
</li>
{% endfor %}
{% else %}
<li>
Keine Todos
</li>
{% endif %}
</ul>
{% endif %}
{% if protocol is not none %}
</div>
<div
id=
"right-column"
class=
"col-lg-6"
>
<h3>
Letztes Protokoll
</h3>
<div
class=
"well"
>
<div
class=
"btn-group"
>
<a
class=
"btn btn-primary"
href=
"{{url_for("
show_protocol
",
protocol_id=
protocol.id)}}"
>
Details anzeigen
</a>
{% if protocol.protocoltype.has_modify_right(current_user()) %}
<a
class=
"btn btn-default"
href=
"{{url_for("
update_protocol
",
protocol_id=
protocol.id)}}"
>
Protokoll editieren
</a>
{% endif %}
{% if protocol.has_compiled_document() %}
<a
class=
"btn btn-success"
href=
"{{url_for("
download_document
",
document_id=
protocol.get_compiled_document().id)}}"
>
Download
</a>
{% endif %}
</div>
<h2>
Protokoll: {{protocol.protocoltype.name}} {% if protocol.date is not none %}vom {{protocol.date|datify}}{% endif %}
</h2>
{% if protocol.date is not none %}
<p><strong>
Datum:
</strong>
{{protocol.date|datify_long}}
</p>
{% endif %}
{% if protocol.start_time is not none and protocol.end_time is not none %}
<p><strong>
Zeit:
</strong>
von {{protocol.start_time|timify}} bis {{protocol.end_time|timify}}
</p>
{% endif %}
{% if protocol.location is not none %}
<p><strong>
Ort:
</strong>
{{protocol.location}}
</p>
{% endif %}
{% if protocol.author is not none %}
<p><strong>
Protokollant:
</strong>
{{protocol.author}}
</p>
{% endif %}
{% if protocol.participants is not none %}
<p><strong>
Anwesende:
</strong>
{{protocol.participants}}
</p>
{% endif %}
<h3>
Tagesordnung{% if has_modify_right and not protocol.has_nonplanned_tops() %}
<a
href=
"{{url_for("
new_top
",
protocol_id=
protocol.id)}}"
>
Top hinzufügen
</a>
{% endif %}
</h3>
{% include "protocol-tops-include.html" %}
<h3>
Beschlüsse
</h3>
<ul>
{% if protocol.decisions|length > 0 %}
{% for decision in protocol.decisions %}
<li>
{{decision.content}}
</li>
{% endfor %}
{% else %}
<li>
Keine Beschlüsse
</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% endif %}
{% endblock %}
This diff is collapsed.
Click to expand it.
templates/protocol-new.html
+
1
−
1
View file @
22841431
...
...
@@ -6,7 +6,7 @@
<div
class=
"container"
>
<div
class=
"row"
>
<div
id=
"left-column"
class=
"col-lg-6"
>
<h3>
Neue
s Protokoll
</h3>
<h3>
Neue
Sitzung
</h3>
{{render_form(form, action_url=url_for("new_protocol"), action_text="Anlegen")}}
</div>
<div
id=
"left-column"
class=
"col-lg-6"
>
...
...
This diff is collapsed.
Click to expand it.
templates/protocol-show.html
+
5
−
1
View file @
22841431
...
...
@@ -41,7 +41,11 @@
</div>
<div
class=
"row"
>
<div
id=
"left-column"
class=
"col-lg-6"
>
<h2>
Protokoll: {{protocol.protocoltype.name}} {% if protocol.date is not none %}vom {{protocol.date|datify}}{% endif %}
</h2>
{% if protocol.is_done() %}
<h2>
Protokoll: {{protocol.protocoltype.name}} {% if protocol.date is not none %}vom {{protocol.date|datify}}{% endif %}
</h2>
{% else %}
<h2>
{{protocol.protocoltype.name}} {% if protocol.date is not none %}am {{protocol.date|datify}}{% endif %}
</h2>
{% endif %}
{% if protocol.is_done() %}
{% if protocol.date is not none %}
<p><strong>
Datum:
</strong>
{{protocol.date|datify_long}}
</p>
...
...
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