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:
aignatov-bio 2023-09-06 10:34:05 +02:00 committed by GitHub
commit dfb0d4e1a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 19 deletions

View file

@ -16,6 +16,8 @@
padding: 0 1rem;
.sci--navigation--top-menu-logo {
margin-right: auto;
a {
display: inline-block;
}

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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),

View file

@ -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 %>

View file

@ -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 %>

View file

@ -208,7 +208,7 @@ class Extends
project: [:experiments],
experiment: [:my_modules],
my_module: %i(results protocols),
result: [:asset],
result: [:assets],
protocol: [:steps],
step: [:assets]
}