summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-05 15:01:38 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-05 15:01:38 +0200
commitdfccb06dda344819989fa8d6a9a3c56c5ca0b65f (patch)
tree8231f0538f50159f04a14c9a19bd7367158d1e3c /app/views/projects
parent22d5d8913bfadb409a66e8ff8543d25bab868015 (diff)
downloadgitlab-ce-dfccb06dda344819989fa8d6a9a3c56c5ca0b65f.tar.gz
Refactor web editorrefactor-web-editor
* fix problem with editing non-master branch * before commit make sure branch exists * dont allow user change file in one branch and commit to another existing branch * remove a lot of code duplication * remove outdated statellite errors Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/blob/new.html.haml11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml
index 9b1d03b820e..f7ddf74b4fc 100644
--- a/app/views/projects/blob/new.html.haml
+++ b/app/views/projects/blob/new.html.haml
@@ -6,11 +6,12 @@
= render 'shared/commit_message_container', params: params,
placeholder: 'Add new file'
- .form-group.branch
- = label_tag 'branch', class: 'control-label' do
- Branch
- .col-sm-10
- = text_field_tag 'new_branch', @ref, class: "form-control"
+ - unless @project.empty_repo?
+ .form-group.branch
+ = label_tag 'branch', class: 'control-label' do
+ Branch
+ .col-sm-10
+ = text_field_tag 'new_branch', @ref, class: "form-control"
= hidden_field_tag 'content', '', id: 'file-content'
= render 'projects/commit_button', ref: @ref,