~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/revision.pt

  • Committer: Matt Nordhoff
  • Date: 2009-03-17 20:29:08 UTC
  • mfrom: (294.3.3 get_apparent_authors)
  • Revision ID: mnordhoff@mattnordhoff.com-20090317202908-glk450l6tay73pkm
Avoid using the deprecated Revision.get_apparent_author()

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
2
<tal:block define="onload string:load()">
 
3
  <html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="macros/main">
 
4
    <head>
 
5
      <title metal:fill-slot="title"
 
6
             tal:content="string:${branch/friendly_name} : revision ${change/revno}">
 
7
      </title>
 
8
 
 
9
      <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')"/>
 
12
        <script type="text/javascript"
 
13
                tal:attributes="src python:branch.static_url('/static/javascript/diff.js')"></script>
 
14
      </metal:block>
 
15
    </head>
 
16
 
 
17
    <body>
 
18
 
 
19
      <tal:block metal:fill-slot="heading">
 
20
        <h1>
 
21
          <tal:has-link condition="branch/branch_link">
 
22
            <a tal:attributes="href branch/branch_link"
 
23
               tal:content="branch/friendly_name">
 
24
              nice/branch/name
 
25
            </a>
 
26
          </tal:has-link>
 
27
          <tal:no-link condition="not: branch/branch_link">
 
28
            <span metal:use-macro="breadcrumbs/directory"></span>
 
29
          </tal:no-link>
 
30
          <span class="breadcrumb">:
 
31
            <tal:revno condition="not:specific_path" content="change/revno"></tal:revno>
 
32
            <a tal:condition="specific_path" tal:content="change/revno"
 
33
               tal:attributes="href python:url(['/revision', change.revno])"
 
34
               title="View changes to all files"></a>
 
35
                      <tal:compare-to condition="python:compare_revid is not None">
 
36
              (compared to revision <tal:block content="python:history.get_revno(compare_revid)" />)
 
37
            </tal:compare-to>
 
38
          </span>
 
39
          <span class="breadcrumb" tal:condition="specific_path">
 
40
            : <tal:annotate content="structure python:annotate_link(url, change.revno, specific_path)" />
 
41
          </span>
 
42
        </h1>
 
43
        <tal:branch-info replace="structure python:branchinfo(branch)" />
 
44
        <p tal:condition="not:specific_path">
 
45
          Viewing all changes in revision <tal:revno content="change/revno" />.
 
46
        </p>
 
47
        <p tal:condition="specific_path">
 
48
          <a tal:attributes="href python:url(['/revision', change.revno])">
 
49
            &#xAB; back to all changes in this revision
 
50
          </a>
 
51
        </p>
 
52
        <p tal:condition="specific_path">
 
53
          Viewing changes to <tal:annotate content="structure python:annotate_link(url, change.revno, specific_path)" />
 
54
        </p>
 
55
        <ul id="submenuTabs">
 
56
          <li id="first"><a tal:attributes="href python:url(['/files', change.revno]);
 
57
                                            title string:browse files at revision ${change/revno}"
 
58
                            tal:content="string:browse files at revision ${change/revno}"></a></li>
 
59
          <li tal:condition="python:remember != change.revno">
 
60
            <a tal:attributes="href python:url(['/revision', change.revno], remember=change.revno, compare_revid=None);
 
61
                               title string:compare with another revision"
 
62
               tal:content="string:Compare with another revision"></a></li>
 
63
          <li tal:condition="python:(remember is not None) and (compare_revid is None) and (change.revno != remember)" >
 
64
            <a tal:attributes="href python:url(['/revision', change.revno], compare_revid=history.get_revno(remember))">
 
65
              compare with revision <tal:b content="python:history.get_revno(remember)" />
 
66
            </a>
 
67
          </li>
 
68
          <li>
 
69
            <a tal:condition="python:len(change.parents) > 0 and compare_revid is None"
 
70
               tal:attributes="href python:url(['/diff', change.revno], clear=1)">download diff</a>
 
71
            <a tal:condition="python:compare_revid is not None"
 
72
               tal:attributes="href python:url(['/diff', change.revno, history.get_revno(compare_revid)], clear=1)">download diff</a>
 
73
          </li>
 
74
          <li id="last"><a tal:attributes="href python:url(['/changes', change.revno]);
 
75
                                           title string:view history from revision ${change/revno}"
 
76
                           tal:content="string:view history from revision ${change/revno}"></a></li>
 
77
        </ul>
 
78
 
 
79
        <tal:we-are-comparing condition="python:compare_revid is not None">
 
80
          <ul id="submenuTabs">
 
81
            <li id="first">
 
82
              <a tal:attributes="href python:url([ '/revision', history.get_revno(compare_revid) ], remember=change.revno, compare_revid=change.revno)">
 
83
                reverse the comparison (<tal:b content="change/revno" /> to <tal:b content="python:history.get_revno(compare_revid)" />)
 
84
              </a>
 
85
            </li>
 
86
            <li id="last">
 
87
              <a tal:attributes="href python:url(['/revision', change.revno], remember=None, compare_revid=None)">
 
88
                stop comparing with revision <tal:b content="python:history.get_revno(compare_revid)" />
 
89
              </a>
 
90
            </li>
 
91
          </ul>
 
92
        </tal:we-are-comparing>
 
93
 
 
94
        <tal:revision-info replace="structure python:revisioninfo(url, branch, change, 'fragment', specific_path)" />
 
95
        <p class="expand" id="expand_all" style="display:none;"><a href="#">
 
96
            <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
 
97
                 alt="expand all" /> expand all</a>
 
98
        </p>
 
99
        <p class="expand show_if_js" id="collapse_all"><a href="#">
 
100
            <img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png')"
 
101
                 alt="collapse all" /> collapse all</a>
 
102
        </p>
 
103
        <!-- Table -->
 
104
        <p class="expand show_if_js"><a id="toggle_unified_sbs" href="#">Show diffs side-by-side</a></p>
 
105
        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/newCode.gif')" alt="added" /> added</p>
 
106
        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/deleteCode.gif')" alt="removed" /> removed</p>
 
107
        <div class="clear"><!-- --></div>
 
108
 
 
109
      </tal:block>
 
110
 
 
111
      <div metal:fill-slot="content">
 
112
        <div class="diff"
 
113
             tal:repeat="item diffs">
 
114
 
 
115
          <div class="diffBox">
 
116
            <img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png');
 
117
                                 title python:branch.static_url('/static/images/treeCollapsed.png');
 
118
                                 alt python:branch.static_url('/static/images/treeExpanded.png')"
 
119
                 class="expand_diff" />
 
120
            <a tal:attributes="href python:url(['/revision', change.revno, item.filename], clear=1);
 
121
                               id string:${item/filename};
 
122
                               title string:View changes to ${item/filename} only"
 
123
               tal:content="item/filename">
 
124
            </a>
 
125
          </div>
 
126
          <div style="overflow: hidden">
 
127
            <div class="container">
 
128
              <div class="diffinfo">
 
129
                <div class="pseudotable unified"
 
130
                     tal:repeat="chunk item/chunks">
 
131
 
 
132
                  <tal:block condition="not:repeat/chunk/start">
 
133
                    <div class="pseudorow context-row">
 
134
                      <div class="lineNumber separate"></div>
 
135
                      <div class="lineNumber second separate"></div>
 
136
                      <div class="code separate"></div>
 
137
                      <div class="clear"><!-- --></div>
 
138
                    </div>
 
139
                  </tal:block>
 
140
 
 
141
                  <div tal:repeat="line chunk/diff"
 
142
                       tal:attributes="class string:pseudorow ${line/type}-row">
 
143
                    <div class="lineNumber first"
 
144
                         tal:content="structure python:util.fill_div(line.old_lineno)"></div>
 
145
                    <div class="lineNumber second"
 
146
                         tal:content="structure python:util.fill_div(line.new_lineno)"></div>
 
147
                    <div tal:attributes="class string:code ${line/type}"
 
148
                         tal:content="structure python:util.fill_div(util.html_clean(line.line))"></div>
 
149
                    <div class="clear"><!-- --></div>
 
150
                  </div>
 
151
                </div>
 
152
              </div>
 
153
            </div>
 
154
          </div>
 
155
        </div>
 
156
 
 
157
        <ul tal:condition="python:navigation.prev_page_revid or navigation.next_page_revid"
 
158
            id="pages">
 
159
          <li tal:condition="navigation/prev_page_revid"
 
160
              class="previous">
 
161
            <a tal:attributes="href navigation/prev_page_url">&laquo; Newer</a>
 
162
          </li>
 
163
          <!-- FIXME: Leaving this to eventually show page numbers. Can't show all of them,
 
164
               so some magic has to be done to just show the previous and next N page numbers
 
165
 
 
166
               <li class="active">1</li>
 
167
               <tal:block tal:repeat="page_number python:range(navigation.page_count)">
 
168
                 <li><a href="#"
 
169
                        tal:content="page_number"></a></li>
 
170
               </tal:block>-->
 
171
          <li tal:condition="navigation/next_page_revid"
 
172
              class="next">
 
173
            <a tal:attributes="href navigation/next_page_url">Older &raquo;</a>
 
174
          </li>
 
175
        </ul>
 
176
 
 
177
      </div>
 
178
    </body>
 
179
  </html>
 
180
</tal:block>