From e142d5c07a4935117bf5fab46fd75b44b15e98b1 Mon Sep 17 00:00:00 2001 From: Ruling-Mac Date: Wed, 21 Oct 2015 17:34:28 +0800 Subject: [PATCH] add table head --- .../digital_archives_controller.rb | 22 ++++++++++++++----- app/views/digital_archives/index.html.erb | 2 ++ config/locales/en.yml | 11 +++++++++- config/locales/zh_tw.yml | 9 ++++++++ 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/app/controllers/digital_archives_controller.rb b/app/controllers/digital_archives_controller.rb index 06cf101..5d540e6 100644 --- a/app/controllers/digital_archives_controller.rb +++ b/app/controllers/digital_archives_controller.rb @@ -50,13 +50,13 @@ class DigitalArchivesController < ApplicationController "department" => (dca.department rescue ""), "character" => (dca.character rescue ""), "description" => (dca.description rescue ""), - "detail_description" => (dca.detail_description rescue ""), + "detail-description" => (dca.detail_description rescue ""), "material" => (dca.material rescue ""), "size" => (dca.size rescue ""), - "item_id" => (dca.item_id rescue ""), - "item_from" => (dca.item_from rescue ""), - "item_status" => (dca.item_status rescue ""), - "album_content" => (dca.album_content rescue ""), + "item-id" => (dca.item_id rescue ""), + "item-from" => (dca.item_from rescue ""), + "item-status" => (dca.item_status rescue ""), + "album-content" => (dca.album_content rescue ""), "files" => dcafs } end @@ -65,7 +65,17 @@ class DigitalArchivesController < ApplicationController { "digital_content_archives" => dcas, "extras" => { - "page_url" => url + "page_url" => url, + "th_title" => t('title'), + "th_location" => t('location'), + "th_description" => t('description'), + "th_detaildes" => t('detaildes'), + "th_material" => t('material'), + "th_size" => t('size'), + "th_item-date" => t('item_date'), + "th_item-id" => t('item_id'), + "th_item-from" => t('item_from'), + "th_item-status" => t('item_status') } } end diff --git a/app/views/digital_archives/index.html.erb b/app/views/digital_archives/index.html.erb index 648b75c..2ca9c70 100644 --- a/app/views/digital_archives/index.html.erb +++ b/app/views/digital_archives/index.html.erb @@ -1 +1,3 @@ +<%# data = action_data %> +<%#= data.inspect %> <%= render_view %> \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 775bd18..c24f76d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -16,4 +16,13 @@ en: item_from : "Item From" item_status : "Item Status" album_content : "Album Content" - show_lang: Language \ No newline at end of file + show_lang: Language + title: Title + location: Location + description: Description + detaildes: Detail Description + size: Size + item_data: Item Date + item_id: Item ID + item_from: Item From + item_status: Item Status \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 7eebc02..51e17db 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -18,3 +18,12 @@ zh_tw: item_status : "保存情形" album_content : "相片描述" show_lang: "呈現語系" + title: "標題" + location: "地點" + description: "描述" + detaildes: "詳細描述" + size: "尺寸" + item_data: "物品日期" + item_id: "物品編號" + item_from: "贈與者" + item_status: "保存狀況" \ No newline at end of file