Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
2f905aab
Commit
2f905aab
authored
3 years ago
by
Jan Prachař
Browse files
Options
Downloads
Patches
Plain Diff
Reponsive uživatelské rozhraní pro snadné odevzdávání z mobilu
parent
2109381c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mo/web/templates/user_contest.html
+31
-21
31 additions, 21 deletions
mo/web/templates/user_contest.html
mo/web/templates/user_contest_task.html
+2
-2
2 additions, 2 deletions
mo/web/templates/user_contest_task.html
mo/web/templates/user_index.html
+60
-37
60 additions, 37 deletions
mo/web/templates/user_index.html
with
93 additions
and
60 deletions
mo/web/templates/user_contest.html
+
31
−
21
View file @
2f905aab
...
@@ -82,20 +82,24 @@
...
@@ -82,20 +82,24 @@
<p>
Můžete si stáhnout
<a
href=
'{{ url_for('
user_task_statement
',
id=
contest.contest_id)
}}'
>
zadání úloh
</a>
.
<p>
Můžete si stáhnout
<a
href=
'{{ url_for('
user_task_statement
',
id=
contest.contest_id)
}}'
>
zadání úloh
</a>
.
{% endif %}
{% 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 %}
{% 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>
<tr>
<t
d>
{{ task.code }}: {{ task.name }}
<t
h>
Odevzdané řešení
{% if sol.final_submit_obj %}
{% if sol.final_submit_obj %}
{% set p = 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 }}
<td><a
href=
'{{ url_for('
user_paper
',
contest_id=
contest.contest_id,
paper_id=
p.paper_id)
}}'
>
{{- p.uploaded_at|timeformat }}
...
@@ -109,6 +113,8 @@
...
@@ -109,6 +113,8 @@
<td>
<td>
{% endif %}
{% endif %}
{% if state == RoundState.closed %}
{% if state == RoundState.closed %}
<tr>
<th>
Opravené řešení
<td>
<td>
{% if sol.final_feedback_obj %}
{% if sol.final_feedback_obj %}
<a
href=
'{{ url_for('
user_paper
',
contest_id=
contest.contest_id,
paper_id=
sol.final_feedback_obj.paper_id)
}}'
>
<a
href=
'{{ url_for('
user_paper
',
contest_id=
contest.contest_id,
paper_id=
sol.final_feedback_obj.paper_id)
}}'
>
...
@@ -117,14 +123,18 @@
...
@@ -117,14 +123,18 @@
</a>
</a>
{% endif %}
{% endif %}
{% if sol.note %}
<span
class=
"glyphicon glyphicon-comment"
title=
"Existuje poznámka k řešení, viz detail úlohy"
></span>
{% 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 %}
{% 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>
{% endfor %}
</table>
</table>
{% else %}
<div
class=
"panel-body"
>
Řešení neodevzdáno.
</div>
{% endif %}
</div>
{% endfor %}
{% endif %}
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
mo/web/templates/user_contest_task.html
+
2
−
2
View file @
2f905aab
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
{% block title %}Úloha {{ task.code }}: {{ task.name }}{% endblock %}
{% block title %}Úloha {{ task.code }}: {{ task.name }}{% endblock %}
{% block breadcrumbs %}
{% block breadcrumbs %}
<li><a
href=
'{{ url_for('
user_index
')
}}'
>
Soutěže
</a>
<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 }}
<li>
Úloha {{ task.code }}: {{ task.name }}
{% endblock %}
{% endblock %}
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<p>
Soutěžní kolo bylo ukončeno a úloha opravena a ohodnocena.
<p>
Soutěžní kolo bylo ukončeno a úloha opravena a ohodnocena.
<table
class=
"table table-bordered"
>
<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 %}
{% 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>
<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 %}
{% 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 %}
...
...
This diff is collapsed.
Click to expand it.
mo/web/templates/user_index.html
+
60
−
37
View file @
2f905aab
...
@@ -3,44 +3,67 @@
...
@@ -3,44 +3,67 @@
{% block body %}
{% block body %}
{% if pions %}
{% 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 %}
{% for pion, contest, round in pions %}
{% set state = contest.ct_state() %}
{% set state = contest.ct_state() %}
<tr>
<div
<td
class=
"text-center"
style=
"font-size: 1.2em"
><b>
{{ round.category }}
</b>
{%
if
state =
=
RoundState.preparing
%}
<td>
{{ round.name }} {{ contest.place.name_locative() if contest.place.level > 0 else '' }}
class=
"panel panel-warning"
<td>
{{ pion.state.friendly_name() }}
{%
elif
state =
=
RoundState.running
%}
<td>
{{ contest.ct_long_state() }}
class=
"panel panel-success"
<td>
{%
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() %}
{% 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>
<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 %}
{% endif %}
<a
class=
'btn
btn-xs
btn-primary'
href=
'{{ url_for('
user_contest
',
id=
contest.contest_id)
}}'
>
<a
class=
'btn btn-primary'
href=
'{{ url_for('
user_contest
',
id=
contest.contest_id)
}}'
>
{% if state == RoundState.running %}
{% if state == RoundState.running %}
<span
class=
"glyphicon glyphicon-send"
></span>
Odevzdat řešení
Odevzdat řešení
{% elif state == RoundState.grading %}
{% elif state == RoundState.grading %}
<span
class=
"glyphicon glyphicon-duplicate"
></span>
Odevzdaná řešení
Odevzdaná řešení
{% elif state == RoundState.closed %}
{% elif state == RoundState.closed %}
<span
class=
"glyphicon glyphicon-eye-open"
></span>
Prohlédnout opravy
Prohlédnout opravy
{% else %}
{% else %}
<span
class=
"glyphicon glyphicon-search"
></span>
Detail kola
Detail kola
{% endif %}
{% endif %}
</a>
</a>
{% if state == RoundState.closed %}
{% if state == RoundState.closed %}
<a
class=
"btn btn-xs btn-warning"
href=
'{{ url_for('
public_score
',
ct_id=
contest.contest_id)
}}'
>
Výsledky
</a>
<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 %}
{% endif %}
</div>
</div>
{% endfor %}
{% endfor %}
</table>
{% else %}
{% else %}
<p>
Momentálně se neúčastníte žádného kola FO.
<p>
Momentálně se neúčastníte žádného kola FO.
{% endif %}
{% endif %}
...
...
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