Skip to content

Commit

Permalink
Arreglando una cosita en el despliegue de las areas
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Álvarez committed Oct 4, 2017
1 parent bce0f49 commit a3918fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
16 changes: 4 additions & 12 deletions votai_general_theme/templates/elections/area.html
Expand Up @@ -60,24 +60,16 @@
<li><a href="{% url 'know_your_candidates' %}" onclick="ga('send','event','breadcrumb-candidaturas-area','click')">Candidaturas</a></li>
<li class="active">{{area.name}}</li>
<h1>Candidatos para {{area}}</h1>
{% if area.get_containing_filterable_areas %}
<h4>Comunas de {{area}}</h4>
{% for comuna in area.get_containing_filterable_areas %}
{{comuna}}
{% if not forloop.last %}
,
{% endif%}
{% endfor %}
{% endif %}
</ol>
</div>
{% for p in area.parents %}
{% for p in area.parents %}
{% with p.elections.first as election %}
{% if election %}
<a href="#election-area-{{p.id}}">{{p}}</a>
<span class="label label-primary"><a href="#election-area-{{p.id}}">{{p}}</a></span>
{% endif %}
{% endwith %}
{% endfor %}
</div>



{% for p in area.parents %}
Expand Down
11 changes: 11 additions & 0 deletions votai_general_theme/templates/elections/election_card.html
Expand Up @@ -3,7 +3,18 @@

<div id="election-area-{{election.area.id}}" class="container" itemscope>
{% if election %}
<div class="text-center">
<h2>{{election.name}}</h2>
{% if election.area.get_containing_filterable_areas %}
<h4>Comunas</h4>
{% for comuna in election.area.get_containing_filterable_areas %}
{{comuna}}
{% if not forloop.last %}
,
{% endif%}
{% endfor %}
{% endif %}
</div>
<div class="row">
{% for candidate in election.candidates.all %}
<div class="col-md-3">
Expand Down

0 comments on commit a3918fe

Please sign in to comment.