Commit 25562e67 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Show TOPs from every network.

parent 5f889eff
...@@ -144,7 +144,7 @@ def index(): ...@@ -144,7 +144,7 @@ def index():
return protocol.date return protocol.date
return datetime.now().date() return datetime.now().date()
current_day = datetime.now().date() current_day = datetime.now().date()
all_open_protocols = sorted( open_protocols = sorted(
[ [
protocol for protocol in protocols protocol for protocol in protocols
if not protocol.done if not protocol.done
...@@ -152,10 +152,6 @@ def index(): ...@@ -152,10 +152,6 @@ def index():
], ],
key=_protocol_sort_key key=_protocol_sort_key
) )
open_protocols = [
protocol for protocol in all_open_protocols
if protocol.protocoltype.has_public_view_right(user)
]
finished_protocols = sorted( finished_protocols = sorted(
[ [
protocol for protocol in protocols protocol for protocol in protocols
...@@ -180,7 +176,7 @@ def index(): ...@@ -180,7 +176,7 @@ def index():
return protocol.date if protocol.date is not None else datetime.now().date() return protocol.date if protocol.date is not None else datetime.now().date()
todos = sorted(todos, key=_todo_sort_key, reverse=True) todos = sorted(todos, key=_todo_sort_key, reverse=True)
todos_table = TodosTable(todos) if todos is not None else None 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") @app.route("/documentation")
@login_required @login_required
...@@ -377,7 +373,7 @@ def list_protocols(): ...@@ -377,7 +373,7 @@ def list_protocols():
)) ))
protocols = [ protocols = [
protocol for protocol in protocol_query.all() 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): def _matches_search(content):
content = content.lower() content = content.lower()
...@@ -471,7 +467,7 @@ def new_protocol(): ...@@ -471,7 +467,7 @@ def new_protocol():
def show_protocol(protocol): def show_protocol(protocol):
user = current_user() user = current_user()
errors_table = ErrorsTable(protocol.errors) 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") flash("Die fehlen die nötigen Zugriffsrechte.", "alert-error")
return redirect(request.args.get("next") or url_for("login")) return redirect(request.args.get("next") or url_for("login"))
visible_documents = [ visible_documents = [
......
...@@ -18,11 +18,7 @@ ...@@ -18,11 +18,7 @@
<li><a href="{{url_for("show_protocol", protocol_id=protocol.id)}}">{{protocol.protocoltype.name}}</a> am {{protocol.date|datify}}</li> <li><a href="{{url_for("show_protocol", protocol_id=protocol.id)}}">{{protocol.protocoltype.name}}</a> am {{protocol.date|datify}}</li>
{% endfor %} {% endfor %}
{% else %} {% else %}
{% if all_open_protocols|length == 0 %} <li>Keine anstehenden Sitzungen</li>
<li>Keine anstehenden Sitzungen</li>
{% else %}
<li>Die Sitzungen sind nur aus einem eingeschränkten Teil des Internets, nicht weltweit sichtbar.</li>
{% endif %}
{% endif %} {% endif %}
</ul> </ul>
{% if protocol is not none %} {% if protocol is not none %}
......
...@@ -70,22 +70,26 @@ ...@@ -70,22 +70,26 @@
<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> <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" %} {% include "protocol-tops-include.html" %}
{% if protocol.is_done() and has_public_view_right %} {% if protocol.is_done() %}
<h3>Beschlüsse</h3> <h3>Beschlüsse</h3>
<ul> <ul>
{% if protocol.decisions|length > 0 %} {% if protocol.decisions|length > 0 %}
{% for decision in protocol.decisions %} {% if has_public_view_right %}
<li> {% for decision in protocol.decisions %}
{{decision.content}} <li>
{% if config.PRINTING_ACTIVE and has_private_view_right and decision.document is not none %} {{decision.content}}
<a href="{{url_for("print_decision", document_id=decision.document.id)}}">Drucken</a> {% if config.PRINTING_ACTIVE and has_private_view_right and decision.document is not none %}
{% endif %} <a href="{{url_for("print_decision", document_id=decision.document.id)}}">Drucken</a>
</li> {% endif %}
{% endfor %} </li>
{% else %} {% endfor %}
<li>Keine Beschlüsse</li> {% else %}
{% endif %} <li>Protokoll und Beschlüsse sind in einem eingeschränkten Netzwerk sichtbar.</li>
</ul> {% endif %}
{% else %}
<li>Keine Beschlüsse</li>
{% endif %}
</ul>
{% endif %} {% endif %}
</div> </div>
<div id="right-column" class="col-lg-6"> <div id="right-column" class="col-lg-6">
......
Markdown is supported
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