mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 22:51:24 +08:00
55 lines
2.5 KiB
Text
55 lines
2.5 KiB
Text
<template id="protocolGeneralToolbar">
|
|
<div class="left-general-toolbar">
|
|
<% if can_create_protocols_in_repository?(@current_team) %>
|
|
<button data-toggle="modal"
|
|
data-target="#newProtocolModal"
|
|
class="btn btn-primary only-active"
|
|
title="<%= t("protocols.index.create_new_tooltip") %>"
|
|
>
|
|
<span class="sn-icon sn-icon-new-task"></span>
|
|
<span class="hidden-xs"><%= t("protocols.index.create_new") %></span>
|
|
</button>
|
|
|
|
<div id="protocol-import-group" class="relative sci-btn-group only-active" role="group">
|
|
<button class="btn btn-light" title="<%= t("protocols.index.import_tooltip") %>"
|
|
data-toggle="dropdown"
|
|
aria-haspopup="true"
|
|
aria-expanded="false">
|
|
<span class="sn-icon sn-icon-import"></span><span class="hidden-xs"><%= t("protocols.index.import") %></span>
|
|
</button>
|
|
|
|
<ul class="dropdown-menu rounded !p-2.5 sn-shadow-menu-sm">
|
|
<li>
|
|
<a class="btn-open-file !pl-3 !py-2.5 hover:!bg-sn-super-light-blue rounded !text-sn-blue data-action='import'" >
|
|
<span><%= t('protocols.index.import_eln') %></span>
|
|
<input type="file" value="" accept=".eln" data-role="import-file-input"
|
|
data-team-id="<%= @current_team.id %>" data-import-url="<%= import_protocols_path %>">
|
|
</a>
|
|
</li>
|
|
<% if Protocol.docx_parser_enabled?%>
|
|
<li>
|
|
<a class="btn-open-file btn-beta-icon !pl-3 mt-px !py-2.5 hover:!bg-sn-super-light-blue !text-sn-blue rounded data-action='import'" >
|
|
<span><%= t('protocols.index.import_docx')%></span>
|
|
<input type="file" value="" accept=".docx" data-role="import-file-input"
|
|
data-team-id="<%= @current_team.id %>" data-import-url="<%= import_protocols_path %>">
|
|
</a>
|
|
</li>
|
|
<% end %>
|
|
<li>
|
|
<%= link_to t("protocols.index.import_protocols_io"),
|
|
'',
|
|
class: '!pl-3 !py-2.5 hover:!bg-sn-super-light-blue mt-px !text-sn-blue rounded',
|
|
data: { target: '#protocolsioModal', toggle: 'modal' } %>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<%= 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),
|
|
} %>
|
|
</template>
|