##// END OF EJS Templates
i18n
marcink -
r2455:f71d4038 beta
parent child Browse files
Show More
@@ -1,114 +1,114 b''
1 1 <dl>
2 2 <dt style="padding-top:10px;font-size:16px">${_('History')}</dt>
3 3 <dd>
4 4 <div>
5 5 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
6 6 ${h.hidden('diff2',c.file.changeset.raw_id)}
7 7 ${h.select('diff1',c.file.changeset.raw_id,c.file_history)}
8 ${h.submit('diff','diff to revision',class_="ui-btn")}
9 ${h.submit('show_rev','show at revision',class_="ui-btn")}
8 ${h.submit('diff',_('diff to revision'),class_="ui-btn")}
9 ${h.submit('show_rev',_('show at revision'),class_="ui-btn")}
10 10 ${h.end_form()}
11 11 </div>
12 12 </dd>
13 13 </dl>
14 14
15 15 <div id="body" class="codeblock">
16 16 <div class="code-header">
17 17 <div class="stats">
18 18 <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div>
19 19 <div class="left item"><pre class="tooltip" title="${h.tooltip(h.fmt_date(c.file.changeset.date))}">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</pre></div>
20 20 <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div>
21 21 <div class="left item last"><pre>${c.file.mimetype}</pre></div>
22 22 <div class="buttons">
23 23 %if c.annotate:
24 24 ${h.link_to(_('show source'), h.url('files_home', repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
25 25 %else:
26 26 ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
27 27 %endif
28 28 ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
29 29 ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
30 30 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
31 31 % if not c.file.is_binary:
32 32 ${h.link_to(_('edit'),h.url('files_edit_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
33 33 % endif
34 34 % endif
35 35 </div>
36 36 </div>
37 37 <div class="author">
38 38 <div class="gravatar">
39 39 <img alt="gravatar" src="${h.gravatar_url(h.email(c.file.changeset.author),16)}"/>
40 40 </div>
41 41 <div title="${c.file.changeset.author}" class="user">${h.person(c.file.changeset.author)}</div>
42 42 </div>
43 43 <div class="commit">${h.urlify_commit(c.file.changeset.message,c.repo_name)}</div>
44 44 </div>
45 45 <div class="code-body">
46 46 %if c.file.is_binary:
47 47 ${_('Binary file (%s)') % c.file.mimetype}
48 48 %else:
49 49 % if c.file.size < c.cut_off_limit:
50 50 %if c.annotate:
51 51 ${h.pygmentize_annotation(c.repo_name,c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
52 52 %else:
53 53 ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
54 54 %endif
55 55 %else:
56 56 ${_('File is too big to display')} ${h.link_to(_('show as raw'),
57 57 h.url('files_raw_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path))}
58 58 %endif
59 59 %endif
60 60 </div>
61 61 </div>
62 62
63 63 <script type="text/javascript">
64 64 YUE.onDOMReady(function(){
65 65 function highlight_lines(lines){
66 66 for(pos in lines){
67 67 YUD.setStyle('L'+lines[pos],'background-color','#FFFFBE');
68 68 }
69 69 }
70 70 page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L');
71 71 if (page_highlights.length == 2){
72 72 highlight_ranges = page_highlights[1].split(",");
73 73
74 74 var h_lines = [];
75 75 for (pos in highlight_ranges){
76 76 var _range = highlight_ranges[pos].split('-');
77 77 if(_range.length == 2){
78 78 var start = parseInt(_range[0]);
79 79 var end = parseInt(_range[1]);
80 80 if (start < end){
81 81 for(var i=start;i<=end;i++){
82 82 h_lines.push(i);
83 83 }
84 84 }
85 85 }
86 86 else{
87 87 h_lines.push(parseInt(highlight_ranges[pos]));
88 88 }
89 89 }
90 90 highlight_lines(h_lines);
91 91
92 92 //remember original location
93 93 var old_hash = location.href.substring(location.href.indexOf('#'));
94 94
95 95 // this makes a jump to anchor moved by 3 posstions for padding
96 96 window.location.hash = '#L'+Math.max(parseInt(h_lines[0])-3,1);
97 97
98 98 //sets old anchor
99 99 window.location.hash = old_hash;
100 100
101 101 }
102 102 YUE.on('show_rev','click',function(e){
103 103 YUE.preventDefault(e);
104 104 var cs = YUD.get('diff1').value;
105 105 %if c.annotate:
106 106 var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs);
107 107 %else:
108 108 var url = "${h.url('files_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs);
109 109 %endif
110 110 window.location = url;
111 111 });
112 112 YUE.on('hlcode','mouseup',getSelectionLink("${_('Selection link')}"))
113 113 });
114 114 </script>
General Comments 0
You need to be logged in to leave comments. Login now