Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 06:06:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 06:06:12 +0300
commitf155cc9034f2247c5d368f9b0212ad44248b0c5e (patch)
tree902480293b665d74a337aeae6a0521104f561988 /app/views/projects/tree
parentc920712fab6abdc37de9444e6bbcd170c295b21a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/tree')
-rw-r--r--app/views/projects/tree/_tree_header.html.haml13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml
index 41cd044a5b0..38422d4533d 100644
--- a/app/views/projects/tree/_tree_header.html.haml
+++ b/app/views/projects/tree/_tree_header.html.haml
@@ -41,7 +41,7 @@
%li
= link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal' } do
#{ _('New directory') }
- - elsif can?(current_user, :fork_project, @project) && can?(current_user, :create_merge_request_in, @project)
+ - elsif can_create_mr_from_fork
%li
- continue_params = { to: project_new_blob_path(@project, @id),
notice: edit_in_new_fork_notice,
@@ -81,10 +81,15 @@
= render 'projects/find_file_link'
- - if can_collaborate
+ - if can_create_mr_from_fork
= succeed " " do
- = link_to ide_edit_path(@project, @ref, @path), class: 'btn btn-default qa-web-ide-button' do
- = _('Web IDE')
+ - if can_collaborate || current_user&.already_forked?(@project)
+ = link_to ide_edit_path(@project, @ref, @path), class: 'btn btn-default qa-web-ide-button' do
+ = _('Web IDE')
+ - else
+ = link_to '#modal-confirm-fork', class: 'btn btn-default qa-web-ide-button', data: { target: '#modal-confirm-fork', toggle: 'modal'} do
+ = _('Web IDE')
+ = render 'shared/confirm_fork_modal', fork_path: ide_fork_and_edit_path(@project, @ref, @path)
- if show_xcode_link?(@project)
.project-action-button.project-xcode.inline