##// 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 <%namespace name="sourceblock" file="/codeblocks/source.mako"/>
1 <%namespace name="sourceblock" file="/codeblocks/source.mako"/>
2
2
3 <div id="codeblock" class="codeblock">
3 <div id="codeblock" class="codeblock">
4 <div class="codeblock-header">
4 <div class="codeblock-header">
5 <div class="stats">
5 <div class="stats">
6 <span>
6 <span>
7 <strong>
7 <strong>
8 <i class="icon-file-text"></i>
8 <i class="icon-file-text"></i>
9 ${c.file}
9 ${c.file}
10 </strong>
10 </strong>
11 </span>
11 </span>
12 % if c.lf_node:
12 % if c.lf_node:
13 <span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span>
13 <span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span>
14 % endif
14 % endif
15 <span> | ${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
15 <span> | ${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
16 <span> | ${h.format_byte_size_binary(c.file.size)}</span>
16 <span> | ${h.format_byte_size_binary(c.file.size)}</span>
17 <span> | ${c.file.mimetype} </span>
17 <span> | ${c.file.mimetype} </span>
18 <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
18 <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
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>
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 </div>
20 </div>
21 <div class="buttons">
21 <div class="buttons">
22 <a id="file_history_overview" href="#">
22 <a id="file_history_overview" href="#">
23 ${_('History')}
23 ${_('History')}
24 </a>
24 </a>
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)}">
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 ${_('Show Full History')}
26 ${_('Show Full History')}
27 </a> |
27 </a> |
28 %if c.annotate:
28 %if c.annotate:
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))}
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 %else:
30 %else:
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))}
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 %endif
32 %endif
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))}
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 % if c.lf_node:
35 % if c.lf_node:
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))}">
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 ${_('Download largefile')}
37 ${_('Download largefile')}
38 </a>
38 </a>
39 % else:
39 % else:
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)}">
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 ${_('Download')}
41 ${_('Download')}
42 </a>
42 </a>
43 % endif
43 % endif
44
44
45 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
45 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
46 |
46 |
47 %if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary:
47 %if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary:
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')}">
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 ${_('Edit on Branch:{}').format(c.branch_name)}
49 ${_('Edit on Branch:{}').format(c.branch_name)}
50 </a>
50 </a>
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')}
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 </a>
52 </a>
53 %elif c.on_branch_head and c.branch_or_raw_id and c.file.is_binary:
53 %elif c.on_branch_head and c.branch_or_raw_id and c.file.is_binary:
54 ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing binary files not allowed'))}
54 ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing binary files not allowed'))}
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")}
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 %else:
56 %else:
57 ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing files allowed only when on branch head commit'))}
57 ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing files allowed only when on branch head commit'))}
58 | ${h.link_to(_('Delete'), '#', class_="btn btn-danger btn-link disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))}
58 | ${h.link_to(_('Delete'), '#', class_="btn btn-danger btn-link disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))}
59 %endif
59 %endif
60 %endif
60 %endif
61 </div>
61 </div>
62 </div>
62 </div>
63 <div id="file_history_container"></div>
63 <div id="file_history_container"></div>
64 <div class="code-body">
64 <div class="code-body">
65 %if c.file.is_binary:
65 %if c.file.is_binary:
66 <% rendered_binary = h.render_binary(c.repo_name, c.file)%>
66 <% rendered_binary = h.render_binary(c.repo_name, c.file)%>
67 % if rendered_binary:
67 % if rendered_binary:
68 ${rendered_binary}
68 ${rendered_binary}
69 % else:
69 % else:
70 <div>
70 <div>
71 ${_('Binary file (%s)') % c.file.mimetype}
71 ${_('Binary file (%s)') % c.file.mimetype}
72 </div>
72 </div>
73 % endif
73 % endif
74 %else:
74 %else:
75 % if c.file.size < c.visual.cut_off_limit_file:
75 % if c.file.size < c.visual.cut_off_limit_file:
76 %if c.renderer and not c.annotate:
76 %if c.renderer and not c.annotate:
77 ## pick relative url based on renderer
77 ## pick relative url based on renderer
78 ${c.renderer} XXXX
79 <%
78 <%
80 relative_urls = {
79 relative_urls = {
81 'raw': h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
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 'standard': h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
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 ${h.render(c.file.content, renderer=c.renderer, relative_urls=relative_urls)}
84 ${h.render(c.file.content, renderer=c.renderer, relative_urls=relative_urls)}
86 %else:
85 %else:
87 <table class="cb codehilite">
86 <table class="cb codehilite">
88 %if c.annotate:
87 %if c.annotate:
89 <% color_hasher = h.color_hasher() %>
88 <% color_hasher = h.color_hasher() %>
90 %for annotation, lines in c.annotated_lines:
89 %for annotation, lines in c.annotated_lines:
91 ${sourceblock.render_annotation_lines(annotation, lines, color_hasher)}
90 ${sourceblock.render_annotation_lines(annotation, lines, color_hasher)}
92 %endfor
91 %endfor
93 %else:
92 %else:
94 %for line_num, tokens in enumerate(c.lines, 1):
93 %for line_num, tokens in enumerate(c.lines, 1):
95 ${sourceblock.render_line(line_num, tokens)}
94 ${sourceblock.render_line(line_num, tokens)}
96 %endfor
95 %endfor
97 %endif
96 %endif
98 </table>
97 </table>
99 %endif
98 %endif
100 %else:
99 %else:
101 ${_('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'),
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 h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
101 h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
103 %endif
102 %endif
104 %endif
103 %endif
105 </div>
104 </div>
106 </div> No newline at end of file
105 </div>
General Comments 0
You need to be logged in to leave comments. Login now