%script{:defer => "defer", :src => "https://maps.googleapis.com/maps/api/js?key=AIzaSyBwBucyDcI9NeFRe1NqxRzPeENTQWTpN5k&libraries=places&callback=initAutocomplete&"} = javascript_include_tag Ckeditor.cdn_url #hotel_jquery_start .row = simple_form_for(@hotel, html: { role: 'form', multipart: true }) do |f| .row .col-md-12 - if @hotel.errors.any? #error_explanation %h3.text-center %mark = "#{pluralize(@hotel.errors.count, 'error')} prohibited this hotel from being saved:" %ul - @hotel.errors.full_messages.each do |msg| %li.alert.alert-danger.fade.in{role: 'alert'} %button.close{'data-dismiss' => 'alert', type: 'button'} %span{'aria-hidden' => 'true'} × %span.sr-only Close %strong= msg.to_s.humanize .col-md-12 - if @hotel.ref = f.input :ref, input_html: {class: '', :type => "hidden"}, :label => false - else - if Hotel.exists? - @ref2_id = Hotel.last.id.to_i+1.to_i - @ref2_id = @ref2_id.to_s + "-" + request.session_options[:id].to_s + "-" + current_admintg.id.to_s - else - @ref2_id = "1" + "-" + request.session_options[:id].to_s + "-" + current_admintg.id.to_s = f.input :ref, input_html: {value: @ref2_id, class: '', :type => "hidden"}, :label => false %h4 Technical Options (Opciones Técnicas): %hr .row .field.col-md-3.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :add_tgs, inline_label: 'The Grand Selection', label: false .field.col-md-3.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :add_stm, inline_label: 'St.Moritz', label: false .field.col-md-3.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :add_alp, inline_label: 'Alp Courchevel', label: false .field.col-md-3.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :add_cls, inline_label: 'Cabo San Lucas', label: false .row .field.col-md-3.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :featured, inline_label: 'Featured (Destacado)', label: false .field.col-md-3.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :hidden, inline_label: 'Hidden (Oculto)', label: false .col-md-12.col-xs-12 %h4 Location (Ubicación): %hr .field.form-group.col-md-2.col-xs-6 = f.label :Country = f.collection_select :country_id, Country.order(:id), :id, :en, {prompt: "Select Country: "}, {class: "form-control"} .field.form-group.col-md-2.col-xs-6 = f.label :City = f.grouped_collection_select :province_id, Country.order(:id), :provinces, :en, :id, :en, {prompt: "Select City: "}, {class: "form-control"} .field.form-group.col-md-2.col-xs-6 = f.label :Area = f.grouped_collection_select :region_id, Province.order(:id), :regions, :en, :id, :en, {prompt: "Select Area: "}, {class: "form-control"} .field.form-group.col-md-2.col-xs-6 = f.label :Location = f.grouped_collection_select :location_id, Region.order(:id), :locations, :en, :id, :en, {prompt: "Select Location: "}, {class: "form-control"} %br .row .col-lg-12 %h4 Features (Características): %hr .field.form-group.col-md-2.col-xs-4 = f.input :stars, collection: [['★ (1)','1'], ['★S (1S)','1S'], ['★★ (2)','2'], ['★★S (2S)','2S'], ['★★★ (3)','3'], ['★★★S (3S)','3S'], ['★★★★ (4)','4'], ['★★★★S (4S)','4S'], ['★★★★★ (5)','5'], ['★★★★★S (5S)','5S']], :selected => @hotel.stars, :label => 'Stars ★: ', :include_blank => 'Stars ★: ' .col-lg-12 .field.form-group.col-md-2.col-xs-4 = f.input :distance_sea, collection: [['up to 100m','100m'], ['up to 500m','500m'], ['up to 1km','1km'], ['up to 5km','5km'], ['up to 10km','10km']], :selected => @hotel.distance_sea, :label => 'Distance to sea: ', :include_blank => 'Select distance: ' .field.form-group.col-md-2.col-xs-4 = f.input :distance_lake, collection: [['up to 100m','100m'], ['up to 500m','500m'], ['up to 1km','1km'], ['up to 5km','5km'], ['up to 10km','10km']], :selected => @hotel.distance_lake, :label => 'Distance to lake: ', :include_blank => 'Select distance: ' .field.form-group.col-md-2.col-xs-4 = f.input :distance_centre, collection: [['Central','central'], ['up to 1km','1km'], ['up to 5km','5km'], ['up to 10km','10km']], :selected => @hotel.distance_centre, :label => 'Distance to centre: ', :include_blank => 'Select distance: ' .field.form-group.col-md-2.col-xs-4 = f.input :distance_ski_mountain_lift, collection: [['up to 100m','100m'], ['up to 500m','500m'], ['up to 1km','1km'], ['up to 5km','5km'], ['up to 10km','10km']], :selected => @hotel.distance_ski_mountain_lift, :label => 'Distance to ski lift: ', :include_blank => 'Select distance: ' .col-lg-12 .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :wifi, inline_label: 'Wifi', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :parking, inline_label: 'Parking', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :sky_in_out, inline_label: 'Ski-in Ski-out', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :pool_indoor, inline_label: 'Pool Indoor', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :pool_outdoor, inline_label: 'Pool Outdoor', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :jacuzzi, inline_label: 'Jacuzzi', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :spa, inline_label: 'SPA', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :sauna, inline_label: 'Hammam / Sauna', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :garden, inline_label: 'Garden', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :beach_front, inline_label: 'Beach Front', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :sea_view, inline_label: 'Sea View', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :garden_view, inline_label: 'Garden View', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :air_conditioning, inline_label: 'Air conditioning', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :tv, inline_label: 'TV', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :pets_allowed, inline_label: 'Pets allowed', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :wheel_chairs, inline_label: 'Suitable for wheelchairs ', label: false .col-lg-12 %h4 Activities in resort: %hr .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :skiing_snowboarding, inline_label: 'Skiing/Snowboarding ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :cycling, inline_label: 'Cycling ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :cross_country_skiing, inline_label: 'Cross country skiing ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :golf, inline_label: 'Golf ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :hiking, inline_label: 'Hiking ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :mountain_biking, inline_label: 'Mountain biking ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :riding, inline_label: 'Riding ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :sailing, inline_label: 'Sailing ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :surfing, inline_label: 'Surfing ', label: false .field.col-md-3.col-xs-6{ style: 'background-color: #e7e7e7;'} = f.input :tennis, inline_label: 'Tennis ', label: false %br .col-md-12.col-xs-12 %h4 = f.input :map, inline_label: '¿Google map?', label: false #map-activate .col-lg-3.col-md-3.col-sm-4.col-xs-6 = f.input :lat, placeholder: 'lat', label: 'Latitude: ' .col-lg-3.col-md-3.col-sm-4.col-xs-6 = f.input :lng, placeholder: 'lng', label: 'Longitude: ' %br %br %input#pac-input.controls{:placeholder => "Search Box", :type => "text"} #map{:style => "width: 99%; height: 400px;"} %br .col-md-12.col-xs-12 = f.input :image, as: :file, input_html: { class: 'form-control', multiple: true, name: 'ImagesHotels[image][]'}, label: 'Photos' .col-lg-3.col-md-3.col-sm-4.col-xs-6 = f.input :iframe_youtube, placeholder: 'ej: 5RljHbKC3Kc', label: 'Video (Youtube): ' .row %hr %ul.nav.nav-tabs.panel{role: 'tablist', style: 'background-color: #E0F1FF;' } %li %a{ href: '#English', role: 'tab', 'data-toggle' => 'tab' } English %li %a{ href: '#Frances', role: 'tab', 'data-toggle' => 'tab' } Frances %li %a{ href: '#Russian', role: 'tab', 'data-toggle' => 'tab' } Russian %li %a{ href: '#Spanish', role: 'tab', 'data-toggle' => 'tab' } Spanish %li %a{ href: '#Info', role: 'tab', 'data-toggle' => 'tab' } Info (Private) %li %a{ href: '#X', role: 'tab', 'data-toggle' => 'tab' } × %div.tab-content %div.tab-pane#English %br .field.col-md-12.form-group = f.input :title_en, input_html: { class: 'form-control' }, :label => 'Title EN (60 max.)', :maxlength => '60' .field.col-md-12.form-group = f.input :description_en, input_html: { class: 'form-control' }, :label => 'Description for search engines EN (160 max.)', :maxlength => '160' .field.col-md-12.form-group = f.cktext_area :text_en, :rows => 40, :cols => 120 %div.tab-pane#Frances %br .field.col-md-12.form-group = f.input :title_fr, input_html: { class: 'form-control' }, :label => 'Title FR (60 max.)', :maxlength => '60' .field.col-md-12.form-group = f.input :description_fr, input_html: { class: 'form-control' }, :label => 'Description for search engines FR (160 max.)', :maxlength => '160' .field.col-md-12.form-group = f.cktext_area :text_fr, :rows => 40, :cols => 120 %div.tab-pane#Russian %br .field.col-md-12.form-group = f.input :title_ru, input_html: { class: 'form-control' }, :label => 'Title RU (60 max.)', :maxlength => '60' .field.col-md-12.form-group = f.input :description_ru, input_html: { class: 'form-control' }, :label => 'Description for search engines RU (160 max.)', :maxlength => '160' .field.col-md-12.form-group = f.cktext_area :text_ru, :rows => 40, :cols => 120 %div.tab-pane#Spanish %br .field.col-md-12.form-group = f.input :title_es, input_html: { class: 'form-control' }, :label => 'Title ES (60 max.)', :maxlength => '60' .field.col-md-12.form-group = f.input :description_es, input_html: { class: 'form-control' }, :label => 'Description for search engines ES (160 max.)', :maxlength => '160' .field.col-md-12.form-group = f.cktext_area :text_es, :rows => 40, :cols => 120 %div.tab-pane#Info %br .field.col-md-12.form-group = f.cktext_area :p_info, :rows => 40, :cols => 120 %div.tab-pane#X .row %hr .actions.col-md-12.col-xs-12 = f.submit 'Save', class: 'btn btn-lg btn-primary btn-block', id: 'save' #hotel_not_valid #hotel_valid