diff --git a/Gemfile b/Gemfile
index 1e2a6448..de03e4fd 100644
--- a/Gemfile
+++ b/Gemfile
@@ -72,10 +72,10 @@ end
group :test, :development do
- #gem 'pry'
- #gem 'pry-remote'
- #gem 'pry-stack_explorer'
- #gem 'pry-debugger'
+ gem 'pry'
+ gem 'pry-remote'
+ gem 'pry-stack_explorer'
+ gem 'pry-debugger'
gem 'faker'
gem "sunspot-rails-tester"
diff --git a/app/assets/javascripts/page_edit.js.erb b/app/assets/javascripts/page_edit.js.erb
index aec24de6..b7771692 100644
--- a/app/assets/javascripts/page_edit.js.erb
+++ b/app/assets/javascripts/page_edit.js.erb
@@ -42,6 +42,10 @@ $("#tag_list select").live('change', function() {
$.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_partial').hide();
$('#part_' + $(this).attr('value')).show();
diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb
index 21050985..d591dd83 100644
--- a/app/controllers/admin/page_parts_controller.rb
+++ b/app/controllers/admin/page_parts_controller.rb
@@ -55,9 +55,10 @@ class Admin::PagePartsController < ApplicationController
def update
@part = PagePart.find(params[:id])
-
- 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] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type],params[:page_part][:widget_field_is_link] )
+
params[:page_part][:widget_field_type] = nil
+ params[:page_part][:widget_field_is_link] = nil
if params[:page_part][:module_app].blank?
params[:page_part][:module_app] = nil
@@ -90,6 +91,13 @@ class Admin::PagePartsController < ApplicationController
redirect_to admin_items_url( :parent_id => @item.parent_id )
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
@part = PagePart.find params[:id]
@module_app = ModuleApp.find(params[:module_app_id]) rescue nil
diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb
index 637810cd..956a2a53 100644
--- a/app/controllers/default_widget_controller.rb
+++ b/app/controllers/default_widget_controller.rb
@@ -23,8 +23,7 @@ class DefaultWidgetController< OrbitWidgetController
@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)
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]
when "typeA"
@tag_class = 'default_widget_typeA'
diff --git a/app/helpers/admin/page_parts_helper.rb b/app/helpers/admin/page_parts_helper.rb
index 818fe46b..898b139e 100644
--- a/app/helpers/admin/page_parts_helper.rb
+++ b/app/helpers/admin/page_parts_helper.rb
@@ -9,6 +9,49 @@ module Admin::PagePartsHelper
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)
local_item = @part if local_item.nil? && @part
local_item = @page if local_item.nil? && @page
diff --git a/app/helpers/default_widget_helper.rb b/app/helpers/default_widget_helper.rb
index 645f50f0..913c77ee 100644
--- a/app/helpers/default_widget_helper.rb
+++ b/app/helpers/default_widget_helper.rb
@@ -1,22 +1,23 @@
module DefaultWidgetHelper
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
- 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
- if method_ary.has_key? field
- url = case method_ary[field]["args"]
+ field = field.to_sym
+ if(method_ary.has_key?(field) and (switch == "true"))
+ url = case method_ary[field][:args]
when nil # no args
- get_data_link(method_ary[field]["method"])
+ get_data_link(method_ary[field][:method])
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
- ary = method_ary[field]["args"].clone
+ ary = method_ary[field][:args].clone
object_hash = ary.each do |key,val|
ary[key]= type_trans_or_to_s(row_data.send(val[0]).send(val[1]))
end
- get_data_link(method_ary[field]['method'],object_hash)
+ get_data_link(method_ary[field][:method],object_hash)
end
link_to row_data.send(field),url
diff --git a/app/models/module_app.rb b/app/models/module_app.rb
index fb735438..5aa5a11d 100644
--- a/app/models/module_app.rb
+++ b/app/models/module_app.rb
@@ -6,7 +6,7 @@ class ModuleApp
field :key
field :title
- field :sidebar_order#,type: Integer
+ field :sidebar_order,type: Integer,default: 0
def refetch_setting!(reg)
# %w{module_label category base_url version organization author intro update_info create_date}.each do |field|
@@ -30,7 +30,7 @@ class ModuleApp
end
def get_default_widget
- raise 'Need to link with OrbitApp [type: Array]'
+ get_registration.get_default_widget
end
@@ -98,7 +98,8 @@ class ModuleApp
end
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
diff --git a/app/views/admin/page_parts/_default_widget_setting.html.erb b/app/views/admin/page_parts/_default_widget_setting.html.erb
index 8496b19b..f4546178 100644
--- a/app/views/admin/page_parts/_default_widget_setting.html.erb
+++ b/app/views/admin/page_parts/_default_widget_setting.html.erb
@@ -31,13 +31,15 @@
<%= 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}"%>
<%= select_tag "#{object_name}[#{field_name}_type][]", widget_fiield_type_options(i), :include_blank => true %>
-
-
+
+ <%= field_link_switch(i,object_name,field_name) %>
+
+
<% end %>
diff --git a/app/views/admin/page_parts/_module_widget.html.erb b/app/views/admin/page_parts/_module_widget.html.erb
index 38fb013f..e1f81263 100644
--- a/app/views/admin/page_parts/_module_widget.html.erb
+++ b/app/views/admin/page_parts/_module_widget.html.erb
@@ -26,7 +26,7 @@
<%= t "default_widget.select_widget_path" %>
- <%= 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 } %>
diff --git a/app/views/admin/page_parts/reload_widget_field.js.erb b/app/views/admin/page_parts/reload_widget_field.js.erb
new file mode 100644
index 00000000..32482e51
--- /dev/null
+++ b/app/views/admin/page_parts/reload_widget_field.js.erb
@@ -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) %>");
\ No newline at end of file
diff --git a/app/views/default_widget/typeA.html.erb b/app/views/default_widget/typeA.html.erb
index f6e0eb54..20ce3dbd 100644
--- a/app/views/default_widget/typeA.html.erb
+++ b/app/views/default_widget/typeA.html.erb
@@ -11,7 +11,7 @@
<% @data.each do |row_data| %>
<% @fields.each do |field|%>
- <%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%> |
+ <%= content_tag(:span,link_to_field(row_data,field[0],field[2]),:class=>field[1])%> |
<% end %>
<% end %>
diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb
index fa2d332c..af7a5c79 100644
--- a/app/views/layouts/_side_bar.html.erb
+++ b/app/views/layouts/_side_bar.html.erb
@@ -13,8 +13,7 @@
- <%= 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') %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index d72d7383..cfd48348 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -151,6 +151,8 @@ en:
deadline: Deadline
default: Default
default_css: Default CSS
+ default_widget:
+ default_widget: Default Widget
delete:
file: Delete file
success:
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index 26c0dd52..768c52e5 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -144,9 +144,11 @@ zh_tw:
delete: 刪除
delete_file: 刪除檔案
default_widget:
+ default_widget: 預設樣板
name: 預設樣式
no_support_setting: 沒有可以使用的設定
no_value: 不設定(全部)
+ field_is_link: 連結
fields_: 前台輸出欄位
fields_order: 輸出欄位順序
fields_style: 輸出欄位樣式
diff --git a/config/mongoid.yml b/config/mongoid.yml
index a809bc06..2fa55a36 100644
--- a/config/mongoid.yml
+++ b/config/mongoid.yml
@@ -8,10 +8,10 @@ defaults: &defaults
development:
<<: *defaults
- database: demo_site_development
+ database: test_site
test:
<<: *defaults
- database: demo_site_test
+ database: test_site
# set these environment variables on your prod server
production:
diff --git a/config/routes.rb b/config/routes.rb
index 62c12180..c9e77b6b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -114,6 +114,7 @@ Orbit::Application.routes.draw do
resources :page_parts do
member do
+ get 'reload_after_widget_field_changed',:action=>'reload_widget_field'
get 'reload_after_module_changed',:action=>'reload_widgets'
get 'reload_after_list_changed',:action=> 'reload_widget_styles'
get 'reload_r_tag_options'
diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb
index 4911042b..9856f7d3 100644
--- a/lib/orbit_app/module/registration.rb
+++ b/lib/orbit_app/module/registration.rb
@@ -64,6 +64,10 @@ module OrbitApp
return @widget_set.get_fields
end
+ def get_link_methods
+ return @widget_set.get_link_methods
+ end
+
def get_default_widget
if @widget_set.nil? # Init not defining widget
return {}
diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb
index 050df87a..50811f03 100644
--- a/lib/orbit_app/module/side_bar.rb
+++ b/lib/orbit_app/module/side_bar.rb
@@ -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,12 +57,18 @@ 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 rescue 0)
+ end
+
def get_module_app
@get_module_app.call
end
diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb
index a02a2427..7e99b2a9 100644
--- a/lib/orbit_app/module/widget.rb
+++ b/lib/orbit_app/module/widget.rb
@@ -75,6 +75,10 @@ module OrbitApp
get_default_widget.get_fields
end
+ def get_link_methods
+ get_default_widget.get_link_methods
+ end
+
def get_default_widget
return @default_widget
end
@@ -98,11 +102,11 @@ module OrbitApp
def self.get_interface_args
#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
def to_module_app_format
- {:query=>@query,:image=>@image} rescue nil
+ {"query"=>@query,"image"=>@image} rescue nil
end
def link_field(field_name,setting)
@@ -117,6 +121,10 @@ module OrbitApp
@fields
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)
@query = var
end
@@ -125,6 +133,10 @@ module OrbitApp
@image = var
end
+ def flatten_hashes(ary)
+ Hash[*ary.map(&:to_a).flatten]
+ end
+
end
class Widget
@@ -161,7 +173,7 @@ module OrbitApp
def to_hash
- {:name => @name,:fields=>@fields,:label=>@label,:style=>@style,:i18n=>@widget_i18n}
+ {:name => @name,:fields=>@fields,:style=>@style,:i18n=>@widget_i18n}
end
protected
diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake
index 14516d93..f3b16f16 100644
--- a/lib/tasks/migrate.rake
+++ b/lib/tasks/migrate.rake
@@ -439,5 +439,57 @@ namespace :migrate do
ma.save
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
+
+ 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
diff --git a/vendor/built_in_modules/ad_banner/config/locales/en.yml b/vendor/built_in_modules/ad_banner/config/locales/en.yml
new file mode 100644
index 00000000..c52a82f7
--- /dev/null
+++ b/vendor/built_in_modules/ad_banner/config/locales/en.yml
@@ -0,0 +1,4 @@
+en:
+
+ ad_banner:
+ ad_banner: Ad Banner
\ No newline at end of file
diff --git a/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml b/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml
new file mode 100644
index 00000000..70168488
--- /dev/null
+++ b/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml
@@ -0,0 +1,3 @@
+zh_tw:
+ module_name:
+ ad_banner: 廣告輪播
\ No newline at end of file
diff --git a/vendor/built_in_modules/ad_banner/init.rb b/vendor/built_in_modules/ad_banner/init.rb
index 4a9aafba..3e7d5e39 100644
--- a/vendor/built_in_modules/ad_banner/init.rb
+++ b/vendor/built_in_modules/ad_banner/init.rb
@@ -1,6 +1,6 @@
module AdBanner
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__)
# personal_plugin :enable => true,:path=>"panel/ad_banner/plugin/profile",:i18n=>'admin.ad_banner'
@@ -33,7 +33,7 @@ module AdBanner
# end
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]
active_for_controllers ({:public=>['admin/ad_banners', 'admin/ad_images']})
diff --git a/vendor/built_in_modules/announcement/config/locales/en.yml b/vendor/built_in_modules/announcement/config/locales/en.yml
index 5dc236b5..d57797d9 100644
--- a/vendor/built_in_modules/announcement/config/locales/en.yml
+++ b/vendor/built_in_modules/announcement/config/locales/en.yml
@@ -15,3 +15,5 @@ en:
search: Search for Announcement
update_bulletin_success: Announcement was successfully updated
update_bulletin_category_success: Announcement category was successfully updated
+ all_articles: All Articles
+ add_new: New
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml
index 995bf2f5..d24c1265 100644
--- a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml
@@ -11,8 +11,8 @@ zh_tw:
editing_announcement_category: 編輯公告類別
error:
no_avilb_cate_for_posting: 公告必需有一個類別才能發送,請與管理員聯絡
- front_end:
- bulletins: 請LIN給名字前台頁
+ frontend:
+ bulletins: 公告前台
new_bulletin_category: 新增公告類別
search: 搜尋公告
update_bulletin_success: 公告已成功更新
diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb
index 77b696be..2dd1628a 100644
--- a/vendor/built_in_modules/announcement/init.rb
+++ b/vendor/built_in_modules/announcement/init.rb
@@ -13,7 +13,7 @@ module Announcement
front_end do
app_page 'bulletins' do
- frontend_i18n "announcement.front_end.bulletins"
+ frontend_i18n "announcement.frontend.bulletins"
end
end
@@ -40,7 +40,7 @@ module Announcement
end
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]
active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']})
active_for_object_auth ['BulletinCategory']
diff --git a/vendor/built_in_modules/archive/config/locales/en.yml b/vendor/built_in_modules/archive/config/locales/en.yml
index 4fcaafe7..27ba2c9f 100644
--- a/vendor/built_in_modules/archive/config/locales/en.yml
+++ b/vendor/built_in_modules/archive/config/locales/en.yml
@@ -4,7 +4,9 @@
en:
_locale: English
-
+ archive:
+ all: All
+ archive: Archive
add: Add
back: Back
create: Create
diff --git a/vendor/built_in_modules/archive/config/locales/zh_tw.yml b/vendor/built_in_modules/archive/config/locales/zh_tw.yml
index c2790d32..0369e6f6 100644
--- a/vendor/built_in_modules/archive/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/archive/config/locales/zh_tw.yml
@@ -2,8 +2,12 @@ zh_tw:
_locale: 中文
archive:
+ archive: 檔案室
+ all: 全部檔案
widget:
archive_files: 檔案室Wiget
+ frontend:
+ archive: 檔案室前台
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb
index 902ab57a..bd65fabe 100644
--- a/vendor/built_in_modules/archive/init.rb
+++ b/vendor/built_in_modules/archive/init.rb
@@ -1,12 +1,9 @@
module Archive
OrbitApp.registration "Archive",:type=> 'ModuleApp' do
- module_label 'miss_module_i18n.archive'
+ module_label 'archive.archive'
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=>'admin.archive'
-# >>>>>>> 858e942da234fffa3053a995231f2b0d9eee43d1
+ # personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'archive.archive'
version "0.1"
organization "Rulingcom"
@@ -15,7 +12,9 @@ module Archive
update_info 'some update_info'
front_end do
- app_page 'archive_files'
+ app_page 'archive_files' do
+ frontend_i18n "archive.frontend.archive"
+ end
end
widgets do
@@ -33,14 +32,14 @@ module Archive
end
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]
active_for_controllers ({:private=>['archive_file_categorys','archive_files'],:public=>['panel/archive/back_end/tags']})
active_for_object_auth ['BulletinCategory']
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" ,
:priority=>1,
:active_for_action=>{:archive_files=>:index},
diff --git a/vendor/built_in_modules/calendar/config/locales/en.yml b/vendor/built_in_modules/calendar/config/locales/en.yml
index 32396ad2..6e645481 100644
--- a/vendor/built_in_modules/calendar/config/locales/en.yml
+++ b/vendor/built_in_modules/calendar/config/locales/en.yml
@@ -1,5 +1,6 @@
en:
calendar:
+ calendar_: Calendar
calendar: Calendar
calendars: Calendars
color: Color
diff --git a/vendor/built_in_modules/calendar/config/locales/zh_tw.yml b/vendor/built_in_modules/calendar/config/locales/zh_tw.yml
index 1e7df002..ff6e49c8 100644
--- a/vendor/built_in_modules/calendar/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/calendar/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
calendar:
+ calendar_: 行事曆
calendar: 日曆
- calendars: Calendars
+ categories: 類別
color: Color
name: Name
save: Save
diff --git a/vendor/built_in_modules/calendar/init.rb b/vendor/built_in_modules/calendar/init.rb
index fc318e6c..beef7ca9 100644
--- a/vendor/built_in_modules/calendar/init.rb
+++ b/vendor/built_in_modules/calendar/init.rb
@@ -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},
diff --git a/vendor/built_in_modules/gallery/init.rb b/vendor/built_in_modules/gallery/init.rb
index 615d6593..d71b8af5 100644
--- a/vendor/built_in_modules/gallery/init.rb
+++ b/vendor/built_in_modules/gallery/init.rb
@@ -1,6 +1,6 @@
module Gallery
OrbitApp.registration "Gallery",:type=> 'ModuleApp' do
- module_label 'miss_module_i18n.gallery'
+ module_label 'gallery.gallery'
base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/gallery/plugin/profile",:i18n=>'admin.gallery'
@@ -41,7 +41,7 @@ module Gallery
end
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]
active_for_controllers ({:private=>['albums','album_images','gallery_categories','/panel/gallery/back_end/tags']})
active_for_object_auth ['BulletinCategory']
diff --git a/vendor/built_in_modules/location/config/locales/en.yml b/vendor/built_in_modules/location/config/locales/en.yml
new file mode 100644
index 00000000..5f7ec8ea
--- /dev/null
+++ b/vendor/built_in_modules/location/config/locales/en.yml
@@ -0,0 +1,3 @@
+en:
+ location:
+ location: Location
\ No newline at end of file
diff --git a/vendor/built_in_modules/location/config/locales/zh_tw.yml b/vendor/built_in_modules/location/config/locales/zh_tw.yml
new file mode 100644
index 00000000..ce53ff5b
--- /dev/null
+++ b/vendor/built_in_modules/location/config/locales/zh_tw.yml
@@ -0,0 +1,3 @@
+zh_tw:
+ location:
+ location: 地標
\ No newline at end of file
diff --git a/vendor/built_in_modules/location/init.rb b/vendor/built_in_modules/location/init.rb
index 021ddcc1..566bf5c1 100644
--- a/vendor/built_in_modules/location/init.rb
+++ b/vendor/built_in_modules/location/init.rb
@@ -1,6 +1,6 @@
module Location
OrbitApp.registration "Location",:type=> 'ModuleApp' do
- module_label 'miss_module_i18n.location'
+ module_label 'location.location'
base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location'
@@ -32,7 +32,7 @@ module Location
# end
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]
active_for_controllers ({:private=>['locations']})
diff --git a/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml b/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml
index 807df328..a723f1d0 100644
--- a/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml
@@ -1,24 +1,13 @@
zh_tw:
miss_module_i18n:
- archive: 檔案室
- _archive:
- all: 全部檔案
- calendar: 日曆模組
- calendars: 日曆
- gallery: 相簿
- location: (未命名)Location
- ad_banner: 廣告輪播
- 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
+ # miss_plugin_i18n:
+
+ # personal_experience: 經歷
+ # personal_honor: 榮譽
+
+ # personal_project: 研究計畫
+ # personal_research: 研究
+ # personal_conference: 研討會論文
diff --git a/vendor/built_in_modules/page_content/config/locales/zh_tw.yml b/vendor/built_in_modules/page_content/config/locales/zh_tw.yml
index a5df3f73..2e47402f 100644
--- a/vendor/built_in_modules/page_content/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/page_content/config/locales/zh_tw.yml
@@ -5,3 +5,5 @@ zh_tw:
create_page_content_success: 頁面內容已成功建立
editing_page_content: 編輯頁面內容
update_page_content_success: 頁面內容已成功更新
+ frontend:
+ page: 頁面前台
\ No newline at end of file
diff --git a/vendor/built_in_modules/page_content/init.rb b/vendor/built_in_modules/page_content/init.rb
index 73199b18..064489b4 100644
--- a/vendor/built_in_modules/page_content/init.rb
+++ b/vendor/built_in_modules/page_content/init.rb
@@ -12,11 +12,13 @@ module PageContent
update_info 'some update_info'
front_end do
- app_page 'page_contexts'
+ app_page 'page_contexts' do
+ frontend_i18n "page_content.frontend.page"
+ end
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']
diff --git a/vendor/built_in_modules/personal_book/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_book/config/locales/zh_tw.yml
index a0104cbd..2d8c73a7 100644
--- a/vendor/built_in_modules/personal_book/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_book/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_book: 專書
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_book/init.rb b/vendor/built_in_modules/personal_book/init.rb
index 2f739adc..abf7aadf 100644
--- a/vendor/built_in_modules/personal_book/init.rb
+++ b/vendor/built_in_modules/personal_book/init.rb
@@ -1,9 +1,8 @@
module PersonalBook
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__)
- 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
diff --git a/vendor/built_in_modules/personal_conference/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_conference/config/locales/zh_tw.yml
index a0104cbd..71dcb56f 100644
--- a/vendor/built_in_modules/personal_conference/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_conference/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_conference: 研討會論文
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_conference/init.rb b/vendor/built_in_modules/personal_conference/init.rb
index b1fd1db0..5be96c8d 100644
--- a/vendor/built_in_modules/personal_conference/init.rb
+++ b/vendor/built_in_modules/personal_conference/init.rb
@@ -1,9 +1,8 @@
module PersonalConference
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__)
- 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
diff --git a/vendor/built_in_modules/personal_diploma/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_diploma/config/locales/zh_tw.yml
index a0104cbd..d4f945ce 100644
--- a/vendor/built_in_modules/personal_diploma/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_diploma/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_diploma: 學歷
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_diploma/init.rb b/vendor/built_in_modules/personal_diploma/init.rb
index 129dd4c2..17221f78 100644
--- a/vendor/built_in_modules/personal_diploma/init.rb
+++ b/vendor/built_in_modules/personal_diploma/init.rb
@@ -1,9 +1,8 @@
module PersonalDiploma
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__)
- 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
diff --git a/vendor/built_in_modules/personal_experience/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_experience/config/locales/zh_tw.yml
index a0104cbd..46d24587 100644
--- a/vendor/built_in_modules/personal_experience/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_experience/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_experience: 經歷
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_experience/init.rb b/vendor/built_in_modules/personal_experience/init.rb
index 3bc16241..ccb6cd37 100644
--- a/vendor/built_in_modules/personal_experience/init.rb
+++ b/vendor/built_in_modules/personal_experience/init.rb
@@ -1,9 +1,8 @@
module PersonalExperience
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__)
- 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
diff --git a/vendor/built_in_modules/personal_honor/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_honor/config/locales/zh_tw.yml
index a0104cbd..67853500 100644
--- a/vendor/built_in_modules/personal_honor/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_honor/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_honor: 榮譽
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_honor/init.rb b/vendor/built_in_modules/personal_honor/init.rb
index f55e9c6e..2916869c 100644
--- a/vendor/built_in_modules/personal_honor/init.rb
+++ b/vendor/built_in_modules/personal_honor/init.rb
@@ -1,9 +1,8 @@
module PersonalHonor
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__)
- 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
diff --git a/vendor/built_in_modules/personal_journal/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_journal/config/locales/zh_tw.yml
index 19bf1aa2..ed89a4d7 100644
--- a/vendor/built_in_modules/personal_journal/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_journal/config/locales/zh_tw.yml
@@ -1,4 +1,6 @@
zh_tw:
+ module_name:
+ personal_journal: 期刊著作
personal_journal:
paper_title : "論文名稱"
journal_title : "期刊名稱"
diff --git a/vendor/built_in_modules/personal_journal/init.rb b/vendor/built_in_modules/personal_journal/init.rb
index c993996e..ebf1b503 100644
--- a/vendor/built_in_modules/personal_journal/init.rb
+++ b/vendor/built_in_modules/personal_journal/init.rb
@@ -1,9 +1,8 @@
module PersonalJournal
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__)
- 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
diff --git a/vendor/built_in_modules/personal_lab/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_lab/config/locales/zh_tw.yml
index a0104cbd..035eec6a 100644
--- a/vendor/built_in_modules/personal_lab/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_lab/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_lab: 實驗室
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_lab/init.rb b/vendor/built_in_modules/personal_lab/init.rb
index 2462f8b8..18501260 100644
--- a/vendor/built_in_modules/personal_lab/init.rb
+++ b/vendor/built_in_modules/personal_lab/init.rb
@@ -1,8 +1,8 @@
module PersonalLab
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__)
- 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
diff --git a/vendor/built_in_modules/personal_patent/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_patent/config/locales/zh_tw.yml
index a0104cbd..629eef60 100644
--- a/vendor/built_in_modules/personal_patent/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_patent/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_patent: 專利
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_patent/init.rb b/vendor/built_in_modules/personal_patent/init.rb
index 49409047..84e9f70d 100644
--- a/vendor/built_in_modules/personal_patent/init.rb
+++ b/vendor/built_in_modules/personal_patent/init.rb
@@ -1,9 +1,9 @@
module PersonalPatent
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__)
- 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
diff --git a/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml
index a0104cbd..8aa797fa 100644
--- a/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_project: 研究計畫
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_project/init.rb b/vendor/built_in_modules/personal_project/init.rb
index a1dc7dce..a0334d6c 100644
--- a/vendor/built_in_modules/personal_project/init.rb
+++ b/vendor/built_in_modules/personal_project/init.rb
@@ -1,8 +1,8 @@
module PersonalProject
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__)
- 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
diff --git a/vendor/built_in_modules/personal_research/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_research/config/locales/zh_tw.yml
index a0104cbd..bf02f4b1 100644
--- a/vendor/built_in_modules/personal_research/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_research/config/locales/zh_tw.yml
@@ -1,7 +1,8 @@
zh_tw:
_locale: 中文
-
+ module_name:
+ personal_research: 研究
add: 新增
back: 回去
create: 創造
diff --git a/vendor/built_in_modules/personal_research/init.rb b/vendor/built_in_modules/personal_research/init.rb
index 75649678..22b9314a 100644
--- a/vendor/built_in_modules/personal_research/init.rb
+++ b/vendor/built_in_modules/personal_research/init.rb
@@ -1,8 +1,8 @@
module PersonalResearch
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__)
- 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