Merge pull request #2940 from mlorb/ml-sci-5034

Expose the new step button on task [SCI-5034]
This commit is contained in:
mlorb 2020-11-10 13:10:55 +01:00 committed by GitHub
commit a71e8ef9cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 11 deletions

View file

@ -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 {

View file

@ -116,10 +116,6 @@
padding-right: 5px;
}
}
.dropdown {
margin-right: 5px;
}
}
}
}

View file

@ -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">

View file

@ -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>