.container .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h3.text-center Cars %hr = link_to 'Add New Car', new_car_path, class: 'btn btn-success btn-block btn-lg', data: { 'no-turbolink'=>true} %hr .col-lg-3.col-md-3.col-sm-12.col-xs-12 =render 'layouts/admin/side_menu' .col-lg-9.col-md-9.col-sm-12.col-xs-12 %table.table.table-striped.table-bordered.table-hover %tr %th.text-center Image %th.text-center Title %th.text-center Brand (Model) %th.text-center Price day %th.text-center Price week %th.text-center %th.text-center %th.text-center - @cars.each do |car| %tr %td = image_tag(car.ImagesCars.order("position").first.image.thumblittle.url, class: 'img-thumbnail') unless car.ImagesCars.blank? %td= car.title_en %td - @car_brands.each do |car_brand| - if car.brand_id == car_brand.id = car_brand.brand - @car_models.each do |car_model| - if car.model_id == car_model.id = "(" + car_model.model + ")" %td= car.price_day %td= car.price_week %td= link_to 'Show', car, class: 'btn btn-primary' %td= link_to 'Edit', edit_car_path(car), class: 'btn btn-warning', data: { 'no-turbolink'=>true} %td= link_to 'Destroy', car, :method => :delete, :data => { confirm: 'Are you sure?' }, class: 'btn btn-danger' %tr %th{:style => "text-align: center;"} Info(Private) %td{:colspan => "7"} = raw(car.p_info) %br