diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 88c68fdf7..a591e6b45 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -10,7 +10,6 @@ class ProjectsController < ApplicationController delete_samples samples_index) before_action :load_projects_tree, only: %i(sidebar show samples archive experiment_archive) - before_action :load_archive_vars, only: :archive before_action :check_view_permissions, only: %i(show reports notifications samples experiment_archive samples_index) @@ -82,10 +81,6 @@ class ProjectsController < ApplicationController end end - def archive - index - end - def new @project = Project.new end @@ -319,15 +314,6 @@ class ProjectsController < ApplicationController end end - def load_archive_vars - if current_user.teams.any? - @archived_projects_by_teams = - current_user.projects_by_teams(@current_team.id, @current_sort, true) - else - @archived_projects_by_teams = [] - end - end - def check_view_permissions render_403 unless can_read_project?(@project) end diff --git a/app/views/projects/archive.html.erb b/app/views/projects/archive.html.erb deleted file mode 100644 index 03753fd4e..000000000 --- a/app/views/projects/archive.html.erb +++ /dev/null @@ -1,54 +0,0 @@ -<% provide(:head_title, t("projects.archive.head_title")) %> -<%= render partial: "shared/sidebar", locals: { page: 'project' } %> -<%= render partial: "shared/secondary_navigation" %> - -
- <% if @archived_projects_by_teams.length > 0 %> -
- -
- -
- - - -
-
-
- - <% @archived_projects_by_teams.each do |team, projects| %> - <%= render partial: 'projects/archive/team_projects', - locals: {team: team, projects: projects} %> - <% end %> - <% else %> -
-
-

<%=t "projects.index.no_archived_projects" %>

-
-
-
-
- <%= link_to t("projects.index.back_to_projects_index"), projects_path %> -
-
- -
-
-
- <% end %> -
diff --git a/app/views/projects/archive/_project.html.erb b/app/views/projects/archive/_project.html.erb deleted file mode 100644 index ee563ae1d..000000000 --- a/app/views/projects/archive/_project.html.erb +++ /dev/null @@ -1,46 +0,0 @@ -
-
- <% if can_restore_project?(project) %> - - <% end %> - -

- <% if project.hidden? then %> - - <% else %> - - <% end %> - <%= project.name %> -

-
- -
-
-
<%= t('projects.index.start_date') %>
-
- <%=l project.created_at, format: :full_date %> -
-
-
-
diff --git a/app/views/projects/archive/_team_projects.html.erb b/app/views/projects/archive/_team_projects.html.erb deleted file mode 100644 index c501786c5..000000000 --- a/app/views/projects/archive/_team_projects.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -
-<% projects.each_index do |i| project = projects[i] %> -
- <%= render partial: "projects/archive/project", locals: { project: project } %> -
- <% if (i+1) % 4 == 0 %> -
- <% end %> - <% if (i+1) % 3 == 0 %> -
- <% end %> - <% if (i+1) % 2 == 0 %> -
- <% end %> -<% end %> -
diff --git a/config/locales/en.yml b/config/locales/en.yml index 840309479..91c7f0742 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -281,8 +281,6 @@ en: options_header: "Options" comment_placeholder: "Your Message" more_comments: "More Comments" - no_archived_projects: "No archived projects!" - back_to_projects_index: "Back to home" modal_new_project: modal_title: "Create new project" create: "Create" @@ -331,7 +329,6 @@ en: success_flash: "Project %{name} successfully updated." error_flash: "Project %{name} not updated." archive: - head_title: "Projects Archive" success_flash: "Project %{name} successfully archived." error_flash: "Project %{name} not archived." restore: diff --git a/config/routes.rb b/config/routes.rb index bd61bf47c..01e7ce25c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -225,7 +225,6 @@ Rails.application.routes.draw do via: [:get, :post, :put, :patch] end - get 'projects/archive', to: 'projects#archive', as: 'projects_archive' post 'projects/index_dt', to: 'projects#index_dt', as: 'projects_index_dt' get 'projects/sidebar', to: 'projects#sidebar', as: 'projects_sidebar' get 'projects/dt_state_load', to: 'projects#dt_state_load', diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index a2a58e024..443540a22 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -90,18 +90,6 @@ describe ProjectsController, type: :controller do end end - describe '#archive' do - context 'in JSON format' do - let(:params) { { team: team.id, sort: 'atoz' } } - - it 'returns success response' do - get :archive, params: params, format: :json - expect(response).to have_http_status(:success) - expect(response.content_type).to eq 'application/json' - end - end - end - describe 'POST create' do context 'in JSON format' do let(:params) do