</div>
</td>
</tr>
-{% if submission.latest_series %}
+{% if all_series %}
<tr>
<th>Series</th>
<td>
<div class="patchrelations">
<ul>
- {% for series in submission.series.all %}
+ {% for series in all_series %}
<li>
- {% if series == submission.latest_series %}
+ {% if forloop.first %}
{{ series }}
{% else %}
<a href="{% url 'patch-list' project_id=project.linkname %}?series={{ series.id }}">
href="javascript:toggle_div('togglepatchrelations', 'patchrelations')"
>show</a>
<div id="patchrelations" class="patchrelations" style="display:none;">
+ {% for series in all_series %}
<ul>
- {% with submission.latest_series.cover_letter as cover %}
+ {% with series.cover_letter as cover %}
<li>
{% if cover %}
{% if cover == submission %}
{% endif %}
</li>
{% endwith %}
- {% for sibling in submission.latest_series.patches.all %}
+ {% for sibling in series.patches.all %}
<li>
{% if sibling == submission %}
{{ sibling.name|default:"[no subject]"|truncatechars:100 }}
</li>
{% endfor %}
</ul>
+ {% endfor %}
</div>
</td>
</tr>
comments = comments.only('submitter', 'date', 'id', 'content',
'submission')
context['comments'] = comments
+ context['all_series'] = cover.series.all().order_by('-date')
return render(request, 'patchwork/submission.html', context)
'submission')
context['comments'] = comments
+ context['all_series'] = patch.series.all().order_by('-date')
context['submission'] = patch
context['patchform'] = form
context['createbundleform'] = createbundleform