mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 23:15:34 +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>
|
<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">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<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>
|
<a class="btn btn-default-link btn-open-file" <%= can_import_protocols(@current_team) ? 'data-action="import"' : 'disabled="disabled"' %>>
|
||||||
<% end %>
|
<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>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= link_to import_protocols_path(@protocol, format: :json), remote: true, data: { action: "import"} do %>
|
<%= 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>
|
<span class="glyphicon glyphicon-file"></span> <%= "from protocols.io file(.json)" %></a>
|
||||||
|
|
Loading…
Reference in a new issue