added description for images and albums

This commit is contained in:
Harry Bomrah 2014-06-09 17:56:14 +08:00
parent 6ec8f6a5c0
commit f48ae3228c
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@ class GalleriesController < ApplicationController
albums = Album.filter_by_categories.collect do |a|
{
"album-name" => a.name,
"album-description" => a.description,
"link_to_show" => OrbitHelper.url_to_show(a.to_param),
"thumb-src" => a.cover_path || "/assets/gallery/default.jpg"
}
@ -19,6 +20,7 @@ class GalleriesController < ApplicationController
album = Album.find_by_param(params[:uid])
images = album.album_images.collect do |a|
{
"image-description" => a.description,
"link_to_show" => "/" + I18n.locale.to_s + params[:url] + "/-" + a.id.to_s + "?method=theater",
"thumb-src" => a.file.thumb.url
}