From c58c039e3c0bc5d193aa74427d878ea2af569e7b Mon Sep 17 00:00:00 2001 From: Ilya Konanykhin Date: Thu, 22 Dec 2016 23:21:41 +0600 Subject: [PATCH] BS3: edit task list. --- app/views/task_lists/edit.haml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/app/views/task_lists/edit.haml b/app/views/task_lists/edit.haml index ff65425..a21b8a5 100644 --- a/app/views/task_lists/edit.haml +++ b/app/views/task_lists/edit.haml @@ -1,16 +1,20 @@ = link_to_dashboard -%h2 Task List +%h1 Task List + %h3 - %a{ href: bike_path(@task_list.item)}#{@task_list.item.shop_id} #{@task_list.item.bike_brand} + = link_to bike_path(@task_list.item) do + #{@task_list.item.shop_id}: #{@task_list.item.bike_brand} + %h4 #{@task_list.item.model} -%p - .control-group +%fieldset + .form-group - @task_list.tasks.each do |task| - .controls - %input{class: "task_list_task", type: "checkbox", "data-id" => task.id, checked: task.done} - #{task.task} - .control-group - .controls - %input{id: "update_tasks_submit", value: "Save Changes", type: "button", class: "btn btn-lg btn-block btn-primary disabled", "data-url" => "#{api_update_task_path}"} + .checkbox + %label + = check_box_tag '', '', task.done, class: 'task_list_task', type: 'checkbox', "data-id": task.id + = task.task + + .form-group + = button_tag 'Save Changes', id: 'update_tasks_submit', class: 'btn btn-primary disabled', "data-url": "#{api_update_task_path}"