126 lines
4.0 KiB
Plaintext
126 lines
4.0 KiB
Plaintext
<% # encoding: utf-8 %>
|
|
|
|
<%= f.error_messages %>
|
|
|
|
<!--Widget start-->
|
|
|
|
<div id="sub-wiget">
|
|
|
|
<div id="widget-tags" class="widget-box widget-size-300">
|
|
<div class="widget-action clear tip" title="Setting">
|
|
<a class="action"><i class="icon-cog icon-white"></i></a>
|
|
</div>
|
|
<h3 class="widget-title"><i class="icons-tag"></i>Tags</h3>
|
|
<div class="widget-content clear form-horizontal">
|
|
<% @tags.each do |tag| %>
|
|
<%= content_tag :label,:class => "checkbox inline" do -%>
|
|
<%= check_box_tag 'diploma[tag_ids][]', tag.id, @diploma.tag_ids.include?(tag.id)%>
|
|
<%= tag.name %>
|
|
<%= hidden_field_tag 'diploma[tag_ids][]', '' %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<!--Wiget End-->
|
|
<!--Post Start-->
|
|
|
|
<div id="post-body">
|
|
<div id="post-body-content" class="clear">
|
|
|
|
<div class="title">
|
|
<%= f.label :start_date ,t("personal_diploma.start_date")%>
|
|
<%= f.date_select :start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month], :discard_day => true }, {:class => 'span1'} %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :end_date ,t("personal_diploma.end_date")%>
|
|
<%= f.date_select :end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month], :discard_day => true }, {:class => 'span1'} %>
|
|
</div>
|
|
|
|
<ul class="nav nav-tabs">
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
|
<li <%= ( i == 0 ) ? "class=active" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
|
|
|
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
|
|
|
|
<div class="title">
|
|
<%= f.label :school_name ,t("personal_diploma.school_name")%>
|
|
<%= f.fields_for :school_name_translations do |f| %>
|
|
<%= I18nVariable.from_locale(locale) %>
|
|
<%= f.text_field locale, :class=>'post-title', :value => (@diploma.school_name_translations[locale] rescue nil) %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :country ,t("personal_diploma.country")%>
|
|
<%= f.fields_for :country_translations do |f| %>
|
|
<%= I18nVariable.from_locale(locale) %>
|
|
<%= f.text_field locale, :class=>'post-title', :value => (@diploma.country_translations[locale] rescue nil) %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :department ,t("personal_diploma.department")%>
|
|
<%= f.fields_for :department_translations do |f| %>
|
|
<%= I18nVariable.from_locale(locale) %>
|
|
<%= f.text_field locale, :class=>'post-title', :value => (@diploma.department_translations[locale] rescue nil) %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :degree ,t("personal_diploma.degree")%>
|
|
<%= f.fields_for :degree_translations do |f| %>
|
|
<%= I18nVariable.from_locale(locale) %>
|
|
<%= f.text_field locale, :class=>'post-title', :value => (@diploma.degree_translations[locale] rescue nil) %>
|
|
<% end %>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :url, t("personal_diploma.url") %>
|
|
<%= f.text_field :url %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :keywords, t("personal_diploma.keywords") %>
|
|
<%= f.text_field :keywords %>
|
|
</div>
|
|
|
|
<div id="title">
|
|
<%= f.label :language, t("personal_diploma.language") %>
|
|
<%= f.radio_button :language, "Chinese" %> <%= t("personal_diploma.Chinese") %>
|
|
<%= f.radio_button :language, "English" %> <%= t("personal_diploma.English") %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :note, t("personal_diploma.note") %>
|
|
<%= f.text_area :note, :size => "60x3" %>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<!--Post End-->
|
|
|
|
|
|
<div class="form-actions">
|
|
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
|
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
|
</div> |