Show More
@@ -1,77 +1,87 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${c.repo_name} ${_('File annotate')} - ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(u'Home',h.url('/'))} |
|
9 | 9 | » |
|
10 | 10 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
11 | 11 | » |
|
12 | 12 | ${_('annotate')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="page_nav()"> |
|
16 | 16 | ${self.menu('files')} |
|
17 | 17 | </%def> |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | <ul class="links"> |
|
24 | 24 | <li> |
|
25 | 25 | <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
26 | 26 | </li> |
|
27 | 27 | </ul> |
|
28 | 28 | </div> |
|
29 | 29 | <div class="table"> |
|
30 | 30 | <div id="files_data"> |
|
31 | 31 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> |
|
32 | 32 | <dl class="overview"> |
|
33 | 33 | <dt>${_('Last revision')}</dt> |
|
34 | 34 | <dd>${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)), |
|
35 | 35 | h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id,f_path=c.f_path))} </dd> |
|
36 | 36 | <dt>${_('Size')}</dt> |
|
37 | 37 | <dd>${h.format_byte_size(c.file.size,binary=True)}</dd> |
|
38 | 38 | <dt>${_('Mimetype')}</dt> |
|
39 | 39 | <dd>${c.file.mimetype}</dd> |
|
40 | 40 | <dt>${_('Options')}</dt> |
|
41 | 41 | <dd>${h.link_to(_('show source'), |
|
42 |
h.url('files_home',repo_name=c.repo_name,revision=c.cs.r |
|
|
42 | h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} | |
|
43 | 43 | / ${h.link_to(_('show as raw'), |
|
44 |
h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.r |
|
|
44 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} | |
|
45 | 45 | / ${h.link_to(_('download as raw'), |
|
46 |
h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.r |
|
|
46 | h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} | |
|
47 | 47 | </dd> |
|
48 | 48 | <dt>${_('History')}</dt> |
|
49 | 49 | <dd> |
|
50 | 50 | <div> |
|
51 | 51 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
52 | 52 | ${h.hidden('diff2',c.file.last_changeset.raw_id)} |
|
53 | 53 | ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} |
|
54 | 54 | ${h.submit('diff','diff to revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} |
|
55 | 55 | ${h.submit('show_rev','show at revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} |
|
56 | 56 | ${h.end_form()} |
|
57 | 57 | </div> |
|
58 | 58 | </dd> |
|
59 | 59 | </dl> |
|
60 | 60 | <div id="body" class="codeblock"> |
|
61 | 61 | <div class="code-header"> |
|
62 | 62 | <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${h.short_id(c.file.last_changeset.raw_id)}</div> |
|
63 | 63 | <div class="commit">"${c.file.message}"</div> |
|
64 | 64 | </div> |
|
65 | 65 | <div class="code-body"> |
|
66 | 66 | % if c.file.size < c.file_size_limit: |
|
67 | 67 | ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} |
|
68 | 68 | %else: |
|
69 | 69 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
|
70 | 70 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path))} |
|
71 | 71 | %endif |
|
72 | 72 | </div> |
|
73 | 73 | </div> |
|
74 | <script type="text/javascript"> | |
|
75 | YAHOO.util.Event.onDOMReady(function(){ | |
|
76 | YAHOO.util.Event.addListener('show_rev','click',function(e){ | |
|
77 | YAHOO.util.Event.preventDefault(e); | |
|
78 | var cs = YAHOO.util.Dom.get('diff1').value; | |
|
79 | var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); | |
|
80 | window.location = url; | |
|
81 | }); | |
|
82 | }); | |
|
83 | </script> | |
|
74 | 84 | </div> |
|
75 | 85 | </div> |
|
76 | 86 | </div> |
|
77 | 87 | </%def> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now