mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-30 20:23:14 +08:00
Merge pull request #2940 from mlorb/ml-sci-5034
Expose the new step button on task [SCI-5034]
This commit is contained in:
commit
a71e8ef9cf
4 changed files with 6 additions and 11 deletions
|
@ -206,10 +206,9 @@
|
|||
|
||||
function toggleButtons(show) {
|
||||
if (show) {
|
||||
$("[data-action='new-step']:first").show();
|
||||
$("[data-action='new-step']").show();
|
||||
$("[data-action='edit-step']").show();
|
||||
if ($('#steps .step').length > 0) {
|
||||
$("[data-action='new-step']:last").show();
|
||||
$(".expand-all-steps").show();
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -116,10 +116,6 @@
|
|||
padding-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,8 +93,7 @@
|
|||
</div>
|
||||
</a>
|
||||
<%= render partial: "my_modules/protocols/protocol_status_bar" %>
|
||||
<div class="actions-block">
|
||||
<%= render partial: "my_modules/protocols/protocol_options_dropdown" %>
|
||||
<div class="sci-btn-group actions-block">
|
||||
<% if can_manage_protocol_in_module?(@protocol) %>
|
||||
<a href="#"
|
||||
class="btn btn-primary"
|
||||
|
@ -104,6 +103,7 @@
|
|||
<span><%=t "protocols.steps.new_step" %></span>
|
||||
</a>
|
||||
<% end %>
|
||||
<%= render partial: "my_modules/protocols/protocol_options_dropdown" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse in" id="protocol-container" aria-expanded="true">
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
<a href="#"
|
||||
class="btn btn-primary"
|
||||
data-action="new-step"
|
||||
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>">
|
||||
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>"
|
||||
style="<%= @protocol.steps.empty? ? 'display: none;' : '' %>">
|
||||
<span class="fas fa-plus" aria-hidden="true"></span>
|
||||
<span class="hidden-xs"><%=t "protocols.steps.new_step" %></span>
|
||||
</a>
|
||||
|
@ -34,8 +35,7 @@
|
|||
<a href="#"
|
||||
class="btn btn-primary"
|
||||
data-action="new-step"
|
||||
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>"
|
||||
style="<%= @protocol.steps.empty? ? 'display: none;' : '' %>">
|
||||
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>">
|
||||
<span class="fas fa-plus" aria-hidden="true"></span>
|
||||
<span class="hidden-xs"><%=t "protocols.steps.new_step" %></span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue