summaryrefslogtreecommitdiff
path: root/app/views/projects/blob/_editor.html.haml
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-07-01 16:32:56 +0100
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-07-06 14:13:57 +0100
commit7f4959ee4f8d54b42c394db1cfb32929cece419f (patch)
tree0ad5cccdc20f8d66208e25c640c65e746580c68e /app/views/projects/blob/_editor.html.haml
parentcfd5870b62e9d76e564ffc64db1d1281b4a363bb (diff)
downloadgitlab-ce-7f4959ee4f8d54b42c394db1cfb32929cece419f.tar.gz
implements the form for renaming the new filename on the file edit page
Diffstat (limited to 'app/views/projects/blob/_editor.html.haml')
-rw-r--r--app/views/projects/blob/_editor.html.haml6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml
index 29c7d45074a..3c64b2f5e96 100644
--- a/app/views/projects/blob/_editor.html.haml
+++ b/app/views/projects/blob/_editor.html.haml
@@ -4,7 +4,11 @@
= icon('code-fork')
= ref
%span.editor-file-name
- = @path
+ - if current_action?(:edit) && can?(current_user, :push_code, @project)
+ = text_field_tag 'file_name', params[:file_name], placeholder: @path,
+ class: 'form-control new-file-name'
+ - else
+ = @path
- if current_action?(:new) || current_action?(:create)
%span.editor-file-name