added country and award date

This commit is contained in:
Harry Bomrah 2016-04-06 02:09:04 +08:00
parent 1433be1a9b
commit 97de505179
5 changed files with 27 additions and 0 deletions

View File

@ -58,6 +58,8 @@ class PersonalHonorsController < ApplicationController
"year", "year",
"honor_type", "honor_type",
"award_name", "award_name",
"award_date",
"country",
"honoree", "honoree",
"awarding_unit", "awarding_unit",
"keywords", "keywords",
@ -75,6 +77,8 @@ class PersonalHonorsController < ApplicationController
"award_name", "award_name",
"awarding_unit", "awarding_unit",
"honor_type", "honor_type",
"award_date",
"country",
"keywords", "keywords",
"url", "url",
"note", "note",

View File

@ -10,11 +10,13 @@ class Honor
field :year, type: Integer field :year, type: Integer
field :award_name, localize: true field :award_name, localize: true
field :awarding_unit, localize: true field :awarding_unit, localize: true
field :award_date, type: DateTime
field :language field :language
field :keywords field :keywords
field :url field :url
field :note field :note
field :rss2_id field :rss2_id
field :country, localize: true
field :create_user_id, :type => BSON::ObjectId field :create_user_id, :type => BSON::ObjectId
field :update_user_id, :type => BSON::ObjectId field :update_user_id, :type => BSON::ObjectId

View File

@ -51,6 +51,15 @@
</div> </div>
</div> </div>
<div class="control-group input-title">
<label class="control-label muted"><%= t("personal_honor.country") %></label>
<div class="controls">
<%= f.fields_for :country_translations do |f| %>
<%= f.text_field locale, class: "input-block-level", placeholder: t("personal_honor.country"), value: (@honor.country_translations[locale] rescue nil) %>
<% end %>
</div>
</div>
</div> </div>
<% end %> <% end %>
@ -104,6 +113,14 @@
</div> </div>
</div> </div>
<!-- award_date -->
<div class="control-group">
<label class="control-label muted"><%= t("personal_honor.award_date") %></label>
<div class="controls">
<%= f.datetime_picker :award_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD", :value => @honor.award_date, :new_record => @honor.new_record? %>
</div>
</div>
<!-- language --> <!-- language -->
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t("personal_honor.language") %></label> <label class="control-label muted"><%= t("personal_honor.language") %></label>

View File

@ -21,6 +21,8 @@ en:
issue_no : "Issue.No" issue_no : "Issue.No"
form_to_start : "From" form_to_start : "From"
form_to_end : "To" form_to_end : "To"
country: "Country"
award_date: "Award Date"
total_pages : "Total Pages" total_pages : "Total Pages"
keywords : "Keywords" keywords : "Keywords"
abstract : "Abstract" abstract : "Abstract"

View File

@ -23,6 +23,8 @@ zh_tw:
keywords : "關鍵字" keywords : "關鍵字"
abstract : "摘要" abstract : "摘要"
publication_date : "發表日期" publication_date : "發表日期"
award_date: "獲獎日期"
country: "國別"
url : "參考連結" url : "參考連結"
note : "記事" note : "記事"
level_type : "期刊類別" level_type : "期刊類別"