Index: templates/issue.html
diff --git a/templates/issue.html b/templates/issue.html
index a1d5af2e91412378aa8d1eb38ee5d222ef0d60be..6efd03e666734a4251f34487e3ffe109d6253e39 100644
--- a/templates/issue.html
+++ b/templates/issue.html
@@ -25,7 +25,7 @@
{%for patchset in patchsets%}
<h3>
<a id="ps-{{patchset.key.id}}-pointer"
- href="javascript:M_toggleSection('ps-{{patchset.key.id}}')"
+ href="javascript:M_toggleSectionForPS('{{issue.key.id}}', '{{patchset.key.id}}')"
class="toggled-section {%if forloop.last or patchset.n_drafts%}opentriangle{%endif%}">
Patch Set {{forloop.counter}}
{%if patchset.message%}: {{patchset.message}}{%endif%}
@@ -44,99 +44,12 @@
{%endif%}
<div id="ps-{{patchset.key.id}}"
- style="{%if forloop.last or patchset.n_drafts%}{%else%}display:none{%endif%}">
- {%if patchset.url%}
- <div>
- Downloaded from: <a href="{{patchset.url}}">{{patchset.url}}</a>
- </div>
- {%endif%}
- <div class="issue-list">
-
- <div class="pagination">
- <div style="float: left;">
- <i>Created:</i> {{patchset.created|timesince}} ago
- {%ifnotequal patchset.owner issue.owner%}
- by <b>{{patchset.owner|nickname}}</b>{%endifnotequal%}
- </div>
- {%if patchset.data%}
- <div style="float: right;">
- <a href="{%url codereview.views.download issue.key.id,patchset.key.id%}">
- Download raw patch set
- </a>
- </div>
- {%else%}
- <div class="disabled" style="float: right;">
- (Patch set is too large to download)
- </div>
- {%endif%}
- <div style="clear:both;"></div>
- </div>
-
- <table id="queues" style="clear:both;">
- <tr align="left">
- <th></th>
- <th>Unified diffs</th>
- <th>Side-by-side diffs</th>
- <th>Delta from patch set</th>
- <th colspan="3">Stats</th>
- <th>Patch</th>
- </tr>
-
- {%for patch in patchset.patches%}
- <tr>
- <td>{%if patch.status%}{{patch.status}}{%endif%}</td>
- <td>
- <a class="noul"
- href="{%url codereview.views.patch issue.key.id,patch.patchset.key.id,patch.key.id%}">
- {{patch.filename}}
- </a>
- </td>
- <td>
- {%if patch.no_base_file%}
- <span class="disabled">
- (Base file is too large to download)
- </span>
- {%else%}
- <a class="noul"
- href="{%url codereview.views.diff issue.key.id,patch.patchset.key.id,patch.key.id%}">
- View
- </a>
- {%endif%}
- </td>
- <td>
- {%comment%}
- The lines below are put together to avoid too much space.
- %spaceless% only removes whitespace between html tags, but not
- between django statements.
- {%endcomment%}
- {%if not patch.no_base_file%}{%for other in patchsets%}{%ifnotequal other patchset%}{%for opatch in other.patches%}{%if not opatch.no_base_file%}{%ifequal opatch.filename patch.filename%}{%ifnotequal opatch.text patch.text%}
- <a href="/{{issue.key.id}}/diff2/{{other.key.id}}:{{patchset.key.id}}/{{patch.key.id}}"
- title="Delta from patch set {{forloop.parentloop.counter}}">{{forloop.parentloop.counter}}</a>
- {%endifnotequal%}{%endifequal%}{%endif%}{%endfor%}{%endifnotequal%}{%endfor%}{%endif%}
- </td>
- <td>{{patch.num_chunks}} chunk{{patch.num_chunks|pluralize}}</td>
- <td>{{patch.num_lines}} line{{patch.num_lines|pluralize}}</td>
- <td>
- {%if patch.num_comments or patch.num_drafts%}<b>{%endif%}
- {{patch.num_comments}} comment{{patch.num_comments|pluralize}}
- {%if patch.num_drafts%}
- <span style="color:red">+
- {{patch.num_drafts}} draft{{patch.num_drafts|pluralize}}
- </span>
- {%endif%}
- {%if patch.num_comments or patch.num_drafts%}</b>{%endif%}
- </td>
- <td>
- <a href="{%url codereview.views.download_patch issue.key.id,patch.patchset.key.id,patch.key.id%}"
- title="Download patch for {{patch.filename}}">
- Download
- </a>
- </td>
- </tr>
- {%endfor%}
-
- </table>
- </div>
+ {%if forloop.last or patchset.n_drafts%}
+ style="">
+ {%include "patchset.html"%}
+ {%else%}
+ style="display:none">
+ {%endif%}
</div>
{%endfor%}
@@ -195,10 +108,10 @@
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="comment_title"
onclick="M_switchChangelistComment({{forloop.counter0}})">
- <td style="padding-left: 5px;">
- <b>{{message.sender|nickname}}</b>
- </td>
- <td width="100%">
+ <td style="padding-left: 5px; white-space: nowrap;">
+ <b>{{message.sender|nickname}}</b>
+ </td>
+ <td>
<table style="table-layout:fixed; white-space: nowrap;"
width="100%">
<tr>
@@ -212,7 +125,8 @@
</tr>
</table>
</td>
- <td style="white-space: nowrap; padding-right: 5px;">
+ <td align="right"
+ style="white-space: nowrap; padding-right: 5px;">
{{message.date|timesince}} ago
</td>
</tr>