Show More
@@ -1,71 +1,77 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 | <div class="info_box"> |
|
12 | 12 | <span >${_('view')}@rev</span> |
|
13 | 13 | <a href="${c.url_prev}">«</a> |
|
14 | 14 | ${h.text('at_rev',value=c.rev_nr,size=3)} |
|
15 | 15 | <a href="${c.url_next}">»</a> |
|
16 | 16 | ${h.submit('view','view')} |
|
17 | 17 | </div> |
|
18 | 18 | ${h.end_form()} |
|
19 | 19 | </div> |
|
20 | 20 | <div class="browser-body"> |
|
21 | 21 | <table class="code-browser"> |
|
22 | 22 | <thead> |
|
23 | 23 | <tr> |
|
24 | 24 | <th>${_('Name')}</th> |
|
25 | 25 | <th>${_('Size')}</th> |
|
26 | <th>${_('Mimetype')}</th> | |
|
26 | 27 | <th>${_('Revision')}</th> |
|
27 | 28 | <th>${_('Last modified')}</th> |
|
28 | 29 | <th>${_('Last commiter')}</th> |
|
29 | 30 | </tr> |
|
30 | 31 | </thead> |
|
31 | 32 | <tr class="parity0"> |
|
32 | 33 | <td> |
|
33 | 34 | % if c.files_list.parent: |
|
34 | 35 | ${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")} |
|
35 | 36 | %endif |
|
36 | 37 | </td> |
|
37 | 38 | <td></td> |
|
38 | 39 | <td></td> |
|
39 | 40 | <td></td> |
|
40 | 41 | <td></td> |
|
41 | 42 | </tr> |
|
42 | 43 | %for cnt,node in enumerate(c.files_list,1): |
|
43 | 44 | <tr class="parity${cnt%2}"> |
|
44 | 45 | <td> |
|
45 | 46 | ${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))} |
|
46 | 47 | </td> |
|
47 | 48 | <td> |
|
48 | 49 | %if node.is_file(): |
|
49 | 50 | ${h.format_byte_size(node.size,binary=True)} |
|
50 | 51 | %endif |
|
51 | 52 | </td> |
|
52 | 53 | <td> |
|
54 | %if node.is_file(): | |
|
55 | ${node.mimetype} | |
|
56 | %endif | |
|
57 | </td> | |
|
58 | <td> | |
|
53 | 59 | %if node.is_file(): |
|
54 | 60 | ${node.last_changeset.revision} |
|
55 | 61 | %endif |
|
56 | 62 | </td> |
|
57 | 63 | <td> |
|
58 | 64 | %if node.is_file(): |
|
59 | 65 | ${h.age(node.last_changeset._ctx.date())} - ${node.last_changeset.date} |
|
60 | 66 | %endif |
|
61 | 67 | </td> |
|
62 | 68 | <td> |
|
63 | 69 | %if node.is_file(): |
|
64 | 70 | ${node.last_changeset.author} |
|
65 | 71 | %endif |
|
66 | 72 | </td> |
|
67 | 73 | </tr> |
|
68 | 74 | %endfor |
|
69 | 75 | </table> |
|
70 | 76 | </div> |
|
71 | 77 | </div> No newline at end of file |
@@ -1,55 +1,57 b'' | |||
|
1 | 1 | <dl> |
|
2 | 2 | <dt>${_('Last revision')}</dt> |
|
3 | 3 | <dd> |
|
4 | 4 | ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,c.files_list.last_changeset._short), |
|
5 | 5 | h.url('files_home',repo_name=c.repo_name,revision=c.files_list.last_changeset._short,f_path=c.f_path))} |
|
6 | 6 | </dd> |
|
7 | 7 | <dt>${_('Size')}</dt> |
|
8 | 8 | <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd> |
|
9 | <dt>${_('Mimetype')}</dt> | |
|
10 | <dd>${c.files_list.mimetype}</dd> | |
|
9 | 11 | <dt>${_('Options')}</dt> |
|
10 | 12 | <dd>${h.link_to(_('show annotation'), |
|
11 | 13 | h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} |
|
12 | 14 | / ${h.link_to(_('show as raw'), |
|
13 | 15 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} |
|
14 | 16 | / ${h.link_to(_('download as raw'), |
|
15 | 17 | h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} |
|
16 | 18 | </dd> |
|
17 | 19 | <dt>${_('History')}</dt> |
|
18 | 20 | <dd> |
|
19 | 21 | <div> |
|
20 | 22 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
21 | 23 | ${h.hidden('diff2',c.files_list.last_changeset._short)} |
|
22 | 24 | ${h.select('diff1',c.files_list.last_changeset._short,c.file_history)} |
|
23 | 25 | ${h.submit('diff','diff to revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} |
|
24 | 26 | ${h.submit('show_rev','show at revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} |
|
25 | 27 | ${h.end_form()} |
|
26 | 28 | </div> |
|
27 | 29 | </dd> |
|
28 | 30 | </dl> |
|
29 | 31 | |
|
30 | 32 | |
|
31 | 33 | <div id="body" class="codeblock"> |
|
32 | 34 | <div class="code-header"> |
|
33 | 35 | <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</div> |
|
34 | 36 | <div class="commit">"${c.files_list.last_changeset.message}"</div> |
|
35 | 37 | </div> |
|
36 | 38 | <div class="code-body"> |
|
37 | 39 | % if c.files_list.size < c.file_size_limit: |
|
38 | 40 | ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} |
|
39 | 41 | %else: |
|
40 | 42 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
|
41 | 43 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} |
|
42 | 44 | %endif |
|
43 | 45 | </div> |
|
44 | 46 | </div> |
|
45 | 47 | |
|
46 | 48 | <script type="text/javascript"> |
|
47 | 49 | YAHOO.util.Event.onDOMReady(function(){ |
|
48 | 50 | YAHOO.util.Event.addListener('show_rev','click',function(e){ |
|
49 | 51 | YAHOO.util.Event.preventDefault(e); |
|
50 | 52 | var cs = YAHOO.util.Dom.get('diff1').value; |
|
51 | 53 | var url = "${h.url('files_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); |
|
52 | 54 | window.location = url; |
|
53 | 55 | }); |
|
54 | 56 | }); |
|
55 | 57 | </script> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now