<div class="toolbar hh1">
  <div class="fn_g hp">
    <%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
    <!-- class: bt-cancle can't be remove -->
    <% if not @writing_conference.new_record? %>
      <%= submit_tag t("cancel"), :type => "button", "callback-method"=>"cancelpaper", "ajax-remote" => "get", :href => panel_personal_conference_desktop_conference_pages_path, class: "fn_btn ini_input hp hh1 admbg2 admtxt" %>
    <% end %>
  </div>
   <div class="hh1 hp sdm">
    <div class="sdm_t hh1 ">Language</div>
    <div class="admbg sdm_o language_select">
      <ul>
        <% @site_in_use_locales.each_with_index do |locale, i| %>
          <li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
        <% end %>
      </ul>
    </div>
  </div>
  <div class="hh1 hp sdm">
    <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
  </div>
</div>
<!-- <div id="paper_add" class="tinycanvas vp">
  <div class="scrollbar sb_h vp">
    <div class="track">
      <div class="thumb thmc2">
        <div class="end"></div>
      </div>
    </div>
  </div>
  <div class="viewport"> -->
    <div class="overview" content-layout="simple" base-width="420">
       <ul class="s_form" isotope="true">
            <li class="s_grid_row" >
            <% @site_in_use_locales.each_with_index do |locale, i| %>
              <% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
              <% data = "data-language=" + locale  %>
             <div class="form_fix" <%= style %> <%= data %>>
            <%= f.fields_for :paper_title_translations do |f| %>
              <%= f.text_area locale,
                class: "s_grid_12 s_grid_h_2 s_grid",
                size: "20x2",
                placeholder: t("personal_conference.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
                value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
            <% end %>
            <%= f.fields_for :conference_title_translations do |f| %>
              <%= f.text_field locale,
                size: "20",
                placeholder: t("personal_conference.conference_title")+ "("+I18nVariable.from_locale(locale)+")",
                class: "s_grid_12 s_grid",
                value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %>
            <% end %>
          </div>
            <% end %>
          </li>
            <li class="s_grid_row">
            <div>
              <%= label_tag("", t("personal_conference.paper_type"), class: 's_grid s_grid_4') %>
              <div class="s_select_g s_grid s_grid_8 s_grid_h_1">
              <ul>
                <% @paper_types.each_with_index do |paper_type, i| %>
                  <li>
                  <%= radio_button_tag "writing_conference[conference_paper_type_ids][]",
                    paper_type.id,
                    @writing_conference.conference_paper_type_ids.include?(paper_type.id),
                    id: "field-#{i}"
                    %><%= label_tag("field-#{i}", paper_type.title) %>
                  </li>
                <% end %>
              </ul>
            </div>
            </div>
            </li>
            <li class="s_grid_row">
            <%= f.text_field :keywords, size: "20", placeholder: t("personal_conference.keywords"), class: "s_grid_12 s_grid"%>
            </li>
            <li class="s_grid_row">
              <%= label_tag("", t("personal_conference.conference_time"), class: "s_grid s_grid_4") %>
              <ul class="s_grid s_grid_8">
                <li class="s_grid_row">
                <%= label_tag("", t("personal_conference.period_start_date"), class: "s_grid_2 s_grid") %>
                <%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_2 s_grid'} %>
                </li>

                <li class="s_grid_row">
                <%= label_tag("", t("personal_conference.period_end_date"), class: "s_grid_2 s_grid") %>
                <%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_2 s_grid'} %>
                </li>
              </ul>
            </li>
            <li class="s_grid_row">
            <%= label_tag("", t("personal_conference.sponsor"), class: "s_grid_4 s_grid") %><%= f.text_field :sponsor, size: "20", placeholder: "Sponsor", class: "s_grid_8 s_grid"%>
            </li>
            <li class="s_grid_row">
            <%= label_tag("", t("personal_conference.location"), class: "s_grid_4 s_grid") %><%= f.text_field :location, size: "20", placeholder: "Location", class: "s_grid_8 s_grid"%>
            </li>
            <li class="s_grid_row">
            <%= label_tag("", t("personal_conference.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_8 s_grid"%>
            </li>
         
              <li class="s_grid_row">
              <%= f.text_area :author_tokens,
                class: "s_grid_12 s_grid",
                size: "20x2",
                placeholder: t("personal_conference.authors"),
                 "autocomplete" => "/panel/personal_conference/desktop/conference_pages/new.json",
                "autocomplete-format" => "--:[text,email]",
                "data-pre" => generate_authors_name(@writing_conference.conference_co_author_ids) %>
              <%#= f.fields_for :authors_translations do |f| %>
                <%#= f.text_area locale,
                class: "s_grid_6 s_grid",
                size: "20x2",
                placeholder: t("personal_conference.authors"),
                #                  "autocomplete-list" => "coauthor_autocomplete_list",
                value:  (@writing_conference.authors_translations[locale.to_s] rescue nil) %>
              <%# end %>
          
              </li>

              <li class="s_grid_row">
                <%= label_tag("", t("personal_conference.author_type"), class: "s_grid_4 s_grid") %>
                <select name="writing_conference[conference_author_type_ids][]" id="" class="s_grid s_grid_8">
                  <%= options_for_select(
                    @author_types.map do |author_type|
                      [author_type.title, author_type.id]
                    end
                  )
                %>
          </select>
          </li>

          <li class="s_grid_row">
            <label for="" class="s_grid s_grid_4">Status</label>
          <select name="" id="" class="s_grid s_grid_8">
            <option value="">Published</option>
            <option value="">Pending</option>
            <option value="">Writing</option>
          </select>
          </li>

          <li class="s_grid_row">
          <%= label_tag("", t("personal_conference.publication_date"), class: "s_grid_6 s_grid") %>
          <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_2 s_grid'} %>
          </li>

          <li class="s_grid_row">
          <%= f.label :year, t("personal_conference.year"), :class => "s_grid_4 s_grid" %>
          <%= select_year((@writing_conference.year ? @writing_conference.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_conference[year]', :class => "s_grid_8 s_grid"} ) %>
          </li>

          <li class="s_grid_row"><input class="s_grid s_grid_12" type="text" placeholder=<%= t("personal_conference.tags") %>></li>
         
            <li class="s_grid_row">
            <table class="s_table">
              <thead>
                <tr>
                  <th class="s_grid_2"><%= t("personal_conference.file")%></th>
                  <th class="s_grid_4"><%= t("personal_conference.file_name")%></th>
                  <th class="s_grid_4"><%= t("personal_conference.description") %></th>
                  <th class="s_grid_2"></th>
                </tr>
              </thead>
              <tfoot>
                <tr>
                  <td colspan="4">
                    <div id='add_plugin_file' class="info_input plugin_files_block s_action">
                      <%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
                      <a class="add setting_btn thmc1 thmtxt w1 hh1 hp" href=""><i class="icon-plus icon-white"></i> add</a>
                    </div>
                  </td>
                </tr>
              </tfoot>
              <tbody>
                <% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %>
                  <%= f.fields_for :writing_conference_files, writing_conference_file do |f| %>
                    <%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %>
                  <% end %>
                <% end %>
              </tbody>
            </table>
            </li>
        
            <li class="s_grid_row">
            <%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_12 s_grid_h_10 s_grid s_grid_h_full"%>
            </li>
        
            <li class="s_grid_row">
              <%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_12 s_grid_h_10 s_grid s_grid_h_full"%>
            </li>
          </ul>

      </div>
  <!-- </div>
</div> -->
   


    



    <script>
      var get_html = function(old_id,new_id){
        return ("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id);
      }
    </script>
