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