~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-11 19:20:51 UTC
  • mfrom: (266.2.17 clean-up-inventory-view)
  • Revision ID: michael.hudson@canonical.com-20090211192051-a19byfoyaaq581f1
clean up the inventory view and beef up the tests of the same

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