-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show semester name and school year when displaying semsester and year. #1163
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.10 on 2018-06-13 21:44 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('contests', '0010_round_results_final'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='competition', | ||
name='founded', | ||
field=models.IntegerField(blank=True, null=True, verbose_name='Year of foundation'), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,9 @@ | |
|
||
{% block page_header %} | ||
<h1> | ||
Zadania | ||
Zadania<br> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Toto by sme mohli mať ujednotené, že či teda ide názov kola vedľa alebo popod. Vyskytuje sa to ešte minimálne v list_active_rounds_tasks, v round_submit a tiež vo výsledkovkách ... a možno aj inde - najlepšie to skúsiť vyregexiť v kóde? preklikať sa stránkou? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pôvodne tam bolo Zadania # kola # časti..., teda názov časti by bolo treba vyskloňovať, tak preto som to oddelil, neoddelené si tak viac pýta skloňovanie :D, ale asi bude v pohode v riadku a nevyskloňované. Alebo mám sa nejako pohrať so skloňovaním? Preklikával som sa, na tých dvoch miestach, čo si dal, sa volá str() na round a to som prerobil, aby zobrazovalo aj názov časti, aj šk. rok. Ešte to checknem. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hej, na niektorých stránkach je to vyskloňované (aj pri výsledkoch) a na ostatných sa dáva priamo A viem, že sa tam volá str. Tie ostatné linky som tam dal hlavne pre ukázanie ako je to spravené inde - možno tam tiež pridať nejako medzeru? miesto |
||
<small> | ||
{{ round.number }}. kola {{ round.semester.number }}. časti | ||
{{ round.semester.year }}. ročníka {{ round.semester.competition.name }} | ||
{{ round }} | ||
{% if not round.visible %} | ||
<span class="label label-danger">skryté</span> | ||
{% endif %} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
<tr> | ||
<th colspan="3" class="active"> | ||
{{ year }}. ročník | ||
{% if competition.founded %} | ||
({{ competition.founded|add:year }}/{{ competition.founded|add:year|add:"1" }}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Asi by bolo vhodnejšie spraviť metódu pre semester že |
||
{% endif %} | ||
</th> | ||
</tr> | ||
</thead> | ||
|
@@ -20,7 +23,7 @@ | |
{% endif %} | ||
</td> | ||
<td> | ||
{{ round.semester.number }}. časť | ||
{{ round.semester.number }}.{% if round.semester.name %} ({{ round.semester.name }}){% endif %} časť | ||
</td> | ||
<td style="text-align:right;"> | ||
<a href="{% url 'task_list' round_id=round.id %}" class="btn btn-primary btn-sm"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do funkcie, viď nižšie