orbit-personaldiploma/app/views/panel/personal_diploma/desktop/personal_diplomas/_form.html.erb

91 lines
4.7 KiB
Plaintext

<div class="toolbar hh1">
<div class="fn_g hp">
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
<% if not @diploma.new_record? %>
<%= submit_tag t("cancel"), :type => "button", "callback-method"=>"canceldiploma", "ajax-remote" => "get", :href => panel_personal_diploma_desktop_personal_diplomas_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 class="overview" content-layout="simple" base-width="420">
<ul class="s_form" isotope="true">
<li class="s_grid_row">
<%= label_tag("", t("personal_diploma.start_date"), class: "s_grid_4 s_grid") %>
<%= f.date_select :start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
<%= f.date_select :start_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_diploma.end_date"), class: "s_grid_4 s_grid") %>
<%= f.date_select :end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
<%= f.date_select :end_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
</li>
<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 :school_name_translations do |f| %>
<%= f.text_field locale,
size: "20",
placeholder: t("personal_diploma.school_name")+ "("+I18nVariable.from_locale(locale)+")",
class: "s_grid_12 s_grid",
value: (@diploma.school_name_translations[locale.to_s] rescue nil) %>
<% end %>
<%= f.fields_for :country_translations do |f| %>
<%= f.text_field locale,
size: "20",
placeholder: t("personal_diploma.country")+ "("+I18nVariable.from_locale(locale)+")",
class: "s_grid_12 s_grid",
value: (@diploma.country_translations[locale.to_s] rescue nil) %>
<% end %>
<%= f.fields_for :department_translations do |f| %>
<%= f.text_field locale,
size: "20",
placeholder: t("personal_diploma.department")+ "("+I18nVariable.from_locale(locale)+")",
class: "s_grid_12 s_grid",
value: (@diploma.department_translations[locale.to_s] rescue nil) %>
<% end %>
<%= f.fields_for :degree_translations do |f| %>
<%= f.text_field locale,
size: "20",
placeholder: t("personal_diploma.degree")+ "("+I18nVariable.from_locale(locale)+")",
class: "s_grid_12 s_grid",
value: (@diploma.degree_translations[locale.to_s] rescue nil) %>
<% end %>
</div>
<% end %>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_diploma.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
</li>
<li class="s_grid_row">
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_diploma.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
</li>
<li class="s_grid_row">
<%= f.label :language, t("personal_diploma.language"), :class => "s_grid s_grid_4" %>
<%= f.select :language, Diploma::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
</li>
<li class="s_grid_row">
<%= f.text_area :note, size: "20x3", placeholder: t("personal_diploma.note"), class: "s_grid_12 s_grid s_grid_h_10 s_grid_h_full"%>
</li>
</ul>
</div>