~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/revision.pt

  • Committer: Michael Hudson
  • Date: 2009-03-16 23:01:40 UTC
  • Revision ID: michael.hudson@canonical.com-20090316230140-ydm0xm0jghg6v5dq
it seems that double url-encoding the revid we put in the +revlog url is
necessary to avoid assorted bits of cleverness in random toolchains.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
              tal:attributes="href python:branch.static_url('/static/css/diff.css')"/>
12
12
        <script type="text/javascript"
13
13
                tal:attributes="src python:branch.static_url('/static/javascript/diff.js')"></script>
14
 
        <script type="text/javascript">
15
 
          var link_data = <tal:b content="link_data" />;
16
 
          var specific_path = <tal:b content="json_specific_path" />;
17
 
          var path_to_id = <tal:b content="path_to_id" />;
18
 
        </script>
19
14
      </metal:block>
20
15
    </head>
21
16
 
96
91
          </ul>
97
92
        </tal:we-are-comparing>
98
93
 
99
 
        <tal:revision-info replace="structure python:revisioninfo(url, branch, change, file_changes, specific_path, merged_in)" />
100
 
        <tal:specific-path condition="not:specific_path">
101
 
          <p class="expand show_if_js" id="expand_all"><a href="#">
102
 
              <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
103
 
                   alt="expand all" /> expand all</a>
104
 
          </p>
105
 
          <p class="expand" id="collapse_all" style="display:none;"><a href="#">
106
 
              <img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png')"
107
 
                   alt="collapse all" /> collapse all</a>
108
 
          </p>
109
 
        </tal:specific-path>
 
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>
110
103
        <!-- Table -->
111
104
        <p class="expand show_if_js"><a id="toggle_unified_sbs" href="#">Show diffs side-by-side</a></p>
112
105
        <p class="codin"><img tal:attributes="src python:branch.static_url('/static/images/newCode.gif')" alt="added" /> added</p>
116
109
      </tal:block>
117
110
 
118
111
      <div metal:fill-slot="content">
119
 
        <tal:block condition="specific_path">
120
 
          <div class="diff">
121
 
 
122
 
            <div  class="diffBox">
123
 
              <a tal:attributes="href python:url(['/revision', change.revno, specific_path], clear=1);
124
 
                                 id string:${specific_path};
125
 
                                 title string:View changes to ${specific_path} only"
126
 
                 class="the-link">
127
 
                <img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png')"
128
 
                     class="expand_diff"/>
129
 
                <tal:b content="specific_path" />
130
 
              </a>
131
 
            </div>
132
 
            <div style="overflow: hidden">
133
 
              <div class="container">
134
 
                <div class="loading" style="display:none">
135
 
                  <img tal:attributes="src python:branch.static_url('/static/images/spinner.gif')" />
136
 
                </div>
137
 
                <div class="diffinfo">
138
 
                  <div class="pseudotable unified"
139
 
                       tal:repeat="chunk diff_chunks">
140
 
 
141
 
                    <tal:block condition="not:repeat/chunk/start">
142
 
                      <div class="pseudorow context-row">
143
 
                        <div class="lineNumber separate"></div>
144
 
                        <div class="lineNumber second separate"></div>
145
 
                        <div class="code separate"></div>
146
 
                        <div class="clear"><!-- --></div>
147
 
                      </div>
148
 
                    </tal:block>
149
 
 
150
 
                    <div tal:repeat="line chunk/diff"
151
 
                         tal:attributes="class string:pseudorow ${line/type}-row">
152
 
                      <div class="lineNumber first"
153
 
                           tal:content="structure python:util.fill_div(line.old_lineno)"></div>
154
 
                      <div class="lineNumber second"
155
 
                           tal:content="structure python:util.fill_div(line.new_lineno)"></div>
156
 
                      <div tal:attributes="class string:code ${line/type}"
157
 
                           tal:content="structure python:util.fill_div(util.html_clean(line.line))"></div>
 
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>
158
137
                      <div class="clear"><!-- --></div>
159
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>
160
150
                  </div>
161
151
                </div>
162
152
              </div>
163
153
            </div>
164
154
          </div>
165
 
        </tal:block>
166
 
 
167
 
        <tal:block condition="not:specific_path">
168
 
          <div class="diff"
169
 
               tal:repeat="item file_changes/text_changes" tal:attributes="id string:diff-${item/index}">
170
 
 
171
 
            <div  class="diffBox">
172
 
              <a tal:attributes="href python:url(['/revision', change.revno, item.filename], clear=1);
173
 
                                 id string:${item/filename};
174
 
                                 title string:View changes to ${item/filename} only"
175
 
                 class="the-link">
176
 
                <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
177
 
                     class="expand_diff" />
178
 
                <tal:b content="item/filename" />
179
 
              </a>
180
 
            </div>
181
 
            <div class="diffinfo"  style="display:none">
182
 
              <div class="loading">
183
 
                <img tal:attributes="src python:branch.static_url('/static/images/spinner.gif')" />
184
 
              </div>
185
 
            </div>
186
 
          </div>
187
 
        </tal:block>
 
155
        </div>
188
156
 
189
157
        <ul tal:condition="python:navigation.prev_page_revid or navigation.next_page_revid"
190
158
            id="pages">