<commit_before>- content_for :scripts do
  = javascript_include_tag "contacts"
  = javascript_include_tag "tag"
  = javascript_include_tag "contacts_form"
  = javascript_include_tag "scheduling"

#menu-vertical
  %span
    = link_to t(:cancel), @festival
    ou
  .btn.btn-alert.btn-large.btn-submit{:href => "#"}
    Enregistrer
  

%h1.page-title Modifier le festival
/%h2= @festival.name

= simple_nested_form_for(@festival, :html => { :class => 'form-horizontal form-edit' }) do |f|
  /simple_form_for(@article, :html => { :class => 'form-horizontal' }) do |f|
  = display_errors(@festival)
  
  .form-inputs
    %header
      .control-group
        .pic-container
          .pic= image_tag @festival.avatar_url
        = f.fields_for :structure do |s|
          = s.fields_for :contact do |c|
            = c.input :name, label: false, :class => "input-Xlarge"
        = f.input :avatar, label:false, :hint => "L’image doit faire au moins 80x80 pixels."
  
    .row-fluid
      .span12
        .tabbable
          / ________________________________________________________ nav-tabs _________________
          %ul.nav.nav-tabs
            %li.active
              %a{"data-toggle" => "tab", :href => "#contact-infos"} Coordonnées
            %li
              %a{"data-toggle" => "tab", :href => "#basic-infos"} Infos
            %li
              %a{"data-toggle" => "tab", :href => "#schedulings"} Programmation(s)
          
          .tab-content
            / ________________________________________________________________________________________________________________ contact-infos
            #contact-infos.tab-pane.active
              /.section-title
              /.title Coordonnées
              / ________________________________________________________ email
              = f.fields_for :structure do |s|
                = s.fields_for :contact do |c|

                  = c.fields_for :emails do |email|
                    .nested-fields
                      = email.link_to_remove :title => "Remove this email" do
                        %i.entypo.edi-minus-2
                      = email.input :address, label:"Email", :wrapper => :append do
                        = email.input_field :address, :label => "Email", :validate => true, :class => "input-xlarge"
                        = email.input_field :classic_kind, :label => "Type", :collection => Email::VENUE_KIND, :class => "add-on btn dropdown-toggle"
                        = email.input_field :specific_kind, :class => "other input-medium"
                  .links
                    = c.link_to_add :emails, :title => 'Add a new email' do
                      %i.entypo.edi-plus-2
                      Add a new email


                  / ________________________________________________________ phone
                  = c.fields_for :phones do |phone|
                    .nested-fields
                      = phone.link_to_remove :title => "Remove this phone" do
                        %i.entypo.edi-minus-2
                      = phone.input :national_number, :wrapper => :append do
                        = phone.input_field :national_number, :class => "input-medium", :validate => true
                        = phone.input_field :classic_kind, label:false, :collection => Phone::VENUE_KIND, :class => "add-on btn dropdown-toggle"
                        = phone.input_field :specific_kind, :class => "other input-medium"
                  .links
                    = c.link_to_add :phones, :title => 'Ajouter un téléphone' do
                      %i.entypo.edi-plus-2
                      Add a new phone



                  / ________________________________________________________ address
                  .fields-group
                    = c.fields_for :addresses do |address|
                      .nested-fields.addresses
                        = address.link_to_remove :title => "Remove this address" do
                          %i.entypo.edi-minus-2

                        = address.input :street, label:"Addresse", :wrapper => :append do
                          = address.input_field :street,:placeholder =>"Addresse",  :label => false, :input_html => { :class => "input-xlarge" }
                          = address.input_field :kind, :label => false, :collection => [:main_address, :admin_address], :selected => "Work", :input_html => { :class => "add-on btn dropdown-toggle" }
                          
                          
                        .control-group.nolabel
                          = address.input_field :city, :label => false, :placeholder =>"Ville, localité, …", :class => " inline"
                          = address.input_field :postal_code, :label => false, :placeholder =>"Code postal", :class => "input-medium inline"
                          = address.input_field :country, :label => false, :priority => [ "France", "Spain", "Germany", "Austria", "United States", "United Kingdom" ], :class => "inline"
                        .control-group.nolabel.state.hidden
                          = address.input_field :state, :label => false, :placeholder =>"State", :class => "inline"
                      
                        = address.input :more_info, label:false

                    .links
                      = c.link_to_add :addresses, :title => 'Add a new address' do
                        %i.entypo.edi-plus-2
                        Add a new address



                  / ________________________________________________________ website
                  = c.fields_for :websites do |website|
                    .nested-fields
                      = website.link_to_remove :title => "Remove this website" do
                        %i.entypo.edi-minus-2
                      /= website.input :url, :label => "Website"
                      /= website.input :kind, :label => "Type", :collection => %w(Work Home),  :selected => "Work"

                      /= website.input :url, wrapper: :with_tooltip, tooltip: "Coucou tooltip" do
                      = website.input :url, wrapper: :append do
                        = website.input_field :url, :class => "input-xlarge"
                        = website.input_field :kind, label:false, :collection => %w(Work Home),  :selected => "Work", :class => "add-on btn dropdown-toggle"

                  .links
                    = c.link_to_add :websites, :title => 'Add a new website' do
                      %i.entypo.edi-plus-2
                      Add a new website

            / ________________________________________________________________________________________________________________ contact-infos
            #basic-infos.tab-pane
              /%section#basic-infos
              /.section-title
              /.title Infos lieu
    
              -#  ________________________________________________________ kind of venue
              /= v.input :kind, :collection => [:smac, :bar, :private_venue, :theater, :cultural_center], selected: :private_venue
              = f.input :artists_kind, :collection => ["Artistes en developpement", "Artistes émergents", "Artistes confirmés"], :as => :radio_buttons, item_wrapper_class: "inline"

              = f.input :nb_edition
              = f.input :last_year
              

              = f.fields_for :structure do |s|
                = s.fields_for :contact do |c|

                  -#  ________________________________________________________ TAGS V1
    
                  = c.input :network_tags, label: "Réseaux <br><span class='help-block'>(séparés par des virgules)</span>", :input_html => { :class => "span12 network_tags_input", :placeholder =>"…", data: {autocomplete_source: networks_path} }

                  -#  ________________________________________________________ TAGS V1
                  = c.input :custom_tags, label: "Tags personnalisés<br><span class='help-block'>(séparés par des virgules)</span>", :input_html => { :class => "span12 custom_tags_input", :placeholder =>"…", data: {autocomplete_source: customs_path} }
    



                  -# ________________________________________________________ Observations
                  = f.fields_for :structure do |s|
                    = s.fields_for :contact do |c|
                      = c.input :remark



                    
            -#  ________________________________________________________ contracts

            / ________________________________________________________________________________________________________________ contact-infos
            #schedulings.tab-pane

              = f.fields_for :schedulings do |v|
                -#, :class => "span4"
                -#, :input_html => { :class => "span4" }
                .nested-fields
                  = v.link_to_remove :title => "Supprimer cette programmation" do
                    %i.entypo.edi-minus-2
                  = v.input :name
                  
                  = v.input :external_show_buyer, collection: ["Cette structure", "Un autre organisateur de spectacles"], as: :radio_buttons, item_wrapper_class: "inline", input_html: {class: "external_show_buyer_radio"}  
                  = v.input :show_buyer_name, input_html: {autocomplete:"off", class: "jq_autocomplete external_show_buyer_radio", data: {autocomplete_source: structures_path(type: "ShowBuyer")} }
                  
                  = v.input :scheduler_name, input_html: {autocomplete:"off", class: "jq_autocomplete", data: {autocomplete_source: people_path} }
                  -# = v.input :scheduler, input_html: {autocomplete:"off", class: "jq_autocomplete", data: {autocomplete_source: people_path} }
                  = v.input :contract_list, :collection => ["Co-realisation","Co-production","Cession","Location","Engagement","Autre"], :as => :check_boxes, item_wrapper_class:"inline"
          

                  = v.input :style_tags, label: "Styles programmés<br><span class='help-block'>(séparés par des virgules)</span>", :input_html => { :class => "span6 style_tags_input", :placeholder =>"Rock, humour…", data: {autocomplete_source: styles_path} }


          

      
                  -#  ________________________________________________________ period
                  = v.input :period, :collection => [:all_year, :quaterly, :per_semester], as: :radio_buttons, item_wrapper_class: "inline"

              
              
                  -#________________________________________________________ scheduling OK
                  = v.fields_for :prospectings do |s|
                    .nested-fields
                      = s.link_to_remove :title => "Supprimer cette periode de prospection" do
                        %i.entypo.edi-minus-2

                      .control-group  
                        %label.control-label #{t("simple_form.labels.venue.schedulings.prospecting")}

                        .inline-inputs
                          = s.input :prospecting, :wrapper => :prepend, :label => false do
                            = content_tag :span, t("simple_form.labels.defaults.start"), :class => "add-on"
                            = s.input_field :start_month, :label => "Debut Programmation", :collection => 1..12, label_method: lambda { |i| t("date.month_names")[i] }

                          = s.input :prospecting, :wrapper => :prepend, :label => false do
                            = content_tag :span, t("simple_form.labels.defaults.end"), :class => "add-on"
                            = s.input_field :end_month, :label => "Fin Programmation", :collection => 1..12, label_method: lambda { |i| t("date.month_names")[i] }
                            
                  .links
                    = v.link_to_add :prospectings, :title => 'Ajouter une periode de prospection' do
                      %i.entypo.edi-plus-2
                      Ajouter une periode de prospection
                      
                  = v.input :remark

              .links
                = f.link_to_add :schedulings, :title => 'Ajouter une periode de programmation' do
                  %i.entypo.edi-plus-2
                  Ajouter une programmation

                                            
              

                

    / ________________________________________________________ actions
    .form-actions
      = f.button :submit, :class => "btn-primary btn-large btn-alert"
      ou
      = link_to t(:cancel), @festival
<commit_msg>no period scheduling for festival<commit_after>- content_for :scripts do
  = javascript_include_tag "contacts"
  = javascript_include_tag "tag"
  = javascript_include_tag "contacts_form"
  = javascript_include_tag "scheduling"

#menu-vertical
  %span
    = link_to t(:cancel), @festival
    ou
  .btn.btn-alert.btn-large.btn-submit{:href => "#"}
    Enregistrer
  

%h1.page-title Modifier le festival
/%h2= @festival.name

= simple_nested_form_for(@festival, :html => { :class => 'form-horizontal form-edit' }) do |f|
  /simple_form_for(@article, :html => { :class => 'form-horizontal' }) do |f|
  = display_errors(@festival)
  
  .form-inputs
    %header
      .control-group
        .pic-container
          .pic= image_tag @festival.avatar_url
        = f.fields_for :structure do |s|
          = s.fields_for :contact do |c|
            = c.input :name, label: false, :class => "input-Xlarge"
        = f.input :avatar, label:false, :hint => "L’image doit faire au moins 80x80 pixels."
  
    .row-fluid
      .span12
        .tabbable
          / ________________________________________________________ nav-tabs _________________
          %ul.nav.nav-tabs
            %li.active
              %a{"data-toggle" => "tab", :href => "#contact-infos"} Coordonnées
            %li
              %a{"data-toggle" => "tab", :href => "#basic-infos"} Infos
            %li
              %a{"data-toggle" => "tab", :href => "#schedulings"} Programmation(s)
          
          .tab-content
            / ________________________________________________________________________________________________________________ contact-infos
            #contact-infos.tab-pane.active
              /.section-title
              /.title Coordonnées
              / ________________________________________________________ email
              = f.fields_for :structure do |s|
                = s.fields_for :contact do |c|

                  = c.fields_for :emails do |email|
                    .nested-fields
                      = email.link_to_remove :title => "Remove this email" do
                        %i.entypo.edi-minus-2
                      = email.input :address, label:"Email", :wrapper => :append do
                        = email.input_field :address, :label => "Email", :validate => true, :class => "input-xlarge"
                        = email.input_field :classic_kind, :label => "Type", :collection => Email::VENUE_KIND, :class => "add-on btn dropdown-toggle"
                        = email.input_field :specific_kind, :class => "other input-medium"
                  .links
                    = c.link_to_add :emails, :title => 'Add a new email' do
                      %i.entypo.edi-plus-2
                      Add a new email


                  / ________________________________________________________ phone
                  = c.fields_for :phones do |phone|
                    .nested-fields
                      = phone.link_to_remove :title => "Remove this phone" do
                        %i.entypo.edi-minus-2
                      = phone.input :national_number, :wrapper => :append do
                        = phone.input_field :national_number, :class => "input-medium", :validate => true
                        = phone.input_field :classic_kind, label:false, :collection => Phone::VENUE_KIND, :class => "add-on btn dropdown-toggle"
                        = phone.input_field :specific_kind, :class => "other input-medium"
                  .links
                    = c.link_to_add :phones, :title => 'Ajouter un téléphone' do
                      %i.entypo.edi-plus-2
                      Add a new phone



                  / ________________________________________________________ address
                  .fields-group
                    = c.fields_for :addresses do |address|
                      .nested-fields.addresses
                        = address.link_to_remove :title => "Remove this address" do
                          %i.entypo.edi-minus-2

                        = address.input :street, label:"Addresse", :wrapper => :append do
                          = address.input_field :street,:placeholder =>"Addresse",  :label => false, :input_html => { :class => "input-xlarge" }
                          = address.input_field :kind, :label => false, :collection => [:main_address, :admin_address], :selected => "Work", :input_html => { :class => "add-on btn dropdown-toggle" }
                          
                          
                        .control-group.nolabel
                          = address.input_field :city, :label => false, :placeholder =>"Ville, localité, …", :class => " inline"
                          = address.input_field :postal_code, :label => false, :placeholder =>"Code postal", :class => "input-medium inline"
                          = address.input_field :country, :label => false, :priority => [ "France", "Spain", "Germany", "Austria", "United States", "United Kingdom" ], :class => "inline"
                        .control-group.nolabel.state.hidden
                          = address.input_field :state, :label => false, :placeholder =>"State", :class => "inline"
                      
                        = address.input :more_info, label:false

                    .links
                      = c.link_to_add :addresses, :title => 'Add a new address' do
                        %i.entypo.edi-plus-2
                        Add a new address



                  / ________________________________________________________ website
                  = c.fields_for :websites do |website|
                    .nested-fields
                      = website.link_to_remove :title => "Remove this website" do
                        %i.entypo.edi-minus-2
                      /= website.input :url, :label => "Website"
                      /= website.input :kind, :label => "Type", :collection => %w(Work Home),  :selected => "Work"

                      /= website.input :url, wrapper: :with_tooltip, tooltip: "Coucou tooltip" do
                      = website.input :url, wrapper: :append do
                        = website.input_field :url, :class => "input-xlarge"
                        = website.input_field :kind, label:false, :collection => %w(Work Home),  :selected => "Work", :class => "add-on btn dropdown-toggle"

                  .links
                    = c.link_to_add :websites, :title => 'Add a new website' do
                      %i.entypo.edi-plus-2
                      Add a new website

            / ________________________________________________________________________________________________________________ contact-infos
            #basic-infos.tab-pane
              /%section#basic-infos
              /.section-title
              /.title Infos lieu
    
              -#  ________________________________________________________ kind of venue
              /= v.input :kind, :collection => [:smac, :bar, :private_venue, :theater, :cultural_center], selected: :private_venue
              = f.input :artists_kind, :collection => ["Artistes en developpement", "Artistes émergents", "Artistes confirmés"], :as => :radio_buttons, item_wrapper_class: "inline"

              = f.input :nb_edition
              = f.input :last_year
              

              = f.fields_for :structure do |s|
                = s.fields_for :contact do |c|

                  -#  ________________________________________________________ TAGS V1
    
                  = c.input :network_tags, label: "Réseaux <br><span class='help-block'>(séparés par des virgules)</span>", :input_html => { :class => "span12 network_tags_input", :placeholder =>"…", data: {autocomplete_source: networks_path} }

                  -#  ________________________________________________________ TAGS V1
                  = c.input :custom_tags, label: "Tags personnalisés<br><span class='help-block'>(séparés par des virgules)</span>", :input_html => { :class => "span12 custom_tags_input", :placeholder =>"…", data: {autocomplete_source: customs_path} }
    



                  -# ________________________________________________________ Observations
                  = f.fields_for :structure do |s|
                    = s.fields_for :contact do |c|
                      = c.input :remark



                    
            -#  ________________________________________________________ contracts

            / ________________________________________________________________________________________________________________ contact-infos
            #schedulings.tab-pane

              = f.fields_for :schedulings do |v|
                -#, :class => "span4"
                -#, :input_html => { :class => "span4" }
                .nested-fields
                  = v.link_to_remove :title => "Supprimer cette programmation" do
                    %i.entypo.edi-minus-2
                  = v.input :name
                  
                  = v.input :external_show_buyer, collection: ["Cette structure", "Un autre organisateur de spectacles"], as: :radio_buttons, item_wrapper_class: "inline", input_html: {class: "external_show_buyer_radio"}  
                  = v.input :show_buyer_name, input_html: {autocomplete:"off", class: "jq_autocomplete external_show_buyer_radio", data: {autocomplete_source: structures_path(type: "ShowBuyer")} }
                  
                  = v.input :scheduler_name, input_html: {autocomplete:"off", class: "jq_autocomplete", data: {autocomplete_source: people_path} }
                  -# = v.input :scheduler, input_html: {autocomplete:"off", class: "jq_autocomplete", data: {autocomplete_source: people_path} }
                  = v.input :contract_list, :collection => ["Co-realisation","Co-production","Cession","Location","Engagement","Autre"], :as => :check_boxes, item_wrapper_class:"inline"
          

                  = v.input :style_tags, label: "Styles programmés<br><span class='help-block'>(séparés par des virgules)</span>", :input_html => { :class => "span6 style_tags_input", :placeholder =>"Rock, humour…", data: {autocomplete_source: styles_path} }


          

      
                  -#  ________________________________________________________ period
                  -# = v.input :period, :collection => [:all_year, :quaterly, :per_semester], as: :radio_buttons, item_wrapper_class: "inline"

              
              
                  -#________________________________________________________ scheduling OK
                  = v.fields_for :prospectings do |s|
                    .nested-fields
                      = s.link_to_remove :title => "Supprimer cette periode de prospection" do
                        %i.entypo.edi-minus-2

                      .control-group  
                        %label.control-label #{t("simple_form.labels.venue.schedulings.prospecting")}

                        .inline-inputs
                          = s.input :prospecting, :wrapper => :prepend, :label => false do
                            = content_tag :span, t("simple_form.labels.defaults.start"), :class => "add-on"
                            = s.input_field :start_month, :label => "Debut Programmation", :collection => 1..12, label_method: lambda { |i| t("date.month_names")[i] }

                          = s.input :prospecting, :wrapper => :prepend, :label => false do
                            = content_tag :span, t("simple_form.labels.defaults.end"), :class => "add-on"
                            = s.input_field :end_month, :label => "Fin Programmation", :collection => 1..12, label_method: lambda { |i| t("date.month_names")[i] }
                            
                  .links
                    = v.link_to_add :prospectings, :title => 'Ajouter une periode de prospection' do
                      %i.entypo.edi-plus-2
                      Ajouter une periode de prospection
                      
                  = v.input :remark

              .links
                = f.link_to_add :schedulings, :title => 'Ajouter une periode de programmation' do
                  %i.entypo.edi-plus-2
                  Ajouter une programmation

                                            
              

                

    / ________________________________________________________ actions
    .form-actions
      = f.button :submit, :class => "btn-primary btn-large btn-alert"
      ou
      = link_to t(:cancel), @festival

{'fraction_non_alphanumeric': 0.11205337406052811, 'fraction_numerical': 0.002813391744704795, 'mean_word_length': 1.7998199617418702, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 217, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5982945', 'n_tokens_mistral': 6678, 'n_tokens_neox': 6246, 'n_words': 1406}