diff --git a/mo/web/templates/user_contest.html b/mo/web/templates/user_contest.html
index d1cec6adecf7b1190ac67c399968184dba2c5094..d04f34c63054219ebc415043abe64e186acf16e1 100644
--- a/mo/web/templates/user_contest.html
+++ b/mo/web/templates/user_contest.html
@@ -82,21 +82,25 @@
<p>Můžete si stáhnout <a href='{{ url_for('user_task_statement', id=contest.contest_id) }}'>zadání úloh</a>.
{% endif %}
-<table class="table table-bordered table-hover">
- <thead>
- <tr>
- <th>Úloha
- <th>Odevzdáno
- {% if state == RoundState.closed %}
- <th>Opraveno
- <th>Body
- {% endif %}
- <th>Akce
- <tbody>
{% for task, sol in task_sols %}
+<div class="panel panel-default">
+ <div class="panel-heading" style="display: flex; align-items: center">
+ <h4 class="panel-title" style="flex-grow: 1"><b>{{ task.code }}</b>: {{ task.name }}</h4>
+ <a class='btn btn-sm btn-primary pull-right' href='{{ url_for('user_contest_task', contest_id=contest.contest_id, task_id=task.task_id) }}'>
+ {% if contest.ct_can_submit() %}
+ <span class="glyphicon glyphicon-send"></span>
+ Odevzdat
+ {% else %}
+ <span class="glyphicon glyphicon-search"></span>
+ Detail úlohy
+ {% endif %}
+ </a>
+ </div>
+ {% if sol != None %}
+ <table class="table table-bordered">
<tr>
- <td>{{ task.code }}: {{ task.name }}
- {% if sol.final_submit_obj %}
+ <th>Odevzdané řešení
+ {% if sol.final_submit_obj %}
{% set p = sol.final_submit_obj %}
<td><a href='{{ url_for('user_paper', contest_id=contest.contest_id, paper_id=p.paper_id) }}'>{{- p.uploaded_at|timeformat }}
{% if p.is_broken() %}
@@ -105,10 +109,12 @@
({{ p.pages|inflected('strana', 'strany', 'stran') }})
{% endif %}
</a>
- {% else %}
+ {% else %}
<td>
- {% endif %}
+ {% endif %}
{% if state == RoundState.closed %}
+ <tr>
+ <th>Opravené řešení
<td>
{% if sol.final_feedback_obj %}
<a href='{{ url_for('user_paper', contest_id=contest.contest_id, paper_id=sol.final_feedback_obj.paper_id) }}'>
@@ -117,14 +123,18 @@
</a>
{% endif %}
{% if sol.note %}<span class="glyphicon glyphicon-comment" title="Existuje poznámka k řešení, viz detail úlohy"></span>{% endif %}
- <td>{{ sol.points if sol.points != None else '–' }}
+ <tr>
+ <th>Získané body
+ <td><b>{{ sol.points|decimal|none_value('–') }}</b>
{% endif %}
- <td>
- <a class='btn btn-xs btn-primary' href='{{ url_for('user_contest_task', contest_id=contest.contest_id, task_id=task.task_id) }}'>
- {% if contest.ct_can_submit() %}Odevzdat{% else %}Detail úlohy{% endif %}
- </a>
+ </table>
+ {% else %}
+ <div class="panel-body">
+ Řešení neodevzdáno.
+ </div>
+ {% endif %}
+</div>
{% endfor %}
-</table>
{% endif %}
diff --git a/mo/web/templates/user_contest_task.html b/mo/web/templates/user_contest_task.html
index d3d9f78782aacb09ea846c0e961d5b40d9c695ab..c6c5686bf26cbdecb487fc994397cf3c6e562d71 100644
--- a/mo/web/templates/user_contest_task.html
+++ b/mo/web/templates/user_contest_task.html
@@ -12,7 +12,7 @@
{% block title %}Úloha {{ task.code }}: {{ task.name }}{% endblock %}
{% block breadcrumbs %}
<li><a href='{{ url_for('user_index') }}'>Soutěže</a>
-<li><a href='{{ url_for('user_contest', id=contest.contest_id) }}'>{{ round.name }} {{ round.year }}. ročníku kategorie {{ round.category }}: {{ contest.place.name }}</a>
+<li><a href='{{ url_for('user_contest', id=contest.contest_id) }}'>{{ round.name }} {{ round.category }}</a>
<li>Úloha {{ task.code }}: {{ task.name }}
{% endblock %}
@@ -65,7 +65,7 @@
<p>Soutěžní kolo bylo ukončeno a úloha opravena a ohodnocena.
<table class="table table-bordered">
- <tr><th>Získané body:<td>{% if sol.points %}{{ sol.points|inflected("bod", "body", "bodů") }}{% else %}nebyly přiděleny žádné body{% endif %}
+ <tr><th>Získané body:<td>{% if sol.points %}{{ sol.points|decimal }}{% else %}nebyly přiděleny žádné body{% endif %}
{% if sol.final_feedback_obj %}
<tr><th>Opravené řešení:<td><a class="btn btn-xs btn-primary" href="{{ url_for('user_paper', contest_id=contest.contest_id, paper_id=sol.final_feedback_obj.paper_id) }}">Zobrazit</a>
{% if sol.final_feedback_obj.pages != None %}({{ sol.final_feedback_obj.pages|inflected('stránka', 'stránky', 'stránek') }}, {{ sol.final_feedback_obj.bytes }} bajtů){% endif %}
diff --git a/mo/web/templates/user_index.html b/mo/web/templates/user_index.html
index 2a7b4844ed72196d4e11c6f8a31f60a389fccb0d..36d57ce2365c343d6043a903dcba5a9d3ff170d1 100644
--- a/mo/web/templates/user_index.html
+++ b/mo/web/templates/user_index.html
@@ -3,44 +3,67 @@
{% block body %}
{% if pions %}
- <p>Účastníte se následujících kol FO:
+ <p>Účastníte se následujících kol FO.
- <table class="table">
- <thead>
- <tr>
- <th>Kategorie
- <th>Kolo
- <th>Stav účasti
- <th>Stav soutěže
- <th>Odkazy
- <tbody>
- {% for pion, contest, round in pions %}
- {% set state = contest.ct_state() %}
- <tr>
- <td class="text-center" style="font-size: 1.2em"><b>{{ round.category }}</b>
- <td>{{ round.name }} {{ contest.place.name_locative() if contest.place.level > 0 else '' }}
- <td>{{ pion.state.friendly_name() }}
- <td>{{ contest.ct_long_state() }}
- <td>
- {% if contest.ct_task_statement_available() %}
- <a class='btn btn-xs btn-success' href='{{ url_for('user_task_statement', id=contest.contest_id) }}'>Zadání</a>
- {% endif %}
- <a class='btn btn-xs btn-primary' href='{{ url_for('user_contest', id=contest.contest_id) }}'>
- {% if state == RoundState.running %}
- Odevzdat řešení
- {% elif state == RoundState.grading %}
- Odevzdaná řešení
- {% elif state == RoundState.closed %}
- Prohlédnout opravy
- {% else %}
- Detail kola
- {% endif %}
- </a>
- {% if state == RoundState.closed %}
- <a class="btn btn-xs btn-warning" href='{{ url_for('public_score', ct_id=contest.contest_id) }}'>Výsledky</a>
- {% endif %}
- {% endfor %}
- </table>
+ {% for pion, contest, round in pions %}
+ {% set state = contest.ct_state() %}
+ <div
+ {% if state == RoundState.preparing %}
+ class="panel panel-warning"
+ {% elif state == RoundState.running %}
+ class="panel panel-success"
+ {% elif state == RoundState.grading %}
+ class="panel panel-info"
+ {% else %}
+ class="panel panel-default"
+ {% endif %}>
+ <div class="panel-heading">
+ <h4 class="panel-title">{{ round.name }} <b>{{round.category}}</b> {{ contest.place.name_locative() if contest.place.level > 0 else '' }}</h4>
+ </div>
+ <div class="panel-body">
+ {% if pion.state == PartState.registered %}
+ <p class="text-warning">Jste přihlášen, ale vaše přihláška zatím nebyla potvrzena.
+ {% elif pion.state == PartState.refused %}
+ <p class="text-danger">Vaše přihláška byla odmítnuta.
+ {% elif pion.state == PartState.disqualified %}
+ <p class="text-danger">Byl jste diskvalifikován.
+ {% elif pion.state == PartState.absent %}
+ <p class="text-muted">Soutěže jste se nezúčastnil.
+ {% elif pion.state != PartState.active %}
+ <p>Stav vaší účasti: {{ pion.state.friendly_name() }}
+ {% endif %}
+ <p>{{round.name}} {{ contest.ct_long_state()|replace("opravuje se", "se opravuje")|replace("připravuje se", "se připravuje") }}.
+ <p>
+ {% if contest.ct_task_statement_available() %}
+ <a class='btn btn-success' href='{{ url_for('user_task_statement', id=contest.contest_id) }}'>
+ <span class="glyphicon glyphicon-file"></span>
+ Zadání
+ </a>
+ {% endif %}
+ <a class='btn btn-primary' href='{{ url_for('user_contest', id=contest.contest_id) }}'>
+ {% if state == RoundState.running %}
+ <span class="glyphicon glyphicon-send"></span>
+ Odevzdat řešení
+ {% elif state == RoundState.grading %}
+ <span class="glyphicon glyphicon-duplicate"></span>
+ Odevzdaná řešení
+ {% elif state == RoundState.closed %}
+ <span class="glyphicon glyphicon-eye-open"></span>
+ Prohlédnout opravy
+ {% else %}
+ <span class="glyphicon glyphicon-search"></span>
+ Detail kola
+ {% endif %}
+ </a>
+ {% if state == RoundState.closed %}
+ <a class="btn btn-warning" href='{{ url_for('public_score', ct_id=contest.contest_id) }}'>
+ <span class="glyphicon glyphicon-bullhorn"></span>
+ Výsledky
+ </a>
+ {% endif %}
+ </div>
+ </div>
+ {% endfor %}
{% else %}
<p>Momentálně se neúčastníte žádného kola FO.
{% endif %}