##// END OF EJS Templates
i18n fix
Takumi IINO -
r3373:cab58d49 beta
parent child Browse files
Show More
@@ -1,106 +1,106 b''
1 1 <div id="node_history">
2 2 %if c.load_full_history:
3 3 <%include file='files_history_box.html'/>
4 4 %else:
5 5 <div style="padding-bottom:10px">
6 6 <span id="load_node_history" class="ui-btn">${_('Load file history')}</span>
7 7 </div>
8 8 %endif
9 9 </div>
10 10
11 11
12 12 <div id="body" class="codeblock">
13 13 <div class="code-header">
14 14 <div class="stats">
15 15 <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div>
16 16 <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>
17 17 <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div>
18 18 <div class="left item last"><pre>${c.file.mimetype}</pre></div>
19 19 <div class="buttons">
20 20 %if c.annotate:
21 21 ${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")}
22 22 %else:
23 23 ${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")}
24 24 %endif
25 25 ${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")}
26 26 ${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")}
27 27 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
28 28 % if c.on_branch_head and c.changeset.branch and c.file.is_binary is False:
29 ${h.link_to(_('edit on branch:%s' % c.changeset.branch),h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.branch,f_path=c.f_path),class_="ui-btn")}
29 ${h.link_to(_('edit on branch:%s') % c.changeset.branch,h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.branch,f_path=c.f_path),class_="ui-btn")}
30 30 %else:
31 31 ${h.link_to(_('edit on branch:?'), '#', class_="ui-btn disabled tooltip", title=_('Editing files allowed only when on branch head revision'))}
32 32 % endif
33 33 % endif
34 34 </div>
35 35 </div>
36 36 <div class="author">
37 37 <div class="gravatar">
38 38 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.file_changeset.author),16)}"/>
39 39 </div>
40 40 <div title="${c.file_changeset.author}" class="user">${h.person(c.file_changeset.author)}</div>
41 41 </div>
42 42 <div class="commit">${h.urlify_commit(c.file_changeset.message,c.repo_name)}</div>
43 43 </div>
44 44 <div class="code-body">
45 45 %if c.file.is_binary:
46 46 ${_('Binary file (%s)') % c.file.mimetype}
47 47 %else:
48 48 % if c.file.size < c.cut_off_limit:
49 49 %if c.annotate:
50 50 ${h.pygmentize_annotation(c.repo_name,c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
51 51 %else:
52 52 ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
53 53 %endif
54 54 %else:
55 55 ${_('File is too big to display')} ${h.link_to(_('show as raw'),
56 56 h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path))}
57 57 %endif
58 58 %endif
59 59 </div>
60 60 </div>
61 61
62 62 <script type="text/javascript">
63 63 YUE.onDOMReady(function(){
64 64 function highlight_lines(lines){
65 65 for(pos in lines){
66 66 YUD.setStyle('L'+lines[pos],'background-color','#FFFFBE');
67 67 }
68 68 }
69 69 page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L');
70 70 if (page_highlights.length == 2){
71 71 highlight_ranges = page_highlights[1].split(",");
72 72
73 73 var h_lines = [];
74 74 for (pos in highlight_ranges){
75 75 var _range = highlight_ranges[pos].split('-');
76 76 if(_range.length == 2){
77 77 var start = parseInt(_range[0]);
78 78 var end = parseInt(_range[1]);
79 79 if (start < end){
80 80 for(var i=start;i<=end;i++){
81 81 h_lines.push(i);
82 82 }
83 83 }
84 84 }
85 85 else{
86 86 h_lines.push(parseInt(highlight_ranges[pos]));
87 87 }
88 88 }
89 89 highlight_lines(h_lines);
90 90
91 91 }
92 92
93 93 // select code link event
94 94 YUE.on('hlcode', 'mouseup', getSelectionLink);
95 95
96 96 //load history of file
97 97 YUE.on('load_node_history', 'click', function(e){
98 98 var _url = node_history_url.replace('__REV__','${c.file_changeset.raw_id}').replace('__FPATH__', '${c.f_path}');
99 99 ypjax(_url, 'node_history', function(o){
100 100 tooltip_activate();
101 101 })
102 102 });
103 103
104 104 });
105 105
106 106 </script>
General Comments 0
You need to be logged in to leave comments. Login now