~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/revision.pt

  • Committer: Martin Albisetti
  • Date: 2008-11-17 02:23:41 UTC
  • Revision ID: martin.albisetti@canonical.com-20081117022341-pj0oyhob16zgog81
Allow serving robots.txt out of static/ (Brian Harring)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    <body>
16
16
 
17
17
      <tal:block metal:fill-slot="heading">
18
 
        <h1><tal:block content="branch/friendly_name" /><span>: <tal:revno content="change/revno"></tal:revno>
 
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
            <span metal:use-macro="breadcrumbs/directory"></span>
 
27
          </tal:no-link>
 
28
          <span>: <tal:revno content="change/revno"></tal:revno>
19
29
        <tal:compare-to condition="python:compare_revid is not None">
20
30
          (compared to revision <tal:block content="python:history.get_revno(compare_revid)" />)
21
31
          </tal:compare-to>
22
32
        </span></h1>
23
33
        <ul id="submenuTabs">
24
 
            <li id="inicio"><a tal:attributes="href python:url(['/files', change.revno]); 
 
34
            <li id="first"><a tal:attributes="href python:url(['/files', change.revno]); 
25
35
                                               title string:browse files at revision ${change/revno}"
26
36
                               tal:content="string:browse files at revision ${change/revno}"></a></li>
27
37
            <li tal:condition="python:remember != change.revno">
28
38
                <a tal:attributes="href python:url(['/revision', change.revno], remember=change.revno, compare_revid=None); 
29
 
                                   title string:Compare with another revision"
 
39
                                   title string:compare with another revision"
30
40
                   tal:content="string:Compare with another revision"></a></li>       
31
41
            <li tal:condition="python:(remember is not None) and (compare_revid is None) and (change.revno != remember)" >
32
42
                <a tal:attributes="href python:url(['/revision', change.revno], compare_revid=history.get_revno(remember))">
33
43
                compare with revision <tal:b content="python:history.get_revno(remember)" />
34
44
                </a>
35
45
            </li>
36
 
            <li id="final"><a tal:attributes="href python:url(['/changes', change.revno]); 
 
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]); 
37
53
                                  title string:view history from revision ${change/revno}"
38
54
                  tal:content="string:view history from revision ${change/revno}"></a></li>
39
55
        </ul>
40
56
 
41
57
        <tal:we-are-comparing condition="python:compare_revid is not None">
42
58
        <ul id="submenuTabs">
43
 
          <li id="inicio">
 
59
          <li id="first">
44
60
              <a tal:attributes="href python:url([ '/revision', history.get_revno(compare_revid) ], remember=change.revno, compare_revid=change.revno)">
45
61
                reverse the comparison (<tal:b content="change/revno" /> to <tal:b content="python:history.get_revno(compare_revid)" />)
46
62
              </a>
47
63
          </li>
48
 
          <li id="final">
 
64
          <li id="last">
49
65
              <a tal:attributes="href python:url(['/revision', change.revno], remember=None, compare_revid=None)">
50
66
                stop comparing with revision <tal:b content="python:history.get_revno(compare_revid)" />
51
67
              </a>
54
70
        </tal:we-are-comparing>
55
71
        
56
72
        <tal:revision-info replace="structure python:revisioninfo(url, branch, change, modified_file_link_rev)" />
57
 
        <!-- FIXME: This doesn't work yet -->
58
 
        <p class="expand"><a href="#"><img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')" 
59
 
                             alt="collapse all" /> collapse all</a></p>
60
 
                        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/newCode.gif')" 
61
 
                           alt="added" /> added</p>
 
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>
62
83
        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/deleteCode.gif')" alt="removed" /> removed</p>
63
84
        <div class="clear"><!-- --></div>
64
85
 
72
93
          <tal:block repeat="item change/changes/modified">
73
94
 
74
95
              <tal:u define="u python:util.uniq(uniqs, item.file_id)">
75
 
                      <div class="diffBox"><a href="#"><img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png');
76
 
                                                                            title string:Annotate ${item/filename}" /></a>
 
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" />
77
100
                                           <a tal:attributes="href python:url(['/annotate', change.revno], clear=1, file_id=item.file_id);
78
 
                                                              id string:${item/filename}-s"
 
101
                                                              id string:${item/filename}-s;
 
102
                                                              title string:Annotate ${item/filename}"
79
103
                                              tal:content="item/filename"></a></div>
80
 
               <div id="psuedotable">
 
104
               <div id="psuedotable" class="diffinfo">
81
105
               <tal:block repeat="chunk item/sbs_chunks">
82
 
                 <tal:block repeat="line chunk/diff">
 
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">
83
116
                    <div id="pseudorow">
84
117
                    <tal:block condition="line/old_lineno">
85
 
                        <div class="lineNumber" tal:content="python:util.fill_div(line.old_lineno)"></div>
86
 
                        <div tal:attributes="class string:lineCode ${line/old_type}" tal:content="python:util.fill_div(line.old_line)"></div>
 
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>
87
122
                    </tal:block>
88
123
 
89
124
                    <tal:block condition="not:line/old_lineno">
90
 
                        <div class="lineNumber" tal:content="python:util.fill_div(line.old_lineno)"></div>
91
 
                        <div tal:attributes="class string:lineCode ${line/old_type}" tal:content="python:util.fill_div(line.old_line)"></div>
 
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>
92
129
                    </tal:block>
93
130
 
94
131
                    <tal:block condition="line/new_lineno">
95
 
                        <div class="lineNumber" tal:content="python:util.fill_div(line.new_lineno)"></div>
96
 
                        <div tal:attributes="class string:lineCode ${line/new_type}" tal:content="python:util.fill_div(line.new_line)"></div>
 
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>
97
136
                    </tal:block>
98
137
 
99
138
                    <tal:block condition="not:line/new_lineno">
100
 
                        <div class="lineNumber" tal:content="python:util.fill_div(line.new_lineno)"></div>
101
 
                        <div tal:attributes="class string:lineCode ${line/new_type}" tal:content="python:util.fill_div(line.new_line)"></div>
 
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>
102
143
                    </tal:block>
103
144
                    <div class="clear"><!-- --></div>
104
145
                    </div>