##// END OF EJS Templates
files browser updated to use webhelpers huminizer for file size
marcink -
r168:e3521056 default
parent child Browse files
Show More
@@ -1,43 +1,42 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${_('Repository managment')}
5 5 </%def>
6 6 <%def name="breadcrumbs()">
7 7 ${h.link_to(u'Home',h.url('/'))}
8 8 /
9 9 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
10 10 /
11 11 ${_('files')}
12 12 </%def>
13 13 <%def name="page_nav()">
14 14 <form action="log">
15 15 <dl class="search">
16 16 <dt><label>Search: </label></dt>
17 17 <dd><input type="text" name="rev" /></dd>
18 18 </dl>
19 19 </form>
20 20
21 21 ${self.menu('files')}
22 22 </%def>
23 23 <%def name="css()">
24 24 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
25 25 <link rel="stylesheet" href="/css/pygments.css" type="text/css" />
26 26 </%def>
27 27 <%def name="main()">
28
29 28 <h2 class="no-link no-border">${_('Files')}</h2>
30 29 <div id="files_data">
31 30 %if c.files_list:
32 31 <h2>${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.files_list.path)}</h2>
33 32 %if c.files_list.is_dir():
34 33 <%include file='files_browser.html'/>
35 34 %else:
36 35 <%include file='files_source.html'/>
37 36 %endif
38 37 %else:
39 38 <h2><a href="#" onClick="javascript:parent.history.back();" target="main">${_('Go back')}</a> ${_('No files at given path')}: "${c.f_path or "/"}" </h2>
40 39 %endif
41 40
42 41 </div>
43 42 </%def> No newline at end of file
@@ -1,66 +1,66 b''
1 1 <%def name="file_class(node)">
2 2 %if node.is_file():
3 3 <%return "browser-file" %>
4 4 %else:
5 5 <%return "browser-dir"%>
6 6 %endif
7 7 </%def>
8 8 <div id="body" class="browserblock">
9 9 <div class="browser-header">
10 10 ${h.form(h.url.current())}
11 11 <span>${_('view')}@rev <a style="font-size: 1.3em" href="${c.url_prev}">&laquo;</a>${h.text('at_rev',value=c.rev_nr,size='5')}<a style="font-size: 1.3em" href="${c.url_next}">&raquo;</a></span>
12 12 ${h.submit('view','view')}
13 13 ${h.end_form()}
14 14 </div>
15 15 <div class="browser-body">
16 16 <table class="code-browser">
17 17 <thead>
18 18 <tr>
19 19 <th>${_('Name')}</th>
20 20 <th>${_('Size')}</th>
21 21 <th>${_('Revision')}</th>
22 22 <th>${_('Last modified')}</th>
23 23 <th>${_('Last commiter')}</th>
24 24 </tr>
25 25 </thead>
26 26 <tr class="parity0">
27 27 <td>
28 28 % if c.files_list.parent:
29 29 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent.path),class_="browser-dir")}
30 30 %endif
31 31 </td>
32 32 <td></td>
33 33 <td></td>
34 34 <td></td>
35 35 <td></td>
36 36 </tr>
37 37 %for cnt,node in enumerate(c.files_list,1):
38 38 <tr class="parity${cnt%2}">
39 39 <td>
40 40 ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=node.path),class_=file_class(node))}
41 41 </td>
42 42 <td>
43 43 %if node.is_file():
44 ${h.filesizeformat(node.size)}
44 ${h.format_byte_size(node.size,binary=True)}
45 45 %endif
46 46 </td>
47 47 <td>
48 48 %if node.is_file():
49 49 ${node.last_changeset.revision}
50 50 %endif
51 51 </td>
52 52 <td>
53 53 %if node.is_file():
54 54 ${node.last_changeset.date}
55 55 %endif
56 56 </td>
57 57 <td>
58 58 %if node.is_file():
59 59 ${node.last_changeset.author}
60 60 %endif
61 61 </td>
62 62 </tr>
63 63 %endfor
64 64 </table>
65 65 </div>
66 66 </div> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now