Mercurial > kallithea
comparison pylons_app/templates/files.html @ 99:5b57295601b6
Updated basic files browser with, pygments
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 25 Apr 2010 01:19:21 +0200 |
parents | |
children | 2dc0c8e4f384 |
comparison
equal
deleted
inserted
replaced
98:01d0f363f36d | 99:5b57295601b6 |
---|---|
1 <%inherit file="base/base.html"/> | |
2 | |
3 <%def name="title()"> | |
4 ${_('Repository managment')} | |
5 </%def> | |
6 <%def name="breadcrumbs()"> | |
7 ${h.link_to(u'Home',h.url('/'))} | |
8 / | |
9 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} | |
10 / | |
11 ${_('files')} | |
12 </%def> | |
13 <%def name="page_nav()"> | |
14 <form action="log"> | |
15 <dl class="search"> | |
16 <dt><label>Search: </label></dt> | |
17 <dd><input type="text" name="rev" /></dd> | |
18 </dl> | |
19 </form> | |
20 | |
21 ${self.menu('files')} | |
22 </%def> | |
23 <%def name="css()"> | |
24 <link rel="stylesheet" href="/css/style-monoblue_custom.css" type="text/css" /> | |
25 <link rel="stylesheet" href="/css/pygments.css" type="text/css" /> | |
26 </%def> | |
27 <%def name="main()"> | |
28 | |
29 <h2 class="no-link no-border">${_('Files')}</h2> | |
30 <div id="files_data"> | |
31 <h2>${_('File')}: ${c.repo_name}/${c.f_path}</h2> | |
32 %if c.files_list.is_dir(): | |
33 <table class="code-browser"> | |
34 <thead> | |
35 <tr> | |
36 <th class="width-50 lefted">${_('Name')}</th> | |
37 <th class="width-10 righted">${_('Size')}</th> | |
38 <th class="width-10 righted">${_('Revision')}</th> | |
39 <th class="width-15 righted">${_('Last modified')}</th> | |
40 <th class="width-15 righted">${_('Last commiter')}</th> | |
41 </tr> | |
42 </thead> | |
43 <tr> | |
44 % if c.files_list.parent: | |
45 <td colspan="5" class="browser-dir"> | |
46 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent))} | |
47 </td> | |
48 %endif | |
49 </tr> | |
50 <%def name="file_class(node)"> | |
51 %if node.is_file(): | |
52 browser-file | |
53 %else: | |
54 browser-dir | |
55 %endif | |
56 </%def> | |
57 | |
58 | |
59 %for cnt,node in enumerate(c.files_list): | |
60 <tr class="parity${cnt%2}"> | |
61 | |
62 <td class="${file_class(node)}"> | |
63 ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=node.path),class_='file or dir')} | |
64 </td> | |
65 <td> | |
66 %if node.is_file(): | |
67 ${h.filesizeformat(node.size)} | |
68 %endif | |
69 </td> | |
70 <td> | |
71 %if node.is_file(): | |
72 ${node.last_changeset.revision} | |
73 %endif | |
74 </td> | |
75 <td> | |
76 %if node.is_file(): | |
77 ${node.last_changeset.date} | |
78 %endif | |
79 </td> | |
80 <td> | |
81 %if node.is_file(): | |
82 ${node.last_changeset.author} | |
83 %endif | |
84 | |
85 </td> | |
86 </tr> | |
87 %endfor | |
88 </table> | |
89 %else: | |
90 <div id="body" class="codeblock"> | |
91 ${h.pygmentize(c.files_list.content,linenos=True,anchorlinenos=True,cssclass="code-highlight")} | |
92 </div> | |
93 %endif | |
94 </div> | |
95 </%def> |