.container .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h3.text-center Yachts %hr = link_to 'New Yacht', new_yacht_path, class: 'btn btn-success btn-lg btn-block', 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 Image %th Title %th Brand (Model) %th Price hour %th Price day %th %th %th - @yachts.each do |yacht| %tr %td = image_tag(yacht.ImagesYachts.order("position").first.image.thumblittle.url, class: 'img-thumbnail') unless yacht.ImagesYachts.blank? %td= yacht.title_en %td - @yacht_brands.each do |yacht_brand| - if yacht.brand_id == yacht_brand.id = yacht_brand.brand - @yacht_models.each do |yacht_model| - if yacht.model_id == yacht_model.id = "(" + yacht_model.model + ")" %td= yacht.price_hour %td= yacht.price_day %td= link_to 'Show', yacht, class: 'btn btn-primary' %td= link_to 'Edit', edit_yacht_path(yacht), class: 'btn btn-warning', data: { 'no-turbolink'=>true} %td= link_to 'Destroy', yacht, :method => :delete, :data => { confirm: 'Are you sure?' }, class: 'btn btn-danger' %tr %th{:style => "text-align: center;"} Info(Private) %td{:colspan => "7"} = raw(yacht.p_info) %br