# HG changeset patch # User Daniel Dourvaris # Date 2019-06-25 15:31:53 # Node ID 2e97cecba54921b2cad3ec688549796d0fa2ee3f # Parent 5cee44bdb85b86f68dc96ce730c7aecfd8d57f40 files: fixed branch icon for SVN - added content preview template diff --git a/rhodecode/templates/files/file_content.mako b/rhodecode/templates/files/file_content.mako new file mode 100644 --- /dev/null +++ b/rhodecode/templates/files/file_content.mako @@ -0,0 +1,9 @@ +<%namespace name="sourceblock" file="/codeblocks/source.mako"/> + +<%def name="render_lines(lines)"> + + %for line_num, tokens in enumerate(lines, 1): + ${sourceblock.render_line(line_num, tokens)} + %endfor +
+ diff --git a/rhodecode/templates/files/files_add.mako b/rhodecode/templates/files/files_add.mako --- a/rhodecode/templates/files/files_add.mako +++ b/rhodecode/templates/files/files_add.mako @@ -23,7 +23,11 @@
${_('Add new file')} @ ${h.show_id(c.commit)} - ${c.commit.branch} + % if c.commit.branch: + + ${c.commit.branch} + + % endif
${h.secure_form(h.route_path('repo_files_create_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', request=request)} diff --git a/rhodecode/templates/files/files_delete.mako b/rhodecode/templates/files/files_delete.mako --- a/rhodecode/templates/files/files_delete.mako +++ b/rhodecode/templates/files/files_delete.mako @@ -23,7 +23,11 @@
${_('Delete file')} @ ${h.show_id(c.commit)} - ${c.commit.branch} + % if c.commit.branch: + + ${c.commit.branch} + + % endif
${h.secure_form(h.route_path('repo_files_delete_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', request=request)} diff --git a/rhodecode/templates/files/files_edit.mako b/rhodecode/templates/files/files_edit.mako --- a/rhodecode/templates/files/files_edit.mako +++ b/rhodecode/templates/files/files_edit.mako @@ -23,7 +23,11 @@
${_('Edit file')} @ ${h.show_id(c.commit)} - ${c.commit.branch} + % if c.commit.branch: + + ${c.commit.branch} + + % endif
${h.secure_form(h.route_path('repo_files_update_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', request=request)} diff --git a/rhodecode/templates/files/files_upload.mako b/rhodecode/templates/files/files_upload.mako --- a/rhodecode/templates/files/files_upload.mako +++ b/rhodecode/templates/files/files_upload.mako @@ -50,7 +50,11 @@
${_('Upload new file')} @ ${h.show_id(c.commit)} - ${c.commit.branch} + % if c.commit.branch: + + ${c.commit.branch} + + % endif
<% form_url = h.route_path('repo_files_upload_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path) %>