2017-03-03 23:36:52 +08:00
|
|
|
<div class="pull-right my_module-state-buttons">
|
2018-02-09 23:14:40 +08:00
|
|
|
<% if can_complete_module?(@my_module) %>
|
2020-04-28 18:30:43 +08:00
|
|
|
<div class="btn-group">
|
2017-03-06 23:01:04 +08:00
|
|
|
<% if !@my_module.completed? %>
|
|
|
|
<div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
|
2017-03-09 15:44:09 +08:00
|
|
|
<%= render 'my_modules/state_button_complete.html.erb' %>
|
2017-03-06 23:01:04 +08:00
|
|
|
</div>
|
2017-03-09 15:44:09 +08:00
|
|
|
<% else @my_module.completed? %>
|
2017-03-06 23:01:04 +08:00
|
|
|
<div data-action="uncomplete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
|
2017-03-09 15:44:09 +08:00
|
|
|
<%= render 'my_modules/state_button_uncomplete.html.erb' %>
|
2017-03-06 23:01:04 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2020-04-01 19:05:35 +08:00
|
|
|
<span data-hook="my_module-state-buttons"></span>
|
2018-02-09 23:14:40 +08:00
|
|
|
</div>
|