mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 03:59:51 +08:00
Add name order for porject/experiment/task sidebar
This commit is contained in:
parent
183f5af7de
commit
aaff5eb67f
4 changed files with 4 additions and 4 deletions
|
@ -286,7 +286,7 @@ class ExperimentsController < ApplicationController
|
|||
def load_projects_tree
|
||||
# Switch to correct team
|
||||
current_team_switch(@experiment.project.team) unless @experiment.project.nil?
|
||||
@projects_tree = current_user.projects_tree(current_team, nil)
|
||||
@projects_tree = current_user.projects_tree(current_team, 'atoz')
|
||||
end
|
||||
|
||||
def check_view_permissions
|
||||
|
|
|
@ -582,7 +582,7 @@ class MyModulesController < ApplicationController
|
|||
def load_projects_tree
|
||||
# Switch to correct team
|
||||
current_team_switch(@project.team) unless @project.nil?
|
||||
@projects_tree = current_user.projects_tree(current_team, nil)
|
||||
@projects_tree = current_user.projects_tree(current_team, 'atoz')
|
||||
end
|
||||
|
||||
def check_manage_permissions
|
||||
|
|
|
@ -19,7 +19,7 @@ class Experiment < ApplicationRecord
|
|||
|
||||
has_many :my_modules, inverse_of: :experiment, dependent: :destroy
|
||||
has_many :active_my_modules,
|
||||
-> { where(archived: false).order(:workflow_order) },
|
||||
-> { where(archived: false).order(:name) },
|
||||
class_name: 'MyModule'
|
||||
has_many :my_module_groups, inverse_of: :experiment, dependent: :destroy
|
||||
has_many :report_elements, inverse_of: :experiment, dependent: :destroy
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% if project.active_experiments.present? %>
|
||||
<ul class="tree-child hidden" data-branch-id="pro<%= project.id %>">
|
||||
<% project.active_experiments.each do |experiment| %>
|
||||
<% project.sorted_active_experiments('atoz').each do |experiment| %>
|
||||
<% cache [action_name, current_user, experiment] do %>
|
||||
<li data-parent="candidate" class="branch">
|
||||
<span class="tree-link first-indent" title="<%= experiment.name %>">
|
||||
|
|
Loading…
Reference in a new issue