~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/revision.pt

  • Committer: Michael Hudson
  • Date: 2007-11-19 08:55:10 UTC
  • mto: This revision was merged to the branch mainline in revision 142.
  • Revision ID: michael.hudson@canonical.com-20071119085510-ossv2rsqdcg7ikzh
oops

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
 
      </metal:block>
13
 
    </head>
14
 
 
15
 
    <body>
16
 
 
17
 
      <tal:block metal:fill-slot="heading">
18
 
        <h1><tal:block content="branch/friendly_name" /><span>: <tal:revno content="change/revno"></tal:revno>
19
 
        <tal:compare-to condition="python:compare_revid is not None">
20
 
          (compared to revision <tal:block content="python:history.get_revno(compare_revid)" />)
21
 
          </tal:compare-to>
22
 
        </span></h1>
23
 
        <ul id="submenuTabs">
24
 
            <li id="first"><a tal:attributes="href python:url(['/files', change.revno]); 
25
 
                                               title string:browse files at revision ${change/revno}"
26
 
                               tal:content="string:browse files at revision ${change/revno}"></a></li>
27
 
            <li tal:condition="python:remember != change.revno">
28
 
                <a tal:attributes="href python:url(['/revision', change.revno], remember=change.revno, compare_revid=None); 
29
 
                                   title string:Compare with another revision"
30
 
                   tal:content="string:Compare with another revision"></a></li>       
31
 
            <li tal:condition="python:(remember is not None) and (compare_revid is None) and (change.revno != remember)" >
32
 
                <a tal:attributes="href python:url(['/revision', change.revno], compare_revid=history.get_revno(remember))">
33
 
                compare with revision <tal:b content="python:history.get_revno(remember)" />
34
 
                </a>
35
 
            </li>
36
 
            <li id="last"><a tal:attributes="href python:url(['/changes', change.revno]); 
37
 
                                  title string:view history from revision ${change/revno}"
38
 
                  tal:content="string:view history from revision ${change/revno}"></a></li>
39
 
        </ul>
40
 
 
41
 
        <tal:we-are-comparing condition="python:compare_revid is not None">
42
 
        <ul id="submenuTabs">
43
 
          <li id="first">
44
 
              <a tal:attributes="href python:url([ '/revision', history.get_revno(compare_revid) ], remember=change.revno, compare_revid=change.revno)">
45
 
                reverse the comparison (<tal:b content="change/revno" /> to <tal:b content="python:history.get_revno(compare_revid)" />)
46
 
              </a>
47
 
          </li>
48
 
          <li id="last">
49
 
              <a tal:attributes="href python:url(['/revision', change.revno], remember=None, compare_revid=None)">
50
 
                stop comparing with revision <tal:b content="python:history.get_revno(compare_revid)" />
51
 
              </a>
52
 
          </li>
53
 
        </ul>
54
 
        </tal:we-are-comparing>
55
 
        
56
 
        <tal:revision-info replace="structure python:revisioninfo(url, branch, change, modified_file_link_rev)" />
57
 
        <p class="expand" id="expand_all" style="display:none;"><a tal:attributes="href string:javascript:toggle_expand_all_revisionview('open')">
58
 
            <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
59
 
                  alt="expand all" /> expand all</a>
60
 
        </p>
61
 
        <p class="expand" id="collapse_all"><a tal:attributes="href string:javascript:toggle_expand_all_revisionview('close')">
62
 
            <img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png')"
63
 
                  alt="collapse all" /> collapse all</a>
64
 
        </p>
65
 
        <!-- Table -->        
66
 
        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/newCode.gif')" alt="added" /> added</p>
67
 
        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/deleteCode.gif')" alt="removed" /> removed</p>
68
 
        <div class="clear"><!-- --></div>
69
 
 
70
 
      </tal:block>
71
 
 
72
 
      <div metal:fill-slot="content">
73
 
        <div class="diff"
74
 
             tal:condition="change/changes/modified"
75
 
             tal:define="uniqs python:{}">
76
 
          <!-- ! side-by-side diff -->
77
 
          <tal:block repeat="item change/changes/modified">
78
 
 
79
 
              <tal:u define="u python:util.uniq(uniqs, item.file_id)">
80
 
                      <div class="diffBox"><img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png');
81
 
                                                                title python:branch.static_url('/static/images/treeCollapsed.png');
82
 
                                                                alt python:branch.static_url('/static/images/treeExpanded.png')"
83
 
                                                                class="expand_diff" />
84
 
                                           <a tal:attributes="href python:url(['/annotate', change.revno], clear=1, file_id=item.file_id);
85
 
                                                              id string:${item/filename}-s;
86
 
                                                              title string:Annotate ${item/filename}"
87
 
                                              tal:content="item/filename"></a></div>
88
 
               <div id="psuedotable" class="diffinfo">
89
 
               <tal:block repeat="chunk item/sbs_chunks">
90
 
 
91
 
                <tal:block condition="not:repeat/chunk/start">
92
 
                 <div class="lineNumber separate"></div>
93
 
                 <div class="lineCode separate"></div>
94
 
                 <div class="lineNumber separate"></div>
95
 
                 <div class="lineCode separate"></div>
96
 
                 <div class="clear"><!-- --></div>
97
 
                </tal:block>
98
 
 
99
 
                <tal:block repeat="line chunk/diff">
100
 
                    <div id="pseudorow">
101
 
                    <tal:block condition="line/old_lineno">
102
 
                    <div class="lineNumber"><tal:block replace="structure python:util.fill_div(line.old_lineno)" /></div>
103
 
                        <div tal:attributes="class string:lineCode ${line/old_type}">
104
 
                            <tal:block replace="structure python:util.fill_div(line.old_line)" />
105
 
                        </div>
106
 
                    </tal:block>
107
 
 
108
 
                    <tal:block condition="not:line/old_lineno">
109
 
                    <div class="lineNumber"><tal:block replace="structure python:util.fill_div(line.old_lineno)" /></div>
110
 
                        <div tal:attributes="class string:lineCode ${line/old_type}">
111
 
                            <tal:block replace="structure python:util.fill_div(line.old_line)" />
112
 
                        </div>
113
 
                    </tal:block>
114
 
 
115
 
                    <tal:block condition="line/new_lineno">
116
 
                    <div class="lineNumber"><tal:block replace="structure python:util.fill_div(line.new_lineno)" /></div>
117
 
                        <div tal:attributes="class string:lineCode ${line/new_type}">
118
 
                            <tal:block replace="structure python:util.fill_div(line.new_line)" />
119
 
                        </div>
120
 
                    </tal:block>
121
 
 
122
 
                    <tal:block condition="not:line/new_lineno">
123
 
                    <div class="lineNumber"><tal:block replace="structure python:util.fill_div(line.new_lineno)" /></div>
124
 
                        <div tal:attributes="class string:lineCode ${line/new_type}">
125
 
                            <tal:block replace="structure python:util.fill_div(line.new_line)" />
126
 
                        </div>
127
 
                    </tal:block>
128
 
                    <div class="clear"><!-- --></div>
129
 
                    </div>
130
 
                   </tal:block>
131
 
                 </tal:block>
132
 
                 </div>
133
 
              </tal:u>
134
 
            </tal:block>
135
 
        </div>
136
 
 
137
 
        <ul tal:condition="python:navigation.prev_page_revid or navigation.next_page_revid"
138
 
            id="pages">
139
 
            <li tal:condition="navigation/prev_page_revid" 
140
 
                class="previous">
141
 
                <a tal:attributes="href navigation/prev_page_url">&laquo; Previous</a>
142
 
            </li>
143
 
            <!-- FIXME: Leaving this to eventually show page numbers. Can't show all of them,
144
 
                        so some magic has to be done to just show the previous and next N page numbers
145
 
 
146
 
            <li class="active">1</li>
147
 
            <tal:block tal:repeat="page_number python:range(navigation.page_count)">
148
 
            <li><a href="#"
149
 
                   tal:content="page_number"></a></li>
150
 
               </tal:block>-->
151
 
            <li tal:condition="navigation/next_page_revid"
152
 
                class="next">
153
 
                <a tal:attributes="href navigation/next_page_url">Next &raquo;</a>
154
 
            </li>
155
 
        </ul>
156
 
 
157
 
      </div>
158
 
    </body>
159
 
  </html>
160
 
</tal:block>