Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(23)

Side by Side Diff: templates/diff.html

Issue 1008: Issue navigation bar (Closed) SVN Base: http://rietveld.googlecode.com/svn/trunk/
Patch Set: Created 3 months, 3 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 {%extends "base.html"%} 1 {%extends "base.html"%}
2 {%block body%} 2 {%block body%}
3 3
4 <script language="JavaScript" type="text/javascript"><!-- 4 <script language="JavaScript" type="text/javascript"><!--
5 function keyPressIntermediary(evt) { 5 function keyPressIntermediary(evt) {
6 return M_keyPress(evt); 6 return M_keyPress(evt);
7 } 7 }
8 document.onkeypress = keyPressIntermediary; 8 document.onkeypress = keyPressIntermediary;
9 {%if user%} 9 {%if user%}
10 logged_in = true; 10 logged_in = true;
11 {%else%} 11 {%else%}
12 logged_in = false; 12 logged_in = false;
13 login_warned = false; 13 login_warned = false;
14 {%endif%} 14 {%endif%}
15 // --> 15 // -->
16 </script> 16 </script>
17 17
18 <!-- Form used by in-line comment JS; XXX filled in by JS code --> 18 <!-- Form used by in-line comment JS; XXX filled in by JS code -->
19 <form id="dainlineform" style="display: none;" 19 <form id="dainlineform" style="display: none;"
20 action="{%url codereview.views.inline_draft%}" method="post"> 20 action="{%url codereview.views.inline_draft%}" method="post">
21 <div class="comment-border" name="form-container"> 21 <div class="comment-border" name="form-container">
22 <input type="hidden" name="snapshot" value="XXX"> 22 <input type="hidden" name="snapshot" value="XXX">
23 <input type="hidden" name="lineno" value="XXX"> 23 <input type="hidden" name="lineno" value="XXX">
24 <input type="hidden" name="side" value="XXX"> 24 <input type="hidden" name="side" value="XXX">
25 <input type="hidden" name="issue" value="{{issue.key.id}}"> 25 <input type="hidden" name="issue" value="{{issue.key.id}}">
26 <input type="hidden" name="patchset" value="{{patchset.key.id}}"> 26 <input type="hidden" name="patchset" value="{{patchset.key.id}}">
27 <input type="hidden" name="patch" value="{{patch.key.id}}"> 27 <input type="hidden" name="patch" value="{{patch.key.id}}">
28 <textarea name="text" cols="60" rows="5"></textarea><br> 28 <textarea name="text" cols="60" rows="5"></textarea><br>
29 <input type="submit" name="save" value="Save" 29 <input type="submit" name="save" value="Save"
30 onclick="return M_submitInlineComment(this.form);"> 30 onclick="return M_submitInlineComment(this.form);">
31 <input type="reset" name="cancel" value="Cancel" 31 <input type="reset" name="cancel" value="Cancel"
32 onclick="M_removeTempInlineComment(this.form)"> 32 onclick="M_removeTempInlineComment(this.form)">
33 </div> 33 </div>
34 <div class="comment-border" style="padding: 0pt;"></div> 34 <div class="comment-border" style="padding: 0pt;"></div>
35 </form> 35 </form>
36 <a id="resizer" style="display:none;cursor:pointer"><img src="/static/zippyplus. gif"></a> 36 <a id="resizer" style="display:none;cursor:pointer"><img src="/static/zippyplus. gif"></a>
37 37
38 <h2>File: {{patch.filename}}</h2> 38 <h2>File: {{patch.filename}}</h2>
39 39
40 <div> 40 <div>
41 <b>Issue:</b> 41 <b>Issue:</b>
42 <a id="upCL" href="{%url codereview.views.show issue.key.id%}">{{issue.subject }}</a> 42 <a id="upCL" href="{%url codereview.views.show issue.key.id%}">{{issue.subject }}</a>
43 {%if issue.closed %} (Closed) {%endif%} 43 {%if issue.closed %} (Closed) {%endif%}
44 ('u') 44 ('u')
45 </div> 45 </div>
46 <div> 46 <div>
47 <i>Created:</i> {{issue.created|timesince}} ago by <b>{{issue.owner|nickname}} </b>; 47 <i>Created:</i> {{issue.created|timesince}} ago by <b>{{issue.owner|nickname}} </b>;
48 <i>Last updated:</i> {{issue.modified|timesince}} ago 48 <i>Last updated:</i> {{issue.modified|timesince}} ago
49 </div> 49 </div>
50 <div><i>SVN Base:</i> {{issue.base}}</div> 50 <div><i>SVN Base:</i> {{issue.base}}</div>
51 <div><i>Reviewers:</i> {{issue.reviewers|nicknames}}</div> 51 <div><i>Reviewers:</i> {{issue.reviewers|nicknames}}</div>
52 <div> 52 <div>
53 <b>Patch Set: {%if patchset.message%}{{patchset.message}}{%endif%}</b> 53 <b>Patch Set: {%if patchset.message%}{{patchset.message}}{%endif%}</b>
54 </div> 54 </div>
55 {%if patchset.url%} 55 {%if patchset.url%}
56 <div><i>Downloaded from:</i> <a href="{{patchset.url}}">{{patchset.url}}</a></di v> 56 <div><i>Downloaded from:</i> <a href="{{patchset.url}}">{{patchset.url}}</a></di v>
57 {%endif%} 57 {%endif%}
58 <div> 58 <div>
59 <i>Created:</i> {{patchset.created|timesince}} ago 59 <i>Created:</i> {{patchset.created|timesince}} ago
60 {%ifnotequal patchset.owner issue.owner%} 60 {%ifnotequal patchset.owner issue.owner%}
61 by <b>{{patchset.owner|nickname}}</b>{%endifnotequal%} 61 by <b>{{patchset.owner|nickname}}</b>{%endifnotequal%}
62 </div> 62 </div>
63 63
64 <p> 64 <p>
65 {%comment%} 65 {%comment%}
66 For some reason, 66 For some reason,
67 {%url codereview.views.diff issue.key.id,patchset.key.id,patch.prev.key.id%} 67 {%url codereview.views.diff issue.key.id,patchset.key.id,patch.prev.key.id%}
68 doesn't work. Go figure. Bleah. So use absolute URLs. 68 doesn't work. Go figure. Bleah. So use absolute URLs.
69 {%endcomment%} 69 {%endcomment%}
70 {%if patch.prev%} 70 {%if patch.prev%}
71 <a id="prevFile" 71 <a id="prevFile"
72 href="/{{issue.key.id}}/diff/{{patchset.key.id}}/{{patch.prev.key.id}}"> 72 href="/{{issue.key.id}}/diff/{{patchset.key.id}}/{{patch.prev.key.id}}">
73 &laquo; {{patch.prev.filename}}</a> ('k'){%else%} 73 &laquo; {{patch.prev.filename}}</a> ('k'){%else%}
74 <span class="disabled">&laquo; no previous file</span>{%endif%} 74 <span class="disabled">&laquo; no previous file</span>{%endif%}
75 | 75 |
76 {%if patch.next%} 76 {%if patch.next%}
77 <a id="nextFile" 77 <a id="nextFile"
78 href="/{{issue.key.id}}/diff/{{patchset.key.id}}/{{patch.next.key.id}}"> 78 href="/{{issue.key.id}}/diff/{{patchset.key.id}}/{{patch.next.key.id}}">
79 {{patch.next.filename}} &raquo;</a> ('j'){%else%} 79 {{patch.next.filename}} &raquo;</a> ('j'){%else%}
80 <span class="disabled">no next file &raquo;</span>{%endif%} 80 <span class="disabled">no next file &raquo;</span>{%endif%}
81 | 81 |
82 <a href="{%url codereview.views.patch issue.key.id,patchset.key.id,patch.key.id% }"> 82 <a href="{%url codereview.views.patch issue.key.id,patchset.key.id,patch.key.id% }">
83 View unified diff</a> 83 View unified diff</a>
84 | 84 |
85 <a href="javascript:if (intraLineDiff) intraLineDiff.toggle()"> 85 <a href="javascript:if (intraLineDiff) intraLineDiff.toggle()">
86 Toggle Intra-line Diffs</a> ('i') 86 Toggle Intra-line Diffs</a> ('i')
87 | 87 |
88 <a href="javascript:M_expandAllInlineComments()">Expand Comments</a> ('e') 88 <a href="javascript:M_expandAllInlineComments()">Expand Comments</a> ('e')
89 | 89 |
90 <a href="javascript:M_collapseAllInlineComments()">Collapse Comments</a> ('c') 90 <a href="javascript:M_collapseAllInlineComments()">Collapse Comments</a> ('c')
91 | 91 |
92 <a id="show-all-inline" 92 <a id="show-all-inline"
93 style="display:none" 93 style="display:none"
94 href="javascript:M_showAllInlineComments()">Show Comments</a> 94 href="javascript:M_showAllInlineComments()">Show Comments</a>
95 <a id="hide-all-inline" 95 <a id="hide-all-inline"
96 href="javascript:M_hideAllInlineComments()">Hide Comments</a> ('s') 96 href="javascript:M_hideAllInlineComments()">Hide Comments</a> ('s')
97 {%if user%}
98 |
99 <a class="novisit" href="{%url codereview.views.publish issue.key.id%}">Publish+ Mail
100 Comments</a>
101 {%endif%}
102 </p> 97 </p>
103 98
104 <h3>Side by Side Diff</h3> 99 <h3>Side by Side Diff</h3>
105 100
106 <p><i>Use n/p to move between diff chunks; 101 <p><i>Use n/p to move between diff chunks;
107 N/P to move between comments. 102 N/P to move between comments.
108 {%if user%} 103 {%if user%}
109 Double-click a line to add a draft in-line comment. 104 Double-click a line to add a draft in-line comment.
110 <br><span style="color:red">Draft comments are only viewable by you;</span> 105 <br><span style="color:red">Draft comments are only viewable by you;</span>
111 use <a class="novisit" href="{%url codereview.views.publish issue.key.id%}">Publ ish+Mail 106 use <a class="novisit" href="{%url codereview.views.publish issue.key.id%}">Publ ish+Mail
112 Comments</a> to let others view them. 107 Comments</a> to let others view them.
113 {%else%} 108 {%else%}
114 Please <a class="novisit" href="{{sign_in}}">Sign in</a> 109 Please <a class="novisit" href="{{sign_in}}">Sign in</a>
115 to add in-line comments. 110 to add in-line comments.
116 {%endif%} 111 {%endif%}
117 </i></p> 112 </i></p>
118 113
119 <div style="position:relative" id="table-top"> 114 <div style="position:relative" id="table-top">
120 115
121 <span id="hook-sel" style="display:none;"></span> 116 <span id="hook-sel" style="display:none;"></span>
122 117
123 <table border="0" cellpadding="0" cellspacing="0" id="thecode" 118 <table border="0" cellpadding="0" cellspacing="0" id="thecode"
124 ondblclick="M_handleTableDblClick(event)"> 119 ondblclick="M_handleTableDblClick(event)">
125 120
126 <tr><th>OLD</th><th>NEW</th></tr> 121 <tr><th>OLD</th><th>NEW</th></tr>
127 122
128 {%for row in rows%}{{row|safe}}{%endfor%} 123 {%for row in rows%}{{row|safe}}{%endfor%}
129 124
130 <tr><th>OLD</th><th>NEW</th></tr> 125 <tr><th>OLD</th><th>NEW</th></tr>
131 126
132 </table> 127 </table>
133 128
134 </div> 129 </div>
135 130
136 <p> 131 <p>
137 {%if patch.prev%} 132 {%if patch.prev%}
138 <a id="prevFile" 133 <a id="prevFile"
139 href="/{{issue.key.id}}/diff/{{patchset.key.id}}/{{patch.prev.key.id}}"> 134 href="/{{issue.key.id}}/diff/{{patchset.key.id}}/{{patch.prev.key.id}}">
140 &laquo; {{patch.prev.filename}}</a> ('k'){%else%} 135 &laquo; {{patch.prev.filename}}</a> ('k'){%else%}
141 <span class="disabled">&laquo; no previous file</span>{%endif%} 136 <span class="disabled">&laquo; no previous file</span>{%endif%}
142 | 137 |
143 {%if patch.next%} 138 {%if patch.next%}
144 <a id="nextFile" 139 <a id="nextFile"
145 href="/{{issue.key.id}}/diff/{{patchset.key.id}}/{{patch.next.key.id}}"> 140 href="/{{issue.key.id}}/diff/{{patchset.key.id}}/{{patch.next.key.id}}">
146 {{patch.next.filename}} &raquo;</a> ('j'){%else%} 141 {{patch.next.filename}} &raquo;</a> ('j'){%else%}
147 <span class="disabled">no next file &raquo;</span>{%endif%} 142 <span class="disabled">no next file &raquo;</span>{%endif%}
148 | 143 |
149 <a href="{%url codereview.views.patch issue.key.id,patchset.key.id,patch.key.id% }"> 144 <a href="{%url codereview.views.patch issue.key.id,patchset.key.id,patch.key.id% }">
150 View unified diff</a> 145 View unified diff</a>
151 | 146 |
152 <a href="javascript:if (intraLineDiff) intraLineDiff.toggle()"> 147 <a href="javascript:if (intraLineDiff) intraLineDiff.toggle()">
153 Toggle Intra-line Diffs</a> ('i') 148 Toggle Intra-line Diffs</a> ('i')
154 | 149 |
155 <a href="javascript:M_expandAllInlineComments()">Expand Comments</a> ('e') 150 <a href="javascript:M_expandAllInlineComments()">Expand Comments</a> ('e')
156 | 151 |
157 <a href="javascript:M_collapseAllInlineComments()">Collapse Comments</a> ('c') 152 <a href="javascript:M_collapseAllInlineComments()">Collapse Comments</a> ('c')
158 | 153 |
159 <a href="javascript:M_toggleAllInlineComments()"> 154 <a href="javascript:M_toggleAllInlineComments()">
160 Toggle Comments</a> ('s') 155 Toggle Comments</a> ('s')
161 {%if user%} 156 {%if user%}
162 | 157 |
163 <a class="novisit" href="{%url codereview.views.publish issue.key.id%}">Publish+ Mail 158 <a class="novisit" href="{%url codereview.views.publish issue.key.id%}">Publish+ Mail
164 Comments</a> 159 Comments</a>
165 {%endif%} 160 {%endif%}
166 </p> 161 </p>
167 162
168 </script> 163 </script>
169 <script language="JavaScript" type="text/javascript"><!-- 164 <script language="JavaScript" type="text/javascript"><!--
170 var old_snapshot = "old"; 165 var old_snapshot = "old";
171 var new_snapshot = "new"; 166 var new_snapshot = "new";
172 var intraLineDiff = new M_IntraLineDiff(); 167 var intraLineDiff = new M_IntraLineDiff();
173 var hookState = new M_HookState(window); 168 var hookState = new M_HookState(window);
174 hookState.updateHooks(); 169 hookState.updateHooks();
175 // --> 170 // -->
176 </script> 171 </script>
177 {%endblock%} 172 {%endblock%}
OLDNEW

Powered by Google App Engine
This is Rietveld r305