diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /app/controllers/projects_controller.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) | |
download | gitlab-ce-a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4.tar.gz |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index fb977a5ee42..53d80b8be58 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -39,6 +39,11 @@ class ProjectsController < Projects::ApplicationController push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml) end + before_action only: [:new] do + # Run experiment before render so it will be written to the `gon` for FE + helpers.new_repo_experiment_text + end + layout :determine_layout feature_category :projects, [ @@ -221,7 +226,14 @@ class ProjectsController < Projects::ApplicationController def download_export if @project.export_file_exists? - send_upload(@project.export_file, attachment: @project.export_file.filename) + if @project.export_archive_exists? + send_upload(@project.export_file, attachment: @project.export_file.filename) + else + redirect_to( + edit_project_path(@project, anchor: 'js-export-project'), + alert: _("The file containing the export is not available yet; it may still be transferring. Please try again later.") + ) + end else redirect_to( edit_project_path(@project, anchor: 'js-export-project'), @@ -330,11 +342,7 @@ class ProjectsController < Projects::ApplicationController experiment(:empty_repo_upload, project: @project).track(:view_project_show, property: property) end - if @project.empty_repo? - record_experiment_user(:invite_members_empty_project_version_a) - - render 'projects/empty' - end + render 'projects/empty' if @project.empty_repo? else if can?(current_user, :read_wiki, @project) @wiki = @project.wiki @@ -435,6 +443,7 @@ class ProjectsController < Projects::ApplicationController :request_access_enabled, :runners_token, :tag_list, + :topics, :visibility_level, :template_name, :template_project_id, |