Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/relanzamiento-candidatos' into r…
…elanzamiento-candidatos
- Loading branch information
Showing
6 changed files
with
125 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
votai_general_theme/templates/elections/_election_with_position.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% load votainteligente_extras %} | ||
{% load thumbnail %} | ||
{% load staticfiles %} | ||
{% load i18n %} | ||
{% load thumbnail %} | ||
{% load bootstrap3 %} | ||
|
||
{% get_election_by_position position as election %} | ||
<!-- Cata compañera cacha que podis hacer lo siguiente {{position}} y te va a imprimir alcalde o concejal dependiendo de lo que tu digai --> | ||
<li class="col-md-4 containerAccordion"> | ||
<script type="text/javascript"> | ||
jQuery(document).ready(function($){ | ||
screenwidth = $(".containerAccordion").width(); | ||
$('#gridaccordion-{{position}}').gridAccordion({ | ||
width:screenwidth, height:250, columns:{{election.candidates.all|length}}, | ||
distance:2, closedPanelWidth:10, closedPanelHeight:10, alignType:'centerCenter', linkTarget: "_self", slideshow:true | ||
}); | ||
}); | ||
</script> | ||
<ul class="accordion" id="gridaccordion-{{position}}"> | ||
{% for candidate in election.candidates.all %} | ||
<li> | ||
{% if candidate.image %} | ||
{% thumbnail candidate.image "x300" as im %} | ||
<a href="{% url 'candidate_detail_view' election_slug=election.slug slug=candidate.id %}"><img src="{{ im.url }}" alt="{{ candidate.name }}" border="0"/></a> | ||
{% endthumbnail %} | ||
{% else %} | ||
<a href="{% url 'candidate_detail_view' election_slug=election.slug slug=candidate.id %}"><img src="{% static 'img/candidate-default.jpg' %}" alt="{{candidate.name}}" border="0" class="img-responsive"></a> | ||
{% endif %} | ||
<div class="caption">{{ candidate.name }}</div> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<a href="{{ election.get_absolute_url }}"><h3 class="portada">{{ election.name }}</h3></a> | ||
<div class="election-description"> | ||
<p>{{ election.description|truncatewords:33 }}</p> | ||
</div> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters