~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/changelog.kid

  • Committer: Robey Pointer
  • Date: 2006-12-20 09:29:42 UTC
  • Revision ID: robey@lag.net-20061220092942-4jte8hob9sq1h93y
the big migration of branch-specific data to a BranchView object: actually
not so bad.  now all branch config is in a sub-object.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    <link rel="alternate" type="application/atom+xml" href="${branch.url('/atom')}" title="RSS feed for ${branch.friendly_name}" />
8
8
    
9
9
    <span py:def="loglink(revid, text)">
10
 
        <a title="Show history" href="${branch.url('/changes', **util.get_context(start_revid=revid))}" class="revlink"> ${text} </a>
 
10
        <a title="Show history" href="${tg.url('/changes', start_revid=revid)}" class="revlink"> ${text} </a>
11
11
    </span>
12
12
 
13
13
    <span py:def="file_link(filename, file_id, revid)">
14
 
        <a href="${branch.url([ '/annotate', revid ], **util.get_context(file_id=file_id))}" title="Annotate ${filename}">${filename}</a>
15
 
    </span>
16
 
    
17
 
    <span py:def="file_diff_link(revid, filename)">
18
 
        <a href="javascript:diff_url('${branch.context_url([ '/revision', revid ]) + '#' + filename}')"
19
 
           title="View diff for ${filename}">${filename}</a>
20
 
    </span>
21
 
    
22
 
    ${use_collapse_buttons()}
 
14
        <a href="${tg.url([ '/annotate', revid ], file_id=file_id)}" title="Annotate ${filename}">${filename}</a>
 
15
    </span>
23
16
 
24
 
    <script type="text/javascript"> <!--
25
 
    function diff_url(url) {
26
 
        if (document.cookie.indexOf('diff=unified') >= 0) {
27
 
            this.location.href = url + "-u";
28
 
        } else {
29
 
            this.location.href = url + "-s";
 
17
    <!-- this is totally matty's fault.  i don't like javacsript. ;) -->
 
18
    <script type="text/javascript"> // <!--
 
19
    function displayDetails(name, hide, show) {
 
20
        if (show == '') { show = 'inline'; }
 
21
        var bhide = hide, ihide = hide;
 
22
        if (hide == '') { bhide = 'block'; ihide = 'inline'; }
 
23
        document.getElementById('details-' + name).style.display = bhide;
 
24
        document.getElementById('hide-' + name).style.display = ihide;
 
25
        document.getElementById('show-' + name).style.display = show;
 
26
    }
 
27
    function displayAll(hide, show) {
 
28
        if (show == '') { show = 'inline'; }
 
29
        var bhide = hide, ihide = hide;
 
30
        if (hide == '') { bhide = 'block'; ihide = 'inline'; }
 
31
        var nodes = document.getElementsByTagName('div');
 
32
        for (var i = 0; i < nodes.length; i++) {
 
33
            var id = nodes[i].id;
 
34
            if ((id.length > 8) && (id.substring(0, 8) == 'details-')) {
 
35
                nodes[i].style.display = bhide;
 
36
                var revno = id.substring(8);
 
37
                document.getElementById('hide-' + revno).style.display = ihide;
 
38
                document.getElementById('show-' + revno).style.display = show;
 
39
            }
30
40
        }
 
41
        document.getElementById('hide-all').style.display = ihide;
 
42
        document.getElementById('show-all').style.display = show;
31
43
    }
32
 
    // --> </script>
 
44
    // -->
 
45
        </script>
33
46
</head>
34
47
 
35
 
<body onload="javascript:sortCollapseElements();">
 
48
<body>
36
49
 
37
50
${navbar()}
38
51
 
46
59
    Sorry, no results found for your search.
47
60
</span>
48
61
 
49
 
<span py:if="not changes">
50
 
    No revisions!
 
62
<span py:if="not search_failed">
 
63
<a class="hide-all" id="hide-all" href="javascript:displayAll('none', '')"> (hide all) </a>
 
64
<a class="hide-all" id="show-all" href="javascript:displayAll('', 'none')"> (show all) </a>
51
65
</span>
52
66
 
53
 
<span py:if="not search_failed" class="changelog"> ${collapse_all_button('cl')} </span>
54
 
 
55
 
<table class="log-entries">
56
 
    <tr class="log-header">
57
 
        <th class="revision-number">Rev</th>
58
 
        <th></th>
59
 
        <th class="summary">Summary</th>
60
 
        <span py:strip="True" py:if="all_same_author">
61
 
            <th></th>
62
 
        </span>
63
 
        <span py:strip="True" py:if="not all_same_author">
64
 
            <th class="author">Committer</th>
65
 
        </span>
66
 
        <th class="date" colspan="2">Date</th>
67
 
    </tr>
 
67
<div class="log-entries">
68
68
    <div py:for="entry in changes" class="revision">
69
69
        <a name="entry-${entry.revno}" />
70
 
        <tr class="revision-header parity${entry.parity}">
71
 
            <td class="revision-number"> ${revision_link(entry.revid, util.trunc(entry.revno))} </td>
72
 
            <td class="expand-button"> ${collapse_button('cl', entry.revno)} </td>
73
 
            <td class="summary"> ${revision_link(entry.revid, entry.short_comment)} </td>
74
 
            <span py:strip="True" py:if="all_same_author">
75
 
                <td></td>
76
 
            </span>
77
 
            <span py:strip="True" py:if="not all_same_author">
78
 
                <td class="author"> ${util.trunc(util.hide_email(entry.author), 20)} </td>
79
 
            </span>
80
 
            <td class="date"> ${util.format_date(entry.date)} &nbsp; (${util.ago(entry.date)}) </td>
81
 
            <td class="inventory-link"> 
82
 
                <a href="${branch.url([ '/files', entry.revid ])}"
83
 
                    title="Files at revision ${entry.revno}"> files</a>
84
 
            </td>
85
 
        </tr>
 
70
        <div class="revision-header">
 
71
            <table>
 
72
                <tr>
 
73
                    <td class="revision-number"> ${revlink_q(entry.revid, start_revid, file_id, query, util.trunc(entry.revno))} </td>
 
74
                    <td class="expand-button">
 
75
                        <a href="javascript:displayDetails('${entry.revno}', 'none', '')" id="hide-${entry.revno}" class="show-button">
 
76
                            <img src="${tg.url('/static/images/nav-small-down.gif')}" width="10" height="10" />
 
77
                        </a>
 
78
                        <a href="javascript:displayDetails('${entry.revno}', '', 'none')" id="show-${entry.revno}" class="hide-button">
 
79
                                <img src="${tg.url('/static/images/nav-small-right.gif')}" witdh="10" height="10" />
 
80
                        </a>
 
81
                    </td>
 
82
                                        <td class="summary"> ${revlink_q(entry.revid, start_revid, file_id, query, entry.short_comment)} </td>
 
83
                                        <td class="inventory-link"> <a href="${tg.url([ '/files', entry.revid ])}">&#8594; files</a> </td>
 
84
                                </tr>
 
85
                        </table>
 
86
        </div>
86
87
        
87
 
        <tr class="revision-details-block parity${entry.parity}">
88
 
            <td colspan="2"></td>
89
 
            <td colspan="4"><table class="revision-details hidden-details collapse-cl-${entry.revno}-content">
90
 
                <tr py:if="len(entry.merge_points) > 0">
91
 
                    <th class="children"> merged in: </th>
92
 
                    <td class="children">
93
 
                        <span py:for="child in entry.merge_points">
94
 
                            ${loglink(child.revid, '(' + child.revno + util.if_present(' %s', child.branch_nick) + ')')} <br />
95
 
                        </span>
96
 
                    </td>
97
 
                </tr>
98
 
                <tr py:if="len(entry.parents) > 1">
99
 
                    <th class="parents"> merged from: </th>
100
 
                    <td class="parents">
101
 
                        <span py:for="parent in entry.parents[1:]">
102
 
                            ${loglink(parent.revid, parent.revno + util.if_present(' (%s)', parent.branch_nick))} <br />
103
 
                        </span>
104
 
                    </td>
105
 
                </tr>
106
 
                <span py:strip="True" py:if="all_same_author">
107
 
                    <tr>
108
 
                        <th class="author">committed by:</th>
109
 
                        <td class="author"> ${util.hide_email(entry.author)} </td>
110
 
                    </tr>
111
 
                </span>
112
 
                <tr>
113
 
                    <th class="description">description:</th>
114
 
                    <td class="description"><span py:for="line in entry.comment_clean">${XML(line)} <br /></span> </td>
115
 
                </tr>
116
 
                <tr py:if="entry.changes.added">
117
 
                    <th class="files"> files added: </th>
118
 
                    <td class="files"> <span py:for="filename, fid in entry.changes.added" class="filename">${file_link(filename, fid, entry.revid)} <br /></span> </td>
119
 
                </tr>
120
 
                <tr py:if="entry.changes.removed">
121
 
                    <th class="files"> files removed: </th>
122
 
                    <td class="files"> <span py:for="filename, fid in entry.changes.removed" class="filename">${file_link(filename, fid, entry.revid)} <br /></span> </td>
123
 
                </tr>
124
 
                <tr py:if="entry.changes.renamed">
125
 
                    <th class="files"> files renamed: </th>
126
 
                    <td class="files"> <span py:for="old_filename, new_filename, fid in entry.changes.renamed" class="filename">
127
 
                        ${file_link(old_filename, fid, entry.revid)} => ${file_link(new_filename, fid, entry.revid)}<br />
128
 
                    </span> </td>
129
 
                </tr>
130
 
                <tr py:if="entry.changes.modified">
131
 
                    <th class="files"> files modified: </th>
132
 
                    <td class="files"> <span py:for="item in entry.changes.modified">
133
 
                        <span class="filename">${file_diff_link(entry.revid, item.filename)}</span>
134
 
                        <br />
135
 
                    </span> </td>
136
 
                </tr>
137
 
                </table>
138
 
            </td>
139
 
        </tr>
 
88
        <div class="revision-details-block">
 
89
            <div class="revision-details">
 
90
                            <table>
 
91
                                <tr>
 
92
                                    <th class="author">committed by:</th>
 
93
                                    <td class="author"> ${util.hide_email(entry.author)} </td>
 
94
                                </tr>
 
95
                                <tr>
 
96
                                    <th class="date">date:</th>
 
97
                                    <td class="date"> ${entry.date.strftime('%d %b %Y %H:%M')} &nbsp; (${util.ago(entry.date)}) </td>
 
98
                                </tr>
 
99
                            </table>
 
100
                        </div>
 
101
                <div class="revision-details hidden-details" id="details-${entry.revno}">
 
102
                        <table>
 
103
                                <tr py:if="len(entry.merge_points) > 0">
 
104
                                    <th class="children"> merged in: </th>
 
105
                                    <td class="children">
 
106
                                        <span py:for="child in entry.merge_points">
 
107
                                            ${loglink(child.revid, '(' + child.revno + util.if_present(' %s', child.branch_nick) + ')')} <br />
 
108
                                        </span>
 
109
                                    </td>
 
110
                                </tr>
 
111
                                <tr py:if="len(entry.parents) > 1">
 
112
                                        <th class="parents"> merged from: </th>
 
113
                                        <td class="parents">
 
114
                                            <span py:for="parent in entry.parents"><span py:if="parent.revid != entry.parents[0].revid">
 
115
                                                ${loglink(parent.revid, '(' + parent.revno + util.if_present(' %s', parent.branch_nick) + ')')} <br />
 
116
                                            </span></span>
 
117
                                        </td>
 
118
                                </tr>
 
119
 
 
120
                                <tr py:if="entry.changes.added">
 
121
                                    <th class="files"> files added: </th>
 
122
                                    <td class="files"> <span py:for="filename, fid in entry.changes.added" class="filename">${file_link(filename, fid, entry.revid)} <br /></span> </td>
 
123
                                </tr>
 
124
                                <tr py:if="entry.changes.removed">
 
125
                                    <th class="files"> files removed: </th>
 
126
                                    <td class="files"> <span py:for="filename, fid in entry.changes.removed" class="filename">${file_link(filename, fid, entry.revid)} <br /></span> </td>
 
127
                                </tr>
 
128
                                <tr py:if="entry.changes.renamed">
 
129
                                    <th class="files"> files renamed: </th>
 
130
                                    <td class="files"> <span py:for="old_filename, new_filename, fid in entry.changes.renamed" class="filename">
 
131
                                        ${file_link(old_filename, fid, entry.revid)} => ${file_link(new_filename, fid, entry.revid)}<br />
 
132
                                    </span> </td>
 
133
                                </tr>
 
134
                                <tr py:if="entry.changes.modified">
 
135
                                    <th class="files"> files modified: </th>
 
136
                                    <td class="files"> <span py:for="item in entry.changes.modified">
 
137
                                        <span class="filename">${file_link(item.filename, item.file_id, entry.revid)}</span> &nbsp;
 
138
                                        <a href="${tg.url([ '/revision', entry.revid ], start_revid=start_revid, file_id=file_id, query=query) + '#' + item.filename}" class="jump">&#8594; diff</a>
 
139
                                        <br />
 
140
                                    </span> </td>
 
141
                                </tr>
 
142
                                <tr>
 
143
                                    <th class="description">description:</th>
 
144
                                <td class="description"><span py:for="line in entry.comment_clean">${XML(line)} <br /></span> </td>
 
145
                            </tr>
 
146
                        </table>
 
147
                </div>
 
148
        </div>
140
149
    </div>
141
 
</table>
 
150
</div>
142
151
 
143
152
<div py:if="navigation.prev_page_revid or navigation.next_page_revid" class="bar">
144
153
    <table>