mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-29 03:01:58 +08:00
Small bugfixes [SCI-5432] (#3107)
This commit is contained in:
parent
172c366828
commit
adb9442677
3 changed files with 9 additions and 16 deletions
|
@ -157,7 +157,7 @@ class MyModulesController < ApplicationController
|
|||
),
|
||||
due_date_label: render_to_string(
|
||||
partial: 'my_modules/due_date_label.html.erb',
|
||||
locals: { my_module: @my_module }
|
||||
locals: { my_module: @my_module, my_module_editable: true }
|
||||
),
|
||||
card_due_date_label: render_to_string(
|
||||
partial: 'my_modules/card_due_date_label.html.erb',
|
||||
|
|
|
@ -32,14 +32,15 @@ module ProjectsHelper
|
|||
end
|
||||
|
||||
def sidebar_folders_tree(team, user, sort, folders_only: false)
|
||||
sort ||= team.current_view_state(user).state.dig('projects', 'active', 'sort')
|
||||
if projects_view_mode_archived?
|
||||
records = ProjectFolder.archived.inner_folders(team)
|
||||
records += team.projects.archived.visible_to(user, team) unless folders_only
|
||||
else
|
||||
records = ProjectFolder.active.inner_folders(team)
|
||||
records += team.projects.active.visible_to(user, team) unless folders_only
|
||||
sort = 'new' if %w(archived_old archived_new).include?(sort)
|
||||
end
|
||||
sort ||= team.current_view_state(user).state.dig('projects', 'active', 'sort')
|
||||
records = case sort
|
||||
when 'new'
|
||||
records.sort_by(&:created_at).reverse!
|
||||
|
|
|
@ -2,18 +2,10 @@
|
|||
<% text = query.present? ? highlight(experiment.name, query.strip.split(/\s+/)) : experiment.name %>
|
||||
|
||||
<% if experiment.archived? %>
|
||||
<span class="label label-warning"><%=t 'search.index.archived' %></span>
|
||||
<% if can_read_experiment?(experiment) && can_restore_experiment?(experiment.project) %>
|
||||
<%= route_to_other_team root_path, experiment.project.team, text %>
|
||||
<% else %>
|
||||
<%= text %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if can_read_experiment?(experiment) %>
|
||||
<%= route_to_other_team canvas_experiment_path(experiment),
|
||||
experiment.project.team,
|
||||
text %>
|
||||
<% else %>
|
||||
<%= text %>
|
||||
<% end %>
|
||||
<span class="label label-warning"><%= t('search.index.archived') %></span>
|
||||
<% end %>
|
||||
<% if can_read_experiment?(experiment) %>
|
||||
<%= route_to_other_team(canvas_experiment_path(experiment), experiment.project.team, text) %>
|
||||
<% else %>
|
||||
<%= text %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue