first version of app config and modified inits.

This commit is contained in:
Fu Matthew committed 2013-01-29 20:33:40 +08:00
1 parent bfaa22052f
commit 71d5abae2e
36 files changed
+377 -264

No files matched your search

@@ -1,17 +1,21 @@
class GalleryCategory
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Document
include Mongoid::Timestamps
include OrbitCoreLib::ObjectAuthable
include OrbitCoreLib::ObjectAuthable
ObjectAuthTitlesOptions = %W{new_album}
APP_NAME = "album"
ObjectAuthTitlesOptions = %W{new_album}
APP_NAME = "album"
field :name, localize: true
field :name, localize: true
has_many :gallery_albums, :autosave => true, :dependent => :destroy
has_many :gallery_albums, :autosave => true, :dependent => :destroy
def pp_object
name
end
def title
name
end
def pp_object
name
end
end
@@ -23,6 +23,8 @@ zh_tw:
edit: 編輯
delete_selected: 刪除選擇項目
del_album?: "要刪除這本相簿嗎?"
front_end:
albums: 相簿前台
album_not_found: 找不到此相簿
pic_not_found: 找不到該照片
save: 儲存
@@ -33,6 +35,8 @@ zh_tw:
set_cover: 設為封面
sure?: "你確定嗎?"
no_description: 沒有描述
widget:
widget1: Widget1
widget_option:
horizontal: 水平圖片數量
vertical: 垂直圖片數量
+14 -3
View File
@@ -11,7 +11,9 @@ module Gallery
update_info 'some update_info'
front_end do
app_page 'albums'
app_page 'albums' do
frontend_i18n "gallery.front_end.albums"
end
end
category ["gallery_categories"]
@@ -25,8 +27,17 @@ module Gallery
categories_query 'GalleryCategory.all'
# tags_query 'GalleryTag.all'
customize_widget "albums","gallery.widget.albums",:fields=>[],:style=>[]
#* customize_widget "albums","gallery.widget.albums",:fields=>[],:style=>[],:options=>{"widget1"=>{"vertical"=>[1, 2], "horizontal"=>[1, 2, 3, 4, 5, 6], "album_id"=>{"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}}}
#* customize_widget_options_fields_i18n({"widget1"=>{"vertical"=>"gallery.widget_option.vertical", "horizontal"=>"gallery.widget_option.horizontal", "album_id"=>"gallery.widget_option.album"}} )
customize_widget "widget1" do
widget_i18n "gallery.widget.widget1"
style []
options "vertical",:i18n => "gallery.widget_option.vertical",:options_item=>[1, 2]
options "horizontal",:i18n => "gallery.widget_option.horizontal",:options_item=>[1, 2,3,4,5,6]
options "album_id",:i18n =>"gallery.widget_option.album",:options_item => {"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}
end
end
side_bar do