diff --git a/mo/web/org_contest.py b/mo/web/org_contest.py index dca704ce2be6dab8103729222f0c7844b7a3a55e..fdebce5c5e6dd8e9629a809fa11ceeddcc9b2876 100644 --- a/mo/web/org_contest.py +++ b/mo/web/org_contest.py @@ -288,7 +288,8 @@ def get_contest_site_rr(id: int, site_id: Optional[int], right_needed: Optional[ def contest_breadcrumbs( round: Optional[db.Round] = None, contest: Optional[db.Contest] = None, site: Optional[db.Place] = None, task: Optional[db.Task] = None, - user: Optional[db.User] = None, action: Optional[str] = None + user: Optional[db.User] = None, action: Optional[str] = None, + table: Optional[bool] = False ) -> Markup: elements = [(url_for('org_rounds'), 'Soutěže')] round_id = None @@ -313,6 +314,11 @@ def contest_breadcrumbs( if user: user_id = user.user_id elements.append((url_for('org_contest_user', contest_id=ct_id, user_id=user_id), user.full_name())) + if table: + if contest: + elements.append((url_for('org_contest_list', id=ct_id, site=site_id), "Seznam účastníků")) + else: + elements.append((url_for('org_round_list', id=round_id), "Seznam účastníků")) if action: elements.append(('', action)) diff --git a/mo/web/templates/org_contest_list.html b/mo/web/templates/org_contest_list.html index a52f292d2b0ee28f7671d8c25229c66dcef4d19d..edf82b924aaa910cd9f4b80ab458663ede048fac 100644 --- a/mo/web/templates/org_contest_list.html +++ b/mo/web/templates/org_contest_list.html @@ -6,7 +6,7 @@ Seznam účastníků {% if site %}v soutěžním místě {{ site.name }}{% else %}{{ contest.place.name_locative() }}{% endif %} {% endblock %} {% block breadcrumbs %} -{{ contest_breadcrumbs(round=round, contest=contest, site=site, action="Seznam účastníků") }} +{{ contest_breadcrumbs(round=round, contest=contest, site=site, action="Seznam účastníků" if table else "E-maily", table=False if table else True) }} {% endblock %} {% set id = contest.contest_id %} {% set site_id = site.place_id if site else None %} diff --git a/mo/web/templates/org_round_list.html b/mo/web/templates/org_round_list.html index 69b4ca3fd586f25b0546ad0d7c51c240aafa3138..e3ecd19842cc501ecd0e9dba5251754ae85dd4b9 100644 --- a/mo/web/templates/org_round_list.html +++ b/mo/web/templates/org_round_list.html @@ -3,7 +3,7 @@ {% block title %}Seznam účastníků kola {{ round.round_code() }}{% endblock %} {% block breadcrumbs %} -{{ contest_breadcrumbs(round=round, action="Seznam účastníků") }} +{{ contest_breadcrumbs(round=round, action="Seznam účastníků" if table else "E-maily", table=False if table else True) }} {% endblock %} {% set id = round.round_id %} diff --git a/mo/web/templates/parts/org_participants_emails.html b/mo/web/templates/parts/org_participants_emails.html index 19a46a262538e3cb2e6e8a97b9fcb7b80d115bca..b84c2102ec95312adcf1c168346399c3e71bb3a1 100644 --- a/mo/web/templates/parts/org_participants_emails.html +++ b/mo/web/templates/parts/org_participants_emails.html @@ -1,8 +1,3 @@ -<a class="btn btn-default pull-right" style="margin-top: 15px;" - href="{{ url_for('org_contest_list', id=id, site_id=site_id, **request.args) if contest else url_for('org_round_list', id=id, **request.args) }}"> - Zpět na tabulku účastníků -</a> - <h3>E-mailové adresy</h3> {% if emails %}