diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index f6bb51855..722074c03 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -495,6 +495,7 @@ }, success: function(data) { $('#breadcrumbsWrapper').html(data.breadcrumbs_html); + $(projectsWrapper).find('.projects-title').html(data.title); $(toolbarWrapper).html(data.toolbar_html); viewContainer.data('projects-cards-url', data.projects_cards_url); viewContainer.removeClass('no-results'); diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index bb9981a79..8eb09c4ab 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -31,6 +31,7 @@ class ProjectsController < ApplicationController def cards overview_service = ProjectsOverviewService.new(current_team, current_user, current_folder, params) + title = params[:view_mode] == 'archived' ? t('projects.index.head_title_archived') : t('projects.index.head_title') if filters_included? render json: { @@ -44,6 +45,7 @@ class ProjectsController < ApplicationController render json: { projects_cards_url: current_folder ? project_folder_cards_url(current_folder) : cards_projects_url, breadcrumbs_html: current_folder ? render_to_string(partial: 'projects/index/breadcrumbs.html.erb') : '', + title: current_folder ? current_folder&.name : title, toolbar_html: render_to_string(partial: 'projects/index/toolbar.html.erb'), cards_html: render_to_string( partial: 'projects/index/team_projects.html.erb', diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index d60791634..6d97fa0ac 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -11,7 +11,7 @@ <% end %>