mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-03 22:21:53 +08:00
Merge pull request #3138 from mlorb/ml-sci-5456
Change the title Projects to folder/subfolder title [SCI-5456]
This commit is contained in:
commit
480893c8c7
4 changed files with 9 additions and 3 deletions
|
@ -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');
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<% end %>
|
||||
|
||||
<div id="projectsWrapper" class="content-pane flexible projects-index <%= projects_view_mode %>" data-view-mode="<%= projects_view_mode %>">
|
||||
<%= render partial: 'projects/index/header' %>
|
||||
<%= render partial: 'projects/index/header', locals: { current_folder: current_folder} %>
|
||||
|
||||
<span style="display: none;" data-hook="projects-index-html"></span>
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<div class="content-header sticky-header">
|
||||
<div class="title-row">
|
||||
<h1 data-view-mode="active"><%= t('projects.index.head_title') %></h1>
|
||||
<h1 data-view-mode="archived"><i class="fas fa-archive"></i> <%= t('projects.index.head_title_archived') %></h1>
|
||||
<h1 data-view-mode="active" class="projects-title"><%= current_folder&.name || t('projects.index.head_title') %></h1>
|
||||
<h1 data-view-mode="archived">
|
||||
<i class="fas fa-archive"></i>
|
||||
<span class="projects-title"><%= current_folder&.name || t('projects.index.head_title_archived') %></span>
|
||||
</h1>
|
||||
|
||||
<div class="sci-btn-group header-actions">
|
||||
<%= render layout: 'shared/view_switch', locals: { disabled: false } do %>
|
||||
|
|
Loading…
Reference in a new issue