diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /app/presenters/project_presenter.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'app/presenters/project_presenter.rb')
-rw-r--r-- | app/presenters/project_presenter.rb | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index bbd8c715f5c..ec66f9bdd4f 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -249,33 +249,23 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated strong_memoize(:upload_anchor_data) do next unless can_current_user_push_to_default_branch? - experiment(:empty_repo_upload, project: project) do |e| - e.use {} - e.try do - AnchorData.new(false, - statistic_icon('upload') + _('Upload file'), - '#modal-upload-blob', - 'js-upload-file-experiment-trigger', - nil, - nil, - { - 'target_branch' => default_branch_or_main, - 'original_branch' => default_branch_or_main, - 'can_push_code' => 'true', - 'path' => project_create_blob_path(project, default_branch_or_main), - 'project_path' => project.full_path - } - ) - end - e.run - end + AnchorData.new(false, + statistic_icon('upload') + _('Upload file'), + '#modal-upload-blob', + 'js-upload-file-trigger', + nil, + nil, + { + 'target_branch' => default_branch_or_main, + 'original_branch' => default_branch_or_main, + 'can_push_code' => 'true', + 'path' => project_create_blob_path(project, default_branch_or_main), + 'project_path' => project.full_path + } + ) end end - def empty_repo_upload_experiment? - upload_anchor_data.present? - end - def new_file_anchor_data if can_current_user_push_to_default_branch? new_file_path = empty_repo? ? ide_edit_path(project, default_branch_or_main) : project_new_blob_path(project, default_branch_or_main) |