2022-12-19 20:18:24 +08:00
|
|
|
<template id="protocolGeneralToolbar">
|
|
|
|
<div class="left-general-toolbar">
|
2023-03-14 16:12:54 +08:00
|
|
|
<% if can_create_protocols_in_repository?(@current_team) %>
|
|
|
|
<button data-toggle="modal"
|
|
|
|
data-target="#newProtocolModal"
|
|
|
|
class="btn btn-primary only-active"
|
2023-06-19 14:04:58 +08:00
|
|
|
title="<%= t("protocols.index.create_new_tooltip") %>"
|
2023-03-14 16:12:54 +08:00
|
|
|
>
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-new-task"></span>
|
2023-03-14 16:12:54 +08:00
|
|
|
<span class="hidden-xs"><%= t("protocols.index.create_new") %></span>
|
2022-12-19 20:18:24 +08:00
|
|
|
</button>
|
2023-03-14 16:12:54 +08:00
|
|
|
|
|
|
|
<div id="protocol-import-group" class="sci-btn-group only-active" role="group">
|
2023-06-21 16:00:46 +08:00
|
|
|
<button class="btn btn-light btn-open-file" title="<%= t("protocols.index.import_tooltip") %>"
|
2023-03-14 16:12:54 +08:00
|
|
|
data-toggle="dropdown"
|
|
|
|
aria-haspopup="true"
|
|
|
|
aria-expanded="false">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-import"></span><span class="hidden-xs"><%= t("protocols.index.import") %></span>
|
2023-03-14 16:12:54 +08:00
|
|
|
</button>
|
|
|
|
|
2022-12-19 20:18:24 +08:00
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li>
|
2023-06-19 21:45:22 +08:00
|
|
|
<a class="btn-link-alt btn-secondary-link btn-open-file" <%= can_create_protocols_in_repository?(@current_team) ? 'data-action="import"' : 'disabled="disabled"' %>>
|
2022-12-19 20:18:24 +08:00
|
|
|
<span><%= t("protocols.index.import_alt") %></span>
|
|
|
|
<input type="file" value="" accept=".eln" data-role="import-file-input"
|
2023-03-14 16:12:54 +08:00
|
|
|
data-team-id="<%= @current_team.id %>" data-import-url="<%= import_protocols_path %>">
|
2022-12-19 20:18:24 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
2023-03-13 18:25:04 +08:00
|
|
|
<li class="import-protocols-io">
|
2023-02-21 18:03:06 +08:00
|
|
|
<%= link_to t("protocols.index.import_protocols_io"), '', data: { target: '#protocolsioModal', toggle: 'modal' } %>
|
2022-12-19 20:18:24 +08:00
|
|
|
</li>
|
|
|
|
</ul>
|
2023-03-14 16:12:54 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2022-12-19 20:18:24 +08:00
|
|
|
</div>
|
2023-05-09 20:53:50 +08:00
|
|
|
<%= render partial: 'shared/state_view_switch', locals: {
|
|
|
|
disabled: false,
|
|
|
|
switchable: true,
|
|
|
|
archived: templates_view_mode_archived?(type: @type),
|
|
|
|
active_url: protocols_path(type: :active),
|
|
|
|
archived_url: protocols_path(type: :archived),
|
|
|
|
} %>
|
2022-12-19 20:18:24 +08:00
|
|
|
</template>
|