From 884f4a0e82d104020588349df9214b7228cfc50f Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 14 Jul 2014 21:31:55 +0800 Subject: [PATCH] added rss2id and some changes in form --- app/models/project.rb | 4 +++- app/views/admin/projects/_form.html.erb | 17 ++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 4290efd..95c7168 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -11,6 +11,7 @@ class Project field :job_title, localize: true field :participator, localize: true field :unit, localize: true + field :note, localize: true field :year field :language @@ -19,7 +20,8 @@ class Project field :period_start_date, :type => Date field :period_end_date, :type => Date field :url - field :note + + field :rss2_id field :create_user_id, :type => BSON::ObjectId field :update_user_id, :type => BSON::ObjectId diff --git a/app/views/admin/projects/_form.html.erb b/app/views/admin/projects/_form.html.erb index ce0069f..276ee34 100644 --- a/app/views/admin/projects/_form.html.erb +++ b/app/views/admin/projects/_form.html.erb @@ -109,13 +109,6 @@ - -
- -
- <%= f.text_area :note, rows: 2, class: "input-block-level" %> -
-
@@ -190,6 +183,16 @@ + +
+ +
+ <%= f.fields_for :note_translations do |f| %> + <%= f.text_area locale, rows: 2, class: "input-block-level", value: (@project.note_translations[locale] rescue nil) %> + <% end %> +
+
+ <% end %>