mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 14:46:00 +08:00
36 lines
1.5 KiB
Text
36 lines
1.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"
|
|
>
|
|
<span class="fas fa-plus"></span>
|
|
<span class="hidden-xs"><%= t("protocols.index.create_new") %></span>
|
|
</button>
|
|
|
|
<div id="protocol-import-group" class="sci-btn-group only-active" role="group">
|
|
<button class="btn btn-light btn-open-file"
|
|
data-toggle="dropdown"
|
|
aria-haspopup="true"
|
|
aria-expanded="false">
|
|
<span class="fas fa-upload"></span><span class="hidden-xs"><%= t("protocols.index.import") %></span>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<a class="btn-link-alt btn-default-link btn-open-file" data-action="import">
|
|
<span><%= t("protocols.index.import_alt") %></span>
|
|
<input type="file" value="" accept=".eln" data-role="import-file-input"
|
|
data-team-id="<%= @current_team.id %>" data-import-url="<%= import_protocols_path %>"
|
|
<%= 'disabled="disabled"' unless can_create_protocols_in_repository?(@current_team) %>>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<%= link_to t("protocols.index.import_protocols_io"), '', data: { target: '#protocolsioModal', toggle: 'modal' } %>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</template>
|