Show More
@@ -221,6 +221,10 b' class FilesController(BaseRepoController' | |||
|
221 | 221 | c.cs = self.__get_cs_or_redirect(revision, repo_name) |
|
222 | 222 | c.file = self.__get_filenode_or_redirect(repo_name, c.cs, f_path) |
|
223 | 223 | |
|
224 | if c.file.is_binary: | |
|
225 | return redirect(url('files_home', repo_name=c.repo_name, | |
|
226 | revision=c.cs.raw_id, f_path=f_path)) | |
|
227 | ||
|
224 | 228 | c.file_history = self._get_node_history(c.cs, f_path) |
|
225 | 229 | c.f_path = f_path |
|
226 | 230 |
@@ -44,9 +44,11 b'' | |||
|
44 | 44 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} |
|
45 | 45 | / ${h.link_to(_('download as raw'), |
|
46 | 46 | h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} |
|
47 |
% if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
|
47 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
|
48 | % if not c.file.is_binary: | |
|
48 | 49 | / ${h.link_to(_('edit'), |
|
49 | 50 | h.url('files_edit_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} |
|
51 | % endif | |
|
50 | 52 | % endif |
|
51 | 53 | </dd> |
|
52 | 54 | <dt>${_('History')}</dt> |
@@ -16,8 +16,10 b'' | |||
|
16 | 16 | / ${h.link_to(_('download as raw'), |
|
17 | 17 | h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
18 | 18 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
19 | % if not c.files_list.is_binary: | |
|
19 | 20 | / ${h.link_to(_('edit'), |
|
20 | 21 | h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
22 | % endif | |
|
21 | 23 | % endif |
|
22 | 24 | </dd> |
|
23 | 25 | <dt>${_('History')}</dt> |
General Comments 0
You need to be logged in to leave comments.
Login now