mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 15:05:26 +08:00
prvi (star gumb) v dropdownu sedaj deluje
This commit is contained in:
parent
f668f60237
commit
0f4dadefa9
1 changed files with 11 additions and 3 deletions
|
@ -68,10 +68,18 @@
|
|||
<a class="btn btn-default btn-open-file" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#"><span class="glyphicon glyphicon-import"></span><span class="hidden-xs"> <%= "Import protocol" %></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<%= link_to import_protocols_path(@protocol, format: :json), remote: true, data: { action: "import"} do %>
|
||||
<span class="glyphicon glyphicon-file"></span> <%= "from SciNote protocol file(.eln)" %></a>
|
||||
<% end %>
|
||||
|
||||
<a class="btn btn-default-link btn-open-file" <%= can_import_protocols(@current_team) ? 'data-action="import"' : 'disabled="disabled"' %>>
|
||||
<span class="glyphicon glyphicon-file"></span>
|
||||
<span class="hidden-xs"> <%= t("protocols.index.import_alt") %></span>
|
||||
<input type="file" value="" accept=".eln" data-role="import-file-input"
|
||||
data-team-id="<%= @current_team.id %>"
|
||||
data-type="<%= @type %>" data-import-url="<%= import_protocols_path %>"
|
||||
<%= 'disabled="disabled"' unless can_import_protocols(@current_team) %>>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<%= link_to import_protocols_path(@protocol, format: :json), remote: true, data: { action: "import"} do %>
|
||||
<span class="glyphicon glyphicon-file"></span> <%= "from protocols.io file(.json)" %></a>
|
||||
|
|
Loading…
Reference in a new issue