mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 13:45:25 +08:00
28 lines
925 B
Text
28 lines
925 B
Text
<% linked_children = protocol.linked_children %>
|
|
<% published_versions = protocol.published_versions_with_original.order(version_number: :desc)%>
|
|
|
|
<% if protocol.nr_of_linked_children > 0 %>
|
|
<div class="version-dropdown">
|
|
<%= label_tag "version-selector".to_sym, t("protocols.index.linked_children.show_version") %>
|
|
<%= select_tag "version",
|
|
options_for_select(
|
|
['All'].concat(
|
|
published_versions.map { |p|
|
|
[
|
|
p.version_number
|
|
]
|
|
})),
|
|
{
|
|
id: 'version-selector'
|
|
} %>
|
|
</div>
|
|
<div class="linked-children-datatable">
|
|
<table id="linked-children-table" class="table" data-source="<%= linked_children_datatable_protocol_path(protocol: protocol) %>">
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
<% else %>
|
|
<div class="no-linked-children">
|
|
<em><%= t("protocols.index.linked_children.no_linked_children") %></em>
|
|
</div>
|
|
<% end %>
|