97 lines
2.6 KiB
Plaintext
97 lines
2.6 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 'honor[tag_ids][]', tag.id, @honor.tag_ids.include?(tag.id)%>
|
|
<%= tag.name %>
|
|
<%= hidden_field_tag 'honor[tag_ids][]', '' %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<!--Wiget End-->
|
|
<!--Post Start-->
|
|
|
|
<div id="post-body">
|
|
<div id="post-body-content" class="clear">
|
|
|
|
<% if !params[:user_id].blank? %>
|
|
|
|
<div class="span6">
|
|
<%= t("著作人")%>
|
|
<%= User.from_id(params[:user_id]).name rescue ''%>
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="title">
|
|
<%= f.label :year ,t("personal_honor.year")%>
|
|
<%= select_year((@honor.year ? @honor.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'honor[year]'} ) %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :honor_category ,t("personal_honor.honor_category")%>
|
|
<%= f.select :honor_category_id, @honor_categorys.collect {|t| [ t.title, t.id ]} %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :award_name, t("personal_honor.award_name") %>
|
|
<%= f.text_field :award_name %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :awarding_unit, t("personal_honor.awarding_unit") %>
|
|
<%= f.text_field :awarding_unit %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :url, t("personal_honor.url") %>
|
|
<%= f.text_field :url %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :keywords, t("personal_honor.keywords") %>
|
|
<%= f.text_field :keywords %>
|
|
</div>
|
|
|
|
<div id="title">
|
|
<%= f.label :language, t("personal_honor.language") %>
|
|
<%= f.radio_button :language, "Chinese" %> <%= t("personal_honor.Chinese") %>
|
|
<%= f.radio_button :language, "English" %> <%= t("personal_honor.English") %>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<%= f.label :note, t("personal_honor.note") %>
|
|
<%= f.text_area :note, :size => "60x3" %>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<!--Post End-->
|
|
|
|
|
|
<div class="form-actions">
|
|
<%= f.hidden_field :user_id, :value => params[:user_id] if !params[:user_id].blank? %>
|
|
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
|
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
|
</div>
|
|
|