~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/changelog.pt

  • Committer: Michael Hudson
  • Date: 2009-02-25 04:41:51 UTC
  • mto: This revision was merged to the branch mainline in revision 294.
  • Revision ID: michael.hudson@canonical.com-20090225044151-o6dffxt1jmoz8zo2
remove useless genericity in how we show changed files in a revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
 
<html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="macros/main">
3
 
  <head>
4
 
    <title metal:fill-slot="title"
5
 
           tal:content="string:${branch/friendly_name} : changes"></title>
6
 
    <metal:block fill-slot="header_extras">
7
 
      <link rel="alternate" type="application/atom+xml"
8
 
            tal:attributes="href python:url(['/atom']);
9
 
                            title string:RSS feed for ${branch/friendly_name}" />
10
 
    <script type="text/javascript">
11
 
      var revids = <tal:block content="data" />;
12
 
    </script>
13
 
      <script type="text/javascript"
14
 
              tal:attributes="src python:branch.static_url('/static/javascript/changelog.js')"></script>
15
 
    </metal:block>
16
 
  </head>
17
 
 
18
 
  <body>
19
 
      <tal:block metal:fill-slot="backlink">
20
 
          <tal:has-link condition="branch/branch_link">
21
 
            <div class="black-link">
22
 
                <a tal:attributes="href branch/branch_link">
23
 
                  &#8592; Back to branch summary
24
 
                </a>
25
 
            </div>
26
 
          </tal:has-link>
27
 
      </tal:block>
28
 
    <tal:block metal:fill-slot="branchname" tal:content="string:${branch/friendly_name}" />
29
 
    <tal:block metal:fill-slot="heading">
30
 
        <div id="breadcrumbs">
31
 
            <tal:has-link condition="branch/branch_link">
32
 
              <a tal:attributes="href branch/branch_link"
33
 
                 tal:content="branch/friendly_name">
34
 
                nice/branch/name
35
 
              </a>
36
 
            </tal:has-link>
37
 
            <tal:no-link condition="not: branch/branch_link">
38
 
              <span metal:use-macro="breadcrumbs/directory"></span>
39
 
            </tal:no-link>
40
 
            <tal:block condition="changes">
41
 
              &#187; Changes
42
 
              <tal:block condition="filter_file_id">to <span tal:content="python:history.get_path(revid, filter_file_id)" /></tal:block>
43
 
              <tal:block condition="start_revid">from revision
44
 
                <span tal:content="python:history.get_revno(start_revid)"/>
45
 
              </tal:block>
46
 
              <tal:block condition="query">matching <tal:block content="query" /></tal:block>
47
 
            </tal:block>
48
 
        </div>
49
 
    </tal:block>
50
 
 
51
 
    <div metal:fill-slot="content">
52
 
      <tal:branch-info replace="structure python:branchinfo(branch)" />
53
 
 
54
 
      <!-- Something nicer-looking should be done with search -->
55
 
      <p tal:condition="search_failed">
56
 
        Sorry, no results found for your search.
57
 
      </p>
58
 
 
59
 
      <p tal:condition="not:changes">
60
 
        No revisions!
61
 
      </p>
62
 
 
63
 
      <p class="fr revnolink">From Revision <a tal:attributes="href #
64
 
                                                               title python:'Show revision '+history.get_revno(revid)"
65
 
                                               tal:content="python:history.get_revno(revid)"></a>
66
 
        <tal:block tal:condition="python:navigation.last_in_page_revid is not None"> to
67
 
          <a tal:attributes="href #
 
2
<tal:block define="onload string:sortCollapseElements()">
 
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} : changes"></title>
 
7
      <metal:block fill-slot="header_extras">
 
8
        <link rel="alternate" type="application/atom+xml"
 
9
              tal:attributes="href python:url(['/atom']);
 
10
                              title string:RSS feed for ${branch/friendly_name}" />
 
11
        <script type="text/javascript"
 
12
                tal:attributes="src python:branch.static_url('/static/javascript/changelog.js')"></script>
 
13
      </metal:block>
 
14
    </head>
 
15
 
 
16
    <body>
 
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
             <span metal:use-macro="breadcrumbs/directory"></span>
 
27
           </tal:no-link>
 
28
           <tal:block condition="changes">
 
29
             : changes
 
30
             <tal:block condition="filter_file_id">to <span tal:content="python:history.get_path(revid, filter_file_id)" /></tal:block>
 
31
             <tal:block condition="start_revid">from revision
 
32
               <span tal:content="python:history.get_revno(start_revid)"/>
 
33
             </tal:block>
 
34
             <tal:block condition="query">matching <tal:block content="query" /></tal:block>
 
35
           </tal:block>
 
36
         </h1>
 
37
        </tal:block>
 
38
 
 
39
        <div metal:fill-slot="content">
 
40
          <tal:branch-info replace="structure python:branchinfo(branch)" />
 
41
 
 
42
           <!-- Something nicer-looking should be done with search -->
 
43
        <p tal:condition="search_failed">
 
44
          Sorry, no results found for your search.
 
45
        </p>
 
46
 
 
47
        <p tal:condition="not:changes">
 
48
          No revisions!
 
49
        </p>
 
50
 
 
51
        <p class="fr revnolink">From Revision <a tal:attributes="href #
 
52
                                                            title python:'Show revision '+history.get_revno(revid)" 
 
53
                                tal:content="python:history.get_revno(revid)"></a>
 
54
          <tal:block tal:condition="python:navigation.last_in_page_revid is not None"> to
 
55
          <a tal:attributes="href # 
68
56
                             title 'Show revision '+history.get_revno(navigation.last_in_page_revid)"
69
57
             tal:content="python:history.get_revno(navigation.last_in_page_revid)"></a>
70
 
      </tal:block></p>
71
 
      <p class="expand show_if_js" id="expand_all"><a href="#">
72
 
          <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
73
 
               alt="expand all" /> expand all</a>
74
 
      </p>
75
 
      <p class="expand" id="collapse_all" style="display:none;"><a href="#">
76
 
          <img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png')"
77
 
               alt="collapse all" /> collapse all</a>
78
 
      </p>
79
 
      <!-- Table -->
80
 
      <table id="logentries">
81
 
        <tr class="logheader">
82
 
          <th class="revisionnumber">Rev</th>
83
 
          <th class="expandcell show_if_js">&nbsp;</th>
84
 
          <th class="summarycell">Summary</th>
85
 
          <th class="authorcell">Authors</th>
86
 
          <th tal:condition="show_tag_col" class="tagscell">Tags</th>
87
 
          <th class="datecell">Date</th>
88
 
          <th class="diffcell">Diff</th>
89
 
          <th class="downloadcell">Files</th>
90
 
        </tr>
91
 
        <tal:block tal:repeat="entry changes">
92
 
          <a tal:attributes="name string:entry-${entry/revno}"/>
93
 
          <tr tal:attributes="class string:blueRow${entry/parity} revision_log; id string:log-${entry/index}">
94
 
            <td class="revnro revnolink"><a tal:attributes="title python:'Show revision '+entry.revno;
95
 
                                                            href  python:url(['/revision', entry.revno], clear=1)"
96
 
                                            tal:content="python:util.trunc(entry.revno)"></a>
97
 
            </td>
98
 
            <td class="expcell show_if_js">
99
 
              <div class="expand_revisioninfo">
100
 
                <a href="#">
101
 
                  <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
102
 
                       class="expand_icon" />
103
 
                </a>
104
 
              </div>
105
 
            </td>
106
 
            <td class="summcell">
107
 
              <div class="short_description">
108
 
                <img tal:condition="python:entry.parents[1:]"
109
 
                     tal:attributes="src python:branch.static_url('/static/images/ico_mergefrom.gif')" />
110
 
                <a tal:attributes="title python:'Show revision '+entry.revno;
111
 
                                   href  python:url(['/revision', entry.revno], clear=1);
112
 
                                   class string:link"
113
 
                   tal:content="entry/short_comment"></a>
114
 
              </div>
115
 
              <div class="long_description" style="display: none">
116
 
                <img tal:condition="python:entry.parents[1:]"
117
 
                     tal:attributes="src python:branch.static_url('/static/images/ico_mergefrom.gif')" />
118
 
                <a tal:attributes="title python:'Show revision '+entry.revno;
119
 
                                   href  python:url(['/revision', entry.revno], clear=1);
120
 
                                   class string:link"
121
 
                   tal:content="structure python:util.fixed_width(entry.comment)"></a>
122
 
                <div class="loading">
123
 
                  <img tal:attributes="src python:branch.static_url('/static/images/spinner.gif')" />
124
 
                </div>
125
 
              </div>
126
 
            </td>
127
 
            <td tal:content="python:util.trunc(util.hide_email(entry.authors[0]), 20)"
128
 
                class="autcell"></td>
129
 
            <td tal:condition="show_tag_col" tal:content="string:${entry/tags}"
130
 
                class="tagcell"></td>
131
 
            <td class="date">
132
 
              <span tal:attributes="title python:util.date_time(entry.utc_date)"
133
 
                    tal:content="python:util._approximatedate(entry.utc_date)"></span>
134
 
            </td>
135
 
            <td class="diffr"><a tal:attributes="title python:'Show diff at revision '+entry.revno;
136
 
                                                 href python:url(['/revision', entry.revno], clear=1)">
137
 
                <img tal:attributes="src python:branch.static_url('/static/images/ico_diff.gif')" alt="Diff" /></a></td>
138
 
            <td class="downr"><a tal:attributes="href python:branch.url(['/files', entry.revno]);
139
 
                                                 title string:Files at revision ${entry/revno}">
140
 
                <img tal:attributes="src python:branch.static_url('/static/images/ico_file.gif')" alt="Files" /></a>
141
 
            </td>
142
 
          </tr>
143
 
        </tal:block>
144
 
      </table>
145
 
 
146
 
      <ul tal:condition="python:navigation.prev_page_revid or navigation.next_page_revid"
147
 
          id="pages">
148
 
        <li tal:condition="navigation/prev_page_revid"
149
 
            class="previous">
150
 
          <a tal:attributes="href navigation/prev_page_url">&laquo; Newer</a>
151
 
        </li>
152
 
        <!-- FIXME: Leaving this to eventually show page numbers. Can't show all of them,
153
 
             so some magic has to be done to just show the previous and next N page numbers
154
 
 
155
 
             <li class="active">1</li>
156
 
             <tal:block tal:repeat="page_number python:range(navigation.page_count)">
157
 
               <li><a href="#"
158
 
                      tal:content="page_number"></a></li>
159
 
             </tal:block>-->
160
 
        <li tal:condition="navigation/next_page_revid"
161
 
            class="next">
162
 
          <a tal:attributes="href navigation/next_page_url">Older &raquo;</a>
163
 
        </li>
164
 
      </ul>
165
 
 
166
 
    </div>
167
 
  </body>
168
 
</html>
 
58
         </tal:block></p>
 
59
        <p class="expand show_if_js" id="expand_all"><a href="#">
 
60
            <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
 
61
                  alt="expand all" /> expand all</a>
 
62
        </p>
 
63
        <p class="expand" id="collapse_all" style="display:none;"><a href="#">
 
64
            <img tal:attributes="src python:branch.static_url('/static/images/treeExpanded.png')"
 
65
                  alt="collapse all" /> collapse all</a>
 
66
        </p>
 
67
        <!-- Table -->        
 
68
        <table id="logentries">
 
69
            <tr class="logheader">
 
70
                <td class="revisionnumber">Rev</td>
 
71
                <td class="expandcell">&nbsp;</td>
 
72
                <td class="summarycell">Summary</td>
 
73
                <td class="authorcell">Author</td>
 
74
                <td class="datecell">Date</td>
 
75
                <td class="diffcell">Diff</td>
 
76
                <td class="downloadcell">Files</td>
 
77
            </tr>
 
78
            <tal:block tal:repeat="entry changes">
 
79
            <a tal:attributes="name string:entry-${entry/revno}"/>
 
80
                <tr tal:attributes="class string:blueRow${entry/parity} revision_log">
 
81
                <td class="revnro revnolink"><a tal:attributes="title python:'Show revision '+entry.revno;
 
82
                                                                href  python:url(['/revision', entry.revno], clear=1)"
 
83
                                                tal:content="python:util.trunc(entry.revno)"></a>
 
84
                </td>            
 
85
                <td class="expcell">
 
86
                    <div class="expand_revisioninfo">
 
87
                        <!-- So, this is interesting. I'm using "alt" to have the correct URL for the image of the expanded icon
 
88
                             and "title" tag for the contracted URL of the image. This is a bit of a hack, but it's better than
 
89
                             other approaches I tried  :)  -->
 
90
                        <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png');
 
91
                                             alt python:branch.static_url('/static/images/treeExpanded.png');
 
92
                                             title python:branch.static_url('/static/images/treeCollapsed.png')" 
 
93
                             class="expand_icon" />
 
94
                    </div>
 
95
                </td>
 
96
                <td class="summcell"><div tal:attributes="class string:short_description">
 
97
                                        <a tal:attributes="title python:'Show revision '+entry.revno;
 
98
                                                           href  python:url(['/revision', entry.revno], clear=1);
 
99
                                                           class string:link"
 
100
                                           tal:content="entry/short_comment"></a>
 
101
                                     </div>
 
102
                                     <div tal:attributes="class string:long_description;
 
103
                                                          style string:display:none">
 
104
                                        <a tal:attributes="title python:'Show revision '+entry.revno;
 
105
                                                           href  python:url(['/revision', entry.revno], clear=1);
 
106
                                                           class string:link"
 
107
                                           tal:content="entry/comment"></a>
 
108
                                     </div>
 
109
                                <div class="revisioninfo" style="display:none;">
 
110
                                    <ul class="expandrev">
 
111
                                        <li class="mfrom" tal:repeat="parent python:entry.parents[1:]">
 
112
                                            <span class="revnolink">
 
113
                                                <a tal:attributes="href python:url(['/changes', parent.revno])"
 
114
                                                   tal:content="parent/revno"></a>
 
115
                                            </span>
 
116
                                            <a tal:condition="parent.branch_nick"
 
117
                                               tal:attributes="href python:url(['/changes'], start_revid=parent.revno)"
 
118
                                               tal:content="python:'(' + parent.branch_nick + ')'"
 
119
                                                title="Show history" class="link"></a>
 
120
                                        </li>
 
121
                                        <li class="mto" tal:repeat="merge_point entry/merge_points">
 
122
                                            <a tal:attributes="href python:url(['/changes'], start_revid=merge_point.revno)"
 
123
                                               tal:content="python:revno_with_nick(merge_point)"
 
124
                                               title="Show history" class="link"></a>
 
125
                                        </li>
 
126
                                        <li class="committerli" tal:content="python:util.hide_email(entry.author)"></li>
 
127
                                        <tal:block content="structure python:file_change_summary(url, entry)" />
 
128
                                    </ul>
 
129
                                </div>
 
130
                </td>
 
131
                <td tal:content="python:util.trunc(util.hide_email(entry.author), 20)"
 
132
                    class="autcell"></td>
 
133
                <td class="date">
 
134
                    <span tal:attributes="title python:util.date_time(entry.date)"
 
135
                          tal:content="python:util._approximatedate(entry.date)"></span>
 
136
                </td>
 
137
                <td class="diffr"><a tal:attributes="title python:'Show diff at revision '+entry.revno;
 
138
                                                     href python:url(['/revision', entry.revno], clear=1)">
 
139
                                  <img tal:attributes="src python:branch.static_url('/static/images/ico_diff.gif')" alt="Diff" /></a></td>
 
140
                <td class="downr"><a tal:attributes="href python:branch.url(['/files', entry.revno]);
 
141
                                                     title string:Files at revision ${entry/revno}">
 
142
                                   <img tal:attributes="src python:branch.static_url('/static/images/ico_file.gif')" alt="Files" /></a>
 
143
                </td>
 
144
            </tr>
 
145
          </tal:block>
 
146
        </table>
 
147
 
 
148
        <ul tal:condition="python:navigation.prev_page_revid or navigation.next_page_revid"
 
149
            id="pages">
 
150
            <li tal:condition="navigation/prev_page_revid" 
 
151
                class="previous">
 
152
                <a tal:attributes="href navigation/prev_page_url">&laquo; Previous</a>
 
153
            </li>
 
154
            <!-- FIXME: Leaving this to eventually show page numbers. Can't show all of them,
 
155
                        so some magic has to be done to just show the previous and next N page numbers
 
156
 
 
157
            <li class="active">1</li>
 
158
            <tal:block tal:repeat="page_number python:range(navigation.page_count)">
 
159
            <li><a href="#"
 
160
                   tal:content="page_number"></a></li>
 
161
               </tal:block>-->
 
162
            <li tal:condition="navigation/next_page_revid"
 
163
                class="next">
 
164
                <a tal:attributes="href navigation/next_page_url">Next &raquo;</a>
 
165
            </li>
 
166
        </ul>
 
167
 
 
168
      </div>
 
169
    </body>
 
170
  </html>
 
171
</tal:block>