= javascript_include_tag Ckeditor.cdn_url #announcement_jquery_start .row = simple_form_for @announcement, html: { role: 'form', multipart: true } do |f| .row .col-md-12 - if @announcement.errors.any? -@refnew = 0 #error_explanation %h3.text-center %mark = "#{pluralize(@announcement.errors.count, 'Error')} :" %ul - @announcement.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 @announcement.ref = f.input :ref, input_html: {class: '', :type => "hidden"}, :label => false - else - if Announcement.exists? - @ref2_id = Announcement.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_prm, inline_label: 'Puente Romano Marbella', 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_hsc, inline_label: 'Hotel Sultan Club', label: false .field.col-md-3.col-xs-6.text-center{ style: 'background-color: #e7e7e7;'} = f.input :add_sm, inline_label: 'Sale Marbella', label: false .row .col-lg-3.col-md-3.col-sm-12.col-xs-12 = f.input :ad_position, collection: [ ['Bottom-Left','bottom-left'], ['Bottom-Right','bottom-right'], ['Center-Mid','center-mid']], :selected => @announcement.ad_position, :label => 'Page position: ' .col-lg-1.col-md-1.col-sm-12.col-xs-12 //= f.input :priority, as: :integer %br .col-lg-12 %h4 Dates (Fechas): %hr .field.form-group.col-md-3.col-xs-6 = f.input :ads_datefrom, as: :string, input_html: { class: 'date-from', placeholder: 'Date From:' } .field.form-group.col-md-3.col-xs-6 = f.input :ads_dateto, as: :string, input_html: { class: 'date-to', placeholder: 'Date To:' } %br .col-md-12.col-xs-12 %h4 Main image: %hr = f.input :image, as: :file, input_html: { class: 'form-control', multiple: true, name: 'ImagesAnnouncements[image][]'}, label: false .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' .field.col-md-12.form-group = f.input :link_en, input_html: { class: 'form-control' }, :label => 'Link EN' .field.col-md-12.form-group = "Description:" = 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' .field.col-md-12.form-group = f.input :link_fr, input_html: { class: 'form-control' }, :label => 'Link FR' .field.col-md-12.form-group = "Description:" = 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' .field.col-md-12.form-group = f.input :link_ru, input_html: { class: 'form-control' }, :label => 'Link RU' .field.col-md-12.form-group = "Description:" = 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' .field.col-md-12.form-group = f.input :link_es, input_html: { class: 'form-control' }, :label => 'Link ES' .field.col-md-12.form-group = "Description:" = 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' #announcement_not_valid #announcement_valid