fix sidebar icon for page.
fix i18n on sidebar make sidebar sortable by changing db value. Need interface
This commit is contained in:
parent
9771d42587
commit
fcb49723b4
|
@ -24,6 +24,11 @@ module OrbitApp
|
|||
def all
|
||||
return @@side_bars
|
||||
end
|
||||
|
||||
def all_get_ordered!
|
||||
@@side_bars.sort! {|x,y| x.get_sidebar_order! <=> y.get_sidebar_order! }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
extend ClassMethods
|
||||
|
@ -52,10 +57,16 @@ module OrbitApp
|
|||
@app_base_path = ''
|
||||
@module_app_key = key
|
||||
@get_module_app = get_module_app
|
||||
@sidebar_order = 0
|
||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||
# setup_module_app(module_app_key)
|
||||
finalize!
|
||||
SideBarRegisition.add(self)
|
||||
SideBarRegisition.all_get_ordered!
|
||||
end
|
||||
|
||||
def get_sidebar_order!
|
||||
@sidebar_order = get_module_app.sidebar_order
|
||||
end
|
||||
|
||||
def get_module_app
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
zh_tw:
|
||||
calendar:
|
||||
calendar_: 行事曆
|
||||
calendar: 日曆
|
||||
calendars: Calendars
|
||||
categories: 類別
|
||||
color: Color
|
||||
name: Name
|
||||
save: Save
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Calendar
|
||||
OrbitApp.registration "Calendar",:type=> 'ModuleApp' do
|
||||
module_label 'miss_module_i18n.calendar'
|
||||
module_label 'calendar.calendar_'
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
# personal_plugin :enable => true,:path=>"panel/calendar/plugin/profile",:i18n=>'admin.calendar'
|
||||
|
||||
|
@ -11,14 +11,14 @@ module Calendar
|
|||
update_info 'some update_info'
|
||||
|
||||
side_bar do
|
||||
head_label_i18n 'miss_module_i18n.calendar',:icon_class=>"icons-calendar"
|
||||
head_label_i18n 'calendar.calendar_',:icon_class=>"icons-calendar"
|
||||
available_for [:admin,:guest,:manager,:sub_manager]
|
||||
active_for_controllers ({:private=>['cals','calendar_categories'],:public=>['panel/calendar/back_end/tags']})
|
||||
|
||||
|
||||
head_link_path "panel_calendar_back_end_cals_path"
|
||||
|
||||
context_link 'calendar.calendars',
|
||||
context_link 'calendar.categories',
|
||||
:link_path=>"new_panel_calendar_back_end_cal_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{:cals=>:new},
|
||||
|
|
|
@ -4,10 +4,9 @@ zh_tw:
|
|||
archive: 檔案室
|
||||
_archive:
|
||||
all: 全部檔案
|
||||
calendar: 日曆模組
|
||||
calendars: 日曆
|
||||
gallery: 相簿
|
||||
location: (未命名)Location
|
||||
location: 地標
|
||||
ad_banner: 廣告輪播
|
||||
|
||||
miss_plugin_i18n:
|
||||
|
|
|
@ -16,7 +16,7 @@ module PageContent
|
|||
end
|
||||
|
||||
side_bar do
|
||||
head_label_i18n 'page',:icon_class=>"icons-page"
|
||||
head_label_i18n 'page',:icon_class=>"icons-newspaper"
|
||||
available_for [:admin,:guest,:manager,:sub_manager]
|
||||
active_for_controllers ({:private=>['page_contexts']})
|
||||
active_for_object_auth ['PageContext']
|
||||
|
|
Loading…
Reference in New Issue