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;
|
padding: 0 1rem;
|
||||||
|
|
||||||
.sci--navigation--top-menu-logo {
|
.sci--navigation--top-menu-logo {
|
||||||
|
margin-right: auto;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ module GlobalActivitiesHelper
|
||||||
when Result
|
when Result
|
||||||
return current_value unless obj.navigable?
|
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
|
when Step
|
||||||
return current_value
|
return current_value
|
||||||
when Report
|
when Report
|
||||||
|
|
|
@ -42,17 +42,6 @@ module ResultsHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def result_icon_class(result)
|
def result_icon_class(result)
|
||||||
return 'sn-icon sn-icon-tables' unless result
|
return 'sn-icon sn-icon-tables'
|
||||||
|
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<i class="sn-icon sn-icon-sort"></i>
|
<i class="sn-icon sn-icon-sort"></i>
|
||||||
</div>
|
</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">
|
class="grow-1 text-ellipsis whitespace-nowrap grow my-1 font-bold">
|
||||||
<InlineEdit
|
<InlineEdit
|
||||||
:value="element.attributes.orderable.name"
|
:value="element.attributes.orderable.name"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<span class="<%=result_icon_class(subject)%>"></span>
|
<span class="<%=result_icon_class(subject)%>"></span>
|
||||||
<% if subject&.navigable? %>
|
<% 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,
|
<%= route_to_other_team(path,
|
||||||
team,
|
team,
|
||||||
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
|
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
my_module.experiment.project.team,
|
my_module.experiment.project.team,
|
||||||
text %>
|
text %>
|
||||||
<% when :results %>
|
<% 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,
|
my_module.experiment.project.team,
|
||||||
text %>
|
text %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if can_read_experiment?(result.my_module.experiment) %>
|
<% if can_read_experiment?(result.my_module.experiment) %>
|
||||||
<% if target == :comment %>
|
<% 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,
|
result.my_module.experiment.project.team,
|
||||||
text %>
|
text %>
|
||||||
<% else %>
|
<% 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,
|
result.my_module.experiment.project.team,
|
||||||
text %>
|
text %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -208,7 +208,7 @@ class Extends
|
||||||
project: [:experiments],
|
project: [:experiments],
|
||||||
experiment: [:my_modules],
|
experiment: [:my_modules],
|
||||||
my_module: %i(results protocols),
|
my_module: %i(results protocols),
|
||||||
result: [:asset],
|
result: [:assets],
|
||||||
protocol: [:steps],
|
protocol: [:steps],
|
||||||
step: [:assets]
|
step: [:assets]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue