From b5afc9e715e9a1a7cf51e196add2e54598d57395 Mon Sep 17 00:00:00 2001 From: Ruling-Mac Date: Wed, 21 Oct 2015 19:29:47 +0800 Subject: [PATCH] show --- .../digital_archives_controller.rb | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/app/controllers/digital_archives_controller.rb b/app/controllers/digital_archives_controller.rb index a12c7ce..3b9289a 100644 --- a/app/controllers/digital_archives_controller.rb +++ b/app/controllers/digital_archives_controller.rb @@ -99,7 +99,8 @@ class DigitalArchivesController < ApplicationController end page = Page.where(:page_id => params[:page_id]).first rescue nil url = page.nil? ? "#" : "/#{I18n.locale.to_s}#{page.url}" - dca = [{ + + { "title" => (dca.title rescue ""), "item-date" => (dca.item_date rescue ""), "location" => (dca.location rescue ""), @@ -114,24 +115,19 @@ class DigitalArchivesController < ApplicationController "item-status" => (dca.item_status rescue ""), "album-content" => (dca.album_content rescue ""), "files" => dcafs - }] - dcas = - { - "digital_content_archives" => dca, - "extras" => { - "th_title" => t('title'), - "th_location" => t("digital_archive.location"), - "th_department" => t('digital_archive.department'), - "th_character" => t('digital_archive.character'), - "th_description" => t('digital_archive.description'), - "th_detaildes" => t('digital_archive.detail_description'), - "th_material" => t('digital_archive.material'), - "th_size" => t('digital_archive.size'), - "th_item_date" => t('digital_archive.item_date'), - "th_item_id" => t('digital_archive.item_id'), - "th_item_from" => t('digital_archive.item_from'), - "th_item_status" => t('digital_archive.item_status') - } + "th_title" => t('title'), + "th_location" => t("digital_archive.location"), + "th_department" => t('digital_archive.department'), + "th_character" => t('digital_archive.character'), + "th_description" => t('digital_archive.description'), + "th_detaildes" => t('digital_archive.detail_description'), + "th_material" => t('digital_archive.material'), + "th_size" => t('digital_archive.size'), + "th_item_date" => t('digital_archive.item_date'), + "th_item_id" => t('digital_archive.item_id'), + "th_item_from" => t('digital_archive.item_from'), + "th_item_status" => t('digital_archive.item_status') + } end end \ No newline at end of file