Merge pull request #502 from Ducz0r/lm-sci-1073-fix

Fix protocol state buttons a bit [SCI-1073]
This commit is contained in:
Luka Murn 2017-03-02 09:02:52 +01:00 committed by GitHub
commit 808fdf6744

View file

@ -1,16 +1,20 @@
<div class="btn-group pull-right"> <div class="pull-right">
<% if !@my_module.completed? %> <div class="btn-group">
<div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>"> <% if !@my_module.completed? %>
<button class="btn btn-primary"> <div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
<%= t("my_modules.buttons.complete") %> <button class="btn btn-primary">
</button> <span class="glyphicon glyphicon-ok"></span>
</div> <%= t("my_modules.buttons.complete") %>
<% else @my_module.completed? %> </button>
<div data-action="uncomplete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>"> </div>
<button class="btn btn-default"> <% else @my_module.completed? %>
<%= t("my_modules.buttons.uncomplete") %> <div data-action="uncomplete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
</button> <button class="btn btn-greyed">
</div> <span class="glyphicon glyphicon-remove"></span>
<% end %> <%= t("my_modules.buttons.uncomplete") %>
</div> </button>
<span data-hook="my_module-protocol-buttons"></span> </div>
<% end %>
</div>
<span data-hook="my_module-protocol-buttons"></span>
</div>