diff --git a/rhodecode/templates/files/files_annotate.html b/rhodecode/templates/files/files_annotate.html
--- a/rhodecode/templates/files/files_annotate.html
+++ b/rhodecode/templates/files/files_annotate.html
@@ -44,6 +44,12 @@
h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))}
/ ${h.link_to(_('download as raw'),
h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))}
+ % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
+ % if not c.file.is_binary:
+ / ${h.link_to(_('edit'),
+ h.url('files_edit_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))}
+ % endif
+ % endif
${_('History')}
@@ -51,8 +57,8 @@
${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
${h.hidden('diff2',c.file.last_changeset.raw_id)}
${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)}
- ${h.submit('diff','diff to revision',class_="ui-button")}
- ${h.submit('show_rev','show at revision',class_="ui-button")}
+ ${h.submit('diff','diff to revision',class_="ui-button-small")}
+ ${h.submit('show_rev','show at revision',class_="ui-button-small")}
${h.end_form()}
@@ -64,28 +70,67 @@
%if c.file.is_binary:
- ${_('Binary file')}
+ ${_('Binary file (%s)') % c.file.mimetype}
%else:
% if c.file.size < c.cut_off_limit:
- ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
+ ${h.pygmentize_annotation(c.repo_name,c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
%else:
- ${_('File is to big to display')} ${h.link_to(_('show as raw'),
+ ${_('File is too big to display')} ${h.link_to(_('show as raw'),
h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path))}
%endif
-
+
%endif
+
-%def>
\ No newline at end of file
+%def>