Skip to content
Snippets Groups Projects
Commit 25562e67 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Show TOPs from every network.

parent 5f889eff
Branches
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@ def index():
return protocol.date
return datetime.now().date()
current_day = datetime.now().date()
all_open_protocols = sorted(
open_protocols = sorted(
[
protocol for protocol in protocols
if not protocol.done
......@@ -152,10 +152,6 @@ def index():
],
key=_protocol_sort_key
)
open_protocols = [
protocol for protocol in all_open_protocols
if protocol.protocoltype.has_public_view_right(user)
]
finished_protocols = sorted(
[
protocol for protocol in protocols
......@@ -180,7 +176,7 @@ def index():
return protocol.date if protocol.date is not None else datetime.now().date()
todos = sorted(todos, key=_todo_sort_key, reverse=True)
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, all_open_protocols=all_open_protocols)
return render_template("index.html", open_protocols=open_protocols, protocol=protocol, todos=todos)
@app.route("/documentation")
@login_required
......@@ -377,7 +373,7 @@ def list_protocols():
))
protocols = [
protocol for protocol in protocol_query.all()
if protocol.protocoltype.has_public_view_right(user)
if protocol.protocoltype.has_public_view_right(user, check_networks=False)
]
def _matches_search(content):
content = content.lower()
......@@ -471,7 +467,7 @@ def new_protocol():
def show_protocol(protocol):
user = current_user()
errors_table = ErrorsTable(protocol.errors)
if not protocol.protocoltype.has_public_view_right(user): # yes, feature
if not protocol.protocoltype.has_public_view_right(user, check_networks=False): # yes, feature
flash("Die fehlen die nötigen Zugriffsrechte.", "alert-error")
return redirect(request.args.get("next") or url_for("login"))
visible_documents = [
......
......@@ -18,11 +18,7 @@
<li><a href="{{url_for("show_protocol", protocol_id=protocol.id)}}">{{protocol.protocoltype.name}}</a> am {{protocol.date|datify}}</li>
{% endfor %}
{% else %}
{% if all_open_protocols|length == 0 %}
<li>Keine anstehenden Sitzungen</li>
{% else %}
<li>Die Sitzungen sind nur aus einem eingeschränkten Teil des Internets, nicht weltweit sichtbar.</li>
{% endif %}
{% endif %}
</ul>
{% if protocol is not none %}
......
......@@ -70,10 +70,11 @@
<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" %}
{% if protocol.is_done() and has_public_view_right %}
{% if protocol.is_done() %}
<h3>Beschlüsse</h3>
<ul>
{% if protocol.decisions|length > 0 %}
{% if has_public_view_right %}
{% for decision in protocol.decisions %}
<li>
{{decision.content}}
......@@ -82,6 +83,9 @@
{% endif %}
</li>
{% endfor %}
{% else %}
<li>Protokoll und Beschlüsse sind in einem eingeschränkten Netzwerk sichtbar.</li>
{% endif %}
{% else %}
<li>Keine Beschlüsse</li>
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment