|
9 | 9 |
|
10 | 10 | {% block body %}
|
11 | 11 | <script>
|
12 |
| -function toggle_div(link_id, headers_id) |
| 12 | +function toggle_div(link_id, headers_id, label_show, label_hide) |
13 | 13 | {
|
14 | 14 | var link = document.getElementById(link_id)
|
15 | 15 | var headers = document.getElementById(headers_id)
|
16 | 16 |
|
17 | 17 | var hidden = headers.style['display'] == 'none';
|
18 | 18 |
|
19 | 19 | if (hidden) {
|
20 |
| - link.innerHTML = 'hide'; |
| 20 | + link.innerHTML = label_hide || 'hide'; |
21 | 21 | headers.style['display'] = 'block';
|
22 | 22 | } else {
|
23 |
| - link.innerHTML = 'show'; |
| 23 | + link.innerHTML = label_show || 'show'; |
24 | 24 | headers.style['display'] = 'none';
|
25 | 25 | }
|
26 | 26 |
|
@@ -74,42 +74,37 @@ <h1>{{ submission.name }}</h1>
|
74 | 74 | <th>Series</th>
|
75 | 75 | <td>
|
76 | 76 | <a href="{% url 'patch-list' project_id=project.linkname %}?series={{ submission.series.id }}">
|
77 |
| - {{ submission.series }} |
78 |
| - </a> |
79 |
| - </td> |
80 |
| - </tr> |
81 |
| - <tr> |
82 |
| - <th>Related</th> |
83 |
| - <td> |
84 |
| - <a id="togglepatchrelations" |
85 |
| - href="javascript:toggle_div('togglepatchrelations', 'patchrelations')" |
86 |
| - >show</a> |
87 |
| - <div id="patchrelations" class="patchrelations" style="display:none;"> |
| 77 | + {{ submission.series.name }} |
| 78 | + </a> | |
| 79 | + <a id="togglepatchseries" |
| 80 | + href="javascript:toggle_div('togglepatchseries', 'patchseries', 'expand', 'collapse')" |
| 81 | + >expand</a> |
| 82 | + <div id="patchseries" class="submissionlist" style="display:none;"> |
88 | 83 | <ul>
|
89 |
| - {% with submission.series.cover_letter as cover %} |
90 |
| - <li> |
91 |
| - {% if cover %} |
92 |
| - {% if cover == submission %} |
93 |
| - {{ cover.name|default:"[no subject]"|truncatechars:100 }} |
94 |
| - {% else %} |
95 |
| - <a href="{% url 'cover-detail' project_id=project.linkname msgid=cover.url_msgid %}"> |
96 |
| - {{ cover.name|default:"[no subject]"|truncatechars:100 }} |
97 |
| - </a> |
98 |
| - {% endif %} |
99 |
| - {% endif %} |
100 |
| - </li> |
101 |
| - {% endwith %} |
102 |
| - {% for sibling in submission.series.patches.all %} |
103 |
| - <li> |
104 |
| - {% if sibling == submission %} |
105 |
| - {{ sibling.name|default:"[no subject]"|truncatechars:100 }} |
106 |
| - {% else %} |
107 |
| - <a href="{% url 'patch-detail' project_id=project.linkname msgid=sibling.url_msgid %}"> |
108 |
| - {{ sibling.name|default:"[no subject]"|truncatechars:100 }} |
109 |
| - </a> |
| 84 | + {% with submission.series.cover_letter as cover %} |
| 85 | + <li> |
| 86 | + {% if cover %} |
| 87 | + {% if cover == submission %} |
| 88 | + {{ cover.name|default:"[no subject]"|truncatechars:100 }} |
| 89 | + {% else %} |
| 90 | + <a href="{% url 'cover-detail' project_id=project.linkname msgid=cover.url_msgid %}"> |
| 91 | + {{ cover.name|default:"[no subject]"|truncatechars:100 }} |
| 92 | + </a> |
| 93 | + {% endif %} |
110 | 94 | {% endif %}
|
111 |
| - </li> |
112 |
| - {% endfor %} |
| 95 | + </li> |
| 96 | + {% endwith %} |
| 97 | + {% for sibling in submission.series.patches.all %} |
| 98 | + <li> |
| 99 | + {% if sibling == submission %} |
| 100 | + {{ sibling.name|default:"[no subject]"|truncatechars:100 }} |
| 101 | + {% else %} |
| 102 | + <a href="{% url 'patch-detail' project_id=project.linkname msgid=sibling.url_msgid %}"> |
| 103 | + {{ sibling.name|default:"[no subject]"|truncatechars:100 }} |
| 104 | + </a> |
| 105 | + {% endif %} |
| 106 | + </li> |
| 107 | + {% endfor %} |
113 | 108 | </ul>
|
114 | 109 | </div>
|
115 | 110 | </td>
|
|
0 commit comments