mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-09 06:35:37 +08:00
Merge pull request #8532 from aignatov-bio/ai-sci-11886-add-step-result-to-shared-tasks
Add step/result links to shared tasks [SCI-11886]
This commit is contained in:
commit
ac5bb49892
3 changed files with 40 additions and 0 deletions
|
@ -24,6 +24,26 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="elements-actions-container">
|
||||
<% if step.results.size > 0 %>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-light icon-btn dropdown-toggle"
|
||||
type="button" id="ResultsMenuDropdown<%= step.id %>"
|
||||
title="<%= t("shareable_links.linked_results", count: step.results.size) %>"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<i class="sn-icon sn-icon-results"></i>
|
||||
<span class="absolute top-1 right-1 h-4 min-w-4 bg-sn-science-blue text-white flex items-center justify-center rounded-full text-[10px]">
|
||||
<%= step.results.size %>
|
||||
</span>
|
||||
</button>
|
||||
<ul id="ResultsMenuDropdown<%= step.id %>" class="dropdown-menu dropdown-menu-right px-4 py-2">
|
||||
<% step.results.each do |result| %>
|
||||
<li class="dropdown-item">
|
||||
<%= link_to result.name, shared_protocol_results_path(@shareable_link.uuid), class: "!py-2.5 !px-3 hover:!bg-sn-super-light-grey !cursor-pointer !block hover:!no-underline !text-sn-blue !truncate" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<a href="#"
|
||||
class="shareable-link-open-comments-sidebar btn icon-btn btn-light"
|
||||
data-turbolinks="false"
|
||||
|
|
|
@ -9,6 +9,25 @@
|
|||
<span class="mt-2 whitespace-nowrap truncate text-xs font-normal absolute bottom-[-1rem] w-full"><%= t('my_modules.results.published_on_iso_html', timestamp: result.created_at.iso8601, user: h(result.user.full_name)) %></span>
|
||||
</div>
|
||||
<div class="elements-actions-container">
|
||||
<% if result.steps.size > 0 %>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-light icon-btn dropdown-toggle"
|
||||
type="button" id="StepsMenuDropdown<%= result.id %>"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<%= t('my_modules.results.link_to_step') %>
|
||||
<span class="absolute top-1 -right-1 h-4 min-w-4 bg-sn-science-blue text-white flex items-center justify-center rounded-full text-[10px]">
|
||||
<%= result.steps.size %>
|
||||
</span>
|
||||
</button>
|
||||
<ul id="StepsMenuDropdown<%= result.id %>" class="dropdown-menu dropdown-menu-right px-4 py-2">
|
||||
<% result.steps.each do |step| %>
|
||||
<li class="dropdown-item">
|
||||
<%= link_to step.name, shared_protocol_url(@shareable_link.uuid), class: "!py-2.5 !px-3 hover:!bg-sn-super-light-grey !cursor-pointer !block hover:!no-underline !text-sn-blue !truncate" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<a href="#"
|
||||
class="shareable-link-open-comments-sidebar btn icon-btn btn-light"
|
||||
data-turbolinks="false"
|
||||
|
|
|
@ -2093,6 +2093,7 @@ en:
|
|||
title: "Welcome to SciNote"
|
||||
description: "You have been invited to view the %{my_module}."
|
||||
view_task_btn: "View task"
|
||||
linked_results: "%{count} linked results"
|
||||
tags:
|
||||
new:
|
||||
head_title: "Create tag"
|
||||
|
|
Loading…
Add table
Reference in a new issue