~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/revision.kid

  • Committer: Robey Pointer
  • Date: 2006-12-12 22:13:10 UTC
  • Revision ID: robey@lag.net-20061212221310-jn3viv726fceheem
ok, add javascript to allow show/hide entries on the revision page

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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" xmlns:py="http://purl.org/kid/ns#"
 
3
    py:extends="'master.kid'">
 
4
<head>
 
5
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 
6
    <title> ${branch_name} : revision ${change.revno} </title>
 
7
</head>
 
8
 
 
9
<body>
 
10
 
 
11
${navbar()}
 
12
 
 
13
<h1> <span class="branch-name">${branch_name}</span> : revision ${change.revno} </h1>
 
14
 
 
15
<div class="revision-info">
 
16
    <table>
 
17
        <tr>
 
18
            <th class="author">committed by:</th>
 
19
            <td class="author"> ${util.hide_email(change.author)} </td>
 
20
        </tr>
 
21
        <tr>
 
22
            <th class="date">date:</th>
 
23
            <td class="date"> ${change.date.strftime('%d %b %Y %H:%M')} </td>
 
24
        </tr>
 
25
 
 
26
        <tr py:if="len(change.merge_points) > 0">
 
27
            <th class="children"> merged in: </th>
 
28
            <td class="children">
 
29
                <span py:for="child in change.merge_points"> ${revlink(child.revid, '(' + child.revno + ')')} &nbsp; </span>
 
30
            </td>
 
31
        </tr>
 
32
        <tr py:if="len(change.parents) > 1">
 
33
                <th class="parents"> merged from: </th>
 
34
                <td class="parents">
 
35
                    <span py:for="parent in change.parents"><span py:if="parent.revid != change.parents[0].revid"> ${revlink(parent.revid, '(' + parent.revno + ')')} &nbsp; </span></span>
 
36
                </td>
 
37
        </tr>
 
38
 
 
39
        <tr>
 
40
            <th class="description">description:</th>
 
41
            <td class="description"><span py:for="line in change.comment_clean">${XML(line)} <br /></span> </td>
 
42
        </tr>
 
43
        
 
44
        <tr class="divider"> <th></th> <td></td> </tr>
 
45
        
 
46
        <tr py:if="change.changes.added">
 
47
            <th class="files"> files added: </th>
 
48
            <td class="files"> <span py:for="filename in change.changes.added">${filename} <br /></span> </td>
 
49
        </tr>
 
50
        <tr py:if="change.changes.removed">
 
51
            <th class="files"> files removed: </th>
 
52
            <td class="files"> <span py:for="filename in change.changes.removed">${filename} <br /></span> </td>
 
53
        </tr>
 
54
        <tr py:if="change.changes.renamed">
 
55
            <th class="files"> files renamed: </th>
 
56
            <td class="files"> <span py:for="old_filename, new_filename in change.changes.renamed">${old_filename} => ${new_filename}<br /></span> </td>
 
57
        </tr>
 
58
        <tr py:if="change.changes.modified">
 
59
            <th class="files"> files modified: </th>
 
60
            <td class="files"> <span py:for="item in change.changes.modified">${item.filename} <br /></span> </td>
 
61
        </tr>
 
62
    </table>
 
63
</div>
 
64
 
 
65
<div class="diff" py:if="change.changes.modified">
 
66
    <table py:for="item in change.changes.modified" class="diff-block">
 
67
        <tr><th class="filename"> ${item.filename} </th></tr>
 
68
        <tr><td>
 
69
            <table py:for="chunk in item.chunks" class="diff-chunk">
 
70
                <tr> <th class="lineno">old</th> <th class="lineno">new</th> <th></th> </tr>
 
71
                <tr py:for="line in chunk.diff">
 
72
                    <td class="lineno">${line.old_lineno}</td>
 
73
                    <td class="lineno">${line.new_lineno}</td>
 
74
                    <td class="${line.type} text">${XML(line.line)}</td>
 
75
                </tr>
 
76
            </table>
 
77
        </td></tr>
 
78
    </table>
 
79
</div>
 
80
 
 
81
</body>
 
82
</html>