mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-16 16:57:11 +08:00
Add breadrumbs to project experiments page [SCI-5369]
This commit is contained in:
parent
e874ca8ac5
commit
b872c6fd14
4 changed files with 12 additions and 2 deletions
|
@ -11,7 +11,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
before_action :switch_team_with_param, only: :index
|
||||
before_action :load_vars, only: %i(show edit update notifications experiment_archive sidebar)
|
||||
before_action :load_current_folder, only: %i(index cards new)
|
||||
before_action :load_current_folder, only: %i(index cards new show experiment_archive)
|
||||
before_action :check_view_permissions, only: %i(show notifications experiment_archive sidebar)
|
||||
before_action :check_create_permissions, only: %i(new create)
|
||||
before_action :check_manage_permissions, only: :edit
|
||||
|
@ -301,6 +301,8 @@ class ProjectsController < ApplicationController
|
|||
def load_current_folder
|
||||
if current_team && params[:project_folder_id].present?
|
||||
@current_folder = current_team.project_folders.find_by(id: params[:project_folder_id])
|
||||
elsif @project&.project_folder
|
||||
@current_folder = @project&.project_folder
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
<%= render partial: 'shared/sidebar/experiments.html.erb', locals: { project: @project, archived: true } %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :breadcrumbs do %>
|
||||
<%= render partial: 'projects/index/breadcrumbs', locals: { target_folder: @project.project_folder } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="content-pane flexible" id="project-show-archive">
|
||||
<%= render partial: 'projects/show/header' %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% target_folder ||= current_folder %>
|
||||
<div class="projects-breadcrumbs">
|
||||
<%= link_to(t('projects.index.breadcrumbs_root'),
|
||||
projects_path,
|
||||
projects_path(view_mode: projects_view_mode),
|
||||
class: 'project-folder-link',
|
||||
data: { projects_cards_url: cards_projects_url,
|
||||
sidebar_url: sidebar_team_path(current_team) }) %>
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
<%= render partial: 'shared/sidebar/experiments.html.erb', locals: { project: @project, archived: false } %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :breadcrumbs do %>
|
||||
<%= render partial: 'projects/index/breadcrumbs', locals: { target_folder: @project.project_folder } %>
|
||||
<% end %>
|
||||
|
||||
<div class="content-pane flexible" id="project-show">
|
||||
<%= render partial: 'projects/show/header' %>
|
||||
<div class="project-show-toolbar">
|
||||
|
|
Loading…
Add table
Reference in a new issue