change textfiled to bilingual for co_author

This commit is contained in:
Rueshyna 2013-01-23 10:58:37 +08:00 committed by chris
parent 85ca196dec
commit e0fedb4454
4 changed files with 16 additions and 11 deletions

View File

@ -1,4 +1,7 @@
<%= f.text_field :relation, class: "ini_input" %>
<%= f.fields_for :co_author_relation_translations do |f| %>
<%= f.text_field locale,
value: (@co_author_relation.co_author_relation_translations[locale] rescue nil) %>
<% end %>
<%= f.submit "Save", class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %>
<% if not @co_author_relation.new_record? %>
<%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %>

View File

@ -8,7 +8,11 @@
<ul>
<li class="s_grid_row">
<%= f.label :co_author, class: "s_grid s_grid_2" %>
<%= f.text_field :co_author, class: "s_grid s_grid_4" %>
<%= f.fields_for :co_author_translations do |f| %>
<%= f.text_field locale,
class: "s_grid_6 s_grid",
value: (@co_author.co_author_translations[locale] rescue nil) %>
<% end %>
</li>
<li class="s_grid_row">
<%= f.label :email, class: "s_grid s_grid_2"%>

View File

@ -24,8 +24,6 @@ en:
file : "File"
file_name : "File name"
description : "File Description"
add : "Add"
edit : "Edit"
delete : "Destory"

View File

@ -24,6 +24,6 @@ zh_tw:
file : "檔案"
file_name : "檔案名稱"
description : "描述"
add : "新增"
edit : "編輯"
delete : "刪除"