%script{:defer => "defer", :src => "https://maps.googleapis.com/maps/api/js?key=AIzaSyBwBucyDcI9NeFRe1NqxRzPeENTQWTpN5k&libraries=places&callback=initAutocomplete&"} #accommodation_jquery_start = javascript_include_tag Ckeditor.cdn_url = simple_form_for @accommodation, html: { role: 'form', multipart: true } do |f| .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 - if @accommodation.errors.any? -@refnew = 0 #error_explanation_x %h3.text-center %mark = "#{pluralize(@accommodation.errors.count, 'Error')} :" %ul - @accommodation.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 .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 - if @accommodation.ref = f.input :ref, input_html: {class: '', :type => "hidden"}, :label => false - else - if Accommodation.exists? - @ref2_id = Accommodation.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 .col-lg-3.col-md-3.col-sm-12.col-xs-12 = f.input :pag_web, collection: [ ['The Grand Selection','TGS'], ['Sale Marbella','SM'], ['Alp Courchevel','AC'], ['St.Moritz','STM'], ['Suites Banus','SB']], :selected => @accommodation.pag_web, :label => 'Page section: ' .col-lg-3.col-md-3.col-sm-12.col-xs-12 = f.input :pag_accommodation, collection: [['Apartment','apartment'], ['Penthouse','penthouse'], ['Villa','villa'], ['Chalet','chalet'], ['Land','land'], ['Commercial Property','commercial property'], ['Townhouse','townhouse'], ['Investment Project','investment project'], ['Room','room']], :selected => @accommodation.pag_accommodation, :label => 'Accommodation type: ' = f.input :pag_accommodation_ru, input_html: { class: '', :type => "hidden"}, :label => false = f.input :pag_accommodation_es, input_html: { class: '', :type => "hidden"}, :label => false = f.input :pag_accommodation_fr, input_html: { class: '', :type => "hidden"}, :label => false .col-lg-3.col-md-3.col-sm-12.col-xs-12 = f.input :offer, collection: [ ['No',0], ['Yes',1]], :selected => @accommodation.offer, :label => 'Offer: ' .col-lg-3.col-md-3.col-sm-12.col-xs-12 = f.input :ref_from, label: 'Reference to: ' .row .col-lg-3.col-md-3.col-sm-6.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :featured, inline_label: 'Featured (Destacado)', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :hidden, inline_label: 'Hidden (Oculto)', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.simple_fields_for :features_accommodation do |w| = w.input :calendar_active, inline_label: 'Show Calendar', label: false .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h5 Puente Romano WEB (The Grand Selection or Sale Marbella): .col-lg-3.col-md-3.col-sm-6.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :puente_romano, inline_label: 'Add to Puente Romano', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :puente_romano_featured, inline_label: 'Puente Romano Featured', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :puente_romano_hiden, inline_label: 'Puente Romano Hidden', label: false .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h4 Price: %hr .col-lg-2.col-md-3.col-sm-6.col-xs-6 = f.simple_fields_for :features_accommodation do |w| = w.input :price_night, input_html: { class: 'form-control' }, placeholder: '€ night', label: 'Price per night: ' .col-lg-2.col-md-3.col-sm-6.col-xs-6 = f.input :price_min, input_html: { class: 'form-control' }, placeholder: '€ week', label: 'Short term price: ' .col-lg-2.col-md-3.col-sm-6.col-xs-6 = f.input :price_max, input_html: { class: 'form-control' }, placeholder: '€ month', label: 'Long term price: ' .col-lg-2.col-md-2.col-sm-6.col-xs-6 = f.input :price, input_html: { class: 'form-control' }, placeholder: '99 € sell', label: 'Sell price: ' .col-lg-2.col-md-2.col-sm-6.col-xs-6 = f.input :offer_price, input_html: { class: 'form-control' }, placeholder: '100 € sell', label: 'Old price: ' .col-lg-2.col-md-2.col-sm-6.col-xs-6 %br = f.input :sold, inline_label: '¿SOLD?', label: false .row .col-lg-3.col-md-3.col-sm-6.col-xs-6 = f.input :community, input_html: { class: 'form-control' }, placeholder: '€ Community/Month', label: 'Community(Month): ' .col-lg-3.col-md-3.col-sm-6.col-xs-6 = f.input :garbage, input_html: { class: 'form-control' }, placeholder: '€ Garbage/Year', label: 'Garbage(Year): ' .col-lg-3.col-md-3.col-sm-6.col-xs-6 = f.input :local_rates, input_html: { class: 'form-control' }, placeholder: '€ Local Rates(IBI)', label: 'Local Rates(IBI): ' .col-lg-2.col-md-2.col-sm-6.col-xs-6 %br = f.input :bank_property, inline_label: '¿Bank Property?', label: false .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h4 Location (Ubicación): %hr .col-lg-2.col-md-2.col-sm-6.col-xs-6.form-group = f.label :Country = f.collection_select :country_id, Country.order(:id), :id, :en, {prompt: "Select Country: "}, {class: "form-control"} .col-lg-2.col-md-2.col-sm-6.col-xs-6.form-group = f.label :City = f.grouped_collection_select :province_id, Country.order(:id), :provinces, :en, :id, :en, {prompt: "Select City: "}, {class: "form-control"} .col-lg-2.col-md-2.col-sm-6.col-xs-6.form-group = f.label :Area = f.grouped_collection_select :region_id, Province.order(:id), :regions, :en, :id, :en, {prompt: "Select Area: "}, {class: "form-control"} .col-lg-2.col-md-2.col-sm-6.col-xs-6.form-group = f.label :Location = f.grouped_collection_select :location_id, Region.order(:id), :locations, :en, :id, :en, {prompt: "Select Location: "}, {class: "form-control"} .col-lg-2.col-md-2.col-sm-6.col-xs-6.form-group.jardin = f.input :jardin, collection: [ ['Select Garden:',''], ['Andalusian Garden','ag'], ['Persian Garden','pg'], ['Japanese Garden','jg']], :selected => @accommodation.jardin, :label => 'Garden: ' %br .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h4 Investment Project: %hr .col-lg-2.col-md-2.col-sm-4.col-xs-4 = f.input :n_apartments, input_html: { class: 'form-control' }, placeholder: 'Nº apartments', label: 'Apartments: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4 = f.input :n_penthouses, input_html: { class: 'form-control' }, placeholder: 'Nº penthouses', label: 'Penthouses: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4 = f.input :n_villas, input_html: { class: 'form-control' }, placeholder: 'Nº villas', label: 'Villas: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4 = f.input :n_chalets, input_html: { class: 'form-control' }, placeholder: 'Nº chalets', label: 'Chalets: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4 = f.input :n_lands, input_html: { class: 'form-control' }, placeholder: 'Nº lands', label: 'Lands: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4 = f.input :n_townhouses, input_html: { class: 'form-control' }, placeholder: 'Nº townhouses', label: 'Townhouses: ' .col-lg-4.col-md-4.col-sm-6.col-xs-6 = f.input :n_commercial_properties, input_html: { class: 'form-control' }, placeholder: 'Nº Commercial Properties', label: 'Commercial Properties: ' .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h4 Features (Características): %hr .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :m_plot, input_html: { class: 'form-control' }, placeholder: 'Plot m2', label: 'Plot m2: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :m_surface, input_html: { class: 'form-control' }, placeholder: 'Surface m2', label: 'Surface m2: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group %table %tr %td{:colspan => 2} .terrace = f.label 'Terrace m2: ' %tr %td .terrace2 = f.input :terrace, inline_label: '', label: false %td.field.form-group = f.input :terrace_m, input_html: { class: 'form-control' }, placeholder: 'Terrace M2', label: false .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :n_people, :collection => (1..40), :include_blank => 'Nº People: ', :label => 'Nº People: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :n_children, :collection => (1..20), :include_blank => 'Nº Children: ', :label => 'Nº Children: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :bedrooms, :collection => (1..20), :include_blank => 'Nº Bedrooms: ', :label => 'Nº Bedrooms: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :bathrooms, :collection => (1..20), :include_blank => 'Nº Bathrooms: ', :label => 'Nº Bathrooms: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group %table %tr %td{:colspan => 2} .terrace = f.label 'Nº Parkings: ' %tr %td .terrace2 = f.input :pargkind, inline_label: '', label: false %td.field.form-group = f.input :n_parking, :collection => (1..10), :include_blank => 'Nº Parkings: ', :label => false, input_html: { class: 'form-control' } .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :floor, input_html: { class: 'form-control' }, placeholder: 'Floor', label: 'Floor: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :n_floors, input_html: { class: 'form-control' }, placeholder: 'Nº Floors', label: 'Nº Floors: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :facing, collection: [['North','north'], ['South','south'], ['East','east'], ['West','west'], ['Northeast','northeast'], ['Northwest','northwest'], ['Southeast','southeast'], ['Southwest','southwest']], :selected => @accommodation.facing, :label => 'Facing: ', :include_blank => 'Select Facing: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = 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 => @accommodation.distance_sea, :label => 'Distance to sea: ', :include_blank => 'Select distance: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = 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 => @accommodation.distance_lake, :label => 'Distance to lake: ', :include_blank => 'Select distance: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = f.input :distance_centre, collection: [['Central','central'], ['up to 1km','1km'], ['up to 5km','5km'], ['up to 10km','10km']], :selected => @accommodation.distance_centre, :label => 'Distance to centre: ', :include_blank => 'Select distance: ' .col-lg-2.col-md-2.col-sm-4.col-xs-4.form-group = 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 => @accommodation.distance_ski_mountain_lift, :label => 'Distance to ski lift: ', :include_blank => 'Select distance: ' .row{ style: 'background-color: #e7e7e7;'} .col-lg-3.col-md-3.col-sm-6.col-xs-6 .field = f.input :wifi, inline_label: 'Wifi', label: false .field = f.input :air_conditioning, inline_label: 'Air conditioning', label: false .field = f.input :tv, inline_label: 'TV', label: false .field = f.simple_fields_for :features_accommodation do |w| = w.input :cinema_tv_room, inline_label: 'Cinema/tv room', label: false .field = f.input :lift_communal, inline_label: 'Lift Communal', label: false .field = f.input :lift_private, inline_label: 'Lift Private', label: false .field = f.input :dishwasher, inline_label: 'Dishwasher', label: false .field = f.input :washing_machine, inline_label: 'Washing machine', label: false .field = f.input :bbq, inline_label: 'BBQ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6 .field = f.input :pool_communal, inline_label: 'Pool Communal', label: false .field = f.input :pool_private, inline_label: 'Pool Private', label: false .field = f.input :pool_indoor, inline_label: 'Pool Indoor', label: false .field = f.input :heated_pool, inline_label: 'Heated Pool', label: false .field = f.input :jacuzzi, inline_label: 'Jacuzzi', label: false .field = f.input :sauna, inline_label: 'Hammam / Sauna', label: false .field = f.input :spa_communal, inline_label: 'SPA Communal', label: false .field = f.input :spa_private, inline_label: 'SPA Private', label: false .field = f.simple_fields_for :features_accommodation do |w| = w.input :gym, inline_label: 'Gym', label: false .field = f.simple_fields_for :features_accommodation do |w| = w.input :massage_room, inline_label: 'Massage Room', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6 .field = f.input :garden_communal, inline_label: 'Garden Communal', label: false .field = f.input :garden_private, inline_label: 'Garden Private', label: false .field = f.input :beach_front, inline_label: 'Beach Front', label: false .field = f.input :sea_view, inline_label: 'Sea View', label: false .field = f.input :garden_view, inline_label: 'Garden View', label: false .field = f.simple_fields_for :features_accommodation do |w| = w.input :mountain_view, inline_label: 'Mountain View', label: false .field = f.input :chimney, inline_label: 'Fireplace', label: false .field = f.input :wheelchairs, inline_label: 'Suitable for wheelchairs ', label: false .field = f.input :pets_allowed, inline_label: 'Pets allowed', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6 .field = f.input :sky_in_out, inline_label: 'Ski-in Ski-out', label: false .field = f.simple_fields_for :features_accommodation do |w| = w.input :ski_room, inline_label: 'Ski Room', label: false .field = f.input :store_room, inline_label: 'Store Room', label: false .field = f.simple_fields_for :features_accommodation do |w| = w.input :wine_cellar, inline_label: 'Wine Cellar', label: false .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h4 Activities in resort: .row{ style: 'background-color: #e7e7e7;'} .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :skiing_snowboarding, inline_label: 'Skiing/Snowboarding ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :cycling, inline_label: 'Cycling ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :cross_country_skiing, inline_label: 'Cross country skiing ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :golf, inline_label: 'Golf ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :hiking, inline_label: 'Hiking ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :mountain_biking, inline_label: 'Mountain biking ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :riding, inline_label: 'Riding ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :sailing, inline_label: 'Sailing ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :surfing, inline_label: 'Surfing ', label: false .col-lg-3.col-md-3.col-sm-6.col-xs-6.field = f.input :tennis, inline_label: 'Tennis ', label: false %br .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h4 = f.input :gmap, 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: ' .col-lg-3.col-md-3.col-sm-4.col-xs-6 = f.input :map_marker_name, placeholder: 'name', label: 'Name: ' %br %br %input#pac-input.controls{:placeholder => "Search Box", :type => "text"} #map{:style => "width: 99%; height: 400px;"} %br .row .col-lg-6.col-md-6.col-sm-6.col-xs-6 = f.input :image, as: :file, input_html: { class: 'form-control', multiple: true, name: 'ImagesAccommodations[image][]'}, label: 'Main images: ' .col-lg-6.col-md-6.col-sm-6.col-xs-6 = f.simple_fields_for :features_accommodation do |w| = w.input :iframe_youtube, placeholder: 'ej: 5RljHbKC3Kc', label: 'Video (Youtube): ' .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h4 Title / Description: .col-lg-12.col-md-12.col-sm-12.col-xs-12 %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 .col-lg-12.col-md-12.col-sm-12.col-xs-12 %hr = f.submit 'Save', class: 'btn btn-lg btn-primary btn-block', id: 'save' #accommodation_not_valid #accommodation_valid