From b503ec6fbded80445aa36f90387326a17cdf0e32 Mon Sep 17 00:00:00 2001 From: Ilya Konanykhin Date: Tue, 27 Dec 2016 09:53:47 +0600 Subject: [PATCH] BS3: cleanup --- app/views/bikes/new.html.haml | 2 +- app/views/bikes/show.html.haml | 2 +- app/views/devise/passwords/new.html.haml | 2 +- app/views/devise/sessions/new.html.haml | 4 ++-- app/views/layouts/application.html.haml | 2 +- app/views/site/index.html.haml | 2 +- app/views/task_lists/edit.haml | 2 +- app/views/time_entries/index.haml | 2 +- app/views/time_entries/new.haml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/bikes/new.html.haml b/app/views/bikes/new.html.haml index 90d06b1..20bb3fc 100644 --- a/app/views/bikes/new.html.haml +++ b/app/views/bikes/new.html.haml @@ -61,7 +61,7 @@ .form-group .input-group - = number_field_tag nil, nil, id: 'seat_tube_height', placeholder: 'Seat Tube', min: 0, max: 100, class: "form-control" + = number_field_tag nil, nil, id: 'seat_tube_height', placeholder: 'Seat Tube', min: 0, max: 100, class: 'form-control' .input-group-addon cm .help-block diff --git a/app/views/bikes/show.html.haml b/app/views/bikes/show.html.haml index 047a575..a80aa2e 100644 --- a/app/views/bikes/show.html.haml +++ b/app/views/bikes/show.html.haml @@ -30,7 +30,7 @@ - unless @bike.color.nil? %dt Color %dd - .bike-color{style: "background-color: ##{@bike.color}"} #{@bike.color} + .bike-color(style="background-color: ##{@bike.color}")= @bike.color - if @task_list - tasks = @task_list.tasks.to_a diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index 155e406..d1e5b3e 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -2,7 +2,7 @@ .row .col-xs-12.col-sm-6.col-lg-4 - = form_for resource, as: resource_name, url: password_path(resource_name), html: {method: :post } do |f| + = form_for resource, as: resource_name, url: password_path(resource_name), html: {method: :post} do |f| = devise_error_messages! %fieldset diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 45314c1..a144f0a 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -25,8 +25,8 @@ .pull-right %span.btn-group - = f.button 'CHECK IN', id: 'checkin', name: 'checkin', type: 'button', value: 'CHECK IN', class: 'btn btn-xsя btn-success' - = f.button 'CHECK OUT', id: 'checkout', name: 'checkout', type: 'button', value: 'CHECK OUT', class: 'btn btn-xsя btn-danger' + = f.button 'Check in', id: 'checkin', name: 'checkin', type: 'button', class: 'btn btn-success' + = f.button 'Check out', id: 'checkout', name: 'checkout', type: 'button', class: 'btn btn-danger' .clearfix diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index c4dcbe3..0cfca60 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,5 +1,5 @@ !!! 5 -%html{lang: 'en'} +%html(lang="en") %head %meta(charset="utf-8")/ %meta(name="viewport" content="width=device-width" initial-scale="1.0")/ diff --git a/app/views/site/index.html.haml b/app/views/site/index.html.haml index ecc24a8..54e75df 100644 --- a/app/views/site/index.html.haml +++ b/app/views/site/index.html.haml @@ -28,4 +28,4 @@ .row.fieldset .col-xs-12.col-sm-3.col-lg-2 %p - %input{id: 'index_logout', value: 'Logout', type: 'button', class: 'btn btn-danger btn-block', 'data-url' => destroy_user_session_path} \ No newline at end of file + = button_tag 'Logout', id: 'index_logout', class: 'btn btn-danger btn-block', data: {url: destroy_user_session_path} \ No newline at end of file diff --git a/app/views/task_lists/edit.haml b/app/views/task_lists/edit.haml index 5fe6377..dcc8399 100644 --- a/app/views/task_lists/edit.haml +++ b/app/views/task_lists/edit.haml @@ -6,7 +6,7 @@ = link_to bike_path(@task_list.item) do #{@task_list.item.shop_id}: #{@task_list.item.bike_brand} -%h4 #{@task_list.item.model} +%h4= @task_list.item.model %fieldset .form-group diff --git a/app/views/time_entries/index.haml b/app/views/time_entries/index.haml index 94ce43a..bd9f502 100644 --- a/app/views/time_entries/index.haml +++ b/app/views/time_entries/index.haml @@ -18,7 +18,7 @@ - @user_time_entries.each do |entry| -# data: {start_date: ..} gets transformed to data-start-date instead of data-start_date, we don't want this %tr{data: {id: entry.id, description: entry.description, duration: entry.duration_in_hours}, - "data-start_date" => entry.start_date.to_date.to_formatted_s(:rfc822)} + 'data-start_date' => entry.start_date.to_date.to_formatted_s(:rfc822)} %td= entry.start_date.to_date.to_formatted_s(:rfc822) %td= entry.duration_in_hours %td= entry.type diff --git a/app/views/time_entries/new.haml b/app/views/time_entries/new.haml index 6bc5ffd..c765f24 100644 --- a/app/views/time_entries/new.haml +++ b/app/views/time_entries/new.haml @@ -53,4 +53,4 @@ .control-group .controls - = button_tag 'Add Time Entry', id: 'add_time_entry_submit', class: 'btn btn-primary', data: {url: "#{api_create_time_entry_path}", forward: "#{"."}"} + = button_tag 'Add Time Entry', id: 'add_time_entry_submit', class: 'btn btn-primary', data: {url: api_create_time_entry_path, forward: '.'}