|
1 | | -<h1><%= @task_list.name %></h1> |
2 | | - |
3 | | -<%= link_to "Edit", edit_polymorphic_path([@task_list.taskable, @task_list]), class: "btn btn-warning" %> |
4 | | - |
5 | | -<%= button_to "Delete", polymorphic_path([@task_list.taskable, @task_list]), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-danger btn-link" %> |
6 | | - |
7 | 1 | <h2>Tasks</h2> |
8 | 2 | <%= link_to "Add Task", new_polymorphic_path([@task_list.taskable, @task_list, :task]), class: "btn btn-primary" %> |
9 | 3 |
|
|
13 | 7 | <%= task.title %> - <%= task.status %> |
14 | 8 | <%= link_to "Edit", edit_polymorphic_path([@task_list.taskable, @task_list, task]) %> | |
15 | 9 |
|
16 | | - <%= button_to "Complete", polymorphic_path([@task_list.taskable, @task_list, task], action: :complete), method: :patch, class: "btn btn-success btn-link", data: { turbo: true } if task.status == "pending" %> |
| 10 | + <%= button_to "Complete", polymorphic_path([@task_list.taskable, @task_list, task], action: :complete), method: :patch, class: "btn btn-success btn-link", data: { turbo: true } if task.status == "pending" %> |
| 11 | + |
| 12 | + <%= button_to "Delete", polymorphic_path([@task_list.taskable, @task_list, task]), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-danger btn-link" %> |
| 13 | + |
| 14 | + <h3>Subtasks</h3> |
| 15 | + <div id="subtasks"> |
| 16 | + <%= turbo_frame_tag "task_steps" do %> |
| 17 | + <%= render task.task_steps %> |
| 18 | + <% end %> |
| 19 | + </div> |
17 | 20 |
|
18 | | - <%= button_to "Delete", polymorphic_path([@task_list.taskable, @task_list, task]), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-danger btn-link" %> |
| 21 | + <%= render "todoro/task_steps/form", task: task %> |
19 | 22 |
|
20 | | - </li> |
21 | | - <% end %> |
| 23 | + <% end %> |
22 | 24 | </ul> |
23 | 25 |
|
24 | 26 | <%= link_to "Back to Task Lists", polymorphic_path([@task_list.taskable, :task_lists]), class: "btn btn-secondary" %> |
0 commit comments