##// END OF EJS Templates
files: removed some left over debug.
marcink -
r2049:3f374374 default
parent child Browse files
Show More
@@ -1,106 +1,105 b''
1 1 <%namespace name="sourceblock" file="/codeblocks/source.mako"/>
2 2
3 3 <div id="codeblock" class="codeblock">
4 4 <div class="codeblock-header">
5 5 <div class="stats">
6 6 <span>
7 7 <strong>
8 8 <i class="icon-file-text"></i>
9 9 ${c.file}
10 10 </strong>
11 11 </span>
12 12 % if c.lf_node:
13 13 <span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span>
14 14 % endif
15 15 <span> | ${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
16 16 <span> | ${h.format_byte_size_binary(c.file.size)}</span>
17 17 <span> | ${c.file.mimetype} </span>
18 18 <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
19 19 <span class="item last"> | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.file.path}" title="${_('Copy the full path')}"></i></span>
20 20 </div>
21 21 <div class="buttons">
22 22 <a id="file_history_overview" href="#">
23 23 ${_('History')}
24 24 </a>
25 25 <a id="file_history_overview_full" style="display: none" href="${h.route_path('repo_changelog_file',repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path)}">
26 26 ${_('Show Full History')}
27 27 </a> |
28 28 %if c.annotate:
29 29 ${h.link_to(_('Source'), h.route_path('repo_files', repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
30 30 %else:
31 31 ${h.link_to(_('Annotation'), h.route_path('repo_files:annotated',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
32 32 %endif
33 33 | ${h.link_to(_('Raw'), h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
34 34 |
35 35 % if c.lf_node:
36 36 <a href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path, _query=dict(lf=1))}">
37 37 ${_('Download largefile')}
38 38 </a>
39 39 % else:
40 40 <a href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}">
41 41 ${_('Download')}
42 42 </a>
43 43 % endif
44 44
45 45 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
46 46 |
47 47 %if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary:
48 48 <a href="${h.route_path('repo_files_edit_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">
49 49 ${_('Edit on Branch:{}').format(c.branch_name)}
50 50 </a>
51 51 | <a class="btn-danger btn-link" href="${h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">${_('Delete')}
52 52 </a>
53 53 %elif c.on_branch_head and c.branch_or_raw_id and c.file.is_binary:
54 54 ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing binary files not allowed'))}
55 55 | ${h.link_to(_('Delete'), h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit'),class_="btn-danger btn-link")}
56 56 %else:
57 57 ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing files allowed only when on branch head commit'))}
58 58 | ${h.link_to(_('Delete'), '#', class_="btn btn-danger btn-link disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))}
59 59 %endif
60 60 %endif
61 61 </div>
62 62 </div>
63 63 <div id="file_history_container"></div>
64 64 <div class="code-body">
65 65 %if c.file.is_binary:
66 66 <% rendered_binary = h.render_binary(c.repo_name, c.file)%>
67 67 % if rendered_binary:
68 68 ${rendered_binary}
69 69 % else:
70 70 <div>
71 71 ${_('Binary file (%s)') % c.file.mimetype}
72 72 </div>
73 73 % endif
74 74 %else:
75 75 % if c.file.size < c.visual.cut_off_limit_file:
76 76 %if c.renderer and not c.annotate:
77 77 ## pick relative url based on renderer
78 ${c.renderer} XXXX
79 78 <%
80 79 relative_urls = {
81 80 'raw': h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
82 81 'standard': h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
83 82 }
84 83 %>
85 84 ${h.render(c.file.content, renderer=c.renderer, relative_urls=relative_urls)}
86 85 %else:
87 86 <table class="cb codehilite">
88 87 %if c.annotate:
89 88 <% color_hasher = h.color_hasher() %>
90 89 %for annotation, lines in c.annotated_lines:
91 90 ${sourceblock.render_annotation_lines(annotation, lines, color_hasher)}
92 91 %endfor
93 92 %else:
94 93 %for line_num, tokens in enumerate(c.lines, 1):
95 94 ${sourceblock.render_line(line_num, tokens)}
96 95 %endfor
97 96 %endif
98 97 </table>
99 98 %endif
100 99 %else:
101 100 ${_('File size {} is bigger then allowed limit {}. ').format(h.format_byte_size_binary(c.file.size), h.format_byte_size_binary(c.visual.cut_off_limit_file))} ${h.link_to(_('Show as raw'),
102 101 h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
103 102 %endif
104 103 %endif
105 104 </div>
106 105 </div> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now