@@ -47,25 +47,27 | |||||
47 | </h4> |
|
47 | </h4> | |
48 | </div> |
|
48 | </div> | |
49 |
|
49 | |||
50 |
<div id="collapseTwo-{{ location. |
|
50 | <div id="collapseTwo-{{ location.id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> | |
51 | <div class="panel-body"> |
|
51 | <div class="panel-body"> | |
52 | <table class="table table-hover"> |
|
52 | <table class="table table-hover"> | |
53 | <tr> |
|
53 | <tr> | |
54 | <th>#</th> |
|
54 | ||
55 | {% for header in experiment_keys %} |
|
55 | {% for header in experiment_keys %} | |
56 | <th>{{ header|title }}</th> |
|
56 | <th>{{ header|title }}</th> | |
57 | {% endfor%} |
|
57 | {% endfor%} | |
58 | </tr> |
|
58 | </tr> | |
59 |
|
59 | |||
60 | {% for item in experiments %} |
|
60 | {% for item in experiments %} | |
61 | {% if location.name in item.location.name %} |
|
61 | {% for exs in item %} | |
62 |
<tr class="clickable-row" data-href="{% url 'url_experiment' |
|
62 | <tr class="clickable-row" data-href="{% url 'url_experiment' exs.id %}" > | |
63 | <td>{{ forloop.counter }}</td> |
|
63 | ||
64 | {% for key in experiment_keys %} |
|
64 | {% for key in experiment_keys %} | |
65 | <td>{{ item|value:key }}</td> |
|
65 | {% if location.name in exs.location.name %} | |
|
66 | <td>{{ exs|value:key }}</td> | |||
|
67 | {% endif %} | |||
66 | {% endfor %} |
|
68 | {% endfor %} | |
|
69 | {% endfor %} | |||
67 | </tr> |
|
70 | </tr> | |
68 | {% endif %} |
|
|||
69 | {% endfor %} |
|
71 | {% endfor %} | |
70 | </table> |
|
72 | </table> | |
71 | </div> |
|
73 | </div> |
@@ -776,8 +776,9 def operation(request, id_camp=None): | |||||
776 | if form.is_valid(): |
|
776 | if form.is_valid(): | |
777 | return redirect('url_operation', id_camp=campaign.id) |
|
777 | return redirect('url_operation', id_camp=campaign.id) | |
778 |
|
778 | |||
779 | locations = Location.objects.filter(experiment__campaign = campaign) |
|
779 | locations = Location.objects.filter(experiment__campaign__pk = campaign.id) | |
780 | experiments = Experiment.objects.filter(campaign=campaign) |
|
780 | experiments = Experiment.objects.filter(campaign=campaign) | |
|
781 | experiments = [Experiment.objects.filter(location__pk=location.id) for location in locations] | |||
781 |
|
782 | |||
782 | kwargs = {} |
|
783 | kwargs = {} | |
783 | #---Campaign |
|
784 | #---Campaign |
General Comments 0
You need to be logged in to leave comments.
Login now