2023-03-08 22:15:41 +08:00
|
|
|
<% published_versions = protocol.published_versions_with_original.order(version_number: :desc)%>
|
2016-07-21 19:11:15 +08:00
|
|
|
|
2023-03-21 17:59:31 +08:00
|
|
|
<% if protocol.all_linked_children.any? %>
|
2023-03-08 22:15:41 +08:00
|
|
|
<div class="version-dropdown">
|
2023-03-12 21:10:07 +08:00
|
|
|
<%= label_tag "version-selector".to_sym, t("protocols.index.linked_children.show_version") %>
|
2023-03-08 22:15:41 +08:00
|
|
|
<%= select_tag "version",
|
|
|
|
options_for_select(
|
|
|
|
['All'].concat(
|
|
|
|
published_versions.map { |p|
|
|
|
|
[
|
|
|
|
p.version_number
|
|
|
|
]
|
|
|
|
})),
|
|
|
|
{
|
|
|
|
id: 'version-selector'
|
|
|
|
} %>
|
2016-07-21 19:11:15 +08:00
|
|
|
</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 %>
|
2023-03-13 22:19:28 +08:00
|
|
|
<div class="no-linked-children">
|
2016-07-21 19:11:15 +08:00
|
|
|
<em><%= t("protocols.index.linked_children.no_linked_children") %></em>
|
|
|
|
</div>
|
2023-03-08 22:15:41 +08:00
|
|
|
<% end %>
|