diff --git a/app/controllers/glossary_terms_controller.rb b/app/controllers/glossary_terms_controller.rb index 5f47470..6292367 100644 --- a/app/controllers/glossary_terms_controller.rb +++ b/app/controllers/glossary_terms_controller.rb @@ -48,7 +48,8 @@ class GlossaryTermsController < ApplicationController def glossary_term_params params.require(:glossary_term).permit( - :name, :description, :category_id + :name, :description, :category_id, + :name_en, :rubi, :abbr_whole, :datatype, :codename ) end end diff --git a/app/views/glossary_terms/_form.html.erb b/app/views/glossary_terms/_form.html.erb index 70eb26b..2bf6b15 100644 --- a/app/views/glossary_terms/_form.html.erb +++ b/app/views/glossary_terms/_form.html.erb @@ -1,5 +1,10 @@
<%= form.text_field :name, size: 80, required: true %>
+<%= form.text_field :name_en, size: 80 %>
+<%= form.text_field :rubi, size: 80 %>
+<%= form.text_field :abbr_whole, size: 80 %>
+<%= form.text_field :datatype, size: 80 %>
+<%= form.text_field :codename, size: 80 %>
<%= form.select :category_id, GlossaryCategory.pluck(:name, :id), include_blank: true %>
<%= form.text_area :description, size: "80x10", required: false %>
<%=l :field_name_en %> | +<%= @term.name_en %> | +
---|---|
<%=l :field_rubi %> | +<%= @term.rubi %> | +
<%=l :field_abbr_whole %> | +<%= @term.abbr_whole %> | +
<%=l :field_datatype %> | +<%= @term.datatype %> | +
<%=l :field_codename %> | +<%= @term.codename %> | +
<%=l :field_category %> | <%= @term.category.try!(:name) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index de59059..22d97eb 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -22,3 +22,10 @@ en: permission_view_glossary: View glossary permission_manage_glossary: Manage glossary + + field_name_en: English + field_abbr_whole: Whole word for Abbreviation + field_datatype: Data type for coding + field_codename: Abbreviation for coding + field_rubi: Ruby + diff --git a/config/locales/ja.yml b/config/locales/ja.yml index d2a9073..ebc1266 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -14,3 +14,10 @@ ja: permission_view_glossary: 用語集の閲覧 permission_manage_glossary: 用語集の管理 + + field_name_en: 英語名 + field_abbr_whole: 略語の展開名称 + field_datatype: データ型 + field_codename: コーディング用名称例 + field_rubi: ふりがな + diff --git a/db/migrate/005_add_columns_to_glossary_terms.rb b/db/migrate/005_add_columns_to_glossary_terms.rb new file mode 100644 index 0000000..aaf41ae --- /dev/null +++ b/db/migrate/005_add_columns_to_glossary_terms.rb @@ -0,0 +1,9 @@ +class AddColumnsToGlossaryTerms < ActiveRecord::Migration[5.1] + def change + add_column :glossary_terms, :name_en, :string, default: '' + add_column :glossary_terms, :rubi, :string, default: '' + add_column :glossary_terms, :abbr_whole, :string, default: '' + add_column :glossary_terms, :datatype, :string, default: '' + add_column :glossary_terms, :codename, :string, default: '' + end +end |