Skip to content
Snippets Groups Projects
Commit 0ad8e092 authored by Jiří Setnička's avatar Jiří Setnička
Browse files

Templates: Zavedení bloku pretitle a použití na odkazy u výsledkovky

Řeší #187.
parent 4245f0c4
No related branches found
No related tags found
1 merge request!52Drobnosti
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
</div> </div>
<main> <main>
{% if self.breadcrumbs() %}<ol class="breadcrumb">{% block breadcrumbs %}{% endblock %}</ol>{% endif %} {% if self.breadcrumbs() %}<ol class="breadcrumb">{% block breadcrumbs %}{% endblock %}</ol>{% endif %}
{% block pretitle %}{% endblock %}
<h2>{{ self.title() }}</h2> <h2>{{ self.title() }}</h2>
{% with messages = get_flashed_messages(with_categories=true) %} {% with messages = get_flashed_messages(with_categories=true) %}
......
...@@ -10,14 +10,15 @@ ...@@ -10,14 +10,15 @@
{{ contest_breadcrumbs(round=round, contest=contest, site=site, action="Založení řešení" if edit_form else "Tabulka řešení") }} {{ contest_breadcrumbs(round=round, contest=contest, site=site, action="Založení řešení" if edit_form else "Tabulka řešení") }}
{% endblock %} {% endblock %}
{% block body %} {% block pretitle %}
{% if round.state in [RoundState.grading, RoundState.closed] %} {% if round.state in [RoundState.grading, RoundState.closed] %}
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<a class="btn btn-default" href="{{ url_for('org_score', contest_id=contest.contest_id) }}">Výsledky oblasti</a> <a class="btn btn-default" href="{{ url_for('org_score', contest_id=contest.contest_id) }}">Výsledky oblasti</a>
<a class="btn btn-default" href="{{ url_for('org_score', round_id=round.round_id) }}">Výsledky kola</a> <a class="btn btn-default" href="{{ url_for('org_score', round_id=round.round_id) }}">Výsledky kola</a>
</div> </div>
{% endif %} {% endif %}
{% endblock %}
{% block body %}
{% include "parts/org_submit_warning.html" %} {% include "parts/org_submit_warning.html" %}
<p><i> <p><i>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{{ contest_breadcrumbs(round=round, contest=contest, site=site, task=task, action="Zadávání bodů" if points_form else "Založení řešení" if create_form else None) }} {{ contest_breadcrumbs(round=round, contest=contest, site=site, task=task, action="Zadávání bodů" if points_form else "Založení řešení" if create_form else None) }}
{% endblock %} {% endblock %}
{% block body %} {% block pretitle %}
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<a class="btn btn-default" href="{{ url_for('org_contest_solutions', id=ct_id, site_id=site_id) }}">Všechny úlohy</a> <a class="btn btn-default" href="{{ url_for('org_contest_solutions', id=ct_id, site_id=site_id) }}">Všechny úlohy</a>
{% if round.state in [RoundState.grading, RoundState.closed] %} {% if round.state in [RoundState.grading, RoundState.closed] %}
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
<a class="btn btn-default" href="{{ url_for('org_score', round_id=round.round_id) }}">Výsledky kola</a> <a class="btn btn-default" href="{{ url_for('org_score', round_id=round.round_id) }}">Výsledky kola</a>
{% endif %} {% endif %}
</div> </div>
{% endblock %}
{% block body %}
{% include "parts/org_submit_warning.html" %} {% include "parts/org_submit_warning.html" %}
{% set form = points_form or create_form %} {% set form = points_form or create_form %}
......
...@@ -7,13 +7,15 @@ ...@@ -7,13 +7,15 @@
{{ contest_breadcrumbs(round=round, contest=contest, action="Výsledky oblasti" if contest else "Výsledky kola") }} {{ contest_breadcrumbs(round=round, contest=contest, action="Výsledky oblasti" if contest else "Výsledky kola") }}
{% endblock %} {% endblock %}
{% block body %} {% block pretitle %}
<div class="btn-group pull-right"> <div class="btn-group pull-right">
{% if contest %} {% if contest %}
<a class="btn btn-default" href="{{ url_for('org_contest_solutions', id=contest.contest_id) }}">Odevzdaná řešení</a> <a class="btn btn-default" href="{{ url_for('org_contest_solutions', id=contest.contest_id) }}">Odevzdaná řešení</a>
<a class="btn btn-default" href="{{ url_for('org_score', round_id=round.round_id) }}">Výsledky kola</a> <a class="btn btn-default" href="{{ url_for('org_score', round_id=round.round_id) }}">Výsledky kola</a>
{% endif %} {% endif %}
</div> </div>
{% endblock %}
{% block body %}
{% if messages %} {% if messages %}
<div class="collapsible"> <div class="collapsible">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment