fix page url and add data for frontend
This commit is contained in:
parent
dcc2be7eae
commit
7f4f8285ab
|
@ -46,11 +46,22 @@ class DigitalArchivesController < ApplicationController
|
|||
{
|
||||
"title" => (dca.title rescue ""),
|
||||
"item-date" => (dca.item_date rescue ""),
|
||||
"location" => (dca.location rescue ""),
|
||||
"department" => (dca.department rescue ""),
|
||||
"character" => (dca.character rescue ""),
|
||||
"description" => (dca.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 ""),
|
||||
"files" => dcafs
|
||||
}
|
||||
end
|
||||
page = Page.where(:page_id => params[:page_id]).first rescue nil
|
||||
url = page.nil? ? "#" : "/#{I18n.locale.to_s}/#{page.url}"
|
||||
url = page.nil? ? "#" : "/#{I18n.locale.to_s}#{page.url}"
|
||||
{
|
||||
"digital_content_archives" => dcas,
|
||||
"extras" => {
|
||||
|
|
Loading…
Reference in New Issue