Update fields

This commit is contained in:
manson 2014-07-04 15:08:46 +08:00
parent 4e48f22717
commit 9b9e8a6d89
2 changed files with 12 additions and 14 deletions

View File

@ -9,12 +9,12 @@ class Patent
field :patent_title, as: :slug_title, localize: true
field :authors, localize: true
field :patent_country, localize: true
field :year
field :language
field :keywords
field :patent_no
field :patent_country
field :publish_date , :type => Date
field :url
field :note

View File

@ -73,14 +73,6 @@
</div>
</div>
<!-- patent_country -->
<div class="control-group">
<label class="control-label muted"><%= t("personal_patent.patent_country") %></label>
<div class="controls">
<%= f.text_field :patent_country %>
</div>
</div>
<!-- keywords -->
<div class="control-group">
<label class="control-label muted"><%= t("personal_patent.keywords") %></label>
@ -93,11 +85,7 @@
<div class="control-group">
<label class="control-label muted"><%= t("personal_patent.language") %></label>
<div class="controls">
<select id="patent_language" name="patent[language]">
<% @site_in_use_locales.each do |locale| %>
<option value="<%= locale %>" <%= @patent.language.eql?(locale.to_s) ? "selected" : ""%>><%= t(locale) %></option>
<% end %>
</select>
<%= f.text_field :language ,class: "span5"%>
</div>
</div>
@ -160,6 +148,16 @@
</div>
</div>
<!-- patent_country -->
<div class="control-group">
<label class="control-label muted"><%= t("personal_patent.patent_country") %></label>
<div class="controls">
<%= f.fields_for :patent_country_translations do |f| %>
<%= f.text_field locale, placeholder: t("personal_patent.patent_country"), value: (@patent.patent_country_translations[locale] rescue nil) %>
<% end %>
</div>
</div>
<!-- authors-->
<div class="control-group input-title">
<label class="control-label muted"><%= t("personal_patent.authors") %></label>