~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/revision.pt

  • Committer: Jelmer Vernooij
  • Date: 2008-08-06 18:33:20 UTC
  • mto: (197.1.9 pathargs)
  • mto: This revision was merged to the branch mainline in revision 202.
  • Revision ID: jelmer@samba.org-20080806183320-6llann0k480dlb9y
add --log-folder option.

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