mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Fix protocol state buttons a bit
Closes SCI-1073.
This commit is contained in:
parent
634336e1a4
commit
3d7f09bde6
1 changed files with 20 additions and 16 deletions
|
@ -1,16 +1,20 @@
|
|||
<div class="btn-group pull-right">
|
||||
<% if !@my_module.completed? %>
|
||||
<div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
|
||||
<button class="btn btn-primary">
|
||||
<%= t("my_modules.buttons.complete") %>
|
||||
</button>
|
||||
</div>
|
||||
<% else @my_module.completed? %>
|
||||
<div data-action="uncomplete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
|
||||
<button class="btn btn-default">
|
||||
<%= t("my_modules.buttons.uncomplete") %>
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<span data-hook="my_module-protocol-buttons"></span>
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<% if !@my_module.completed? %>
|
||||
<div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
|
||||
<button class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
<%= t("my_modules.buttons.complete") %>
|
||||
</button>
|
||||
</div>
|
||||
<% else @my_module.completed? %>
|
||||
<div data-action="uncomplete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
|
||||
<button class="btn btn-greyed">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
<%= t("my_modules.buttons.uncomplete") %>
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<span data-hook="my_module-protocol-buttons"></span>
|
||||
</div>
|
Loading…
Reference in a new issue