~mwhudson/loggerhead/better-navigation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'master.kid'">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
    <title> ${branch.friendly_name} : revisions </title>
    <link rel="alternate" type="application/atom+xml" href="${branch.url('/atom')}" title="RSS feed for ${branch.friendly_name}" />
    
    <span py:def="loglink(revid, text)">
        <a title="Show history" href="${branch.url('/changes', **util.get_context(start_revid=revid))}" class="revlink"> ${text} </a>
    </span>

    <span py:def="file_link(filename, file_id, revid)">
        <a href="${branch.url([ '/annotate', revid ], file_id=file_id, **util.get_context())}" title="Annotate ${filename}">${filename}</a>
    </span>
    
    <span py:def="file_diff_link(revid, filename)">
        <a href="javascript:diff_url('${branch.context_url(['/revision', revid]) + '#' + filename}')"
           title="View diff for ${filename}">${filename}</a>
    </span>
    
    ${use_collapse_buttons()}

    <script type="text/javascript"> <!--
    function diff_url(url) {
        if (document.cookie.indexOf('diff=unified') >= 0) {
            this.location.href = url + "-u";
        } else {
            this.location.href = url + "-s";
        }
    }
    // --> </script>
</head>

<body onload="javascript:sortCollapseElements();">

${breadcrumbs()}

<h1> revisions
<span py:if="navigation.filter_file_id"> touching '<span class="filename">${history.get_path(revid, filter_file_id)[1:]}'</span></span>
<span py:if="navigation.start_revid is not None"> from ${history.get_revno(navigation.start_revid)} </span>
<span py:if="navigation.query"> matching "${navigation.query}"</span>
</h1>

<span py:if="search_failed">
    Sorry, no results found for your search.
</span>

<span py:if="not changes">
    No revisions!
</span>

<span py:if="not search_failed" class="changelog"> ${collapse_all_button('cl')} </span>

<div style="margin-left: 1em; margin-top: 0.5em;">
${navlinks(navigation)}
</div>
<table class="log-entries">
    <tr class="log-header">
        <th class="revision-number">Rev</th>
        <th></th>
        <th class="summary">Summary</th>
        <span py:strip="True" py:if="all_same_author">
            <th></th>
        </span>
        <span py:strip="True" py:if="not all_same_author">
            <th class="author">Committer</th>
        </span>
        <th class="date" colspan="2">Date</th>
    </tr>
    <div py:for="entry in changes" class="revision">
        <a name="entry-${entry.revno}" />
        <tr class="revision-header parity${entry.parity}">
            <td class="revision-number"> ${revision_link(entry.revid, util.trunc(entry.revno))} </td>
            <td class="expand-button"> ${collapse_button('cl', entry.revno)} </td>
            <td class="summary"> ${revision_link(entry.revid, entry.short_comment)} </td>
            <span py:strip="True" py:if="all_same_author">
                <td></td>
            </span>
            <span py:strip="True" py:if="not all_same_author">
                <td class="author"> ${util.trunc(util.hide_email(entry.author), 20)} </td>
            </span>
            <td class="date"> ${util.approximatedate(entry.date)} </td>
            <td class="inventory-link"> 
                <a href="${branch.url([ '/files', entry.revid ], **util.get_context())}"
                    title="Files at revision ${entry.revno}"> files</a>
            </td>
        </tr>
        
        <tr class="revision-details-block parity${entry.parity}">
            <td colspan="2"></td>
            <td colspan="4"><table class="revision-details hidden-details collapse-cl-${entry.revno}-content">
                <tr py:if="len(entry.merge_points) > 0">
                    <th class="children"> merged in: </th>
                    <td class="children">
                        <span py:for="child in entry.merge_points">
                            ${loglink(child.revid, '(' + child.revno + util.if_present(' %s', child.branch_nick) + ')')} <br />
                        </span>
                    </td>
                </tr>
                <tr py:if="len(entry.parents) > 1">
                    <th class="parents"> merged from: </th>
                    <td class="parents">
                        <span py:for="parent in entry.parents[1:]">
                            ${loglink(parent.revid, parent.revno + util.if_present(' (%s)', parent.branch_nick))} <br />
                        </span>
                    </td>
                </tr>
                <span py:strip="True" py:if="all_same_author">
                    <tr>
                        <th class="author">committed by:</th>
                        <td class="author"> ${util.hide_email(entry.author)} </td>
                    </tr>
                </span>
                <tr>
                    <th class="description">description:</th>
                    <td class="description"><span py:for="line in entry.comment_clean">${XML(line)} <br /></span> </td>
                </tr>
                <tr py:if="entry.changes.added">
                    <th class="files"> files added: </th>
                    <td class="files"> <span py:for="filename, fid in entry.changes.added" class="filename">${file_link(filename, fid, entry.revid)} <br /></span> </td>
                </tr>
                <tr py:if="entry.changes.removed">
                    <th class="files"> files removed: </th>
                    <td class="files"> <span py:for="filename, fid in entry.changes.removed" class="filename">${file_link(filename, fid, entry.revid)} <br /></span> </td>
                </tr>
                <tr py:if="entry.changes.renamed">
                    <th class="files"> files renamed: </th>
                    <td class="files"> <span py:for="old_filename, new_filename, fid in entry.changes.renamed" class="filename">
                        ${file_link(old_filename, fid, entry.revid)} => ${file_link(new_filename, fid, entry.revid)}<br />
                    </span> </td>
                </tr>
                <tr py:if="entry.changes.modified">
                    <th class="files"> files modified: </th>
                    <td class="files"> <span py:for="item in entry.changes.modified">
                        <span class="filename">${file_diff_link(entry.revid, item.filename)}</span>
                        <br />
                    </span> </td>
                </tr>
                </table>
            </td>
        </tr>
    </div>
</table>
<div style="margin-left: 1em">
${navlinks(navigation)}
</div>

<p>
  <a href="${branch.url('/atom')}">
    <img src="${tg.url('/static/images/feed-icon-16x16.gif')}" />
  </a>
  Subscribe to this branch's revisions.
</p>

</body>
</html>