~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/master.kid

  • Committer: Robey Pointer
  • Date: 2006-12-14 05:25:41 UTC
  • Revision ID: robey@lag.net-20061214052541-8leih2o3lthfxi39
fix a thread-unsafety bug in bzrlib's progress bar system that was vexing
me, and do various cleanups on the ui for consistency.  added lots of
locking to the history object before i figured out about the progress bar
thing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    <title py:replace="''">Your title goes here</title>
8
8
    <meta py:replace="item[:]"/>
9
9
    <style type="text/css" media="screen">
10
 
@import "${tg.url('/static/css/style.css')}";
 
10
@import "/static/css/style.css";
11
11
    </style>
12
12
 
13
13
<!-- !define common navbar -->
14
 
<span py:def="navbar()" py:strip="True">
15
 
    <!-- !requires: ${navigation: start_revid, revid, revid_list, pagesize, buttons, scan_url}, ${branch}, ${history} -->
16
 
    <div class="bar" py:if="navigation is not None">
17
 
        <!-- form must go OUTSIDE the table, or safari will add extra padding :( -->
18
 
        <form action="${branch.url('/changes', start_revid=getattr(navigation, 'start_revid', None),
19
 
              file_id=getattr(navigation, 'file_id', None))}"><table><tr>
20
 
            <td><span class="buttons">
21
 
                <!-- ! navbar buttons never change, from now on.  i decree it! -->
22
 
                <a href="${branch.url('/changes', **util.get_context(clear=1))}"> changes </a>
23
 
                <a href="${branch.url('/files', **util.get_context(clear=1))}"> files </a>
24
 
                <span class="search"> search: <input type="text" name="q" /> </span>
25
 
            </span></td>
26
 
            <td align="right" py:if="hasattr(navigation, 'revid_list')">
27
 
                <span py:if="hasattr(navigation, 'feed')" class="rbuttons feed">
28
 
                    <a href="${branch.url('/atom')}">
29
 
                    <img src="${tg.url('/static/images/feed-icon-16x16.gif')}" /></a>
30
 
                </span>
31
 
                <span class="navbuttons">
32
 
                        <span py:if="navigation.prev_page_revid">
33
 
                        <a href="${navigation.prev_page_url}" title="Previous page"> &#171; </a>
34
 
                    </span>
35
 
                        <span py:if="not navigation.prev_page_revid"> &#171; </span>
36
 
                    revision ${history.get_revno(revid)}
37
 
                    (<span py:if="navigation.pagesize > 1">page </span>
38
 
                    ${navigation.page_position} / ${navigation.page_count})
39
 
                        <span py:if="navigation.next_page_revid">
40
 
                    <a href="${navigation.next_page_url}" title="Next page"> &#187; </a>
41
 
                    </span>
42
 
                        <span py:if="not navigation.next_page_revid"> &#187; </span>
43
 
                </span>
44
 
            </td>
45
 
        </tr></table></form>
 
14
<span py:def="navbar()">
 
15
    <!-- !requires: ${navigation: revid, revlist, pagesize, buttons, scan_url}, ${history} -->
 
16
    <div class="navbar">
 
17
        <div class="bar">
 
18
            <table>
 
19
                <tr><td>
 
20
                    <span class="buttons">
 
21
                        <span py:for="label, url in navigation.buttons">
 
22
                            <a href="${url}"> ${label} </a>
 
23
                        </span>
 
24
                    </span>
 
25
                </td><td align="right" py:if="hasattr(navigation, 'revlist')">
 
26
                    <span class="navbuttons">
 
27
                        <span py:for="label, l_title, l_revid in history.scan_range(navigation.revlist, navigation.revid, navigation.pagesize)">
 
28
                            <a py:if="l_revid" href="${tg.url([ navigation.scan_url, l_revid ], path=navigation.path, start_revid=navigation.start_revid)}" title="${l_title}"> ${label} </a>
 
29
                            <span py:if="not l_revid"> ${label} </span>
 
30
                        </span>
 
31
                    </span>
 
32
                </td></tr>
 
33
            </table>
 
34
        </div>
 
35
        <div class="navposition">
 
36
            <table>
 
37
                <tr>
 
38
                    <td> </td>
 
39
                    <td class="navposition" align="right" py:if="hasattr(navigation, 'revlist')">
 
40
                        changes: ${len(navigation.revlist) - history.get_revid_sequence(navigation.revlist, navigation.revid)} / ${len(navigation.revlist)}
 
41
                    </td>
 
42
                </tr>
 
43
            </table>
 
44
        </div>
46
45
    </div>
47
46
</span>
48
47
 
49
 
<span py:def="revision_link(revid, text, **overrides)" py:strip="True">
50
 
    <a title="Show revision ${history.get_revno(revid)}"
51
 
       href="${branch.url([ '/revision', revid ], **util.get_context(**overrides))}"> ${text} </a>
52
 
</span>
53
 
 
54
 
 
55
 
<!-- ! expand button functions: -->
56
 
 
57
 
        <span py:strip="True" py:def="use_collapse_buttons()">
58
 
                <!-- this is totally matty's fault.  i don't like javacsript. ;) -->
59
 
                <script type="text/javascript" src="${tg.url('/static/javascript/collapse.js')}"></script>
60
 
        </span>
61
 
        
62
 
        <span py:strip="True" py:def="collapse_all_button(group, normal='block')">
63
 
            <a class="hide-all collapse-${group}-hideall"
64
 
               href="javascript:collapseAllDisplay('${group}','none')">
65
 
                <img src="${tg.url('/static/images/nav-small-down.gif')}"
66
 
                     width="10" height="10" alt="collapse"
67
 
                     class="collapse-triangle" />collapse all</a>
68
 
            <a class="hide-all collapse-${group}-showall"
69
 
               href="javascript:collapseAllDisplay('${group}','${normal}')">
70
 
                <img src="${tg.url('/static/images/nav-small-right.gif')}"
71
 
                     width="10" height="10" alt="expand"
72
 
                     class="collapse-triangle" />expand all</a>
73
 
        </span>
74
 
        
75
 
        <span py:strip="True" py:def="collapse_button(group, name, normal='block')">
76
 
            <a href="javascript:collapseDisplay('${group}','${name}','none')"
77
 
               class="hide-button collapse-${group}-${name}-hide" title="collapse">
78
 
                <img src="${tg.url('/static/images/nav-small-down.gif')}"
79
 
                     width="10" height="10" alt="collapse"
80
 
                     class="collapse-triangle" />
81
 
            </a>
82
 
            <a href="javascript:collapseDisplay('${group}','${name}','${normal}')"
83
 
               class="show-button collapse-${group}-${name}-show" title="expand">
84
 
                <img src="${tg.url('/static/images/nav-small-right.gif')}"
85
 
                     witdh="10" height="10" alt="expand"
86
 
                     class="collapse-triangle" />
87
 
            </a>
88
 
        </span>
 
48
<span py:def="revlink(revid, text)">
 
49
    <a title="Show revision" href="${tg.url([ '/revision', revid ])}" class="revlink"> ${text} </a>
 
50
</span>
 
51
<span py:def="revlink_path(revid, start_revid, text, path)">
 
52
    <a title="Show revision" href="${tg.url([ '/revision', revid ], start_revid=start_revid, path=path)}" class="revlink"> ${text} </a>
 
53
</span>
89
54
 
90
55
</head>
91
56
 
92
 
<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"
93
 
      py:attrs="item.items()">
 
57
<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
94
58
 
95
59
    <div py:replace="[item.text]+item[:]"/>
96
60
 
97
61
        <!-- End of main_content -->
98
 
        
99
 
        <div class="footer">
100
 
            <span class="banner"><a href="http://www.bazaar-vcs.org/">
101
 
            <img src="${tg.url('/static/images/bazaar-banner.png')}" /></a></span>
102
 
            <span class="banner"><a href="http://www.lag.net/loggerhead/">
103
 
            <img src="${tg.url('/static/images/loggerhead-banner.png')}" /></a></span>
104
 
        </div>
105
62
</body>
106
63
 
107
64
</html>