##// END OF EJS Templates
added jump to revision from file history.
marcink -
r413:0ebec9b8 default
parent child Browse files
Show More
@@ -1,36 +1,48 b''
1 <dl>
1 <dl>
2 <dt>${_('Last revision')}</dt>
2 <dt>${_('Last revision')}</dt>
3 <dd>
3 <dd>
4 ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,c.files_list.last_changeset._short),
4 ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,c.files_list.last_changeset._short),
5 h.url('files_home',repo_name=c.repo_name,revision=c.files_list.last_changeset._short,f_path=c.f_path))}
5 h.url('files_home',repo_name=c.repo_name,revision=c.files_list.last_changeset._short,f_path=c.f_path))}
6 </dd>
6 </dd>
7 <dt>${_('Size')}</dt>
7 <dt>${_('Size')}</dt>
8 <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd>
8 <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd>
9 <dt>${_('Options')}</dt>
9 <dt>${_('Options')}</dt>
10 <dd>${h.link_to(_('show annotation'),
10 <dd>${h.link_to(_('show annotation'),
11 h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
11 h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
12 / ${h.link_to(_('download as raw'),
12 / ${h.link_to(_('download as raw'),
13 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
13 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
14 </dd>
14 </dd>
15 <dt>${_('History')}</dt>
15 <dt>${_('History')}</dt>
16 <dd>
16 <dd>
17 <div>
17 <div>
18 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
18 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
19 ${h.hidden('diff2',c.files_list.last_changeset._short)}
19 ${h.hidden('diff2',c.files_list.last_changeset._short)}
20 ${h.select('diff1','',c.file_history)}
20 ${h.select('diff1',c.files_list.last_changeset._short,c.file_history)}
21 ${h.submit('diff','diff',class_="ui-button ui-widget ui-state-default ui-corner-all")}
21 ${h.submit('diff','diff to revision',class_="ui-button ui-widget ui-state-default ui-corner-all")}
22 ${h.submit('show_rev','show at revision',class_="ui-button ui-widget ui-state-default ui-corner-all")}
22 ${h.end_form()}
23 ${h.end_form()}
23 </div>
24 </div>
24 </dd>
25 </dd>
25 </dl>
26 </dl>
26
27
27
28
28 <div id="body" class="codeblock">
29 <div id="body" class="codeblock">
29 <div class="code-header">
30 <div class="code-header">
30 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</div>
31 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</div>
31 <div class="commit">"${c.files_list.last_changeset.message}"</div>
32 <div class="commit">"${c.files_list.last_changeset.message}"</div>
32 </div>
33 </div>
33 <div class="code-body">
34 <div class="code-body">
34 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")}
35 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")}
35 </div>
36 </div>
36 </div> No newline at end of file
37 </div>
38
39 <script type="text/javascript">
40 YAHOO.util.Event.onDOMReady(function(){
41 YAHOO.util.Event.addListener('show_rev','click',function(e){
42 YAHOO.util.Event.preventDefault(e);
43 var cs = YAHOO.util.Dom.get('diff1').value;
44 var url = "${h.url('files_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs);
45 window.location = url;
46 });
47 });
48 </script> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now