diff --git a/app/models/patent.rb b/app/models/patent.rb index f215813..063fac1 100644 --- a/app/models/patent.rb +++ b/app/models/patent.rb @@ -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 diff --git a/app/views/admin/patents/_form.html.erb b/app/views/admin/patents/_form.html.erb index b2bc1b2..c39dac7 100644 --- a/app/views/admin/patents/_form.html.erb +++ b/app/views/admin/patents/_form.html.erb @@ -73,14 +73,6 @@ - -
- -
- <%= f.text_field :patent_country %> -
-
-
@@ -93,11 +85,7 @@
- + <%= f.text_field :language ,class: "span5"%>
@@ -160,6 +148,16 @@
+ +
+ +
+ <%= 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 %> +
+
+