Skip to content
Snippets Groups Projects
Commit 8840dcf6 authored by tiagonbotelho's avatar tiagonbotelho
Browse files

fixes issues for mr acceptance

parent c9836920
No related branches found
No related tags found
1 merge request!5049Implements the form for renaming the new filename on the file edit page
Loading
@@ -760,7 +760,7 @@ class Repository
Loading
@@ -760,7 +760,7 @@ class Repository
} }
   
if options[:previous_path] if options[:previous_path]
commit_options[:file].merge!(previous_path: options[:previous_path]) commit_options[:file][:previous_path] = options[:previous_path]
   
Gitlab::Git::Blob.rename(raw_repository, commit_options) Gitlab::Git::Blob.rename(raw_repository, commit_options)
else else
Loading
Loading
Loading
@@ -4,11 +4,9 @@
Loading
@@ -4,11 +4,9 @@
= icon('code-fork') = icon('code-fork')
= ref = ref
%span.editor-file-name %span.editor-file-name
- if current_action?(:edit) && can?(current_user, :push_code, @project) -if current_action?(:edit) || current_action?(:update)
= text_field_tag 'file_name', params[:file_name], placeholder: @path, = text_field_tag 'file_name', (params[:file_name] or @path),
class: 'form-control new-file-name' class: 'form-control new-file-name'
- else
= @path
   
- if current_action?(:new) || current_action?(:create) - if current_action?(:new) || current_action?(:create)
%span.editor-file-name %span.editor-file-name
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment