~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/revision.pt

  • Committer: Martin Albisetti
  • Date: 2008-06-22 18:04:15 UTC
  • Revision ID: argentina@gmail.com-20080622180415-9ognqtaiptt58z7p
 * Remove homepage
 * Remove release tarballs
 * Remove push-website script
 * Edit MANIFEST.in to reflect current content

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
    <head>
5
5
      <title metal:fill-slot="title"
6
6
             tal:content="string:${branch/friendly_name} : revision ${change/revno}">
 
7
        ${branch.friendly_name} : revision ${change.revno}
7
8
      </title>
8
9
 
9
10
      <metal:block fill-slot="header_extras">
10
 
        <link rel="stylesheet" type="text/css" media="all"
11
 
              tal:attributes="href python:branch.static_url('/static/css/diff.css')"/>
 
11
        <script type="text/javascript"
 
12
                tal:attributes="src python:branch.static_url('/static/javascript/collapse.js')">
 
13
        </script>
12
14
      </metal:block>
13
15
    </head>
14
16
 
15
17
    <body>
16
18
 
17
 
      <tal:block metal:fill-slot="heading">
18
 
        <h1>
19
 
          <tal:has-link condition="branch/branch_link">
20
 
            <a tal:attributes="href branch/branch_link"
21
 
               tal:content="branch/friendly_name">
22
 
              nice/branch/name
23
 
            </a>
24
 
          </tal:has-link>
25
 
          <tal:no-link condition="not: branch/branch_link">
26
 
            <tal:branch-name replace="branch/friendly_name" />
27
 
          </tal:no-link>
28
 
          <span>: <tal:revno content="change/revno"></tal:revno>
 
19
      <h1 metal:fill-slot="heading">
 
20
        <span class="branch-name" tal:content="branch/friendly_name">
 
21
          ${branch.friendly_name}
 
22
        </span>
 
23
        : revision
 
24
        <tal:revno content="change/revno">
 
25
          ${change.revno}
 
26
        </tal:revno>
29
27
        <tal:compare-to condition="python:compare_revid is not None">
30
 
          (compared to revision <tal:block content="python:history.get_revno(compare_revid)" />)
31
 
          </tal:compare-to>
32
 
        </span></h1>
33
 
        <ul id="submenuTabs">
34
 
            <li id="first"><a tal:attributes="href python:url(['/files', change.revno]); 
35
 
                                               title string:browse files at revision ${change/revno}"
36
 
                               tal:content="string:browse files at revision ${change/revno}"></a></li>
37
 
            <li tal:condition="python:remember != change.revno">
38
 
                <a tal:attributes="href python:url(['/revision', change.revno], remember=change.revno, compare_revid=None); 
39
 
                                   title string:compare with another revision"
40
 
                   tal:content="string:Compare with another revision"></a></li>       
41
 
            <li tal:condition="python:(remember is not None) and (compare_revid is None) and (change.revno != remember)" >
42
 
                <a tal:attributes="href python:url(['/revision', change.revno], compare_revid=history.get_revno(remember))">
43
 
                compare with revision <tal:b content="python:history.get_revno(remember)" />
44
 
                </a>
45
 
            </li>
46
 
            <li>
47
 
            <a tal:condition="python:len(change.parents) > 0 and compare_revid is None"
48
 
                   tal:attributes="href python:url(['/diff', change.revno], clear=1)">download diff</a>
49
 
            <a tal:condition="python:compare_revid is not None"
50
 
                   tal:attributes="href python:url(['/diff', change.revno, history.get_revno(compare_revid)], clear=1)">download diff</a>
51
 
            </li>
52
 
            <li id="last"><a tal:attributes="href python:url(['/changes', change.revno]); 
53
 
                                  title string:view history from revision ${change/revno}"
54
 
                  tal:content="string:view history from revision ${change/revno}"></a></li>
55
 
        </ul>
 
28
          (compared to revision <tal:b content="python:history.get_revno(compare_revid)" />)
 
29
        </tal:compare-to>
 
30
      </h1>
56
31
 
57
 
        <tal:we-are-comparing condition="python:compare_revid is not None">
58
 
        <ul id="submenuTabs">
59
 
          <li id="first">
 
32
      <div metal:fill-slot="content">
 
33
        <div class="links">
 
34
          <div>
 
35
            <b>&#8594;</b>
 
36
            <a tal:attributes="href python:url(['/files', change.revno])">
 
37
              browse files at revision <tal:b content="change/revno" />
 
38
            </a>
 
39
          </div>
 
40
          <div>
 
41
            <b>&#8594;</b>
 
42
            <a tal:attributes="href python:url(['/changes'], start_revid=change.revno)">
 
43
              view history from revision <tal:b content="change/revno" />
 
44
            </a>
 
45
          </div>
 
46
          <div tal:condition="python:compare_revid is not None" >
 
47
            <b>&#8594;</b>
 
48
            <a tal:attributes="href python:branch.url(['/bundle', change.revno, history.get_revno(compare_revid), 'bundle.txt'])">
 
49
                download bundle from <tal:b content="python:history.get_revno(compare_revid)" /> to <tal:b content="change/revno" />
 
50
            </a>
 
51
          </div>
 
52
          <div tal:condition="python:(remember is not None) and (compare_revid is None) and remember != revid" >
 
53
            <b>&#8594;</b>
 
54
            <a tal:attributes="href python:url(['/revision', change.revno], compare_revid=history.get_revno(remember))">
 
55
              compare with revision <tal:b content="python:history.get_revno(remember)" />
 
56
            </a>
 
57
          </div>
 
58
          <div  tal:condition="python:remember != revid">
 
59
            <b>&#8594;</b>
 
60
            <a tal:attributes="href python:url(['/revision', change.revno], remember=change.revno, compare_revid=None)">
 
61
              compare with another revision
 
62
            </a>
 
63
          </div>
 
64
          <tal:we-are-comparing condition="python:compare_revid is not None">
 
65
            <div>
 
66
              <b>&#8594;</b>
60
67
              <a tal:attributes="href python:url([ '/revision', history.get_revno(compare_revid) ], remember=change.revno, compare_revid=change.revno)">
61
68
                reverse the comparison (<tal:b content="change/revno" /> to <tal:b content="python:history.get_revno(compare_revid)" />)
62
69
              </a>
63
 
          </li>
64
 
          <li id="last">
 
70
            </div>
 
71
            <div>
 
72
              <b>&#8594;</b>
65
73
              <a tal:attributes="href python:url(['/revision', change.revno], remember=None, compare_revid=None)">
66
74
                stop comparing with revision <tal:b content="python:history.get_revno(compare_revid)" />
67
75
              </a>
68
 
          </li>
69
 
        </ul>
70
 
        </tal:we-are-comparing>
71
 
        
 
76
            </div>
 
77
          </tal:we-are-comparing>
 
78
        </div>
 
79
 
72
80
        <tal:revision-info replace="structure python:revisioninfo(url, branch, change, modified_file_link_rev)" />
73
 
        <p class="expand" id="expand_all" style="display:none;"><a tal:attributes="href string:javascript:toggle_expand_all_revisionview('open')">
74
 
            <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
75
 
                  alt="expand all" /> expand all</a>
76
 
        </p>
77
 
        <p class="expand" id="collapse_all"><a tal:attributes="href string:javascript:toggle_expand_all_revisionview('close')">
78
 
            <img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png')"
79
 
                  alt="collapse all" /> collapse all</a>
80
 
        </p>
81
 
        <!-- Table -->        
82
 
        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/newCode.gif')" alt="added" /> added</p>
83
 
        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/deleteCode.gif')" alt="removed" /> removed</p>
84
 
        <div class="clear"><!-- --></div>
85
 
 
86
 
      </tal:block>
87
 
 
88
 
      <div metal:fill-slot="content">
 
81
 
 
82
        <table class="diff-option-buttons">
 
83
          <tr>
 
84
            <td>
 
85
              <tal:b content="structure python:collapse_all_button('file', branch, normal='table-row')" />
 
86
            </td>
 
87
 
 
88
            <td class="spacey">
 
89
              <a href="javascript:show_sbs()"
 
90
                 class="hide-all collapse-style-sbs-show"
 
91
                 title="collapse">
 
92
                <img tal:attributes="src python:branch.static_url('/static/images/nav-small-out.gif')"
 
93
                     width="22" height="10" class="collapse-triangle" />
 
94
                show side by side
 
95
              </a>
 
96
              <a href="javascript:show_unified()"
 
97
                 class="hide-all collapse-style-unified-show"
 
98
                 title="expand">
 
99
                <img tal:attributes="src python:branch.static_url('/static/images/nav-small-in.gif')"
 
100
                     width="22" height="10" class="collapse-triangle" />
 
101
                show unified diff
 
102
              </a>
 
103
            </td>
 
104
 
 
105
            <td class="diff-key-block diff-insert">
 
106
            </td>
 
107
            <td class="label">
 
108
              added
 
109
            </td>
 
110
            <td class="diff-key-block diff-delete">
 
111
            </td>
 
112
            <td class="label">
 
113
              removed
 
114
            </td>
 
115
          </tr>
 
116
        </table>
 
117
 
89
118
        <div class="diff"
90
119
             tal:condition="change/changes/modified"
91
120
             tal:define="uniqs python:{}">
92
121
          <!-- ! side-by-side diff -->
93
 
          <tal:block repeat="item change/changes/modified">
94
 
 
 
122
          <table class="diff-block collapse-style-sbs-content">
 
123
            <tal:block repeat="item change/changes/modified">
95
124
              <tal:u define="u python:util.uniq(uniqs, item.file_id)">
96
 
                      <div class="diffBox"><img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png');
97
 
                                                                title python:branch.static_url('/static/images/treeCollapsed.png');
98
 
                                                                alt python:branch.static_url('/static/images/treeExpanded.png')"
99
 
                                                                class="expand_diff" />
100
 
                                           <a tal:attributes="href python:url(['/annotate', change.revno], clear=1, file_id=item.file_id);
101
 
                                                              id string:${item/filename}-s;
102
 
                                                              title string:Annotate ${item/filename}"
103
 
                                              tal:content="item/filename"></a></div>
104
 
               <div id="psuedotable" class="diffinfo">
105
 
               <tal:block repeat="chunk item/sbs_chunks">
106
 
 
107
 
                <tal:block condition="not:repeat/chunk/start">
108
 
                 <div class="lineNumber separate"></div>
109
 
                 <div class="lineCode separate"></div>
110
 
                 <div class="lineNumber separate"></div>
111
 
                 <div class="lineCode separate"></div>
112
 
                 <div class="clear"><!-- --></div>
113
 
                </tal:block>
114
 
 
115
 
                <tal:block repeat="line chunk/diff">
116
 
                    <div id="pseudorow">
 
125
                <tr>
 
126
                  <th class="filename" colspan="4">
 
127
                    <tal:b content="structure python:collapse_button('file', u, branch, normal='table-row')" />
 
128
                    <a tal:attributes="href  python:url(['/annotate', change.revno], file_id=item.file_id);
 
129
                                       name  string:${item/filename}-s;
 
130
                                       title string:Annotate ${item/filename}"
 
131
                       tal:content="item/filename">
 
132
                      ${item.filename}
 
133
                    </a>
 
134
                  </th>
 
135
                </tr>
 
136
 
 
137
                <tal:block repeat="chunk item/sbs_chunks">
 
138
                  <tr tal:attributes="class string:diff-chunk collapse-file-${u}-content">
 
139
                    <th class="lineno">
 
140
                      old
 
141
                    </th>
 
142
                    <th>
 
143
                    </th>
 
144
                    <th class="lineno">
 
145
                      new
 
146
                    </th>
 
147
                    <th>
 
148
                    </th>
 
149
                  </tr>
 
150
                  <tr tal:repeat="line chunk/diff"
 
151
                      tal:attributes="class string:diff-chunk collapse-file-${u}-content">
117
152
                    <tal:block condition="line/old_lineno">
118
 
                    <div class="lineNumber"><tal:block replace="structure python:util.fill_div(line.old_lineno)" /></div>
119
 
                        <div tal:attributes="class string:lineCode ${line/old_type}">
120
 
                            <tal:block replace="structure python:util.fill_div(line.old_line)" />
121
 
                        </div>
 
153
                      <td class="lineno"
 
154
                          tal:content="line/old_lineno">
 
155
                        ${line.old_lineno}
 
156
                      </td>
 
157
                      <td tal:attributes="class string:diff-${line/old_type}"
 
158
                          tal:content="line/old_line">
 
159
                        ${line.old_line}
 
160
                      </td>
122
161
                    </tal:block>
123
 
 
124
162
                    <tal:block condition="not:line/old_lineno">
125
 
                    <div class="lineNumber"><tal:block replace="structure python:util.fill_div(line.old_lineno)" /></div>
126
 
                        <div tal:attributes="class string:lineCode ${line/old_type}">
127
 
                            <tal:block replace="structure python:util.fill_div(line.old_line)" />
128
 
                        </div>
 
163
                      <td class="lineno-skip"
 
164
                          tal:content="line/old_lineno">
 
165
                        ${line.old_lineno}
 
166
                      </td>
 
167
                      <td tal:attributes="class string:diff-${line/old_type}-skip"
 
168
                          tal:content="line/old_line">
 
169
                        ${line.old_line}
 
170
                      </td>
129
171
                    </tal:block>
130
 
 
131
172
                    <tal:block condition="line/new_lineno">
132
 
                    <div class="lineNumber"><tal:block replace="structure python:util.fill_div(line.new_lineno)" /></div>
133
 
                        <div tal:attributes="class string:lineCode ${line/new_type}">
134
 
                            <tal:block replace="structure python:util.fill_div(line.new_line)" />
135
 
                        </div>
 
173
                      <td class="lineno"
 
174
                          tal:content="line/new_lineno">
 
175
                        ${line.new_lineno}
 
176
                      </td>
 
177
                      <td tal:attributes="class string:diff-${line/new_type}"
 
178
                          tal:content="line/new_line">
 
179
                        ${line.new_line}
 
180
                      </td>
136
181
                    </tal:block>
137
 
 
138
182
                    <tal:block condition="not:line/new_lineno">
139
 
                    <div class="lineNumber"><tal:block replace="structure python:util.fill_div(line.new_lineno)" /></div>
140
 
                        <div tal:attributes="class string:lineCode ${line/new_type}">
141
 
                            <tal:block replace="structure python:util.fill_div(line.new_line)" />
142
 
                        </div>
 
183
                      <td class="lineno-skip"
 
184
                          tal:content="line/new_lineno">
 
185
                        ${line.new_lineno}
 
186
                      </td>
 
187
                      <td tal:attributes="class string:diff-${line/new_type}-skip"
 
188
                          tal:content="line/new_line">
 
189
                        ${line.new_line}
 
190
                      </td>
143
191
                    </tal:block>
144
 
                    <div class="clear"><!-- --></div>
145
 
                    </div>
146
 
                   </tal:block>
147
 
                 </tal:block>
148
 
                 </div>
149
 
              </tal:u>
150
 
            </tal:block>
151
 
        </div>
152
 
 
153
 
        <ul tal:condition="python:navigation.prev_page_revid or navigation.next_page_revid"
154
 
            id="pages">
155
 
            <li tal:condition="navigation/prev_page_revid" 
156
 
                class="previous">
157
 
                <a tal:attributes="href navigation/prev_page_url">&laquo; Previous</a>
158
 
            </li>
159
 
            <!-- FIXME: Leaving this to eventually show page numbers. Can't show all of them,
160
 
                        so some magic has to be done to just show the previous and next N page numbers
161
 
 
162
 
            <li class="active">1</li>
163
 
            <tal:block tal:repeat="page_number python:range(navigation.page_count)">
164
 
            <li><a href="#"
165
 
                   tal:content="page_number"></a></li>
166
 
               </tal:block>-->
167
 
            <li tal:condition="navigation/next_page_revid"
168
 
                class="next">
169
 
                <a tal:attributes="href navigation/next_page_url">Next &raquo;</a>
170
 
            </li>
171
 
        </ul>
172
 
 
 
192
                  </tr>
 
193
                  <tr tal:attributes="class string:diff-chunk-spacing collapse-file-${u}-content">
 
194
                    <td colspan="4">
 
195
                      &nbsp;
 
196
                    </td>
 
197
                  </tr>
 
198
                </tal:block>
 
199
                <tr class="diff-spacing">
 
200
                  <td colspan="4">
 
201
                    &nbsp;
 
202
                  </td>
 
203
                </tr>
 
204
              </tal:u>
 
205
            </tal:block>
 
206
          </table>
 
207
 
 
208
          <!-- ! unified diff -->
 
209
          <table class="diff-block collapse-style-unified-content">
 
210
            <tal:block repeat="item change/changes/modified">
 
211
              <tal:u define="u python:util.uniq(uniqs, item.file_id)">
 
212
                <tr>
 
213
                  <th class="filename" colspan="4">
 
214
                    <tal:b content="structure python:collapse_button('file', u, branch, normal='table-row')" />
 
215
                    <a tal:attributes="href  python:url(['/annotate', change.revno], file_id=item.file_id);
 
216
                                       name  string:${item/filename}-u;
 
217
                                       title string:Annotate ${item/filename}"
 
218
                       tal:content="item/filename">
 
219
                      ${item.filename}
 
220
                    </a>
 
221
                  </th>
 
222
                </tr>
 
223
 
 
224
                <tal:block repeat="chunk item/chunks">
 
225
                  <tr tal:attributes="class string:diff-chunk collapse-file-${u}-content">
 
226
                    <th class="lineno">
 
227
                      old
 
228
                    </th>
 
229
                    <th class="lineno">
 
230
                      new
 
231
                    </th>
 
232
                    <th>
 
233
                    </th>
 
234
                    <th>
 
235
                    </th>
 
236
                  </tr>
 
237
                  <tr tal:repeat="line chunk/diff"
 
238
                      tal:attributes="class string:diff-chunk collapse-file-${u}-content">
 
239
                    <td class="lineno"
 
240
                        tal:content="line/old_lineno">
 
241
                      ${line.old_lineno}
 
242
                    </td>
 
243
                    <td class="lineno"
 
244
                        tal:content="line/new_lineno">
 
245
                      ${line.new_lineno}
 
246
                    </td>
 
247
                    <td tal:attributes="class string:diff-${line/type} text"
 
248
                        tal:content="line/line">
 
249
                      ${line.line}
 
250
                    </td>
 
251
                    <td>
 
252
                    </td>
 
253
                  </tr>
 
254
                  <tr tal:attributes="class string:diff-chunk-spacing collapse-file-${u}-content">
 
255
                    <td colspan="4">
 
256
                      &nbsp;
 
257
                    </td>
 
258
                  </tr>
 
259
                </tal:block>
 
260
                <tr class="diff-spacing">
 
261
                  <td colspan="4">
 
262
                    &nbsp;
 
263
                  </td>
 
264
                </tr>
 
265
              </tal:u>
 
266
            </tal:block>
 
267
          </table>
 
268
        </div>
 
269
 
 
270
        <div tal:condition="python:navigation.prev_page_revid or navigation.next_page_revid"
 
271
             class="bar">
 
272
          <table>
 
273
            <tr>
 
274
              <td class="buttons">
 
275
                <a tal:condition="navigation/prev_page_revid"
 
276
                   tal:attributes="href navigation/prev_page_url">
 
277
                  &lt; revision
 
278
                  <tal:r content="python:history.get_revno(navigation.prev_page_revid)" />
 
279
                </a>
 
280
              </td>
 
281
              <td class="rbuttons" align="right">
 
282
                <a tal:condition="navigation/next_page_revid"
 
283
                   tal:attributes="href navigation/next_page_url">
 
284
                  revision
 
285
                  <tal:r content="python:history.get_revno(navigation.next_page_revid)" />
 
286
                  &gt;
 
287
                </a>
 
288
              </td>
 
289
            </tr>
 
290
          </table>
 
291
        </div>
173
292
      </div>
174
293
    </body>
175
294
  </html>