mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 07:26:15 +08:00
Merge pull request #6141 from aignatov-bio/ai-sci-9206-fix-activities
Fix activities for results [SCI-9206][SCI-9205][SCI-9207]
This commit is contained in:
commit
dfb0d4e1a7
|
@ -16,6 +16,8 @@
|
|||
padding: 0 1rem;
|
||||
|
||||
.sci--navigation--top-menu-logo {
|
||||
margin-right: auto;
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ module GlobalActivitiesHelper
|
|||
when Result
|
||||
return current_value unless obj.navigable?
|
||||
|
||||
path = obj.archived? ? archive_my_module_path(obj.my_module) : results_my_module_path(obj.my_module)
|
||||
path = obj.archived? ? archive_my_module_path(obj.my_module) : my_module_results_path(obj.my_module)
|
||||
when Step
|
||||
return current_value
|
||||
when Report
|
||||
|
|
|
@ -42,17 +42,6 @@ module ResultsHelper
|
|||
end
|
||||
|
||||
def result_icon_class(result)
|
||||
return 'sn-icon sn-icon-tables' unless result
|
||||
|
||||
if result.is_asset
|
||||
'sn-icon sn-icon-files'
|
||||
elsif result.is_text
|
||||
'sn-icon sn-icon-result-text'
|
||||
elsif result.is_table
|
||||
'sn-icon sn-icon-tables'
|
||||
else
|
||||
# just return table for any other result
|
||||
'sn-icon sn-icon-tables'
|
||||
end
|
||||
return 'sn-icon sn-icon-tables'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<i class="sn-icon sn-icon-sort"></i>
|
||||
</div>
|
||||
|
||||
<div v-if="element.attributes.orderable.urls.update_url || element.attributes.orderable.name" :key="reloadHeader"
|
||||
<div v-if="element.attributes.orderable.urls.update_url || element.attributes.orderable.name"
|
||||
class="grow-1 text-ellipsis whitespace-nowrap grow my-1 font-bold">
|
||||
<InlineEdit
|
||||
:value="element.attributes.orderable.name"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<span class="<%=result_icon_class(subject)%>"></span>
|
||||
<% if subject&.navigable? %>
|
||||
<% path = subject.archived? ? archive_my_module_path(subject.my_module) : results_my_module_path(subject.my_module) %>
|
||||
<% path = subject.archived? ? archive_my_module_path(subject.my_module) : my_module_results_path(subject.my_module) %>
|
||||
<%= route_to_other_team(path,
|
||||
team,
|
||||
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
my_module.experiment.project.team,
|
||||
text %>
|
||||
<% when :results %>
|
||||
<%= route_to_other_team results_my_module_path(my_module),
|
||||
<%= route_to_other_team my_module_results_path(my_module),
|
||||
my_module.experiment.project.team,
|
||||
text %>
|
||||
<% else %>
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
<% else %>
|
||||
<% if can_read_experiment?(result.my_module.experiment) %>
|
||||
<% if target == :comment %>
|
||||
<%= route_to_other_team results_my_module_path(result.my_module, ctarget: "result-panel-#{result.id}"),
|
||||
<%= route_to_other_team my_module_results_path(result.my_module, ctarget: "result-panel-#{result.id}"),
|
||||
result.my_module.experiment.project.team,
|
||||
text %>
|
||||
<% else %>
|
||||
<%= route_to_other_team results_my_module_path(result.my_module),
|
||||
<%= route_to_other_team my_module_results_path(result.my_module),
|
||||
result.my_module.experiment.project.team,
|
||||
text %>
|
||||
<% end %>
|
||||
|
|
|
@ -208,7 +208,7 @@ class Extends
|
|||
project: [:experiments],
|
||||
experiment: [:my_modules],
|
||||
my_module: %i(results protocols),
|
||||
result: [:asset],
|
||||
result: [:assets],
|
||||
protocol: [:steps],
|
||||
step: [:assets]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue