From c4d445d3c2ebe37f9cd7d2f173f94f7c31774891 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Fri, 29 May 2026 15:55:54 +0800 Subject: [PATCH] add some fields --- app/models/technology_transfer.rb | 5 +++ .../admin/technology_transfers/_form.html.erb | 42 +++++++++++++++++++ config/locales/en.yml | 8 +++- config/locales/zh_tw.yml | 8 +++- 4 files changed, 61 insertions(+), 2 deletions(-) diff --git a/app/models/technology_transfer.rb b/app/models/technology_transfer.rb index 64081b7..9d4fc88 100644 --- a/app/models/technology_transfer.rb +++ b/app/models/technology_transfer.rb @@ -10,6 +10,11 @@ class TechnologyTransfer field :patent_granted, type: Boolean, default: false field :patent_title, type: String, localize: true field :patent_number + field :manufacturer_name, type: String, localize: true + field :license_start_date, type: Date + field :license_end_date, type: Date + field :participating_teachers, type: String + field :note, type: String belongs_to :member_profile diff --git a/app/views/admin/technology_transfers/_form.html.erb b/app/views/admin/technology_transfers/_form.html.erb index 2181575..a630726 100644 --- a/app/views/admin/technology_transfers/_form.html.erb +++ b/app/views/admin/technology_transfers/_form.html.erb @@ -60,6 +60,16 @@ <% end %> + + +
+ +
+ <%= f.fields_for :manufacturer_name_translations do |f| %> + <%= f.text_field locale, class: "input-block-level", placeholder: t("personal_technology_transfer.manufacturer_name"), value: (@tt.manufacturer_name_translations[locale] rescue nil) %> + <% end %> +
+
<% end %> @@ -136,6 +146,38 @@ + +
+ +
+ <%= f.datetime_picker :license_start_date, :format=>"yyyy/MM/dd", :value=> @tt.license_start_date, :new_record => @tt.new_record? %> +
+
+ + +
+ +
+ <%= f.datetime_picker :license_end_date, :no_label => true, :format=>"yyyy/MM/dd", :value=> @tt.license_end_date, :new_record => @tt.new_record? %> +
+
+ + +
+ +
+ <%= f.text_field :participating_teachers %> +
+
+ + +
+ +
+ <%= f.text_area :note, rows: 2, class: "ckeditor input-block-level" %> +
+
+ diff --git a/config/locales/en.yml b/config/locales/en.yml index df196c8..76790d3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -12,6 +12,12 @@ en: patent_granted: Patent Granted patent_title: Patent Title patent_number: Patent Number + manufacturer_name: Manufacturer Name + license_start_date: License Start Date + license_end_date: License End Date + participating_teachers: Participating Teachers + note: Note technology_transfer_category: Category authors: Authors - graph_by : "Graph By" \ No newline at end of file + graph_by : "Graph By" + diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 90197ea..b100e39 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -12,6 +12,12 @@ zh_tw: patent_granted: 是否取得專利 patent_title: 專利名稱 patent_number: 專利證書字號 + manufacturer_name: 廠商名稱 + license_start_date: 技術移轉或授權起始日期 + license_end_date: 技術移轉或授權終止日期 + participating_teachers: 參與教師 + note: 備註 technology_transfer_category: 類別 authors: 姓名 - graph_by : "Graph By" \ No newline at end of file + graph_by : "Graph By" +