-
Notifications
You must be signed in to change notification settings - Fork 32
/
candidate_detail.html
83 lines (76 loc) · 2.74 KB
/
candidate_detail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{% extends "elections/election_base.html" %}
{% load candideitorg_templetags %}
{% load i18n %}
{% block url_face_to_face %}{% url 'face_to_face_one_candidate_detail_view' slug=election.slug slug_candidate_one=candidate.slug %}{% endblock url_face_to_face %}
{% block mainelection %}
<div class="container-profile">
<div>
<h2>{{ candidate.name }}</h2>
</div>
<div class="profile-candidate">
<div class="row">
<div class="col-md-3">
<img src="http://placehold.it/800x600" class="img-responsive img-profile" alt="{{ candidate.name }}">
</div>
<div class="col-md-6">
<table class="table">
{% for personal_data in election.can_election.personaldata_set.all %}
<tr>
<td>
{{personal_data.label}}
</td>
<td>
{% for personal_data_candidate in personal_data.personaldatacandidate_set.all %}
{% relation_personal_data_candidate candidate personal_data %}
{% endfor %}
</td>
</tr>
{% endfor %}
</table>
</div>
<div class="col-md-3">
<ul class="list-unstyled">
{% for link in candidate.link_set.all %}
<li><a href="{{link.url}}" onclick="_gaq.push(['_trackEvent', 'SocialButtonCandidate', click]);" class="social-link-candidate"><i class="{{ link.icon_class }} icon-2x"></i> {{link.name}}</a></li>
{% endfor %}
</ul>
<button type="button" class="btn btn-success btn-lg btn-block"><i class="icon-edit"></i> {% trans "Hazle una pregunta" %}</button>
<button type="button" class="btn btn-primary btn-lg btn-block"><i class="icon-bolt"></i> {% trans "Compáralo con otro candidato" %}</button>
</div>
</div>
<div class="row">
<div class="antecedentes col-md-12">
{% for background_category in election.can_election.backgroundcategory_set.all %}
{% for background in background_category.background_set.all %}
{% for background_candidate in background.backgroundcandidate_set.all %}
<p>
{{background_candidate.value}}
</p>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
</div>
</div>
</div>
<div class="questionary">
<h3>{% trans "Cuestionario" %}:</h3>
{% for category in election.can_election.category_set.all %}
<div class="panel panel-default">
<div class="panel-heading">{{category.name}}</div>
<div class="panel-body">
{% for question in category.question_set.all %}
<div class="question-answer" {% if forloop.counter >= 2 %}style="margin-top:5px;" {% endif %}>
<p class="question">
{{question.question}}
</p>
<p class="answer">
{% answer_for_candidate_and_question candidate question %}
</p>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
{% endblock mainelection %}