diff --git a/app/controllers/results_controller.rb b/app/controllers/results_controller.rb index f32b977c4..9d5094eec 100644 --- a/app/controllers/results_controller.rb +++ b/app/controllers/results_controller.rb @@ -195,7 +195,7 @@ class ResultsController < ApplicationController def set_navigator @navigator = { url: tree_navigator_my_module_path(@my_module), - archived: params[:view_mode] == 'archived', + archived: false, id: @my_module.code } end diff --git a/app/helpers/secondary_navigation_helper.rb b/app/helpers/secondary_navigation_helper.rb index fc4fd9484..b3c0c75bd 100644 --- a/app/helpers/secondary_navigation_helper.rb +++ b/app/helpers/secondary_navigation_helper.rb @@ -41,17 +41,13 @@ module SecondaryNavigationHelper end def is_module_results? - %w(index).include?(action_name) && controller_name == 'results' && !%w(archived).include?(params[:view_mode]) + %w(index).include?(action_name) && controller_name == 'results' end def is_module_activities? action_name == 'activities' end - def is_module_archive? - %w(index).include?(action_name) && controller_name == 'results' && %w(archived).include?(params[:view_mode]) - end - def title_element if all_projects_page? current_team diff --git a/app/javascript/vue/results/results.vue b/app/javascript/vue/results/results.vue index 1f4b77fb5..f675f7370 100644 --- a/app/javascript/vue/results/results.vue +++ b/app/javascript/vue/results/results.vue @@ -2,6 +2,9 @@
+
diff --git a/app/views/results/index.html.erb b/app/views/results/index.html.erb index 892c6382b..6c167db7a 100644 --- a/app/views/results/index.html.erb +++ b/app/views/results/index.html.erb @@ -19,7 +19,10 @@
> + active_url="<%= my_module_results_url(@my_module) %>" + archived_url="<%= my_module_results_url(@my_module, view_mode: :archived) %>" + can-create=<%= can_create_results?(@my_module) && !(params[:view_mode] == 'archived') %> + archived=<%= params[:view_mode] == 'archived' %>>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 404f4d177..8a6a0825b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1252,6 +1252,8 @@ en: load_from_file_protocol_general_error: "Failed to load the protocol from file. It is likely that certain fields (protocol and individual step titles and names) contain too many or too few characters.(max is %{max} and min is %{min})" results: head_title: "%{project} | %{module} | Results" + active_results: "Active results" + archived_results: "Archived results" default_name: "New result" placeholder: "Enter result name" add_label: "New result"