member plugin init edit

This commit is contained in:
unknown 2013-02-20 18:05:09 +08:00
commit f59da3ce81
59 changed files with 273 additions and 111 deletions

View File

@ -72,10 +72,10 @@ end
group :test, :development do group :test, :development do
#gem 'pry' gem 'pry'
#gem 'pry-remote' gem 'pry-remote'
#gem 'pry-stack_explorer' gem 'pry-stack_explorer'
#gem 'pry-debugger' gem 'pry-debugger'
gem 'faker' gem 'faker'
gem "sunspot-rails-tester" gem "sunspot-rails-tester"

View File

@ -42,6 +42,10 @@ $("#tag_list select").live('change', function() {
$.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_r_tag_options'); $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_r_tag_options');
}); });
$("select.widget_field_select").live('change', function() {
$.getScript(get_object_path() + '/reload_after_widget_field_changed?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri'));
});
$('.part_kind').live('click', function() { $('.part_kind').live('click', function() {
$('.part_kind_partial').hide(); $('.part_kind_partial').hide();
$('#part_' + $(this).attr('value')).show(); $('#part_' + $(this).attr('value')).show();

View File

@ -55,9 +55,10 @@ class Admin::PagePartsController < ApplicationController
def update def update
@part = PagePart.find(params[:id]) @part = PagePart.find(params[:id])
params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type],params[:page_part][:widget_field_is_link] )
params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field]
params[:page_part][:widget_field_type] = nil params[:page_part][:widget_field_type] = nil
params[:page_part][:widget_field_is_link] = nil
if params[:page_part][:module_app].blank? if params[:page_part][:module_app].blank?
params[:page_part][:module_app] = nil params[:page_part][:module_app] = nil
@ -90,6 +91,13 @@ class Admin::PagePartsController < ApplicationController
redirect_to admin_items_url( :parent_id => @item.parent_id ) redirect_to admin_items_url( :parent_id => @item.parent_id )
end end
def reload_widget_field
@index = params[:field_seri].to_i
@part = PagePart.find params[:id]
@choosen_field = params[:widget_field_value]
@module_app = @part.module_app
end
def reload_widgets def reload_widgets
@part = PagePart.find params[:id] @part = PagePart.find params[:id]
@module_app = ModuleApp.find(params[:module_app_id]) rescue nil @module_app = ModuleApp.find(params[:module_app_id]) rescue nil

View File

@ -23,8 +23,7 @@ class DefaultWidgetController< OrbitWidgetController
@fields = @page_part.widget_field @fields = @page_part.widget_field
@page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3) @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3)
end end
@data = eval(@default_widget["query"]).limit(data_limit).includes(@widget_image_field) @data = eval(@default_widget["query"]).limit(data_limit).includes(@widget_image_field).desc(:created_at)
case params[:type] case params[:type]
when "typeA" when "typeA"
@tag_class = 'default_widget_typeA' @tag_class = 'default_widget_typeA'

View File

@ -9,6 +9,49 @@ module Admin::PagePartsHelper
end end
end end
def get_widget_field_rel(local_item=nil)
local_item = @part if local_item.nil? && @part
local_item = @page if local_item.nil? && @page
case local_item
when Page
admin_pages_path
when PagePart
admin_page_parts_path
end
end
def field_link_switch(i,object_name,field_name,local_item=nil,prefill_value=nil)
local_item = @part if local_item.nil? && @part
local_item = @page if local_item.nil? && @page
res = ''
choosen_value = prefill_value || (local_item[:widget_field][i][0] rescue nil)
if choosen_value
choosen_field_is_link = (@module_app.widget_fields.select{|t| t[0].to_s==choosen_value}.first)[2]==:link
else
choosen_field_is_link = false
end
if choosen_field_is_link
value = case local_item
when Page
local_item[:frontend_field][i][2]
when PagePart
local_item[:widget_field][i][2]
end
res = label_tag '' do
check_box_tag("#{object_name}[#{field_name}_is_link][]", value = "true", value) + I18n.t("default_widget.field_is_link")
end
else # choosen_field_not_link
res = hidden_field_tag "#{object_name}[#{field_name}_is_link][]", 'false'
end # of if choosen_field_is_link
end
def widget_field_options(i,local_item=nil) def widget_field_options(i,local_item=nil)
local_item = @part if local_item.nil? && @part local_item = @part if local_item.nil? && @part
local_item = @page if local_item.nil? && @page local_item = @page if local_item.nil? && @page

View File

@ -1,22 +1,23 @@
module DefaultWidgetHelper module DefaultWidgetHelper
def get_field_header(field) def get_field_header(field)
I18n.t(@page_part.module_app.widget_fields.select{|t|t[0]==field}[0][1]) I18n.t("#{@page_part.module_app.key}.default_widget.#{field}")
end end
def link_to_field(row_data,field) def link_to_field(row_data,field,switch)
method_ary = @page_part.module_app.widget_fields_link_method method_ary = @page_part.module_app.widget_fields_link_method
if method_ary.has_key? field field = field.to_sym
url = case method_ary[field]["args"] if(method_ary.has_key?(field) and (switch == "true"))
url = case method_ary[field][:args]
when nil # no args when nil # no args
get_data_link(method_ary[field]["method"]) get_data_link(method_ary[field][:method])
when :self # passing self when :self # passing self
get_data_link(method_ary[field]['method'],row_data.id) get_data_link(method_ary[field][:method],row_data.id)
else else
ary = method_ary[field]["args"].clone ary = method_ary[field][:args].clone
object_hash = ary.each do |key,val| object_hash = ary.each do |key,val|
ary[key]= type_trans_or_to_s(row_data.send(val[0]).send(val[1])) ary[key]= type_trans_or_to_s(row_data.send(val[0]).send(val[1]))
end end
get_data_link(method_ary[field]['method'],object_hash) get_data_link(method_ary[field][:method],object_hash)
end end
link_to row_data.send(field),url link_to row_data.send(field),url

View File

@ -6,7 +6,7 @@ class ModuleApp
field :key field :key
field :title field :title
field :sidebar_order#,type: Integer field :sidebar_order,type: Integer,default: 0
def refetch_setting!(reg) def refetch_setting!(reg)
# %w{module_label category base_url version organization author intro update_info create_date}.each do |field| # %w{module_label category base_url version organization author intro update_info create_date}.each do |field|
@ -30,7 +30,7 @@ class ModuleApp
end end
def get_default_widget def get_default_widget
raise 'Need to link with OrbitApp [type: Array]' get_registration.get_default_widget
end end
@ -98,7 +98,8 @@ class ModuleApp
end end
def widget_fields_link_method def widget_fields_link_method
raise 'Need to link with OrbitApp [type: Hash]' get_registration.get_link_methods
# raise 'Need to link with OrbitApp [type: Hash]'
end end

View File

@ -31,12 +31,14 @@
<div class="rows clear"> <div class="rows clear">
<span class="span4"> <span class="span4">
<%= i+1 %> <%= i+1 %>
<%= select_tag "#{object_name}[#{field_name}][]", widget_field_options(i), :include_blank => true %> <%= select_tag "#{object_name}[#{field_name}][]", widget_field_options(i), :include_blank => true ,:class=>'widget_field_select',:field_seri => i ,:id=>"#{object_name}_#{field_name}_#{i}"%>
</span> </span>
<span class="span3"> <span class="span3">
<%= select_tag "#{object_name}[#{field_name}_type][]", widget_fiield_type_options(i), :include_blank => true %> <br /> <%= select_tag "#{object_name}[#{field_name}_type][]", widget_fiield_type_options(i), :include_blank => true %> <br />
</span> </span>
<span class="span5"></span> <span class="span5 link_switch_holder">
<%= field_link_switch(i,object_name,field_name) %>
</span>
</div><br/> </div><br/>
<% end %> <% end %>
<br/> <br/>

View File

@ -26,7 +26,7 @@
<%= t "default_widget.select_widget_path" %> <%= t "default_widget.select_widget_path" %>
</label> </label>
<div class="controls"> <div class="controls">
<%= f.select :widget_path, @module_app ? @module_app.widgets.collect{|k,v| [I18n.t(v["i18n"]),k]} : [], {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> <%= f.select :widget_path, @module_app ? @module_app.widgets.collect{|k,v| [I18n.t(v["i18n"]),k]} : [], {}, { :selected => @part.widget_path, :rel => get_widget_field_rel } %>
</div> </div>
</div> </div>

View File

@ -0,0 +1 @@
$("#<%= params[:dom_id] %>").parents(".rows").find(".link_switch_holder").html("<%= j field_link_switch(@index,'page_part','widget_field',nil,@choosen_field) %>");

View File

@ -11,7 +11,7 @@
<% @data.each do |row_data| %> <% @data.each do |row_data| %>
<tr> <tr>
<% @fields.each do |field|%> <% @fields.each do |field|%>
<td><%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%></td> <td><%= content_tag(:span,link_to_field(row_data,field[0],field[2]),:class=>field[1])%></td>
<% end %> <% end %>
</tr> </tr>
<% end %> <% end %>

View File

@ -13,8 +13,7 @@
<div class="viewport"> <div class="viewport">
<div class="overview"> <div class="overview">
<ul class="nav nav-list"> <ul class="nav nav-list">
<%= render :partial=> 'layouts/side_bar_content'%> <%= render ((local_assigns.has_key? :side_bar_content) ? side_bar_content : 'layouts/side_bar_content') %>
<%#= render ((local_assigns.has_key? :side_bar_content) ? side_bar_content : 'layouts/side_bar_content') %>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -151,6 +151,8 @@ en:
deadline: Deadline deadline: Deadline
default: Default default: Default
default_css: Default CSS default_css: Default CSS
default_widget:
default_widget: Default Widget
delete: delete:
file: Delete file file: Delete file
success: success:

View File

@ -144,9 +144,11 @@ zh_tw:
delete: 刪除 delete: 刪除
delete_file: 刪除檔案 delete_file: 刪除檔案
default_widget: default_widget:
default_widget: 預設樣板
name: 預設樣式 name: 預設樣式
no_support_setting: 沒有可以使用的設定 no_support_setting: 沒有可以使用的設定
no_value: 不設定(全部) no_value: 不設定(全部)
field_is_link: 連結
fields_: 前台輸出欄位 fields_: 前台輸出欄位
fields_order: 輸出欄位順序 fields_order: 輸出欄位順序
fields_style: 輸出欄位樣式 fields_style: 輸出欄位樣式

View File

@ -8,10 +8,10 @@ defaults: &defaults
development: development:
<<: *defaults <<: *defaults
database: demo_site_development database: test_site
test: test:
<<: *defaults <<: *defaults
database: demo_site_test database: test_site
# set these environment variables on your prod server # set these environment variables on your prod server
production: production:

View File

@ -114,6 +114,7 @@ Orbit::Application.routes.draw do
resources :page_parts do resources :page_parts do
member do member do
get 'reload_after_widget_field_changed',:action=>'reload_widget_field'
get 'reload_after_module_changed',:action=>'reload_widgets' get 'reload_after_module_changed',:action=>'reload_widgets'
get 'reload_after_list_changed',:action=> 'reload_widget_styles' get 'reload_after_list_changed',:action=> 'reload_widget_styles'
get 'reload_r_tag_options' get 'reload_r_tag_options'

View File

@ -64,6 +64,10 @@ module OrbitApp
return @widget_set.get_fields return @widget_set.get_fields
end end
def get_link_methods
return @widget_set.get_link_methods
end
def get_default_widget def get_default_widget
if @widget_set.nil? # Init not defining widget if @widget_set.nil? # Init not defining widget
return {} return {}

View File

@ -24,6 +24,11 @@ module OrbitApp
def all def all
return @@side_bars return @@side_bars
end end
def all_get_ordered!
@@side_bars.sort! {|x,y| x.get_sidebar_order! <=> y.get_sidebar_order! }
end
end end
extend ClassMethods extend ClassMethods
@ -52,10 +57,16 @@ module OrbitApp
@app_base_path = '' @app_base_path = ''
@module_app_key = key @module_app_key = key
@get_module_app = get_module_app @get_module_app = get_module_app
@sidebar_order = 0
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
# setup_module_app(module_app_key) # setup_module_app(module_app_key)
finalize! finalize!
SideBarRegisition.add(self) SideBarRegisition.add(self)
SideBarRegisition.all_get_ordered!
end
def get_sidebar_order!
@sidebar_order = (get_module_app.sidebar_order rescue 0)
end end
def get_module_app def get_module_app

View File

@ -75,6 +75,10 @@ module OrbitApp
get_default_widget.get_fields get_default_widget.get_fields
end end
def get_link_methods
get_default_widget.get_link_methods
end
def get_default_widget def get_default_widget
return @default_widget return @default_widget
end end
@ -98,11 +102,11 @@ module OrbitApp
def self.get_interface_args def self.get_interface_args
#will need to work with design #will need to work with design
{:name=>"default_widget",:field=>nil,:label=>'label',:style=>STYLE} {:name=>"default_widget",:field=>@fields,:style=>STYLE,:i18n=>'default_widget.default_widget'}
end end
def to_module_app_format def to_module_app_format
{:query=>@query,:image=>@image} rescue nil {"query"=>@query,"image"=>@image} rescue nil
end end
def link_field(field_name,setting) def link_field(field_name,setting)
@ -117,6 +121,10 @@ module OrbitApp
@fields @fields
end end
def get_link_methods
return flatten_hashes(@fields.select{|t| t[2]==:link}.map{|t| Hash[t[0].to_sym,t[1]] })
end
def query(var) def query(var)
@query = var @query = var
end end
@ -125,6 +133,10 @@ module OrbitApp
@image = var @image = var
end end
def flatten_hashes(ary)
Hash[*ary.map(&:to_a).flatten]
end
end end
class Widget class Widget
@ -161,7 +173,7 @@ module OrbitApp
def to_hash def to_hash
{:name => @name,:fields=>@fields,:label=>@label,:style=>@style,:i18n=>@widget_i18n} {:name => @name,:fields=>@fields,:style=>@style,:i18n=>@widget_i18n}
end end
protected protected

View File

@ -439,5 +439,57 @@ namespace :migrate do
ma.save ma.save
end end
end end
task :cleanup_page_part_without_page => :environment do
pps = PagePart.all.select{|t| t.page.nil? }
pps.each{|t| t.destroy}
end
task :backup_module_app_info => :environment do
PagePart.all.each do |pp|
pp[:backup_module_app_key] = (pp.module_app ? pp.module_app.key : nil)
puts pp.id
pp.save
# puts pp.inspect
end
Page.all.each do |page|
page[:backup_module_app_key] = (page.module_app ? page.module_app.key : nil)
page.save
# puts page.inspect
end
end end
task :rebind_module_app => :environment do
Page.all.each do |page|
if page[:backup_module_app_key].nil?
page.module_app = nil
else
page.module_app = ModuleApp.where(:key=> page[:backup_module_app_key]).first
end
page.save
end
PagePart.all.each do |pp|
if pp[:backup_module_app_key].nil?
pp.module_app = nil
else
pp.module_app = ModuleApp.where(:key=> pp[:backup_module_app_key]).first
end
pp.save
end
end
task :clean_up_module_app_info => :environment do
Page.all.each do |page|
page.unset(:backup_module_app_key)
page.save
end
PagePart.all.each do |pp|
pp.unset(:backup_module_app_key)
pp.save
end
end
end

View File

@ -0,0 +1,4 @@
en:
ad_banner:
ad_banner: Ad Banner

View File

@ -0,0 +1,3 @@
zh_tw:
module_name:
ad_banner: 廣告輪播

View File

@ -1,6 +1,6 @@
module AdBanner module AdBanner
OrbitApp.registration "AdBanner",:type=> 'ModuleApp' do OrbitApp.registration "AdBanner",:type=> 'ModuleApp' do
module_label 'miss_module_i18n.ad_banner' module_label 'module_name.ad_banner'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/ad_banner/plugin/profile",:i18n=>'admin.ad_banner' # personal_plugin :enable => true,:path=>"panel/ad_banner/plugin/profile",:i18n=>'admin.ad_banner'
@ -33,7 +33,7 @@ module AdBanner
# end # end
side_bar do side_bar do
head_label_i18n 'admin.ad_banner',:icon_class=>"icons-landscape" head_label_i18n 'ad_banner.ad_banner',:icon_class=>"icons-landscape"
available_for [:admin,:guest,:manager,:sub_manager] available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:public=>['admin/ad_banners', 'admin/ad_images']}) active_for_controllers ({:public=>['admin/ad_banners', 'admin/ad_images']})

View File

@ -15,3 +15,5 @@ en:
search: Search for Announcement search: Search for Announcement
update_bulletin_success: Announcement was successfully updated update_bulletin_success: Announcement was successfully updated
update_bulletin_category_success: Announcement category was successfully updated update_bulletin_category_success: Announcement category was successfully updated
all_articles: All Articles
add_new: New

View File

@ -11,8 +11,8 @@ zh_tw:
editing_announcement_category: 編輯公告類別 editing_announcement_category: 編輯公告類別
error: error:
no_avilb_cate_for_posting: 公告必需有一個類別才能發送,請與管理員聯絡 no_avilb_cate_for_posting: 公告必需有一個類別才能發送,請與管理員聯絡
front_end: frontend:
bulletins: 請LIN給名字前台頁 bulletins: 公告前台
new_bulletin_category: 新增公告類別 new_bulletin_category: 新增公告類別
search: 搜尋公告 search: 搜尋公告
update_bulletin_success: 公告已成功更新 update_bulletin_success: 公告已成功更新

View File

@ -13,7 +13,7 @@ module Announcement
front_end do front_end do
app_page 'bulletins' do app_page 'bulletins' do
frontend_i18n "announcement.front_end.bulletins" frontend_i18n "announcement.frontend.bulletins"
end end
end end
@ -40,7 +40,7 @@ module Announcement
end end
side_bar do side_bar do
head_label_i18n 'admin.announcement',:icon_class=>"icons-megaphone" head_label_i18n 'announcement.announcement',:icon_class=>"icons-megaphone"
available_for [:admin,:guest,:manager,:sub_manager] available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']}) active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']})
active_for_object_auth ['BulletinCategory'] active_for_object_auth ['BulletinCategory']

View File

@ -4,7 +4,9 @@
en: en:
_locale: English _locale: English
archive:
all: All
archive: Archive
add: Add add: Add
back: Back back: Back
create: Create create: Create

View File

@ -2,8 +2,12 @@ zh_tw:
_locale: 中文 _locale: 中文
archive: archive:
archive: 檔案室
all: 全部檔案
widget: widget:
archive_files: 檔案室Wiget archive_files: 檔案室Wiget
frontend:
archive: 檔案室前台
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,12 +1,9 @@
module Archive module Archive
OrbitApp.registration "Archive",:type=> 'ModuleApp' do OrbitApp.registration "Archive",:type=> 'ModuleApp' do
module_label 'miss_module_i18n.archive' module_label 'archive.archive'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'miss_plugin_i18n.archive' # personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'archive.archive'
# =======
# personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'admin.archive'
# >>>>>>> 858e942da234fffa3053a995231f2b0d9eee43d1
version "0.1" version "0.1"
organization "Rulingcom" organization "Rulingcom"
@ -15,7 +12,9 @@ module Archive
update_info 'some update_info' update_info 'some update_info'
front_end do front_end do
app_page 'archive_files' app_page 'archive_files' do
frontend_i18n "archive.frontend.archive"
end
end end
widgets do widgets do
@ -33,14 +32,14 @@ module Archive
end end
side_bar do side_bar do
head_label_i18n 'miss_module_i18n.archive',:icon_class=>"icons-archive" head_label_i18n 'archive.archive',:icon_class=>"icons-archive"
available_for [:admin,:guest,:manager,:sub_manager] available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['archive_file_categorys','archive_files'],:public=>['panel/archive/back_end/tags']}) active_for_controllers ({:private=>['archive_file_categorys','archive_files'],:public=>['panel/archive/back_end/tags']})
active_for_object_auth ['BulletinCategory'] active_for_object_auth ['BulletinCategory']
head_link_path "panel_archive_back_end_archive_files_path" head_link_path "panel_archive_back_end_archive_files_path"
context_link 'miss_module_i18n._archive.all', context_link 'archive.all',
:link_path=>"panel_archive_back_end_archive_files_path" , :link_path=>"panel_archive_back_end_archive_files_path" ,
:priority=>1, :priority=>1,
:active_for_action=>{:archive_files=>:index}, :active_for_action=>{:archive_files=>:index},

View File

@ -1,5 +1,6 @@
en: en:
calendar: calendar:
calendar_: Calendar
calendar: Calendar calendar: Calendar
calendars: Calendars calendars: Calendars
color: Color color: Color

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
calendar: calendar:
calendar_: 行事曆
calendar: 日曆 calendar: 日曆
calendars: Calendars categories: 類別
color: Color color: Color
name: Name name: Name
save: Save save: Save

View File

@ -1,6 +1,6 @@
module Calendar module Calendar
OrbitApp.registration "Calendar",:type=> 'ModuleApp' do OrbitApp.registration "Calendar",:type=> 'ModuleApp' do
module_label 'miss_module_i18n.calendar' module_label 'calendar.calendar_'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/calendar/plugin/profile",:i18n=>'admin.calendar' # personal_plugin :enable => true,:path=>"panel/calendar/plugin/profile",:i18n=>'admin.calendar'
@ -11,14 +11,14 @@ module Calendar
update_info 'some update_info' update_info 'some update_info'
side_bar do 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] available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['cals','calendar_categories'],:public=>['panel/calendar/back_end/tags']}) active_for_controllers ({:private=>['cals','calendar_categories'],:public=>['panel/calendar/back_end/tags']})
head_link_path "panel_calendar_back_end_cals_path" 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" , :link_path=>"new_panel_calendar_back_end_cal_path" ,
:priority=>1, :priority=>1,
:active_for_action=>{:cals=>:new}, :active_for_action=>{:cals=>:new},

View File

@ -1,6 +1,6 @@
module Gallery module Gallery
OrbitApp.registration "Gallery",:type=> 'ModuleApp' do OrbitApp.registration "Gallery",:type=> 'ModuleApp' do
module_label 'miss_module_i18n.gallery' module_label 'gallery.gallery'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/gallery/plugin/profile",:i18n=>'admin.gallery' # personal_plugin :enable => true,:path=>"panel/gallery/plugin/profile",:i18n=>'admin.gallery'
@ -41,7 +41,7 @@ module Gallery
end end
side_bar do side_bar do
head_label_i18n 'miss_module_i18n.gallery',:icon_class=>"icons-pictures" head_label_i18n 'gallery.gallery',:icon_class=>"icons-pictures"
available_for [:admin,:guest,:manager,:sub_manager] available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['albums','album_images','gallery_categories','/panel/gallery/back_end/tags']}) active_for_controllers ({:private=>['albums','album_images','gallery_categories','/panel/gallery/back_end/tags']})
active_for_object_auth ['BulletinCategory'] active_for_object_auth ['BulletinCategory']

View File

@ -0,0 +1,3 @@
en:
location:
location: Location

View File

@ -0,0 +1,3 @@
zh_tw:
location:
location: 地標

View File

@ -1,6 +1,6 @@
module Location module Location
OrbitApp.registration "Location",:type=> 'ModuleApp' do OrbitApp.registration "Location",:type=> 'ModuleApp' do
module_label 'miss_module_i18n.location' module_label 'location.location'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location'
@ -32,7 +32,7 @@ module Location
# end # end
side_bar do side_bar do
head_label_i18n 'miss_module_i18n.location',:icon_class=>"icons-location" head_label_i18n 'location.location',:icon_class=>"icons-location"
available_for [:admin,:guest,:manager,:sub_manager] available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['locations']}) active_for_controllers ({:private=>['locations']})

View File

@ -1,24 +1,13 @@
zh_tw: zh_tw:
miss_module_i18n: miss_module_i18n:
archive: 檔案室
_archive:
all: 全部檔案
calendar: 日曆模組
calendars: 日曆
gallery: 相簿
location: (未命名)Location
ad_banner: 廣告輪播
miss_plugin_i18n: # miss_plugin_i18n:
personal_book: Personal Book
personal_diploma: Personal Diploma
personal_experience: Personal Experience
personal_honor: Personal Honor
personal_journal: Personal Journal
personal_lab: Personal Lab
personal_patent: Personal Patent
personal_project: Personal Project
personal_research: Personal Research
personal_conference: Personal Conference
# personal_experience: 經歷
# personal_honor: 榮譽
# personal_project: 研究計畫
# personal_research: 研究
# personal_conference: 研討會論文

View File

@ -5,3 +5,5 @@ zh_tw:
create_page_content_success: 頁面內容已成功建立 create_page_content_success: 頁面內容已成功建立
editing_page_content: 編輯頁面內容 editing_page_content: 編輯頁面內容
update_page_content_success: 頁面內容已成功更新 update_page_content_success: 頁面內容已成功更新
frontend:
page: 頁面前台

View File

@ -12,11 +12,13 @@ module PageContent
update_info 'some update_info' update_info 'some update_info'
front_end do front_end do
app_page 'page_contexts' app_page 'page_contexts' do
frontend_i18n "page_content.frontend.page"
end
end end
side_bar do 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] available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['page_contexts']}) active_for_controllers ({:private=>['page_contexts']})
active_for_object_auth ['PageContext'] active_for_object_auth ['PageContext']

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_book: 專書
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,9 +1,8 @@
module PersonalBook module PersonalBook
OrbitApp.registration "PersonalBook",:type=> 'ModuleApp' do OrbitApp.registration "PersonalBook",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_book' module_label 'module_name.personal_book'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_book/plugin/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'miss_plugin_i18n.personal_book' personal_plugin :enable => true,:path=>"panel/personal_book/plugin/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'module_name.personal_book'
end end

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_conference: 研討會論文
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,9 +1,8 @@
module PersonalConference module PersonalConference
OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_conference' module_label 'module_name.personal_conference'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_conference/plugin/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'miss_plugin_i18n.personal_conference' personal_plugin :enable => true,:path=>"panel/personal_conference/plugin/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'module_name.personal_conference'
end end

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_diploma: 學歷
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,9 +1,8 @@
module PersonalDiploma module PersonalDiploma
OrbitApp.registration "PersonalDiploma",:type=> 'ModuleApp' do OrbitApp.registration "PersonalDiploma",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_diploma' module_label 'module_name.personal_diploma'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_diploma/plugin/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'miss_plugin_i18n.personal_diploma' personal_plugin :enable => true,:path=>"panel/personal_diploma/plugin/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'module_name.personal_diploma'
end end

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_experience: 經歷
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,9 +1,8 @@
module PersonalExperience module PersonalExperience
OrbitApp.registration "PersonalExperience",:type=> 'ModuleApp' do OrbitApp.registration "PersonalExperience",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_experience' module_label 'module_name.personal_experience'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_experience/plugin/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'miss_plugin_i18n.personal_experience' personal_plugin :enable => true,:path=>"panel/personal_experience/plugin/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'module_name.personal_experience'
end end

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_honor: 榮譽
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,9 +1,8 @@
module PersonalHonor module PersonalHonor
OrbitApp.registration "PersonalHonor",:type=> 'ModuleApp' do OrbitApp.registration "PersonalHonor",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_honor' module_label 'module_name.personal_honor'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_honor/plugin/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'miss_plugin_i18n.personal_honor' personal_plugin :enable => true,:path=>"panel/personal_honor/plugin/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'module_name.personal_honor'
end end

View File

@ -1,4 +1,6 @@
zh_tw: zh_tw:
module_name:
personal_journal: 期刊著作
personal_journal: personal_journal:
paper_title : "論文名稱" paper_title : "論文名稱"
journal_title : "期刊名稱" journal_title : "期刊名稱"

View File

@ -1,9 +1,8 @@
module PersonalJournal module PersonalJournal
OrbitApp.registration "PersonalJournal",:type=> 'ModuleApp' do OrbitApp.registration "PersonalJournal",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_journal' module_label 'module_name.personal_journal'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_journal/plugin/profile",:admin_path=>"/panel/personal_journal/back_end/writing_journals",:i18n=>'miss_plugin_i18n.personal_journal' personal_plugin :enable => true,:path=>"panel/personal_journal/plugin/profile",:admin_path=>"/panel/personal_journal/back_end/writing_journals",:i18n=>'module_name.personal_journal'
end end

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_lab: 實驗室
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,8 +1,8 @@
module PersonalLab module PersonalLab
OrbitApp.registration "PersonalLab",:type=> 'ModuleApp' do OrbitApp.registration "PersonalLab",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_lab' module_label 'module_name.personal_lab'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_lab/plugin/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'miss_plugin_i18n.personal_lab' personal_plugin :enable => true,:path=>"panel/personal_lab/plugin/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab'
end end

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_patent: 專利
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,8 +1,8 @@
module PersonalPatent module PersonalPatent
OrbitApp.registration "PersonalPatent",:type=> 'ModuleApp' do OrbitApp.registration "PersonalPatent",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_patent' module_label 'module_name.personal_patent'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_patent/plugin/profile",:admin_path=>"/panel/personal_patent/back_end/writing_patents",:i18n=>'miss_plugin_i18n.personal_patent' personal_plugin :enable => true,:path=>"panel/personal_patent/plugin/profile",:admin_path=>"/panel/personal_patent/back_end/writing_patents",:i18n=>'module_name.personal_patent'
end end

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_project: 研究計畫
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,8 +1,8 @@
module PersonalProject module PersonalProject
OrbitApp.registration "PersonalProject",:type=> 'ModuleApp' do OrbitApp.registration "PersonalProject",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_project' module_label 'module_name.personal_project'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_project/plugin/profile",:admin_path=>"/panel/personal_project/back_end/projects",:i18n=>'miss_plugin_i18n.personal_project' personal_plugin :enable => true,:path=>"panel/personal_project/plugin/profile",:admin_path=>"/panel/personal_project/back_end/projects",:i18n=>'module_name.personal_project'
end end

View File

@ -1,7 +1,8 @@
zh_tw: zh_tw:
_locale: 中文 _locale: 中文
module_name:
personal_research: 研究
add: 新增 add: 新增
back: 回去 back: 回去
create: 創造 create: 創造

View File

@ -1,8 +1,8 @@
module PersonalResearch module PersonalResearch
OrbitApp.registration "PersonalResearch",:type=> 'ModuleApp' do OrbitApp.registration "PersonalResearch",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_research' module_label 'module_name.personal_research'
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_research/plugin/profile",:admin_path=>"/panel/personal_research/back_end/researchs",:i18n=>'miss_plugin_i18n.personal_research' personal_plugin :enable => true,:path=>"panel/personal_research/plugin/profile",:admin_path=>"/panel/personal_research/back_end/researchs",:i18n=>'module_name.personal_research'
end end