Skip to content

Commit

Permalink
Change navbar if only one track
Browse files Browse the repository at this point in the history
The "Track x" message changes to "Participate in competition"
Cf. issue #22
  • Loading branch information
sfikas committed Sep 9, 2016
1 parent c70ed59 commit aa3933a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@
</li>
{% for tr in competition.track_set.all %}
<li class="dropdown" id="t1{{ tr.percomp_uniqueid }}">
<a href="{% url 'competition' competition_id=competition.id track_id=tr.percomp_uniqueid %}" style="display:inline-block;padding-right:0px;">{% trans "Track" %} {{ tr.percomp_uniqueid }}</a>
<a href="{% url 'competition' competition_id=competition.id track_id=tr.percomp_uniqueid %}" style="display:inline-block;padding-right:0px;">
{% if competition.track_set.count == 1 %}
{% trans "Participate in competition" %}
{% else %}
{% trans "Track" %} {{ tr.percomp_uniqueid }}
{% endif %}
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#subtracks" style="display:inline-block;padding-left:0px;">
<b class="caret"></b> <!-- This caret shows a wrong url sometimes, but probably doesnt matter -->
</a>
Expand Down

0 comments on commit aa3933a

Please sign in to comment.