##// END OF EJS Templates
disabled edition of binary files
marcink -
r1313:856be614 beta
parent child Browse files
Show More
@@ -221,6 +221,10 b' class FilesController(BaseRepoController'
221 c.cs = self.__get_cs_or_redirect(revision, repo_name)
221 c.cs = self.__get_cs_or_redirect(revision, repo_name)
222 c.file = self.__get_filenode_or_redirect(repo_name, c.cs, f_path)
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 c.file_history = self._get_node_history(c.cs, f_path)
228 c.file_history = self._get_node_history(c.cs, f_path)
225 c.f_path = f_path
229 c.f_path = f_path
226
230
@@ -45,9 +45,11 b''
45 / ${h.link_to(_('download as raw'),
45 / ${h.link_to(_('download as raw'),
46 h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))}
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 / ${h.link_to(_('edit'),
49 / ${h.link_to(_('edit'),
49 h.url('files_edit_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))}
50 h.url('files_edit_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))}
50 % endif
51 % endif
52 % endif
51 </dd>
53 </dd>
52 <dt>${_('History')}</dt>
54 <dt>${_('History')}</dt>
53 <dd>
55 <dd>
@@ -16,9 +16,11 b''
16 / ${h.link_to(_('download as raw'),
16 / ${h.link_to(_('download as raw'),
17 h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))}
17 h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))}
18 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
18 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
19 % if not c.files_list.is_binary:
19 / ${h.link_to(_('edit'),
20 / ${h.link_to(_('edit'),
20 h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))}
21 h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))}
21 % endif
22 % endif
23 % endif
22 </dd>
24 </dd>
23 <dt>${_('History')}</dt>
25 <dt>${_('History')}</dt>
24 <dd>
26 <dd>
General Comments 0
You need to be logged in to leave comments. Login now