From fcb49723b477bc6c32da2992ebd094f47eaa71b1 Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Mon, 4 Feb 2013 18:14:00 +0800 Subject: [PATCH 01/53] fix sidebar icon for page. fix i18n on sidebar make sidebar sortable by changing db value. Need interface --- lib/orbit_app/module/side_bar.rb | 11 +++++++++++ .../calendar/config/locales/zh_tw.yml | 3 ++- vendor/built_in_modules/calendar/init.rb | 6 +++--- .../miss_module/config/locales/zh_tw.yml | 3 +-- vendor/built_in_modules/page_content/init.rb | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb index 050df87a3..60424ae04 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 + end + def get_module_app @get_module_app.call end 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 1e7df0021..ff6e49c8b 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 fc318e6c2..beef7ca94 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/miss_module/config/locales/zh_tw.yml b/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml index aeea83c6a..3b7273550 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 @@ -4,10 +4,9 @@ zh_tw: archive: 檔案室 _archive: all: 全部檔案 - calendar: 日曆模組 calendars: 日曆 gallery: 相簿 - location: (未命名)Location + location: 地標 ad_banner: 廣告輪播 miss_plugin_i18n: diff --git a/vendor/built_in_modules/page_content/init.rb b/vendor/built_in_modules/page_content/init.rb index 73199b184..5d779836d 100644 --- a/vendor/built_in_modules/page_content/init.rb +++ b/vendor/built_in_modules/page_content/init.rb @@ -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'] From b7d797f9dd94ade1b38a9c3264a69f3cb03e082d Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Wed, 6 Feb 2013 17:44:38 +0800 Subject: [PATCH 02/53] fix member sidebar add i18n for modules and default_widgets --- app/views/layouts/_side_bar.html.erb | 3 +-- config/locales/en.yml | 2 ++ config/locales/zh_tw.yml | 1 + lib/orbit_app/module/widget.rb | 2 +- vendor/built_in_modules/ad_banner/config/locales/en.yml | 4 ++++ .../built_in_modules/ad_banner/config/locales/zh_tw.yml | 4 ++++ vendor/built_in_modules/ad_banner/init.rb | 2 +- .../built_in_modules/announcement/config/locales/en.yml | 2 ++ vendor/built_in_modules/announcement/init.rb | 2 +- vendor/built_in_modules/archive/config/locales/en.yml | 4 +++- vendor/built_in_modules/archive/config/locales/zh_tw.yml | 2 ++ vendor/built_in_modules/archive/init.rb | 8 ++++---- vendor/built_in_modules/calendar/config/locales/en.yml | 1 + vendor/built_in_modules/gallery/init.rb | 4 ++-- vendor/built_in_modules/location/config/locales/en.yml | 3 +++ .../built_in_modules/location/config/locales/zh_tw.yml | 3 +++ vendor/built_in_modules/location/init.rb | 4 ++-- .../miss_module/config/locales/zh_tw.yml | 9 +-------- 18 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 vendor/built_in_modules/ad_banner/config/locales/en.yml create mode 100644 vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml create mode 100644 vendor/built_in_modules/location/config/locales/en.yml create mode 100644 vendor/built_in_modules/location/config/locales/zh_tw.yml diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index fa2d332c7..af7a5c798 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -13,8 +13,7 @@
diff --git a/config/locales/en.yml b/config/locales/en.yml index b499353ee..68e299e19 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -150,6 +150,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 0bbb1755a..8578514cf 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -116,6 +116,7 @@ zh_tw: delete: 刪除 delete_file: 刪除檔案 default_widget: + default_widget: 預設樣板 name: 預設樣式 no_support_setting: 沒有可以使用的設定 no_value: 不設定(全部) diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb index a02a2427c..38b15a767 100644 --- a/lib/orbit_app/module/widget.rb +++ b/lib/orbit_app/module/widget.rb @@ -98,7 +98,7 @@ 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=>nil,:label=>'label',:style=>STYLE,:i18n=>'default_widget.default_widget'} end def to_module_app_format 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 000000000..c52a82f77 --- /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 000000000..9b3771f75 --- /dev/null +++ b/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml @@ -0,0 +1,4 @@ +zh_tw: + + ad_banner: + 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 4a9aafba2..e9aec9c71 100644 --- a/vendor/built_in_modules/ad_banner/init.rb +++ b/vendor/built_in_modules/ad_banner/init.rb @@ -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 5dc236b56..d57797d91 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/init.rb b/vendor/built_in_modules/announcement/init.rb index c1174dac3..30ce57b82 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -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 4fcaafe72..27ba2c9f0 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 c2790d329..d110eaf19 100644 --- a/vendor/built_in_modules/archive/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/archive/config/locales/zh_tw.yml @@ -2,6 +2,8 @@ zh_tw: _locale: 中文 archive: + archive: 檔案室 + all: 全部檔案 widget: archive_files: 檔案室Wiget add: 新增 diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb index 53d574799..b29fe2ca0 100644 --- a/vendor/built_in_modules/archive/init.rb +++ b/vendor/built_in_modules/archive/init.rb @@ -1,9 +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=>'archive.archive' # ======= # personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'admin.archive' # >>>>>>> 858e942da234fffa3053a995231f2b0d9eee43d1 @@ -33,14 +33,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 32396ad20..6e6454811 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/gallery/init.rb b/vendor/built_in_modules/gallery/init.rb index 615d65930..d71b8af53 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 000000000..5f7ec8ea0 --- /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 000000000..ce53ff5bd --- /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 021ddcc11..566bf5c1e 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 3b7273550..664dc7c9e 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,13 +1,6 @@ zh_tw: miss_module_i18n: - archive: 檔案室 - _archive: - all: 全部檔案 - calendars: 日曆 - gallery: 相簿 - location: 地標 - ad_banner: 廣告輪播 miss_plugin_i18n: personal_book: Personal Book @@ -19,5 +12,5 @@ zh_tw: personal_patent: Personal Patent personal_project: Personal Project personal_research: Personal Research - personal_seminar: Personal Seminar + personal_conference: Personal Conference From 0a115906f1cf772115f2f5601d627de05a3e8df8 Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Mon, 18 Feb 2013 15:13:31 +0800 Subject: [PATCH 03/53] fix i18n,reload problems --- Gemfile | 8 +-- app/assets/javascripts/page_edit.js.erb | 4 ++ .../admin/page_parts_controller.rb | 12 ++++- app/controllers/default_widget_controller.rb | 1 - app/helpers/admin/page_parts_helper.rb | 36 +++++++++++++ app/helpers/default_widget_helper.rb | 2 +- app/models/module_app.rb | 4 +- .../_default_widget_setting.html.erb | 8 +-- .../admin/page_parts/_module_widget.html.erb | 2 +- .../page_parts/reload_widget_field.js.erb | 1 + config/locales/zh_tw.yml | 1 + config/routes.rb | 1 + lib/orbit_app/module/side_bar.rb | 2 +- lib/orbit_app/module/widget.rb | 6 +-- lib/tasks/migrate.rake | 51 +++++++++++++++++++ .../ad_banner/config/locales/zh_tw.yml | 3 +- vendor/built_in_modules/ad_banner/init.rb | 2 +- .../announcement/config/locales/zh_tw.yml | 4 +- vendor/built_in_modules/announcement/init.rb | 2 +- .../archive/config/locales/zh_tw.yml | 2 + vendor/built_in_modules/archive/init.rb | 4 +- .../miss_module/config/locales/zh_tw.yml | 20 ++++---- .../page_content/config/locales/zh_tw.yml | 2 + vendor/built_in_modules/page_content/init.rb | 4 +- .../personal_book/config/locales/zh_tw.yml | 3 +- vendor/built_in_modules/personal_book/init.rb | 4 +- .../config/locales/zh_tw.yml | 3 +- .../personal_conference/init.rb | 4 +- .../personal_diploma/config/locales/zh_tw.yml | 3 +- .../built_in_modules/personal_diploma/init.rb | 4 +- .../config/locales/zh_tw.yml | 3 +- .../personal_experience/init.rb | 4 +- .../personal_honor/config/locales/zh_tw.yml | 3 +- .../built_in_modules/personal_honor/init.rb | 4 +- .../personal_journal/config/locales/zh_tw.yml | 2 + .../built_in_modules/personal_journal/init.rb | 4 +- .../personal_lab/config/locales/zh_tw.yml | 3 +- vendor/built_in_modules/personal_lab/init.rb | 4 +- .../personal_patent/config/locales/zh_tw.yml | 3 +- .../built_in_modules/personal_patent/init.rb | 4 +- .../personal_project/config/locales/zh_tw.yml | 3 +- .../built_in_modules/personal_project/init.rb | 4 +- .../config/locales/zh_tw.yml | 3 +- .../personal_research/init.rb | 4 +- 44 files changed, 185 insertions(+), 66 deletions(-) create mode 100644 app/views/admin/page_parts/reload_widget_field.js.erb diff --git a/Gemfile b/Gemfile index 1e2a64488..de03e4fd4 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 aec24de65..b77716922 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 21050985f..d591dd839 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 637810cd1..6580b70f1 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -24,7 +24,6 @@ class DefaultWidgetController< OrbitWidgetController @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) - 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 818fe46bd..5eeb553dc 100644 --- a/app/helpers/admin/page_parts_helper.rb +++ b/app/helpers/admin/page_parts_helper.rb @@ -9,6 +9,42 @@ 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] + choosen_field_is_link = (@module_app.widget_fields.select{|t| t[0].to_s==choosen_value}.first)[2]==:link + + 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 645f50f07..7f917449f 100644 --- a/app/helpers/default_widget_helper.rb +++ b/app/helpers/default_widget_helper.rb @@ -1,6 +1,6 @@ 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) diff --git a/app/models/module_app.rb b/app/models/module_app.rb index fb735438a..b10d581f5 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 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 8496b19b6..f45461784 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 38fb013f6..e1f812633 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 000000000..32482e51b --- /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/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 8578514cf..4023b466e 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -120,6 +120,7 @@ zh_tw: name: 預設樣式 no_support_setting: 沒有可以使用的設定 no_value: 不設定(全部) + field_is_link: 連結 fields_: 前台輸出欄位 fields_order: 輸出欄位順序 fields_style: 輸出欄位樣式 diff --git a/config/routes.rb b/config/routes.rb index 62c121807..c9e77b6bf 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/side_bar.rb b/lib/orbit_app/module/side_bar.rb index 60424ae04..50811f03a 100644 --- a/lib/orbit_app/module/side_bar.rb +++ b/lib/orbit_app/module/side_bar.rb @@ -66,7 +66,7 @@ module OrbitApp end def get_sidebar_order! - @sidebar_order = get_module_app.sidebar_order + @sidebar_order = (get_module_app.sidebar_order rescue 0) end def get_module_app diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb index 38b15a767..42e02a4ee 100644 --- a/lib/orbit_app/module/widget.rb +++ b/lib/orbit_app/module/widget.rb @@ -98,11 +98,11 @@ module OrbitApp def self.get_interface_args #will need to work with design - {:name=>"default_widget",:field=>nil,:label=>'label',:style=>STYLE,:i18n=>'default_widget.default_widget'} + {: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) @@ -161,7 +161,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 14516d93d..6582fa2ab 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -439,5 +439,56 @@ 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) + 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/zh_tw.yml b/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml index 9b3771f75..701684881 100644 --- a/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml @@ -1,4 +1,3 @@ zh_tw: - - ad_banner: + 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 e9aec9c71..3e7d5e395 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' 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 995bf2f56..d24c12658 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 30ce57b82..f8f1cf898 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 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 d110eaf19..0369e6f67 100644 --- a/vendor/built_in_modules/archive/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/archive/config/locales/zh_tw.yml @@ -6,6 +6,8 @@ zh_tw: 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 b29fe2ca0..2ba597537 100644 --- a/vendor/built_in_modules/archive/init.rb +++ b/vendor/built_in_modules/archive/init.rb @@ -15,7 +15,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 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 664dc7c9e..a3d6d5d9f 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 @@ -2,15 +2,13 @@ zh_tw: miss_module_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 + # 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 a5df3f73e..2e47402f7 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 5d779836d..064489b46 100644 --- a/vendor/built_in_modules/page_content/init.rb +++ b/vendor/built_in_modules/page_content/init.rb @@ -12,7 +12,9 @@ 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 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 a0104cbd1..2d8c73a74 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 47bff5bd4..8275f5054 100644 --- a/vendor/built_in_modules/personal_book/init.rb +++ b/vendor/built_in_modules/personal_book/init.rb @@ -1,8 +1,8 @@ module PersonalBook OrbitApp.registration "Book",: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",:i18n=>'miss_module_i18n.personal_book' + personal_plugin :enable => true,:path=>"panel/personal_book/plugin/profile",: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 a0104cbd1..71dcb56f4 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 c4eca0153..8c830c0ef 100644 --- a/vendor/built_in_modules/personal_conference/init.rb +++ b/vendor/built_in_modules/personal_conference/init.rb @@ -1,8 +1,8 @@ module PersonalConference OrbitApp.registration "Conference",:type=> 'ModuleApp' do - module_label 'admin.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",:i18n=>'admin.personal_conference' + personal_plugin :enable => true,:path=>"panel/personal_conference/plugin/profile",: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 a0104cbd1..d4f945cee 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 adf2ce23f..de611c65f 100644 --- a/vendor/built_in_modules/personal_diploma/init.rb +++ b/vendor/built_in_modules/personal_diploma/init.rb @@ -1,8 +1,8 @@ module PersonalDiploma OrbitApp.registration "Diploma",: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",:i18n=>'miss_plugin_i18n.personal_diploma' + personal_plugin :enable => true,:path=>"panel/personal_diploma/plugin/profile",: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 a0104cbd1..46d245879 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 b1cc47a28..e3f9685dc 100644 --- a/vendor/built_in_modules/personal_experience/init.rb +++ b/vendor/built_in_modules/personal_experience/init.rb @@ -1,9 +1,9 @@ module PersonalExperience OrbitApp.registration "Experience",: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",:i18n=>'miss_plugin_i18n.personal_experience' + personal_plugin :enable => true,:path=>"panel/personal_experience/plugin/profile",: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 a0104cbd1..678535004 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 7c27a3593..053821407 100644 --- a/vendor/built_in_modules/personal_honor/init.rb +++ b/vendor/built_in_modules/personal_honor/init.rb @@ -1,8 +1,8 @@ module PersonalHonor OrbitApp.registration "Honor",: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",:i18n=>'miss_plugin_i18n.personal_honor' + personal_plugin :enable => true,:path=>"panel/personal_honor/plugin/profile",: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 19bf1aa22..ed89a4d78 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 42e8bdc3a..e586bf89a 100644 --- a/vendor/built_in_modules/personal_journal/init.rb +++ b/vendor/built_in_modules/personal_journal/init.rb @@ -1,8 +1,8 @@ module PersonalJournal OrbitApp.registration "Journal",: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",:i18n=>'miss_plugin_i18n.personal_journal' + personal_plugin :enable => true,:path=>"panel/personal_journal/plugin/profile",: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 a0104cbd1..035eec6a1 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 989dc90fb..c916ab7e3 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 "Lab",: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",:i18n=>'miss_plugin_i18n.personal_lab' + personal_plugin :enable => true,:path=>"panel/personal_lab/plugin/profile",: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 a0104cbd1..629eef601 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 ff12d6392..5f5869413 100644 --- a/vendor/built_in_modules/personal_patent/init.rb +++ b/vendor/built_in_modules/personal_patent/init.rb @@ -1,8 +1,8 @@ module PersonalPatent OrbitApp.registration "Patent",: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",:i18n=>'miss_plugin_i18n.personal_patent' + personal_plugin :enable => true,:path=>"panel/personal_patent/plugin/profile",:i18n=>'module_name.personal_patent' 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 a0104cbd1..8aa797fa8 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 b0b8d69e4..7bbd96b3e 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 "Research Project",: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",:i18n=>'miss_plugin_i18n.personal_project' + personal_plugin :enable => true,:path=>"panel/personal_project/plugin/profile",: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 a0104cbd1..bf02f4b1c 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 5787cd05b..f1ab26626 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 "Research",: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",:i18n=>'miss_plugin_i18n.personal_research' + personal_plugin :enable => true,:path=>"panel/personal_research/plugin/profile",:i18n=>'module_name.personal_research' end From 572e512a1d17518774306e6ab706e9ed4c0ad758 Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Mon, 18 Feb 2013 17:03:18 +0800 Subject: [PATCH 04/53] fix link for default widget --- app/controllers/default_widget_controller.rb | 2 +- app/helpers/default_widget_helper.rb | 15 ++++++++------- app/models/module_app.rb | 3 ++- app/views/default_widget/typeA.html.erb | 2 +- lib/orbit_app/module/registration.rb | 4 ++++ lib/orbit_app/module/widget.rb | 12 ++++++++++++ 6 files changed, 28 insertions(+), 10 deletions(-) diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index 6580b70f1..956a2a532 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -23,7 +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/default_widget_helper.rb b/app/helpers/default_widget_helper.rb index 7f917449f..913c77ee6 100644 --- a/app/helpers/default_widget_helper.rb +++ b/app/helpers/default_widget_helper.rb @@ -3,20 +3,21 @@ module DefaultWidgetHelper 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 b10d581f5..5aa5a11d5 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -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/default_widget/typeA.html.erb b/app/views/default_widget/typeA.html.erb index f6e0eb54a..20ce3dbd5 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/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index 4911042b7..9856f7d33 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/widget.rb b/lib/orbit_app/module/widget.rb index 42e02a4ee..7e99b2a99 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 @@ -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 From 0b88f7d1f8d0eaf84dd623cef54dbf4d7f7e5aad Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Mon, 18 Feb 2013 19:04:04 +0800 Subject: [PATCH 05/53] deliver app config. fix wrong value cause error for default widget --- app/helpers/admin/page_parts_helper.rb | 11 +++++++++-- config/mongoid.yml | 4 ++-- lib/tasks/migrate.rake | 5 +++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/helpers/admin/page_parts_helper.rb b/app/helpers/admin/page_parts_helper.rb index 5eeb553dc..898b139ef 100644 --- a/app/helpers/admin/page_parts_helper.rb +++ b/app/helpers/admin/page_parts_helper.rb @@ -25,8 +25,15 @@ module Admin::PagePartsHelper 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] - choosen_field_is_link = (@module_app.widget_fields.select{|t| t[0].to_s==choosen_value}.first)[2]==:link + + 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 diff --git a/config/mongoid.yml b/config/mongoid.yml index a809bc065..2fa55a361 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/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index 6582fa2ab..f3b16f16c 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -448,14 +448,15 @@ namespace :migrate 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 + # 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 + # puts page.inspect end end From 2a61470f8b0e2548a7b604c4496f1c25c4dc503f Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 31 Jan 2013 19:20:55 +0800 Subject: [PATCH 06/53] back_end widget breadcrumb finish --- Gemfile | 3 +- app/controllers/front_controller.rb | 5 + .../admin/page_parts/_public_r_tag.html.erb | 3 +- app/views/front/show_breadcrumb.html.erb | 11 + config/list.yml | 11 +- config/routes.rb | 2 +- lib/parsers/parser_back_end.rb | 1 + lib/parsers/parser_common.rb | 37 + lib/parsers/parser_front_end.rb | 6 +- route | 1038 ----------------- 10 files changed, 69 insertions(+), 1048 deletions(-) create mode 100644 app/views/front/show_breadcrumb.html.erb delete mode 100644 route diff --git a/Gemfile b/Gemfile index de03e4fd4..7ea9f7832 100644 --- a/Gemfile +++ b/Gemfile @@ -76,8 +76,8 @@ group :test, :development do gem 'pry-remote' gem 'pry-stack_explorer' gem 'pry-debugger' + gem 'debugger' gem 'faker' - gem "sunspot-rails-tester" gem 'database_cleaner' #Strategies for cleaning databases. Can be used to ensure a clean state for testing. gem "rspec", "~> 2.0" @@ -93,4 +93,3 @@ group :test, :development do # gem "bluecloth" end -gem 'debugger' diff --git a/app/controllers/front_controller.rb b/app/controllers/front_controller.rb index eb14b25dc..15a9d9863 100644 --- a/app/controllers/front_controller.rb +++ b/app/controllers/front_controller.rb @@ -2,6 +2,11 @@ class FrontController < ApplicationController layout false + def show_breadcrumb + @ancestors = Page.find(params[:menu_page_id]).ancestors_and_self.map{|m|m.title_translations[locale]}.delete_at(0) rescue [] + @ancestors.delete_at(0) + end + def show_banner @ad_banner = AdBanner.find(params[:id]) rescue nil end diff --git a/app/views/admin/page_parts/_public_r_tag.html.erb b/app/views/admin/page_parts/_public_r_tag.html.erb index 68f91dbc8..9a3ce984e 100644 --- a/app/views/admin/page_parts/_public_r_tag.html.erb +++ b/app/views/admin/page_parts/_public_r_tag.html.erb @@ -7,7 +7,8 @@ <%= f.hidden_field :public_r_tag_object_id, :value => @part.page.id %> <%#= f.select :public_r_tag_object_id, options_for_select([t(:horizontal), t(:vertical)], t(:horizontal)) %> <% elsif @r_tag.eql?('sitemap') %> + <% elsif @r_tag.eql?('breadcrumb') %> <% else %> <%= f.select :public_r_tag_object_id, options_from_collection_for_select(@tag_objects, :id, :title, :selected => @part.public_r_tag_object_id) %> <% end %> - \ No newline at end of file + diff --git a/app/views/front/show_breadcrumb.html.erb b/app/views/front/show_breadcrumb.html.erb new file mode 100644 index 000000000..afba97b23 --- /dev/null +++ b/app/views/front/show_breadcrumb.html.erb @@ -0,0 +1,11 @@ +<% if not @ancestors.empty? %> +
+
    + <%= @ancestors.each do |node| %> +
  • + <%= link_to node.title, (node.class.to_s.eql?('Page') ? '/' + node.path : node.url) %> +
  • + <% end %> +
+
+<% end %> diff --git a/config/list.yml b/config/list.yml index a3b48cfc5..e0fc1914a 100644 --- a/config/list.yml +++ b/config/list.yml @@ -37,17 +37,18 @@ markups: muti_lang_input_supprt: true ext_support: true - + public_r_tags: - ad_banner - sub_menu - sitemap - + - breadcrumb + page_part_kinds: - text - public_r_tag - module_widget - + widget_field: - title - category @@ -57,7 +58,7 @@ widget_field: - content - link - file - + widget_field_type: - title - category @@ -76,4 +77,4 @@ default_widget_style: - style2 - style3 - style4 - - style5 \ No newline at end of file + - style5 diff --git a/config/routes.rb b/config/routes.rb index c9e77b6bf..ad58dd120 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -255,7 +255,7 @@ Orbit::Application.routes.draw do end end - controller_paths :front, %w[show_banner show_footer show_menu show_page_sub_menu show_site_sub_menu show_sitemap] + controller_paths :front, %w[show_breadcrumb show_banner show_footer show_menu show_page_sub_menu show_site_sub_menu show_sitemap] # controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content] # scope 'app' do diff --git a/lib/parsers/parser_back_end.rb b/lib/parsers/parser_back_end.rb index d0c1eab6d..a26fe6961 100644 --- a/lib/parsers/parser_back_end.rb +++ b/lib/parsers/parser_back_end.rb @@ -30,6 +30,7 @@ module ParserBackEnd parse_images_edit(body, page) parse_footer_edit(body, page) parse_sub_menu_edit(body, page) + parse_breadcrumb_edit(body, page) parse_counter_edit(body) public_r_tags.each do |tag| send("parse_#{tag}s_edit", body, page, true) diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index d6bafdd37..0d139ba70 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -144,6 +144,31 @@ module ParserCommon end end + # breadcrumb + def parse_breadcrumbs_edit(body = nil, page = nil, edit=nil) + body.css('breadcrumb').each do |breadcrumb| + ancestors = Page.find(page.id).ancestors_and_self.map{|m|m.title} rescue nil + ancestors.delete_at(0) + res = '' + + if ancestors + res << "
" + res << "
    " + ancestors.each do |node| + res << "
  • " + # root = "/" + # res << "#{child.title}" + res << "#{node}" + res << "
  • " + end + res << "
" + res << "
" + end + fragment = Nokogiri::HTML::DocumentFragment.new(body, res) + breadcrumb.swap(fragment) + end + end + # page_footer def parse_footer_edit(body, page) page_footer = body.css('.page_footer').first @@ -172,6 +197,18 @@ module ParserCommon end end + def parse_breadcrumb_edit(body, page) + page_breadcrumb = body.css('.page_breadcrumb').first + if page_breadcrumb + res = "
" + res << @site.breadcrumb rescue nil + res << "
" + fragment = Nokogiri::HTML::DocumentFragment.new(body ,res) + page_breadcrumb.swap(fragment) rescue nil + else + '' + end + end # sitemap def parse_sitemaps_edit(body = nil, page = nil, edit=nil) sitemap = body.css('sitemap').first diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index c4f644b0b..54199a73a 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -178,5 +178,9 @@ module ParserFrontEnd def generate_sub_menus(*args) "
" end - + + # breadcrumb + def generate_breadcrumbs(*args) + "
" + end end diff --git a/route b/route deleted file mode 100644 index 36cad50c6..000000000 --- a/route +++ /dev/null @@ -1,1038 +0,0 @@ - users_passwd PUT /users_passwd(.:format) desktop/registrations#update - new_user_session GET /users/sign_in(.:format) devise/sessions#new - user_session POST /users/sign_in(.:format) devise/sessions#create - destroy_user_session GET /users/sign_out(.:format) devise/sessions#destroy - user_password POST /users/password(.:format) devise/passwords#create - new_user_password GET /users/password/new(.:format) devise/passwords#new - edit_user_password GET /users/password/edit(.:format) devise/passwords#edit - PUT /users/password(.:format) devise/passwords#update - cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel - user_registration POST /users(.:format) devise/registrations#create - new_user_registration GET /users/sign_up(.:format) devise/registrations#new - edit_user_registration GET /users/edit(.:format) devise/registrations#edit - PUT /users(.:format) devise/registrations#update - DELETE /users(.:format) devise/registrations#destroy - resque_server /admin/resque Resque::Server - site_set_registered /site/set_registered(.:format) CentralServerExchangeApp - site_public_key /site/public_key(.:format) CentralServerExchangeApp - site_update /site/update(.:format) GithubApp - /purchase/:type(.:format) CentralServerExchangeApp - load_orbit_bar /load_orbit_bar(.:format) pages#load_orbit_bar - /admin/resque #>, @realm=nil, @authenticator=#>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :html_types=>["text/html", "application/xhtml"], :xss_mode=>:block, :nosniff=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :html_types=>["text/html", "application/xhtml"], :xss_mode=>:block, :nosniff=>true, :frame_options=>:sameorigin, :except=>[:session_hijacking, :remote_token]}>>>, @template=#\\n\\n\\n \\n \"\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"\\n\\n \\n\\n\\n\\n\\n
\\n
\\n \\\"application\\n
\\n

\"\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"\\n

\\n

\"\n\n; _erbout.concat((h exception.message ).to_s); _erbout.concat \"

\\n
    \\n
  • file: \\n \"\n\n\n; _erbout.concat((h frames.first.filename.split(\"/\").last ).to_s); _erbout.concat \"
  • \\n
  • location: \"\n; _erbout.concat((h frames.first.function ).to_s); _erbout.concat \"\\n
  • \\n
  • line:\\n \"\n\n\n; _erbout.concat((h frames.first.lineno ).to_s); _erbout.concat \"
  • \\n
\\n
\\n
\\n
\\n\\n
\\n

BACKTRACE

\\n

(expand)

\\n

JUMP TO:\\n GET\\n POST\\n COOKIES\\n ENV\\n

\\n
\\n\\n
    \\n\\n \"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; id = 1 ; _erbout.concat \"\\n \"\n; frames.each do |frame| ; _erbout.concat \"\\n \"\n; if frame.context_line && frame.context_line != \"#\" ; _erbout.concat \"\\n\\n
  • \\n \"\n; _erbout.concat((h frame.filename ).to_s); _erbout.concat \" in\\n \"\n; _erbout.concat((h frame.function ).to_s); _erbout.concat \"\\n
  • \\n\\n
  • \\n \"\n; if frame.pre_context ; _erbout.concat \"\\n
      \\n \"\n; frame.pre_context.each do |line| ; _erbout.concat \"\\n
    1. \"\n; _erbout.concat((h line ).to_s); _erbout.concat \"
    2. \\n \"\n; end ; _erbout.concat \"\\n
    \\n \"\n\n; end ; _erbout.concat \"\\n\\n
      \\n
    1. \"; _erbout.concat((\n h frame.context_line ).to_s); _erbout.concat \"
    2. \\n
    \\n\\n \"\n\n\n; if frame.post_context ; _erbout.concat \"\\n
      \\n \"\n; frame.post_context.each do |line| ; _erbout.concat \"\\n
    1. \"\n; _erbout.concat((h line ).to_s); _erbout.concat \"
    2. \\n \"\n; end ; _erbout.concat \"\\n
    \\n \"\n\n; end ; _erbout.concat \"\\n
    \\n
  • \\n\\n \"\n\n\n\n; end ; _erbout.concat \"\\n\\n \"\n\n; id += 1 ; _erbout.concat \"\\n \"\n; end ; _erbout.concat \"\\n\\n
\\n
\\n\\n
\\n

GET

\\n \"\n\n\n\n\n\n\n; if req.GET and not req.GET.empty? ; _erbout.concat \"\\n \\n \\n \\n \\n \\n \"\n\n\n\n\n\n; req.GET.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n \\n \\n \\n \\n \"\n\n; } ; _erbout.concat \"\\n
VariableValue
\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"
\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"
\\n \"\n\n; else ; _erbout.concat \"\\n

No GET data.

\\n \"\n\n; end ; _erbout.concat \"\\n
\\n
\\n\\n
\\n

POST

\\n \"\n\n\n\n\n\n; if req.POST and not req.POST.empty? ; _erbout.concat \"\\n \\n \\n \\n \\n \\n \"\n\n\n\n\n\n; req.POST.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n \\n \\n \\n \\n \"\n\n; } ; _erbout.concat \"\\n
VariableValue
\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"
\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"
\\n \"\n\n; else ; _erbout.concat \"\\n

No POST data.

\\n \"\n\n; end ; _erbout.concat \"\\n
\\n
\\n\\n
\\n

COOKIES

\\n \"\n\n\n\n\n\n; unless req.cookies.empty? ; _erbout.concat \"\\n \\n \\n \\n \\n \\n \"\n\n\n\n\n\n; req.cookies.each { |key, val| ; _erbout.concat \"\\n \\n \\n \\n \\n \"\n\n; } ; _erbout.concat \"\\n
VariableValue
\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"
\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"
\\n \"\n\n; else ; _erbout.concat \"\\n

No cookie data.

\\n \"\n\n; end ; _erbout.concat \"\\n
\\n
\\n\\n
\\n

Rack ENV

\\n \\n \\n \\n \\n \\n \"\n\n\n\n\n\n\n\n\n\n\n; env.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n \\n \\n \\n \\n \"\n\n; } ; _erbout.concat \"\\n
VariableValue
\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"
\"\n; _erbout.concat((h val ).to_s); _erbout.concat \"
\\n
\\n
\\n\\n

You're seeing this error because you have\\nenabled the show_exceptions setting.

\\n
\\n \\n\\n\"\n\n\n\n\n\n\n\n\n\n; _erbout.force_encoding(__ENCODING__)", @enc=#, @filename=nil>>> - file_upload_admin_assets GET /admin/assets/file_upload(.:format) admin/assets#file_upload - delete_admin_assets GET /admin/assets/delete(.:format) admin/assets#delete - admin_assets GET /admin/assets(.:format) admin/assets#index - POST /admin/assets(.:format) admin/assets#create - new_admin_asset GET /admin/assets/new(.:format) admin/assets#new - edit_admin_asset GET /admin/assets/:id/edit(.:format) admin/assets#edit - admin_asset GET /admin/assets/:id(.:format) admin/assets#show - PUT /admin/assets/:id(.:format) admin/assets#update - DELETE /admin/assets/:id(.:format) admin/assets#destroy - admin_asset_categories GET /admin/asset_categories(.:format) admin/asset_categories#index - POST /admin/asset_categories(.:format) admin/asset_categories#create - new_admin_asset_category GET /admin/asset_categories/new(.:format) admin/asset_categories#new - edit_admin_asset_category GET /admin/asset_categories/:id/edit(.:format) admin/asset_categories#edit - admin_asset_category GET /admin/asset_categories/:id(.:format) admin/asset_categories#show - PUT /admin/asset_categories/:id(.:format) admin/asset_categories#update - DELETE /admin/asset_categories/:id(.:format) admin/asset_categories#destroy - admin_asset_tags GET /admin/asset_tags(.:format) admin/asset_tags#index - POST /admin/asset_tags(.:format) admin/asset_tags#create - new_admin_asset_tag GET /admin/asset_tags/new(.:format) admin/asset_tags#new - edit_admin_asset_tag GET /admin/asset_tags/:id/edit(.:format) admin/asset_tags#edit - admin_asset_tag GET /admin/asset_tags/:id(.:format) admin/asset_tags#show - PUT /admin/asset_tags/:id(.:format) admin/asset_tags#update - DELETE /admin/asset_tags/:id(.:format) admin/asset_tags#destroy - admin_app_auths GET /admin/app_auths(.:format) admin/app_auths#index - POST /admin/app_auths(.:format) admin/app_auths#create - new_admin_app_auth GET /admin/app_auths/new(.:format) admin/app_auths#new - edit_admin_app_auth GET /admin/app_auths/:id/edit(.:format) admin/app_auths#edit - admin_app_auth GET /admin/app_auths/:id(.:format) admin/app_auths#show - PUT /admin/app_auths/:id(.:format) admin/app_auths#update - DELETE /admin/app_auths/:id(.:format) admin/app_auths#destroy - admin_object_auth_init_ob_auth GET /admin/object_auths/:object_auth_id/new_interface/:ob_type/:title/new(.:format) admin/object_auths_new_interface#new - admin_object_auth_ob_auth GET /admin/object_auths/:object_auth_id/new_interface(.:format) admin/object_auths_new_interface#setting - admin_object_auth_ob_auth POST /admin/object_auths/:object_auth_id/new_interface(.:format) admin/object_auths_new_interface#update_setting - admin_object_auth_ob_auth_show PUT /admin/object_auths/:object_auth_id/new_interface(.:format) admin/object_auths_new_interface#user_list - init_admin_object_auths GET /admin/object_auths/new/:type/:obj_id(.:format) admin/object_auths#new - create_role_admin_object_auth POST /admin/object_auths/:id/:id/create_role(.:format) admin/object_auths#create_role - remove_admin_object_auth DELETE /admin/object_auths/:id/remove/:type/:target_id(.:format) admin/object_auths#remove_role - admin_object_auths GET /admin/object_auths(.:format) admin/object_auths#index - POST /admin/object_auths(.:format) admin/object_auths#create - new_admin_object_auth GET /admin/object_auths/new(.:format) admin/object_auths#new - edit_admin_object_auth GET /admin/object_auths/:id/edit(.:format) admin/object_auths#edit - admin_object_auth GET /admin/object_auths/:id(.:format) admin/object_auths#show - PUT /admin/object_auths/:id(.:format) admin/object_auths#update - DELETE /admin/object_auths/:id(.:format) admin/object_auths#destroy - admin_realtime_preview_ad_banner PUT /admin/ad_banners/:id/preview(.:format) admin/ad_banners#realtime_preview - admin_rename_ad_banner POST /admin/ad_banners/:id/rename(.:format) admin/ad_banners#rename - new_ad_image_admin_ad_banners GET /admin/ad_banners/new_ad_image(.:format) admin/ad_images#new - create_ad_image_admin_ad_banners POST /admin/ad_banners/new_ad_image(.:format) admin/ad_images#create - admin_ad_banner_ad_images POST /admin/ad_banners/:ad_banner_id/ad_images(.:format) admin/ad_images#create - new_admin_ad_banner_ad_image GET /admin/ad_banners/:ad_banner_id/ad_images/new(.:format) admin/ad_images#new - edit_admin_ad_banner_ad_image GET /admin/ad_banners/:ad_banner_id/ad_images/:id/edit(.:format) admin/ad_images#edit - admin_ad_banner_ad_image PUT /admin/ad_banners/:ad_banner_id/ad_images/:id(.:format) admin/ad_images#update - DELETE /admin/ad_banners/:ad_banner_id/ad_images/:id(.:format) admin/ad_images#destroy - admin_ad_banners GET /admin/ad_banners(.:format) admin/ad_banners#index - POST /admin/ad_banners(.:format) admin/ad_banners#create - new_admin_ad_banner GET /admin/ad_banners/new(.:format) admin/ad_banners#new - edit_admin_ad_banner GET /admin/ad_banners/:id/edit(.:format) admin/ad_banners#edit - admin_ad_banner GET /admin/ad_banners/:id(.:format) admin/ad_banners#show - PUT /admin/ad_banners/:id(.:format) admin/ad_banners#update - DELETE /admin/ad_banners/:id(.:format) admin/ad_banners#destroy - admin_dashboards GET /admin/dashboards(.:format) admin/dashboards#index - POST /admin/dashboards(.:format) admin/dashboards#create - new_admin_dashboard GET /admin/dashboards/new(.:format) admin/dashboards#new - edit_admin_dashboard GET /admin/dashboards/:id/edit(.:format) admin/dashboards#edit - admin_dashboard GET /admin/dashboards/:id(.:format) admin/dashboards#show - PUT /admin/dashboards/:id(.:format) admin/dashboards#update - DELETE /admin/dashboards/:id(.:format) admin/dashboards#destroy - upload_package_admin_designs GET /admin/designs/upload_package(.:format) admin/designs#upload_package - delete_admin_designs GET /admin/designs/delete(.:format) admin/designs#delete - POST /admin/designs/upload_package(.:format) admin/designs#upload_package - edit_file_admin_design POST /admin/designs/:id/edit_file(.:format) admin/designs#edit_file - update_file_admin_design POST /admin/designs/:id/update_file(.:format) admin/designs#update_file - upload_image_admin_design POST /admin/designs/:id/upload_image(.:format) admin/designs#upload_image - admin_designs GET /admin/designs(.:format) admin/designs#index - POST /admin/designs(.:format) admin/designs#create - new_admin_design GET /admin/designs/new(.:format) admin/designs#new - edit_admin_design GET /admin/designs/:id/edit(.:format) admin/designs#edit - admin_design GET /admin/designs/:id(.:format) admin/designs#show - PUT /admin/designs/:id(.:format) admin/designs#update - DELETE /admin/designs/:id(.:format) admin/designs#destroy - admin_info_add_attribute_field GET /admin/infos/:info_id/add_attribute_field(.:format) admin/infos#add_attribute_field - admin_infos GET /admin/infos(.:format) admin/infos#index - POST /admin/infos(.:format) admin/infos#create - new_admin_info GET /admin/infos/new(.:format) admin/infos#new - edit_admin_info GET /admin/infos/:id/edit(.:format) admin/infos#edit - admin_info GET /admin/infos/:id(.:format) admin/infos#show - PUT /admin/infos/:id(.:format) admin/infos#update - DELETE /admin/infos/:id(.:format) admin/infos#destroy - admin_items GET /admin/items(.:format) admin/items#index - POST /admin/items(.:format) admin/items#create - new_admin_item GET /admin/items/new(.:format) admin/items#new - edit_admin_item GET /admin/items/:id/edit(.:format) admin/items#edit - admin_item GET /admin/items/:id(.:format) admin/items#show - PUT /admin/items/:id(.:format) admin/items#update - DELETE /admin/items/:id(.:format) admin/items#destroy - admin_update_position /admin/update_position(.:format) admin/items#update_position - delete_admin_link GET /admin/links/:id/delete(.:format) admin/links#delete - admin_links GET /admin/links(.:format) admin/links#index - POST /admin/links(.:format) admin/links#create - new_admin_link GET /admin/links/new(.:format) admin/links#new - edit_admin_link GET /admin/links/:id/edit(.:format) admin/links#edit - admin_link GET /admin/links/:id(.:format) admin/links#show - PUT /admin/links/:id(.:format) admin/links#update - DELETE /admin/links/:id(.:format) admin/links#destroy - delete_admin_page GET /admin/pages/:id/delete(.:format) admin/pages#delete - reload_themes_admin_page GET /admin/pages/:id/reload_themes(.:format) admin/pages#reload_themes - admin_pages GET /admin/pages(.:format) admin/pages#index - POST /admin/pages(.:format) admin/pages#create - new_admin_page GET /admin/pages/new(.:format) admin/pages#new - edit_admin_page GET /admin/pages/:id/edit(.:format) admin/pages#edit - admin_page GET /admin/pages/:id(.:format) admin/pages#show - PUT /admin/pages/:id(.:format) admin/pages#update - DELETE /admin/pages/:id(.:format) admin/pages#destroy - admin_module_app_manager_auth_proc GET /admin/module_apps/:module_app_id/manager_auth_proc(.:format) admin/module_apps_new_interface#setting - admin_module_app_manager_auth_proc POST /admin/module_apps/:module_app_id/manager_auth_proc(.:format) admin/module_apps_new_interface#update_setting - admin_module_app_manager_auth_show PUT /admin/module_apps/:module_app_id/manager_auth_proc(.:format) admin/module_apps_new_interface#user_list - remove_admin_module_app_app_auth DELETE /admin/module_apps/:module_app_id/app_auths/:id/remove/:type/:target_id(.:format) admin/app_auths#remove - admin_module_app_app_auths GET /admin/module_apps/:module_app_id/app_auths(.:format) admin/app_auths#index - POST /admin/module_apps/:module_app_id/app_auths(.:format) admin/app_auths#create - new_admin_module_app_app_auth GET /admin/module_apps/:module_app_id/app_auths/new(.:format) admin/app_auths#new - edit_admin_module_app_app_auth GET /admin/module_apps/:module_app_id/app_auths/:id/edit(.:format) admin/app_auths#edit - admin_module_app_app_auth GET /admin/module_apps/:module_app_id/app_auths/:id(.:format) admin/app_auths#show - PUT /admin/module_apps/:module_app_id/app_auths/:id(.:format) admin/app_auths#update - DELETE /admin/module_apps/:module_app_id/app_auths/:id(.:format) admin/app_auths#destroy - assign_manager_admin_module_app POST /admin/module_apps/:id/assign_manager(.:format) admin/module_apps#assign_manager - assign_sub_manager_admin_module_app POST /admin/module_apps/:id/assign_sub_manager(.:format) admin/module_apps#assign_sub_manager - remove_manager_admin_module_app DELETE /admin/module_apps/:id/remove_manager/:app_manager_id(.:format) admin/module_apps#remove_manager - remove_sub_manager_admin_module_app DELETE /admin/module_apps/:id/remove_sub_manager/:app_sub_manager_id(.:format) admin/module_apps#remove_sub_manager - reload_frontend_pages_admin_module_app GET /admin/module_apps/:id/reload_frontend_pages(.:format) admin/module_apps#reload_frontend_pages - admin_module_apps GET /admin/module_apps(.:format) admin/module_apps#index - POST /admin/module_apps(.:format) admin/module_apps#create - new_admin_module_app GET /admin/module_apps/new(.:format) admin/module_apps#new - edit_admin_module_app GET /admin/module_apps/:id/edit(.:format) admin/module_apps#edit - admin_module_app GET /admin/module_apps/:id(.:format) admin/module_apps#show - PUT /admin/module_apps/:id(.:format) admin/module_apps#update - DELETE /admin/module_apps/:id(.:format) admin/module_apps#destroy - reload_widgets_admin_page_part GET /admin/page_parts/:id/reload_widgets(.:format) admin/page_parts#reload_widgets - reload_widget_styles_admin_page_part GET /admin/page_parts/:id/reload_widget_styles(.:format) admin/page_parts#reload_widget_styles - reload_r_tag_options_admin_page_part GET /admin/page_parts/:id/reload_r_tag_options(.:format) admin/page_parts#reload_r_tag_options - admin_page_parts GET /admin/page_parts(.:format) admin/page_parts#index - POST /admin/page_parts(.:format) admin/page_parts#create - new_admin_page_part GET /admin/page_parts/new(.:format) admin/page_parts#new - edit_admin_page_part GET /admin/page_parts/:id/edit(.:format) admin/page_parts#edit - admin_page_part GET /admin/page_parts/:id(.:format) admin/page_parts#show - PUT /admin/page_parts/:id(.:format) admin/page_parts#update - DELETE /admin/page_parts/:id(.:format) admin/page_parts#destroy - admin_plugins GET /admin/plugins(.:format) admin/plugins#index - POST /admin/plugins(.:format) admin/plugins#create - new_admin_plugin GET /admin/plugins/new(.:format) admin/plugins#new - edit_admin_plugin GET /admin/plugins/:id/edit(.:format) admin/plugins#edit - admin_plugin GET /admin/plugins/:id(.:format) admin/plugins#show - PUT /admin/plugins/:id(.:format) admin/plugins#update - DELETE /admin/plugins/:id(.:format) admin/plugins#destroy - install_app_admin_purchases GET /admin/purchases/install_app(.:format) admin/purchases#install_app - buy_template_admin_purchase GET /admin/purchases/:id/buy_template(.:format) admin/purchases#buy_template - download_admin_purchase GET /admin/purchases/:id/download(.:format) admin/purchases#download - admin_purchases GET /admin/purchases(.:format) admin/purchases#index - POST /admin/purchases(.:format) admin/purchases#create - new_admin_purchase GET /admin/purchases/new(.:format) admin/purchases#new - edit_admin_purchase GET /admin/purchases/:id/edit(.:format) admin/purchases#edit - admin_purchase GET /admin/purchases/:id(.:format) admin/purchases#show - PUT /admin/purchases/:id(.:format) admin/purchases#update - DELETE /admin/purchases/:id(.:format) admin/purchases#destroy - admin_role_role_field GET /admin/roles/:role_id/role_field(.:format) admin/roles#role_field - admin_role_sub_role_field GET /admin/roles/:role_id/sub_role_field(.:format) admin/roles#sub_role_field - admin_role_sub_role GET /admin/roles/:role_id/sub_role(.:format) admin/roles#sub_role - admin_role_add_sub_role GET /admin/roles/:role_id/add_sub_role(.:format) admin/roles#add_sub_role - admin_role_edit_sub_role GET /admin/roles/:role_id/edit_sub_role(.:format) admin/roles#edit_sub_role - admin_role_add_attribute_field GET /admin/roles/:role_id/add_attribute_field(.:format) admin/roles#add_attribute_field - admin_roles GET /admin/roles(.:format) admin/roles#index - POST /admin/roles(.:format) admin/roles#create - new_admin_role GET /admin/roles/new(.:format) admin/roles#new - edit_admin_role GET /admin/roles/:id/edit(.:format) admin/roles#edit - admin_role GET /admin/roles/:id(.:format) admin/roles#show - PUT /admin/roles/:id(.:format) admin/roles#update - DELETE /admin/roles/:id(.:format) admin/roles#destroy - admin_site_mail_setting GET /admin/sites/:site_id/mail_setting(.:format) admin/sites#mail_setting - admin_site_site_info GET /admin/sites/:site_id/site_info(.:format) admin/sites#site_info - admin_site_sitemap GET /admin/sites/:site_id/sitemap(.:format) admin/sites#sitemap - admin_site_sitemap_frontend GET /admin/sites/:site_id/sitemap_frontend(.:format) admin/sites#sitemap_frontend - sitemap_toggle_admin_site GET /admin/sites/:id/sitemap_toggle(.:format) admin/sites#sitemap_toggle - admin_site_system_info GET /admin/sites/:site_id/system_info(.:format) admin/sites#system_info - admin_site_ui_theme GET /admin/sites/:site_id/ui_theme(.:format) admin/sites#ui_theme - admin_site_change_design GET /admin/sites/:site_id/change_design(.:format) admin/sites#change_design - admin_sites GET /admin/sites(.:format) admin/sites#index - POST /admin/sites(.:format) admin/sites#create - new_admin_site GET /admin/sites/new(.:format) admin/sites#new - edit_admin_site GET /admin/sites/:id/edit(.:format) admin/sites#edit - admin_site GET /admin/sites/:id(.:format) admin/sites#show - PUT /admin/sites/:id(.:format) admin/sites#update - DELETE /admin/sites/:id(.:format) admin/sites#destroy - admin_tags GET /admin/tags(.:format) admin/tags#index - POST /admin/tags(.:format) admin/tags#create - new_admin_tag GET /admin/tags/new(.:format) admin/tags#new - edit_admin_tag GET /admin/tags/:id/edit(.:format) admin/tags#edit - admin_tag GET /admin/tags/:id(.:format) admin/tags#show - PUT /admin/tags/:id(.:format) admin/tags#update - DELETE /admin/tags/:id(.:format) admin/tags#destroy - admin_users GET /admin/users(.:format) admin/users#index - POST /admin/users(.:format) admin/users#create - new_admin_user GET /admin/users/new(.:format) admin/users#new - edit_admin_user GET /admin/users/:id/edit(.:format) admin/users#edit - admin_user GET /admin/users/:id(.:format) admin/users#show - PUT /admin/users/:id(.:format) admin/users#update - DELETE /admin/users/:id(.:format) admin/users#destroy - temp_edit_admin_users_new_interface GET /admin/users_new_interface/:id/temp_edit(.:format) admin/users_new_interface#temp_edit - admin_users_new_interface_index GET /admin/users_new_interface(.:format) admin/users_new_interface#index - POST /admin/users_new_interface(.:format) admin/users_new_interface#create - new_admin_users_new_interface GET /admin/users_new_interface/new(.:format) admin/users_new_interface#new - edit_admin_users_new_interface GET /admin/users_new_interface/:id/edit(.:format) admin/users_new_interface#edit - admin_users_new_interface GET /admin/users_new_interface/:id(.:format) admin/users_new_interface#show - PUT /admin/users_new_interface/:id(.:format) admin/users_new_interface#update - DELETE /admin/users_new_interface/:id(.:format) admin/users_new_interface#destroy - admin_member_select_member_select_search POST /admin/member_selects/:member_select_id/member_select_search(.:format) admin/member_selects#member_select_search - admin_member_select_member_select_add POST /admin/member_selects/:member_select_id/member_select_add(.:format) admin/member_selects#member_select_add - admin_member_selects GET /admin/member_selects(.:format) admin/member_selects#index - POST /admin/member_selects(.:format) admin/member_selects#create - new_admin_member_select GET /admin/member_selects/new(.:format) admin/member_selects#new - edit_admin_member_select GET /admin/member_selects/:id/edit(.:format) admin/member_selects#edit - admin_member_select GET /admin/member_selects/:id(.:format) admin/member_selects#show - PUT /admin/member_selects/:id(.:format) admin/member_selects#update - DELETE /admin/member_selects/:id(.:format) admin/member_selects#destroy - admin_module_store /admin/module_store(.:format) admin/module_store#index - admin_module_store_show /admin/module_store/show(.:format) admin/module_store#show - admin_template_store /admin/template_store(.:format) admin/template_store#index - admin_template_store_template /admin/template_store/template/:id(.:format) admin/template_store#show - panel_users GET /panel/users(.:format) panel/users#index - POST /panel/users(.:format) panel/users#create - new_panel_user GET /panel/users/new(.:format) panel/users#new - edit_panel_user GET /panel/users/:id/edit(.:format) panel/users#edit - panel_user GET /panel/users/:id(.:format) panel/users#show - PUT /panel/users/:id(.:format) panel/users#update - DELETE /panel/users/:id(.:format) panel/users#destroy - upload_desktop_widgets GET /desktop_widgets/upload(.:format) desktop_widgets#upload - delete_desktop_widgets GET /desktop_widgets/delete(.:format) desktop_widgets#delete - POST /desktop_widgets/upload(.:format) desktop_widgets#upload - desktop_widgets GET /desktop_widgets(.:format) desktop_widgets#index - POST /desktop_widgets(.:format) desktop_widgets#create - new_desktop_widget GET /desktop_widgets/new(.:format) desktop_widgets#new - edit_desktop_widget GET /desktop_widgets/:id/edit(.:format) desktop_widgets#edit - desktop_widget GET /desktop_widgets/:id(.:format) desktop_widgets#show - PUT /desktop_widgets/:id(.:format) desktop_widgets#update - DELETE /desktop_widgets/:id(.:format) desktop_widgets#destroy - desktop /desktop(.:format) desktop#index - desktop_desktop /desktop/desktop(.:format) desktop#desktop - /desktop/desktop(.:format) desktop#desktop - desktop_app_manager /desktop/app_manager(.:format) desktop#app_manager - desktop_allsections /desktop/allsections(.:format) desktop#allsections - desktop_settings /desktop/settings(.:format) desktop#settings - desktop_get_desktop_settings /desktop/get_desktop_settings(.:format) desktop#get_desktop_settings - desktop_save_desktop_settings /desktop/save_desktop_settings(.:format) desktop#save_desktop_settings - desktop_getgroups /desktop/getgroups(.:format) desktop#getgroups - desktop_getsectionlist /desktop/getsectionlist(.:format) desktop#getsectionlist - desktop_themes /desktop/themes(.:format) desktop#themes - desktop_sections /desktop/sections(.:format) desktop#sections - desktop_getapplist /desktop/getapplist(.:format) desktop#getapplist - desktop_newpositions /desktop/newpositions(.:format) desktop#newpositions - desktop_connections /desktop/connections(.:format) desktop#connections - desktop_widget_layout /desktop/widget_layout(.:format) desktop#widget_layout - desktop_temp_func /desktop/temp_func(.:format) desktop#temp_func - desktop_publications_books /desktop_publications/books(.:format) desktop_publications#books - desktop_publications_books_list /desktop_publications/books_list(.:format) desktop_publications#books_list - desktop_publications_books_add /desktop_publications/books_add(.:format) desktop_publications#books_add - desktop_publications_conference_p /desktop_publications/conference_p(.:format) desktop_publications#conference_p - desktop_publications_conference_p_list /desktop_publications/conference_p_list(.:format) desktop_publications#conference_p_list - desktop_publications_conference_p_add /desktop_publications/conference_p_add(.:format) desktop_publications#conference_p_add - desktop_research_research_d /desktop_research/research_d(.:format) desktop_research#research_d - desktop_research_research_d_list /desktop_research/research_d_list(.:format) desktop_research#research_d_list - desktop_research_research_d_add /desktop_research/research_d_add(.:format) desktop_research#research_d_add - desktop_research_research_p /desktop_research/research_p(.:format) desktop_research#research_p - desktop_research_research_p_list /desktop_research/research_p_list(.:format) desktop_research#research_p_list - desktop_research_research_p_add /desktop_research/research_p_add(.:format) desktop_research#research_p_add - twitter /twitter(.:format) otheraccounts#twitter - forgmail /forgmail(.:format) otheraccounts#gmail - otheraccounts_getaccounts /otheraccounts/getaccounts(.:format) otheraccounts#getaccounts - save_account_info /save_account_info(.:format) otheraccounts#saveaccountinfo - desktop_appstore_appstore /desktop_appstore/appstore(.:format) desktop_appstore#appstore - desktop_appstore_onlinestore /desktop_appstore/onlinestore(.:format) desktop_appstore#onlinestore - desktop_appstore_widgets /desktop_appstore/widgets(.:format) desktop_appstore#widgets - desktop_appstore_getuserwidgets /desktop_appstore/getuserwidgets(.:format) desktop_appstore#getuserwidgets - desktop_appstore_widgets_settings /desktop_appstore/widgets_settings(.:format) desktop_appstore#widgets_settings - desktop_orbit_orbit /desktop_orbit/orbit(.:format) desktop_orbit#orbit - desktop_orbit_eventajaxload /desktop_orbit/eventajaxload(.:format) desktop_orbit#eventajaxload - desktop_orbit_gettimelinespan /desktop_orbit/gettimelinespan(.:format) desktop_orbit#gettimelinespan - front_show_banner /front/show_banner(/:id)(.:format) front#show_banner - front_show_footer /front/show_footer(/:id)(.:format) front#show_footer - front_show_menu /front/show_menu(/:id)(.:format) front#show_menu - front_show_page_sub_menu /front/show_page_sub_menu(/:id)(.:format) front#show_page_sub_menu - front_show_site_sub_menu /front/show_site_sub_menu(/:id)(.:format) front#show_site_sub_menu - front_show_sitemap /front/show_sitemap(/:id)(.:format) front#show_sitemap - mobile_announcement /mobile(/:app)/announcement(.:format) mobile#announcement - mobile_announcement_content /mobile(/:app)/announcement_content/:id(.:format) mobile#announcement_content - mobile_dialog_contact /mobile(/:app)/dialog_contact(.:format) mobile#dialog_contact - mobile_dialog_copyright /mobile(/:app)/dialog_copyright(.:format) mobile#dialog_copyright - mobile_dialog_language /mobile(/:app)/dialog_language(.:format) mobile#dialog_language - mobile_map /mobile(/:app)/map(.:format) mobile#map - mobile_page /mobile(/:app)/page(.:format) mobile#page - mobile_page_content /mobile(/:app)/page_content/:id(.:format) mobile#page_content - mobile /mobile(/:app)(.:format) mobile#index - /panel/orbit_app/widget/:type(.:format) default_widget#default_widget - /panel/:app_name/front_end/:app_action/:id(/:controller_action)(.:format) pages#show_from_link - /panel/:app_name/front_end/:app_action(.:format) pages#index_from_link - /share/:model/:id(.:format) application#render_share - /gridfs/*path(.:format) gridfs#serve - page /*page_name(.:format) pages#show - root / pages#index - front_show_inner_ad_image /panel/ad_banner/front_end/inner_page/:id(.:format) front#show_inner_ad_image - panel_web_resource_back_end_root /panel/web_resource/back_end(.:format) panel/web_resource/back_end/web_links#index - delete_panel_web_resource_back_end_web_links GET /panel/web_resource/back_end/web_links/delete(.:format) panel/web_resource/back_end/web_links#delete - panel_web_resource_back_end_web_links GET /panel/web_resource/back_end/web_links(.:format) panel/web_resource/back_end/web_links#index - POST /panel/web_resource/back_end/web_links(.:format) panel/web_resource/back_end/web_links#create - new_panel_web_resource_back_end_web_link GET /panel/web_resource/back_end/web_links/new(.:format) panel/web_resource/back_end/web_links#new - edit_panel_web_resource_back_end_web_link GET /panel/web_resource/back_end/web_links/:id/edit(.:format) panel/web_resource/back_end/web_links#edit - panel_web_resource_back_end_web_link GET /panel/web_resource/back_end/web_links/:id(.:format) panel/web_resource/back_end/web_links#show - PUT /panel/web_resource/back_end/web_links/:id(.:format) panel/web_resource/back_end/web_links#update - DELETE /panel/web_resource/back_end/web_links/:id(.:format) panel/web_resource/back_end/web_links#destroy - panel_web_resource_back_end_web_link_categorys GET /panel/web_resource/back_end/web_link_categorys(.:format) panel/web_resource/back_end/web_link_categorys#index - POST /panel/web_resource/back_end/web_link_categorys(.:format) panel/web_resource/back_end/web_link_categorys#create - new_panel_web_resource_back_end_web_link_category GET /panel/web_resource/back_end/web_link_categorys/new(.:format) panel/web_resource/back_end/web_link_categorys#new - edit_panel_web_resource_back_end_web_link_category GET /panel/web_resource/back_end/web_link_categorys/:id/edit(.:format) panel/web_resource/back_end/web_link_categorys#edit - panel_web_resource_back_end_web_link_category GET /panel/web_resource/back_end/web_link_categorys/:id(.:format) panel/web_resource/back_end/web_link_categorys#show - PUT /panel/web_resource/back_end/web_link_categorys/:id(.:format) panel/web_resource/back_end/web_link_categorys#update - DELETE /panel/web_resource/back_end/web_link_categorys/:id(.:format) panel/web_resource/back_end/web_link_categorys#destroy - panel_web_resource_back_end_tags GET /panel/web_resource/back_end/tags(.:format) panel/web_resource/back_end/tags#index - POST /panel/web_resource/back_end/tags(.:format) panel/web_resource/back_end/tags#create - new_panel_web_resource_back_end_tag GET /panel/web_resource/back_end/tags/new(.:format) panel/web_resource/back_end/tags#new - edit_panel_web_resource_back_end_tag GET /panel/web_resource/back_end/tags/:id/edit(.:format) panel/web_resource/back_end/tags#edit - panel_web_resource_back_end_tag GET /panel/web_resource/back_end/tags/:id(.:format) panel/web_resource/back_end/tags#show - PUT /panel/web_resource/back_end/tags/:id(.:format) panel/web_resource/back_end/tags#update - DELETE /panel/web_resource/back_end/tags/:id(.:format) panel/web_resource/back_end/tags#destroy - panel_web_resource_front_end_web_links GET /panel/web_resource/front_end/web_links(.:format) panel/web_resource/front_end/web_links#index - POST /panel/web_resource/front_end/web_links(.:format) panel/web_resource/front_end/web_links#create - new_panel_web_resource_front_end_web_link GET /panel/web_resource/front_end/web_links/new(.:format) panel/web_resource/front_end/web_links#new - edit_panel_web_resource_front_end_web_link GET /panel/web_resource/front_end/web_links/:id/edit(.:format) panel/web_resource/front_end/web_links#edit - panel_web_resource_front_end_web_link GET /panel/web_resource/front_end/web_links/:id(.:format) panel/web_resource/front_end/web_links#show - PUT /panel/web_resource/front_end/web_links/:id(.:format) panel/web_resource/front_end/web_links#update - DELETE /panel/web_resource/front_end/web_links/:id(.:format) panel/web_resource/front_end/web_links#destroy - panel_web_resource_widget_web_links /panel/web_resource/widget/web_links(.:format) panel/web_resource/widget/web_links#index - panel_web_resource_widget_home_list /panel/web_resource/widget/home_list(.:format) panel/web_resource/widget/web_links#home_list - panel_web_resource_widget_reload_web_links /panel/web_resource/widget/reload_web_links(.:format) panel/web_resource/widget/web_links#reload_web_links - /appfront/*path(.:format) :controller#:action - panel_personal_research_back_end_research_setting /panel/personal_research/back_end/research_setting(.:format) panel/personal_research/back_end/researchs#research_setting - delete_panel_personal_research_back_end_researchs GET /panel/personal_research/back_end/researchs/delete(.:format) panel/personal_research/back_end/researchs#delete - panel_personal_research_back_end_research_tag_quick_add /panel/personal_research/back_end/researchs/:research_id/tag_quick_add(.:format) panel/personal_research/back_end/researchs#tag_quick_add - panel_personal_research_back_end_research_tag_quick_edit /panel/personal_research/back_end/researchs/:research_id/tag_quick_edit(.:format) panel/personal_research/back_end/researchs#tag_quick_edit - panel_personal_research_back_end_researchs GET /panel/personal_research/back_end/researchs(.:format) panel/personal_research/back_end/researchs#index - POST /panel/personal_research/back_end/researchs(.:format) panel/personal_research/back_end/researchs#create - new_panel_personal_research_back_end_research GET /panel/personal_research/back_end/researchs/new(.:format) panel/personal_research/back_end/researchs#new - edit_panel_personal_research_back_end_research GET /panel/personal_research/back_end/researchs/:id/edit(.:format) panel/personal_research/back_end/researchs#edit - panel_personal_research_back_end_research GET /panel/personal_research/back_end/researchs/:id(.:format) panel/personal_research/back_end/researchs#show - PUT /panel/personal_research/back_end/researchs/:id(.:format) panel/personal_research/back_end/researchs#update - DELETE /panel/personal_research/back_end/researchs/:id(.:format) panel/personal_research/back_end/researchs#destroy - panel_personal_research_back_end_tags GET /panel/personal_research/back_end/tags(.:format) panel/personal_research/back_end/tags#index - POST /panel/personal_research/back_end/tags(.:format) panel/personal_research/back_end/tags#create - new_panel_personal_research_back_end_tag GET /panel/personal_research/back_end/tags/new(.:format) panel/personal_research/back_end/tags#new - edit_panel_personal_research_back_end_tag GET /panel/personal_research/back_end/tags/:id/edit(.:format) panel/personal_research/back_end/tags#edit - panel_personal_research_back_end_tag GET /panel/personal_research/back_end/tags/:id(.:format) panel/personal_research/back_end/tags#show - PUT /panel/personal_research/back_end/tags/:id(.:format) panel/personal_research/back_end/tags#update - DELETE /panel/personal_research/back_end/tags/:id(.:format) panel/personal_research/back_end/tags#destroy - panel_personal_research_front_end_researchs GET /panel/personal_research/front_end/researchs(.:format) panel/personal_research/front_end/researchs#index - POST /panel/personal_research/front_end/researchs(.:format) panel/personal_research/front_end/researchs#create - new_panel_personal_research_front_end_research GET /panel/personal_research/front_end/researchs/new(.:format) panel/personal_research/front_end/researchs#new - edit_panel_personal_research_front_end_research GET /panel/personal_research/front_end/researchs/:id/edit(.:format) panel/personal_research/front_end/researchs#edit - panel_personal_research_front_end_research GET /panel/personal_research/front_end/researchs/:id(.:format) panel/personal_research/front_end/researchs#show - PUT /panel/personal_research/front_end/researchs/:id(.:format) panel/personal_research/front_end/researchs#update - DELETE /panel/personal_research/front_end/researchs/:id(.:format) panel/personal_research/front_end/researchs#destroy - panel_personal_research_plugin_researchs GET /panel/personal_research/plugin/researchs(.:format) panel/personal_research/plugin/researchs#index - POST /panel/personal_research/plugin/researchs(.:format) panel/personal_research/plugin/researchs#create - new_panel_personal_research_plugin_research GET /panel/personal_research/plugin/researchs/new(.:format) panel/personal_research/plugin/researchs#new - edit_panel_personal_research_plugin_research GET /panel/personal_research/plugin/researchs/:id/edit(.:format) panel/personal_research/plugin/researchs#edit - panel_personal_research_plugin_research GET /panel/personal_research/plugin/researchs/:id(.:format) panel/personal_research/plugin/researchs#show - PUT /panel/personal_research/plugin/researchs/:id(.:format) panel/personal_research/plugin/researchs#update - DELETE /panel/personal_research/plugin/researchs/:id(.:format) panel/personal_research/plugin/researchs#destroy - panel_personal_research_widget_researchs /panel/personal_research/widget/researchs(.:format) panel/personal_research/widget/researchs#index - panel_personal_research_widget_home_list /panel/personal_research/widget/home_list(.:format) panel/personal_research/widget/researchs#home_list - panel_personal_research_widget_reload_researchs /panel/personal_research/widget/reload_researchs(.:format) panel/personal_research/widget/researchs#reload_researchs - /appfront/*path(.:format) :controller#:action - panel_personal_project_back_end_project_setting /panel/personal_project/back_end/project_setting(.:format) panel/personal_project/back_end/projects#project_setting - delete_panel_personal_project_back_end_projects GET /panel/personal_project/back_end/projects/delete(.:format) panel/personal_project/back_end/projects#delete - panel_personal_project_back_end_project_project_category_quick_add /panel/personal_project/back_end/projects/:project_id/project_category_quick_add(.:format) panel/personal_project/back_end/projects#project_category_quick_add - panel_personal_project_back_end_project_project_category_quick_edit /panel/personal_project/back_end/projects/:project_id/project_category_quick_edit(.:format) panel/personal_project/back_end/projects#project_category_quick_edit - panel_personal_project_back_end_projects GET /panel/personal_project/back_end/projects(.:format) panel/personal_project/back_end/projects#index - POST /panel/personal_project/back_end/projects(.:format) panel/personal_project/back_end/projects#create - new_panel_personal_project_back_end_project GET /panel/personal_project/back_end/projects/new(.:format) panel/personal_project/back_end/projects#new - edit_panel_personal_project_back_end_project GET /panel/personal_project/back_end/projects/:id/edit(.:format) panel/personal_project/back_end/projects#edit - panel_personal_project_back_end_project GET /panel/personal_project/back_end/projects/:id(.:format) panel/personal_project/back_end/projects#show - PUT /panel/personal_project/back_end/projects/:id(.:format) panel/personal_project/back_end/projects#update - DELETE /panel/personal_project/back_end/projects/:id(.:format) panel/personal_project/back_end/projects#destroy - panel_personal_project_back_end_project_categorys GET /panel/personal_project/back_end/project_categorys(.:format) panel/personal_project/back_end/project_categorys#index - POST /panel/personal_project/back_end/project_categorys(.:format) panel/personal_project/back_end/project_categorys#create - new_panel_personal_project_back_end_project_category GET /panel/personal_project/back_end/project_categorys/new(.:format) panel/personal_project/back_end/project_categorys#new - edit_panel_personal_project_back_end_project_category GET /panel/personal_project/back_end/project_categorys/:id/edit(.:format) panel/personal_project/back_end/project_categorys#edit - panel_personal_project_back_end_project_category GET /panel/personal_project/back_end/project_categorys/:id(.:format) panel/personal_project/back_end/project_categorys#show - PUT /panel/personal_project/back_end/project_categorys/:id(.:format) panel/personal_project/back_end/project_categorys#update - DELETE /panel/personal_project/back_end/project_categorys/:id(.:format) panel/personal_project/back_end/project_categorys#destroy - panel_personal_project_back_end_tags GET /panel/personal_project/back_end/tags(.:format) panel/personal_project/back_end/tags#index - POST /panel/personal_project/back_end/tags(.:format) panel/personal_project/back_end/tags#create - new_panel_personal_project_back_end_tag GET /panel/personal_project/back_end/tags/new(.:format) panel/personal_project/back_end/tags#new - edit_panel_personal_project_back_end_tag GET /panel/personal_project/back_end/tags/:id/edit(.:format) panel/personal_project/back_end/tags#edit - panel_personal_project_back_end_tag GET /panel/personal_project/back_end/tags/:id(.:format) panel/personal_project/back_end/tags#show - PUT /panel/personal_project/back_end/tags/:id(.:format) panel/personal_project/back_end/tags#update - DELETE /panel/personal_project/back_end/tags/:id(.:format) panel/personal_project/back_end/tags#destroy - panel_personal_project_front_end_projects GET /panel/personal_project/front_end/projects(.:format) panel/personal_project/front_end/projects#index - POST /panel/personal_project/front_end/projects(.:format) panel/personal_project/front_end/projects#create - new_panel_personal_project_front_end_project GET /panel/personal_project/front_end/projects/new(.:format) panel/personal_project/front_end/projects#new - edit_panel_personal_project_front_end_project GET /panel/personal_project/front_end/projects/:id/edit(.:format) panel/personal_project/front_end/projects#edit - panel_personal_project_front_end_project GET /panel/personal_project/front_end/projects/:id(.:format) panel/personal_project/front_end/projects#show - PUT /panel/personal_project/front_end/projects/:id(.:format) panel/personal_project/front_end/projects#update - DELETE /panel/personal_project/front_end/projects/:id(.:format) panel/personal_project/front_end/projects#destroy - panel_personal_project_plugin_projects GET /panel/personal_project/plugin/projects(.:format) panel/personal_project/plugin/projects#index - POST /panel/personal_project/plugin/projects(.:format) panel/personal_project/plugin/projects#create - new_panel_personal_project_plugin_project GET /panel/personal_project/plugin/projects/new(.:format) panel/personal_project/plugin/projects#new - edit_panel_personal_project_plugin_project GET /panel/personal_project/plugin/projects/:id/edit(.:format) panel/personal_project/plugin/projects#edit - panel_personal_project_plugin_project GET /panel/personal_project/plugin/projects/:id(.:format) panel/personal_project/plugin/projects#show - PUT /panel/personal_project/plugin/projects/:id(.:format) panel/personal_project/plugin/projects#update - DELETE /panel/personal_project/plugin/projects/:id(.:format) panel/personal_project/plugin/projects#destroy - panel_personal_project_widget_projects /panel/personal_project/widget/projects(.:format) panel/personal_project/widget/projects#index - panel_personal_project_widget_home_list /panel/personal_project/widget/home_list(.:format) panel/personal_project/widget/projects#home_list - panel_personal_project_widget_reload_projects /panel/personal_project/widget/reload_projects(.:format) panel/personal_project/widget/projects#reload_projects - /appfront/*path(.:format) :controller#:action - panel_personal_patent_back_end_writing_patent_setting /panel/personal_patent/back_end/writing_patent_setting(.:format) panel/personal_patent/back_end/writing_patents#writing_patent_setting - delete_panel_personal_patent_back_end_writing_patents GET /panel/personal_patent/back_end/writing_patents/delete(.:format) panel/personal_patent/back_end/writing_patents#delete - panel_personal_patent_back_end_writing_patent_writing_patent_category_quick_add /panel/personal_patent/back_end/writing_patents/:writing_patent_id/writing_patent_category_quick_add(.:format) panel/personal_patent/back_end/writing_patents#writing_patent_category_quick_add -panel_personal_patent_back_end_writing_patent_writing_patent_category_quick_edit /panel/personal_patent/back_end/writing_patents/:writing_patent_id/writing_patent_category_quick_edit(.:format) panel/personal_patent/back_end/writing_patents#writing_patent_category_quick_edit - panel_personal_patent_back_end_writing_patents GET /panel/personal_patent/back_end/writing_patents(.:format) panel/personal_patent/back_end/writing_patents#index - POST /panel/personal_patent/back_end/writing_patents(.:format) panel/personal_patent/back_end/writing_patents#create - new_panel_personal_patent_back_end_writing_patent GET /panel/personal_patent/back_end/writing_patents/new(.:format) panel/personal_patent/back_end/writing_patents#new - edit_panel_personal_patent_back_end_writing_patent GET /panel/personal_patent/back_end/writing_patents/:id/edit(.:format) panel/personal_patent/back_end/writing_patents#edit - panel_personal_patent_back_end_writing_patent GET /panel/personal_patent/back_end/writing_patents/:id(.:format) panel/personal_patent/back_end/writing_patents#show - PUT /panel/personal_patent/back_end/writing_patents/:id(.:format) panel/personal_patent/back_end/writing_patents#update - DELETE /panel/personal_patent/back_end/writing_patents/:id(.:format) panel/personal_patent/back_end/writing_patents#destroy - panel_personal_patent_back_end_writing_patent_categorys GET /panel/personal_patent/back_end/writing_patent_categorys(.:format) panel/personal_patent/back_end/writing_patent_categorys#index - POST /panel/personal_patent/back_end/writing_patent_categorys(.:format) panel/personal_patent/back_end/writing_patent_categorys#create - new_panel_personal_patent_back_end_writing_patent_category GET /panel/personal_patent/back_end/writing_patent_categorys/new(.:format) panel/personal_patent/back_end/writing_patent_categorys#new - edit_panel_personal_patent_back_end_writing_patent_category GET /panel/personal_patent/back_end/writing_patent_categorys/:id/edit(.:format) panel/personal_patent/back_end/writing_patent_categorys#edit - panel_personal_patent_back_end_writing_patent_category GET /panel/personal_patent/back_end/writing_patent_categorys/:id(.:format) panel/personal_patent/back_end/writing_patent_categorys#show - PUT /panel/personal_patent/back_end/writing_patent_categorys/:id(.:format) panel/personal_patent/back_end/writing_patent_categorys#update - DELETE /panel/personal_patent/back_end/writing_patent_categorys/:id(.:format) panel/personal_patent/back_end/writing_patent_categorys#destroy - panel_personal_patent_back_end_tags GET /panel/personal_patent/back_end/tags(.:format) panel/personal_patent/back_end/tags#index - POST /panel/personal_patent/back_end/tags(.:format) panel/personal_patent/back_end/tags#create - new_panel_personal_patent_back_end_tag GET /panel/personal_patent/back_end/tags/new(.:format) panel/personal_patent/back_end/tags#new - edit_panel_personal_patent_back_end_tag GET /panel/personal_patent/back_end/tags/:id/edit(.:format) panel/personal_patent/back_end/tags#edit - panel_personal_patent_back_end_tag GET /panel/personal_patent/back_end/tags/:id(.:format) panel/personal_patent/back_end/tags#show - PUT /panel/personal_patent/back_end/tags/:id(.:format) panel/personal_patent/back_end/tags#update - DELETE /panel/personal_patent/back_end/tags/:id(.:format) panel/personal_patent/back_end/tags#destroy - panel_personal_patent_front_end_writing_patents GET /panel/personal_patent/front_end/writing_patents(.:format) panel/personal_patent/front_end/writing_patents#index - POST /panel/personal_patent/front_end/writing_patents(.:format) panel/personal_patent/front_end/writing_patents#create - new_panel_personal_patent_front_end_writing_patent GET /panel/personal_patent/front_end/writing_patents/new(.:format) panel/personal_patent/front_end/writing_patents#new - edit_panel_personal_patent_front_end_writing_patent GET /panel/personal_patent/front_end/writing_patents/:id/edit(.:format) panel/personal_patent/front_end/writing_patents#edit - panel_personal_patent_front_end_writing_patent GET /panel/personal_patent/front_end/writing_patents/:id(.:format) panel/personal_patent/front_end/writing_patents#show - PUT /panel/personal_patent/front_end/writing_patents/:id(.:format) panel/personal_patent/front_end/writing_patents#update - DELETE /panel/personal_patent/front_end/writing_patents/:id(.:format) panel/personal_patent/front_end/writing_patents#destroy - panel_personal_patent_plugin_writing_patents GET /panel/personal_patent/plugin/writing_patents(.:format) panel/personal_patent/plugin/writing_patents#index - POST /panel/personal_patent/plugin/writing_patents(.:format) panel/personal_patent/plugin/writing_patents#create - new_panel_personal_patent_plugin_writing_patent GET /panel/personal_patent/plugin/writing_patents/new(.:format) panel/personal_patent/plugin/writing_patents#new - edit_panel_personal_patent_plugin_writing_patent GET /panel/personal_patent/plugin/writing_patents/:id/edit(.:format) panel/personal_patent/plugin/writing_patents#edit - panel_personal_patent_plugin_writing_patent GET /panel/personal_patent/plugin/writing_patents/:id(.:format) panel/personal_patent/plugin/writing_patents#show - PUT /panel/personal_patent/plugin/writing_patents/:id(.:format) panel/personal_patent/plugin/writing_patents#update - DELETE /panel/personal_patent/plugin/writing_patents/:id(.:format) panel/personal_patent/plugin/writing_patents#destroy - panel_personal_patent_widget_writing_patents /panel/personal_patent/widget/writing_patents(.:format) panel/personal_patent/widget/writing_patents#index - panel_personal_patent_widget_home_list /panel/personal_patent/widget/home_list(.:format) panel/personal_patent/widget/writing_patents#home_list - panel_personal_patent_widget_reload_writing_patents /panel/personal_patent/widget/reload_writing_patents(.:format) panel/personal_patent/widget/writing_patents#reload_writing_patents - /appfront/*path(.:format) :controller#:action - panel_personal_lab_back_end_lab_setting /panel/personal_lab/back_end/lab_setting(.:format) panel/personal_lab/back_end/labs#lab_setting - delete_panel_personal_lab_back_end_labs GET /panel/personal_lab/back_end/labs/delete(.:format) panel/personal_lab/back_end/labs#delete - panel_personal_lab_back_end_labs GET /panel/personal_lab/back_end/labs(.:format) panel/personal_lab/back_end/labs#index - POST /panel/personal_lab/back_end/labs(.:format) panel/personal_lab/back_end/labs#create - new_panel_personal_lab_back_end_lab GET /panel/personal_lab/back_end/labs/new(.:format) panel/personal_lab/back_end/labs#new - edit_panel_personal_lab_back_end_lab GET /panel/personal_lab/back_end/labs/:id/edit(.:format) panel/personal_lab/back_end/labs#edit - panel_personal_lab_back_end_lab GET /panel/personal_lab/back_end/labs/:id(.:format) panel/personal_lab/back_end/labs#show - PUT /panel/personal_lab/back_end/labs/:id(.:format) panel/personal_lab/back_end/labs#update - DELETE /panel/personal_lab/back_end/labs/:id(.:format) panel/personal_lab/back_end/labs#destroy - panel_personal_lab_back_end_tags GET /panel/personal_lab/back_end/tags(.:format) panel/personal_lab/back_end/tags#index - POST /panel/personal_lab/back_end/tags(.:format) panel/personal_lab/back_end/tags#create - new_panel_personal_lab_back_end_tag GET /panel/personal_lab/back_end/tags/new(.:format) panel/personal_lab/back_end/tags#new - edit_panel_personal_lab_back_end_tag GET /panel/personal_lab/back_end/tags/:id/edit(.:format) panel/personal_lab/back_end/tags#edit - panel_personal_lab_back_end_tag GET /panel/personal_lab/back_end/tags/:id(.:format) panel/personal_lab/back_end/tags#show - PUT /panel/personal_lab/back_end/tags/:id(.:format) panel/personal_lab/back_end/tags#update - DELETE /panel/personal_lab/back_end/tags/:id(.:format) panel/personal_lab/back_end/tags#destroy - panel_personal_lab_front_end_labs GET /panel/personal_lab/front_end/labs(.:format) panel/personal_lab/front_end/labs#index - POST /panel/personal_lab/front_end/labs(.:format) panel/personal_lab/front_end/labs#create - new_panel_personal_lab_front_end_lab GET /panel/personal_lab/front_end/labs/new(.:format) panel/personal_lab/front_end/labs#new - edit_panel_personal_lab_front_end_lab GET /panel/personal_lab/front_end/labs/:id/edit(.:format) panel/personal_lab/front_end/labs#edit - panel_personal_lab_front_end_lab GET /panel/personal_lab/front_end/labs/:id(.:format) panel/personal_lab/front_end/labs#show - PUT /panel/personal_lab/front_end/labs/:id(.:format) panel/personal_lab/front_end/labs#update - DELETE /panel/personal_lab/front_end/labs/:id(.:format) panel/personal_lab/front_end/labs#destroy - panel_personal_lab_plugin_labs GET /panel/personal_lab/plugin/labs(.:format) panel/personal_lab/plugin/labs#index - POST /panel/personal_lab/plugin/labs(.:format) panel/personal_lab/plugin/labs#create - new_panel_personal_lab_plugin_lab GET /panel/personal_lab/plugin/labs/new(.:format) panel/personal_lab/plugin/labs#new - edit_panel_personal_lab_plugin_lab GET /panel/personal_lab/plugin/labs/:id/edit(.:format) panel/personal_lab/plugin/labs#edit - panel_personal_lab_plugin_lab GET /panel/personal_lab/plugin/labs/:id(.:format) panel/personal_lab/plugin/labs#show - PUT /panel/personal_lab/plugin/labs/:id(.:format) panel/personal_lab/plugin/labs#update - DELETE /panel/personal_lab/plugin/labs/:id(.:format) panel/personal_lab/plugin/labs#destroy - panel_personal_lab_widget_labs /panel/personal_lab/widget/labs(.:format) panel/personal_lab/widget/labs#index - panel_personal_lab_widget_home_list /panel/personal_lab/widget/home_list(.:format) panel/personal_lab/widget/labs#home_list - panel_personal_lab_widget_reload_labs /panel/personal_lab/widget/reload_labs(.:format) panel/personal_lab/widget/labs#reload_labs - /appfront/*path(.:format) :controller#:action - panel_personal_journal_desktop_journal_p /panel/personal_journal/desktop/journal_p(.:format) panel/personal_journal/desktop/journal_p#journal_p - panel_personal_journal_desktop_get_journals_json /panel/personal_journal/desktop/get_journals_json(.:format) panel/personal_journal/desktop/journal_pages#get_journals_json - panel_personal_journal_desktop_journal_type /panel/personal_journal/desktop/journal_type(.:format) panel/personal_journal/desktop/journal_pages#journal_type - panel_personal_journal_desktop_journal_pages GET /panel/personal_journal/desktop/journal_pages(.:format) panel/personal_journal/desktop/journal_pages#index - POST /panel/personal_journal/desktop/journal_pages(.:format) panel/personal_journal/desktop/journal_pages#create - new_panel_personal_journal_desktop_journal_page GET /panel/personal_journal/desktop/journal_pages/new(.:format) panel/personal_journal/desktop/journal_pages#new - edit_panel_personal_journal_desktop_journal_page GET /panel/personal_journal/desktop/journal_pages/:id/edit(.:format) panel/personal_journal/desktop/journal_pages#edit - panel_personal_journal_desktop_journal_page PUT /panel/personal_journal/desktop/journal_pages/:id(.:format) panel/personal_journal/desktop/journal_pages#update - DELETE /panel/personal_journal/desktop/journal_pages/:id(.:format) panel/personal_journal/desktop/journal_pages#destroy - panel_personal_journal_desktop_co_authors GET /panel/personal_journal/desktop/co_authors(.:format) panel/personal_journal/desktop/co_authors#index - POST /panel/personal_journal/desktop/co_authors(.:format) panel/personal_journal/desktop/co_authors#create - new_panel_personal_journal_desktop_co_author GET /panel/personal_journal/desktop/co_authors/new(.:format) panel/personal_journal/desktop/co_authors#new - edit_panel_personal_journal_desktop_co_author GET /panel/personal_journal/desktop/co_authors/:id/edit(.:format) panel/personal_journal/desktop/co_authors#edit - panel_personal_journal_desktop_co_author PUT /panel/personal_journal/desktop/co_authors/:id(.:format) panel/personal_journal/desktop/co_authors#update - DELETE /panel/personal_journal/desktop/co_authors/:id(.:format) panel/personal_journal/desktop/co_authors#destroy - panel_personal_journal_desktop_co_author_relations GET /panel/personal_journal/desktop/co_author_relations(.:format) panel/personal_journal/desktop/co_author_relations#index - POST /panel/personal_journal/desktop/co_author_relations(.:format) panel/personal_journal/desktop/co_author_relations#create - new_panel_personal_journal_desktop_co_author_relation GET /panel/personal_journal/desktop/co_author_relations/new(.:format) panel/personal_journal/desktop/co_author_relations#new - edit_panel_personal_journal_desktop_co_author_relation GET /panel/personal_journal/desktop/co_author_relations/:id/edit(.:format) panel/personal_journal/desktop/co_author_relations#edit - panel_personal_journal_desktop_co_author_relation PUT /panel/personal_journal/desktop/co_author_relations/:id(.:format) panel/personal_journal/desktop/co_author_relations#update - DELETE /panel/personal_journal/desktop/co_author_relations/:id(.:format) panel/personal_journal/desktop/co_author_relations#destroy - panel_personal_journal_back_end_writing_journal_setting /panel/personal_journal/back_end/writing_journal_setting(.:format) panel/personal_journal/back_end/writing_journals#writing_journal_setting - delete_panel_personal_journal_back_end_writing_journals GET /panel/personal_journal/back_end/writing_journals/delete(.:format) panel/personal_journal/back_end/writing_journals#delete - panel_personal_journal_back_end_writing_journal_level_type_quick_add /panel/personal_journal/back_end/writing_journals/:writing_journal_id/level_type_quick_add(.:format) panel/personal_journal/back_end/writing_journals#level_type_quick_add - panel_personal_journal_back_end_writing_journal_level_type_quick_edit /panel/personal_journal/back_end/writing_journals/:writing_journal_id/level_type_quick_edit(.:format) panel/personal_journal/back_end/writing_journals#level_type_quick_edit - panel_personal_journal_back_end_writing_journal_author_type_quick_add /panel/personal_journal/back_end/writing_journals/:writing_journal_id/author_type_quick_add(.:format) panel/personal_journal/back_end/writing_journals#author_type_quick_add - panel_personal_journal_back_end_writing_journal_author_type_quick_edit /panel/personal_journal/back_end/writing_journals/:writing_journal_id/author_type_quick_edit(.:format) panel/personal_journal/back_end/writing_journals#author_type_quick_edit - panel_personal_journal_back_end_writing_journal_paper_type_quick_add /panel/personal_journal/back_end/writing_journals/:writing_journal_id/paper_type_quick_add(.:format) panel/personal_journal/back_end/writing_journals#paper_type_quick_add - panel_personal_journal_back_end_writing_journal_paper_type_quick_edit /panel/personal_journal/back_end/writing_journals/:writing_journal_id/paper_type_quick_edit(.:format) panel/personal_journal/back_end/writing_journals#paper_type_quick_edit - panel_personal_journal_back_end_writing_journal_tag_quick_add /panel/personal_journal/back_end/writing_journals/:writing_journal_id/tag_quick_add(.:format) panel/personal_journal/back_end/writing_journals#tag_quick_add - panel_personal_journal_back_end_writing_journal_tag_quick_edit /panel/personal_journal/back_end/writing_journals/:writing_journal_id/tag_quick_edit(.:format) panel/personal_journal/back_end/writing_journals#tag_quick_edit - panel_personal_journal_back_end_writing_journals GET /panel/personal_journal/back_end/writing_journals(.:format) panel/personal_journal/back_end/writing_journals#index - POST /panel/personal_journal/back_end/writing_journals(.:format) panel/personal_journal/back_end/writing_journals#create - new_panel_personal_journal_back_end_writing_journal GET /panel/personal_journal/back_end/writing_journals/new(.:format) panel/personal_journal/back_end/writing_journals#new - edit_panel_personal_journal_back_end_writing_journal GET /panel/personal_journal/back_end/writing_journals/:id/edit(.:format) panel/personal_journal/back_end/writing_journals#edit - panel_personal_journal_back_end_writing_journal GET /panel/personal_journal/back_end/writing_journals/:id(.:format) panel/personal_journal/back_end/writing_journals#show - PUT /panel/personal_journal/back_end/writing_journals/:id(.:format) panel/personal_journal/back_end/writing_journals#update - DELETE /panel/personal_journal/back_end/writing_journals/:id(.:format) panel/personal_journal/back_end/writing_journals#destroy - panel_personal_journal_back_end_journal_paper_types GET /panel/personal_journal/back_end/journal_paper_types(.:format) panel/personal_journal/back_end/journal_paper_types#index - POST /panel/personal_journal/back_end/journal_paper_types(.:format) panel/personal_journal/back_end/journal_paper_types#create - new_panel_personal_journal_back_end_journal_paper_type GET /panel/personal_journal/back_end/journal_paper_types/new(.:format) panel/personal_journal/back_end/journal_paper_types#new - edit_panel_personal_journal_back_end_journal_paper_type GET /panel/personal_journal/back_end/journal_paper_types/:id/edit(.:format) panel/personal_journal/back_end/journal_paper_types#edit - panel_personal_journal_back_end_journal_paper_type GET /panel/personal_journal/back_end/journal_paper_types/:id(.:format) panel/personal_journal/back_end/journal_paper_types#show - PUT /panel/personal_journal/back_end/journal_paper_types/:id(.:format) panel/personal_journal/back_end/journal_paper_types#update - DELETE /panel/personal_journal/back_end/journal_paper_types/:id(.:format) panel/personal_journal/back_end/journal_paper_types#destroy - panel_personal_journal_back_end_journal_author_types GET /panel/personal_journal/back_end/journal_author_types(.:format) panel/personal_journal/back_end/journal_author_types#index - POST /panel/personal_journal/back_end/journal_author_types(.:format) panel/personal_journal/back_end/journal_author_types#create - new_panel_personal_journal_back_end_journal_author_type GET /panel/personal_journal/back_end/journal_author_types/new(.:format) panel/personal_journal/back_end/journal_author_types#new - edit_panel_personal_journal_back_end_journal_author_type GET /panel/personal_journal/back_end/journal_author_types/:id/edit(.:format) panel/personal_journal/back_end/journal_author_types#edit - panel_personal_journal_back_end_journal_author_type GET /panel/personal_journal/back_end/journal_author_types/:id(.:format) panel/personal_journal/back_end/journal_author_types#show - PUT /panel/personal_journal/back_end/journal_author_types/:id(.:format) panel/personal_journal/back_end/journal_author_types#update - DELETE /panel/personal_journal/back_end/journal_author_types/:id(.:format) panel/personal_journal/back_end/journal_author_types#destroy - panel_personal_journal_back_end_journal_level_types GET /panel/personal_journal/back_end/journal_level_types(.:format) panel/personal_journal/back_end/journal_level_types#index - POST /panel/personal_journal/back_end/journal_level_types(.:format) panel/personal_journal/back_end/journal_level_types#create - new_panel_personal_journal_back_end_journal_level_type GET /panel/personal_journal/back_end/journal_level_types/new(.:format) panel/personal_journal/back_end/journal_level_types#new - edit_panel_personal_journal_back_end_journal_level_type GET /panel/personal_journal/back_end/journal_level_types/:id/edit(.:format) panel/personal_journal/back_end/journal_level_types#edit - panel_personal_journal_back_end_journal_level_type GET /panel/personal_journal/back_end/journal_level_types/:id(.:format) panel/personal_journal/back_end/journal_level_types#show - PUT /panel/personal_journal/back_end/journal_level_types/:id(.:format) panel/personal_journal/back_end/journal_level_types#update - DELETE /panel/personal_journal/back_end/journal_level_types/:id(.:format) panel/personal_journal/back_end/journal_level_types#destroy - panel_personal_journal_back_end_tags GET /panel/personal_journal/back_end/tags(.:format) panel/personal_journal/back_end/tags#index - POST /panel/personal_journal/back_end/tags(.:format) panel/personal_journal/back_end/tags#create - new_panel_personal_journal_back_end_tag GET /panel/personal_journal/back_end/tags/new(.:format) panel/personal_journal/back_end/tags#new - edit_panel_personal_journal_back_end_tag GET /panel/personal_journal/back_end/tags/:id/edit(.:format) panel/personal_journal/back_end/tags#edit - panel_personal_journal_back_end_tag GET /panel/personal_journal/back_end/tags/:id(.:format) panel/personal_journal/back_end/tags#show - PUT /panel/personal_journal/back_end/tags/:id(.:format) panel/personal_journal/back_end/tags#update - DELETE /panel/personal_journal/back_end/tags/:id(.:format) panel/personal_journal/back_end/tags#destroy - panel_personal_journal_front_end_writing_journals GET /panel/personal_journal/front_end/writing_journals(.:format) panel/personal_journal/front_end/writing_journals#index - POST /panel/personal_journal/front_end/writing_journals(.:format) panel/personal_journal/front_end/writing_journals#create - new_panel_personal_journal_front_end_writing_journal GET /panel/personal_journal/front_end/writing_journals/new(.:format) panel/personal_journal/front_end/writing_journals#new - edit_panel_personal_journal_front_end_writing_journal GET /panel/personal_journal/front_end/writing_journals/:id/edit(.:format) panel/personal_journal/front_end/writing_journals#edit - panel_personal_journal_front_end_writing_journal GET /panel/personal_journal/front_end/writing_journals/:id(.:format) panel/personal_journal/front_end/writing_journals#show - PUT /panel/personal_journal/front_end/writing_journals/:id(.:format) panel/personal_journal/front_end/writing_journals#update - DELETE /panel/personal_journal/front_end/writing_journals/:id(.:format) panel/personal_journal/front_end/writing_journals#destroy - panel_personal_journal_plugin_writing_journals GET /panel/personal_journal/plugin/writing_journals(.:format) panel/personal_journal/plugin/writing_journals#index - POST /panel/personal_journal/plugin/writing_journals(.:format) panel/personal_journal/plugin/writing_journals#create - new_panel_personal_journal_plugin_writing_journal GET /panel/personal_journal/plugin/writing_journals/new(.:format) panel/personal_journal/plugin/writing_journals#new - edit_panel_personal_journal_plugin_writing_journal GET /panel/personal_journal/plugin/writing_journals/:id/edit(.:format) panel/personal_journal/plugin/writing_journals#edit - panel_personal_journal_plugin_writing_journal GET /panel/personal_journal/plugin/writing_journals/:id(.:format) panel/personal_journal/plugin/writing_journals#show - PUT /panel/personal_journal/plugin/writing_journals/:id(.:format) panel/personal_journal/plugin/writing_journals#update - DELETE /panel/personal_journal/plugin/writing_journals/:id(.:format) panel/personal_journal/plugin/writing_journals#destroy - panel_personal_journal_widget_writing_journals /panel/personal_journal/widget/writing_journals(.:format) panel/personal_journal/widget/writing_journals#index - panel_personal_journal_widget_home_list /panel/personal_journal/widget/home_list(.:format) panel/personal_journal/widget/writing_journals#home_list - panel_personal_journal_widget_reload_writing_journals /panel/personal_journal/widget/reload_writing_journals(.:format) panel/personal_journal/widget/writing_journals#reload_writing_journals - /appfront/*path(.:format) :controller#:action - panel_personal_honor_back_end_honor_setting /panel/personal_honor/back_end/honor_setting(.:format) panel/personal_honor/back_end/honors#honor_setting - delete_panel_personal_honor_back_end_honors GET /panel/personal_honor/back_end/honors/delete(.:format) panel/personal_honor/back_end/honors#delete - panel_personal_honor_back_end_honor_honor_category_quick_add /panel/personal_honor/back_end/honors/:honor_id/honor_category_quick_add(.:format) panel/personal_honor/back_end/honors#honor_category_quick_add - panel_personal_honor_back_end_honor_honor_category_quick_edit /panel/personal_honor/back_end/honors/:honor_id/honor_category_quick_edit(.:format) panel/personal_honor/back_end/honors#honor_category_quick_edit - panel_personal_honor_back_end_honors GET /panel/personal_honor/back_end/honors(.:format) panel/personal_honor/back_end/honors#index - POST /panel/personal_honor/back_end/honors(.:format) panel/personal_honor/back_end/honors#create - new_panel_personal_honor_back_end_honor GET /panel/personal_honor/back_end/honors/new(.:format) panel/personal_honor/back_end/honors#new - edit_panel_personal_honor_back_end_honor GET /panel/personal_honor/back_end/honors/:id/edit(.:format) panel/personal_honor/back_end/honors#edit - panel_personal_honor_back_end_honor GET /panel/personal_honor/back_end/honors/:id(.:format) panel/personal_honor/back_end/honors#show - PUT /panel/personal_honor/back_end/honors/:id(.:format) panel/personal_honor/back_end/honors#update - DELETE /panel/personal_honor/back_end/honors/:id(.:format) panel/personal_honor/back_end/honors#destroy - panel_personal_honor_back_end_honor_categorys GET /panel/personal_honor/back_end/honor_categorys(.:format) panel/personal_honor/back_end/honor_categorys#index - POST /panel/personal_honor/back_end/honor_categorys(.:format) panel/personal_honor/back_end/honor_categorys#create - new_panel_personal_honor_back_end_honor_category GET /panel/personal_honor/back_end/honor_categorys/new(.:format) panel/personal_honor/back_end/honor_categorys#new - edit_panel_personal_honor_back_end_honor_category GET /panel/personal_honor/back_end/honor_categorys/:id/edit(.:format) panel/personal_honor/back_end/honor_categorys#edit - panel_personal_honor_back_end_honor_category GET /panel/personal_honor/back_end/honor_categorys/:id(.:format) panel/personal_honor/back_end/honor_categorys#show - PUT /panel/personal_honor/back_end/honor_categorys/:id(.:format) panel/personal_honor/back_end/honor_categorys#update - DELETE /panel/personal_honor/back_end/honor_categorys/:id(.:format) panel/personal_honor/back_end/honor_categorys#destroy - panel_personal_honor_back_end_tags GET /panel/personal_honor/back_end/tags(.:format) panel/personal_honor/back_end/tags#index - POST /panel/personal_honor/back_end/tags(.:format) panel/personal_honor/back_end/tags#create - new_panel_personal_honor_back_end_tag GET /panel/personal_honor/back_end/tags/new(.:format) panel/personal_honor/back_end/tags#new - edit_panel_personal_honor_back_end_tag GET /panel/personal_honor/back_end/tags/:id/edit(.:format) panel/personal_honor/back_end/tags#edit - panel_personal_honor_back_end_tag GET /panel/personal_honor/back_end/tags/:id(.:format) panel/personal_honor/back_end/tags#show - PUT /panel/personal_honor/back_end/tags/:id(.:format) panel/personal_honor/back_end/tags#update - DELETE /panel/personal_honor/back_end/tags/:id(.:format) panel/personal_honor/back_end/tags#destroy - panel_personal_honor_front_end_honors GET /panel/personal_honor/front_end/honors(.:format) panel/personal_honor/front_end/honors#index - POST /panel/personal_honor/front_end/honors(.:format) panel/personal_honor/front_end/honors#create - new_panel_personal_honor_front_end_honor GET /panel/personal_honor/front_end/honors/new(.:format) panel/personal_honor/front_end/honors#new - edit_panel_personal_honor_front_end_honor GET /panel/personal_honor/front_end/honors/:id/edit(.:format) panel/personal_honor/front_end/honors#edit - panel_personal_honor_front_end_honor GET /panel/personal_honor/front_end/honors/:id(.:format) panel/personal_honor/front_end/honors#show - PUT /panel/personal_honor/front_end/honors/:id(.:format) panel/personal_honor/front_end/honors#update - DELETE /panel/personal_honor/front_end/honors/:id(.:format) panel/personal_honor/front_end/honors#destroy - panel_personal_honor_plugin_honors GET /panel/personal_honor/plugin/honors(.:format) panel/personal_honor/plugin/honors#index - POST /panel/personal_honor/plugin/honors(.:format) panel/personal_honor/plugin/honors#create - new_panel_personal_honor_plugin_honor GET /panel/personal_honor/plugin/honors/new(.:format) panel/personal_honor/plugin/honors#new - edit_panel_personal_honor_plugin_honor GET /panel/personal_honor/plugin/honors/:id/edit(.:format) panel/personal_honor/plugin/honors#edit - panel_personal_honor_plugin_honor GET /panel/personal_honor/plugin/honors/:id(.:format) panel/personal_honor/plugin/honors#show - PUT /panel/personal_honor/plugin/honors/:id(.:format) panel/personal_honor/plugin/honors#update - DELETE /panel/personal_honor/plugin/honors/:id(.:format) panel/personal_honor/plugin/honors#destroy - panel_personal_honor_widget_honors /panel/personal_honor/widget/honors(.:format) panel/personal_honor/widget/honors#index - panel_personal_honor_widget_home_list /panel/personal_honor/widget/home_list(.:format) panel/personal_honor/widget/honors#home_list - panel_personal_honor_widget_reload_honors /panel/personal_honor/widget/reload_honors(.:format) panel/personal_honor/widget/honors#reload_honors - /appfront/*path(.:format) :controller#:action - panel_personal_experience_back_end_experience_setting /panel/personal_experience/back_end/experience_setting(.:format) panel/personal_experience/back_end/experiences#experience_setting - delete_panel_personal_experience_back_end_experiences GET /panel/personal_experience/back_end/experiences/delete(.:format) panel/personal_experience/back_end/experiences#delete - panel_personal_experience_back_end_experience_experience_category_quick_add /panel/personal_experience/back_end/experiences/:experience_id/experience_category_quick_add(.:format) panel/personal_experience/back_end/experiences#experience_category_quick_add - panel_personal_experience_back_end_experience_experience_category_quick_edit /panel/personal_experience/back_end/experiences/:experience_id/experience_category_quick_edit(.:format) panel/personal_experience/back_end/experiences#experience_category_quick_edit - panel_personal_experience_back_end_experiences GET /panel/personal_experience/back_end/experiences(.:format) panel/personal_experience/back_end/experiences#index - POST /panel/personal_experience/back_end/experiences(.:format) panel/personal_experience/back_end/experiences#create - new_panel_personal_experience_back_end_experience GET /panel/personal_experience/back_end/experiences/new(.:format) panel/personal_experience/back_end/experiences#new - edit_panel_personal_experience_back_end_experience GET /panel/personal_experience/back_end/experiences/:id/edit(.:format) panel/personal_experience/back_end/experiences#edit - panel_personal_experience_back_end_experience GET /panel/personal_experience/back_end/experiences/:id(.:format) panel/personal_experience/back_end/experiences#show - PUT /panel/personal_experience/back_end/experiences/:id(.:format) panel/personal_experience/back_end/experiences#update - DELETE /panel/personal_experience/back_end/experiences/:id(.:format) panel/personal_experience/back_end/experiences#destroy - panel_personal_experience_back_end_experience_categorys GET /panel/personal_experience/back_end/experience_categorys(.:format) panel/personal_experience/back_end/experience_categorys#index - POST /panel/personal_experience/back_end/experience_categorys(.:format) panel/personal_experience/back_end/experience_categorys#create - new_panel_personal_experience_back_end_experience_category GET /panel/personal_experience/back_end/experience_categorys/new(.:format) panel/personal_experience/back_end/experience_categorys#new - edit_panel_personal_experience_back_end_experience_category GET /panel/personal_experience/back_end/experience_categorys/:id/edit(.:format) panel/personal_experience/back_end/experience_categorys#edit - panel_personal_experience_back_end_experience_category GET /panel/personal_experience/back_end/experience_categorys/:id(.:format) panel/personal_experience/back_end/experience_categorys#show - PUT /panel/personal_experience/back_end/experience_categorys/:id(.:format) panel/personal_experience/back_end/experience_categorys#update - DELETE /panel/personal_experience/back_end/experience_categorys/:id(.:format) panel/personal_experience/back_end/experience_categorys#destroy - panel_personal_experience_back_end_tags GET /panel/personal_experience/back_end/tags(.:format) panel/personal_experience/back_end/tags#index - POST /panel/personal_experience/back_end/tags(.:format) panel/personal_experience/back_end/tags#create - new_panel_personal_experience_back_end_tag GET /panel/personal_experience/back_end/tags/new(.:format) panel/personal_experience/back_end/tags#new - edit_panel_personal_experience_back_end_tag GET /panel/personal_experience/back_end/tags/:id/edit(.:format) panel/personal_experience/back_end/tags#edit - panel_personal_experience_back_end_tag GET /panel/personal_experience/back_end/tags/:id(.:format) panel/personal_experience/back_end/tags#show - PUT /panel/personal_experience/back_end/tags/:id(.:format) panel/personal_experience/back_end/tags#update - DELETE /panel/personal_experience/back_end/tags/:id(.:format) panel/personal_experience/back_end/tags#destroy - panel_personal_experience_front_end_experiences GET /panel/personal_experience/front_end/experiences(.:format) panel/personal_experience/front_end/experiences#index - POST /panel/personal_experience/front_end/experiences(.:format) panel/personal_experience/front_end/experiences#create - new_panel_personal_experience_front_end_experience GET /panel/personal_experience/front_end/experiences/new(.:format) panel/personal_experience/front_end/experiences#new - edit_panel_personal_experience_front_end_experience GET /panel/personal_experience/front_end/experiences/:id/edit(.:format) panel/personal_experience/front_end/experiences#edit - panel_personal_experience_front_end_experience GET /panel/personal_experience/front_end/experiences/:id(.:format) panel/personal_experience/front_end/experiences#show - PUT /panel/personal_experience/front_end/experiences/:id(.:format) panel/personal_experience/front_end/experiences#update - DELETE /panel/personal_experience/front_end/experiences/:id(.:format) panel/personal_experience/front_end/experiences#destroy - panel_personal_experience_plugin_experiences GET /panel/personal_experience/plugin/experiences(.:format) panel/personal_experience/plugin/experiences#index - POST /panel/personal_experience/plugin/experiences(.:format) panel/personal_experience/plugin/experiences#create - new_panel_personal_experience_plugin_experience GET /panel/personal_experience/plugin/experiences/new(.:format) panel/personal_experience/plugin/experiences#new - edit_panel_personal_experience_plugin_experience GET /panel/personal_experience/plugin/experiences/:id/edit(.:format) panel/personal_experience/plugin/experiences#edit - panel_personal_experience_plugin_experience GET /panel/personal_experience/plugin/experiences/:id(.:format) panel/personal_experience/plugin/experiences#show - PUT /panel/personal_experience/plugin/experiences/:id(.:format) panel/personal_experience/plugin/experiences#update - DELETE /panel/personal_experience/plugin/experiences/:id(.:format) panel/personal_experience/plugin/experiences#destroy - panel_personal_experience_widget_experiences /panel/personal_experience/widget/experiences(.:format) panel/personal_experience/widget/experiences#index - panel_personal_experience_widget_home_list /panel/personal_experience/widget/home_list(.:format) panel/personal_experience/widget/experiences#home_list - panel_personal_experience_widget_reload_experiences /panel/personal_experience/widget/reload_experiences(.:format) panel/personal_experience/widget/experiences#reload_experiences - /appfront/*path(.:format) :controller#:action - panel_personal_diploma_back_end_diploma_setting /panel/personal_diploma/back_end/diploma_setting(.:format) panel/personal_diploma/back_end/diplomas#diploma_setting - delete_panel_personal_diploma_back_end_diplomas GET /panel/personal_diploma/back_end/diplomas/delete(.:format) panel/personal_diploma/back_end/diplomas#delete - panel_personal_diploma_back_end_diplomas GET /panel/personal_diploma/back_end/diplomas(.:format) panel/personal_diploma/back_end/diplomas#index - POST /panel/personal_diploma/back_end/diplomas(.:format) panel/personal_diploma/back_end/diplomas#create - new_panel_personal_diploma_back_end_diploma GET /panel/personal_diploma/back_end/diplomas/new(.:format) panel/personal_diploma/back_end/diplomas#new - edit_panel_personal_diploma_back_end_diploma GET /panel/personal_diploma/back_end/diplomas/:id/edit(.:format) panel/personal_diploma/back_end/diplomas#edit - panel_personal_diploma_back_end_diploma GET /panel/personal_diploma/back_end/diplomas/:id(.:format) panel/personal_diploma/back_end/diplomas#show - PUT /panel/personal_diploma/back_end/diplomas/:id(.:format) panel/personal_diploma/back_end/diplomas#update - DELETE /panel/personal_diploma/back_end/diplomas/:id(.:format) panel/personal_diploma/back_end/diplomas#destroy - panel_personal_diploma_back_end_tags GET /panel/personal_diploma/back_end/tags(.:format) panel/personal_diploma/back_end/tags#index - POST /panel/personal_diploma/back_end/tags(.:format) panel/personal_diploma/back_end/tags#create - new_panel_personal_diploma_back_end_tag GET /panel/personal_diploma/back_end/tags/new(.:format) panel/personal_diploma/back_end/tags#new - edit_panel_personal_diploma_back_end_tag GET /panel/personal_diploma/back_end/tags/:id/edit(.:format) panel/personal_diploma/back_end/tags#edit - panel_personal_diploma_back_end_tag GET /panel/personal_diploma/back_end/tags/:id(.:format) panel/personal_diploma/back_end/tags#show - PUT /panel/personal_diploma/back_end/tags/:id(.:format) panel/personal_diploma/back_end/tags#update - DELETE /panel/personal_diploma/back_end/tags/:id(.:format) panel/personal_diploma/back_end/tags#destroy - panel_personal_diploma_front_end_diplomas GET /panel/personal_diploma/front_end/diplomas(.:format) panel/personal_diploma/front_end/diplomas#index - POST /panel/personal_diploma/front_end/diplomas(.:format) panel/personal_diploma/front_end/diplomas#create - new_panel_personal_diploma_front_end_diploma GET /panel/personal_diploma/front_end/diplomas/new(.:format) panel/personal_diploma/front_end/diplomas#new - edit_panel_personal_diploma_front_end_diploma GET /panel/personal_diploma/front_end/diplomas/:id/edit(.:format) panel/personal_diploma/front_end/diplomas#edit - panel_personal_diploma_front_end_diploma GET /panel/personal_diploma/front_end/diplomas/:id(.:format) panel/personal_diploma/front_end/diplomas#show - PUT /panel/personal_diploma/front_end/diplomas/:id(.:format) panel/personal_diploma/front_end/diplomas#update - DELETE /panel/personal_diploma/front_end/diplomas/:id(.:format) panel/personal_diploma/front_end/diplomas#destroy - panel_personal_diploma_plugin_diplomas GET /panel/personal_diploma/plugin/diplomas(.:format) panel/personal_diploma/plugin/diplomas#index - POST /panel/personal_diploma/plugin/diplomas(.:format) panel/personal_diploma/plugin/diplomas#create - new_panel_personal_diploma_plugin_diploma GET /panel/personal_diploma/plugin/diplomas/new(.:format) panel/personal_diploma/plugin/diplomas#new - edit_panel_personal_diploma_plugin_diploma GET /panel/personal_diploma/plugin/diplomas/:id/edit(.:format) panel/personal_diploma/plugin/diplomas#edit - panel_personal_diploma_plugin_diploma GET /panel/personal_diploma/plugin/diplomas/:id(.:format) panel/personal_diploma/plugin/diplomas#show - PUT /panel/personal_diploma/plugin/diplomas/:id(.:format) panel/personal_diploma/plugin/diplomas#update - DELETE /panel/personal_diploma/plugin/diplomas/:id(.:format) panel/personal_diploma/plugin/diplomas#destroy - panel_personal_diploma_widget_diplomas /panel/personal_diploma/widget/diplomas(.:format) panel/personal_diploma/widget/diplomas#index - panel_personal_diploma_widget_home_list /panel/personal_diploma/widget/home_list(.:format) panel/personal_diploma/widget/diplomas#home_list - panel_personal_diploma_widget_reload_diplomas /panel/personal_diploma/widget/reload_diplomas(.:format) panel/personal_diploma/widget/diplomas#reload_diplomas - /appfront/*path(.:format) :controller#:action - panel_personal_conference_back_end_writing_conference_setting /panel/personal_conference/back_end/writing_conference_setting(.:format) panel/personal_conference/back_end/writing_conferences#writing_conference_setting - delete_panel_personal_conference_back_end_writing_conferences GET /panel/personal_conference/back_end/writing_conferences/delete(.:format) panel/personal_conference/back_end/writing_conferences#delete - panel_personal_conference_back_end_writing_conference_author_type_quick_add /panel/personal_conference/back_end/writing_conferences/:writing_conference_id/author_type_quick_add(.:format) panel/personal_conference/back_end/writing_conferences#author_type_quick_add - panel_personal_conference_back_end_writing_conference_author_type_quick_edit /panel/personal_conference/back_end/writing_conferences/:writing_conference_id/author_type_quick_edit(.:format) panel/personal_conference/back_end/writing_conferences#author_type_quick_edit - panel_personal_conference_back_end_writing_conference_paper_type_quick_add /panel/personal_conference/back_end/writing_conferences/:writing_conference_id/paper_type_quick_add(.:format) panel/personal_conference/back_end/writing_conferences#paper_type_quick_add - panel_personal_conference_back_end_writing_conference_paper_type_quick_edit /panel/personal_conference/back_end/writing_conferences/:writing_conference_id/paper_type_quick_edit(.:format) panel/personal_conference/back_end/writing_conferences#paper_type_quick_edit - panel_personal_conference_back_end_writing_conferences GET /panel/personal_conference/back_end/writing_conferences(.:format) panel/personal_conference/back_end/writing_conferences#index - POST /panel/personal_conference/back_end/writing_conferences(.:format) panel/personal_conference/back_end/writing_conferences#create - new_panel_personal_conference_back_end_writing_conference GET /panel/personal_conference/back_end/writing_conferences/new(.:format) panel/personal_conference/back_end/writing_conferences#new - edit_panel_personal_conference_back_end_writing_conference GET /panel/personal_conference/back_end/writing_conferences/:id/edit(.:format) panel/personal_conference/back_end/writing_conferences#edit - panel_personal_conference_back_end_writing_conference GET /panel/personal_conference/back_end/writing_conferences/:id(.:format) panel/personal_conference/back_end/writing_conferences#show - PUT /panel/personal_conference/back_end/writing_conferences/:id(.:format) panel/personal_conference/back_end/writing_conferences#update - DELETE /panel/personal_conference/back_end/writing_conferences/:id(.:format) panel/personal_conference/back_end/writing_conferences#destroy - panel_personal_conference_back_end_conference_paper_types GET /panel/personal_conference/back_end/conference_paper_types(.:format) panel/personal_conference/back_end/conference_paper_types#index - POST /panel/personal_conference/back_end/conference_paper_types(.:format) panel/personal_conference/back_end/conference_paper_types#create - new_panel_personal_conference_back_end_conference_paper_type GET /panel/personal_conference/back_end/conference_paper_types/new(.:format) panel/personal_conference/back_end/conference_paper_types#new - edit_panel_personal_conference_back_end_conference_paper_type GET /panel/personal_conference/back_end/conference_paper_types/:id/edit(.:format) panel/personal_conference/back_end/conference_paper_types#edit - panel_personal_conference_back_end_conference_paper_type GET /panel/personal_conference/back_end/conference_paper_types/:id(.:format) panel/personal_conference/back_end/conference_paper_types#show - PUT /panel/personal_conference/back_end/conference_paper_types/:id(.:format) panel/personal_conference/back_end/conference_paper_types#update - DELETE /panel/personal_conference/back_end/conference_paper_types/:id(.:format) panel/personal_conference/back_end/conference_paper_types#destroy - panel_personal_conference_back_end_conference_author_types GET /panel/personal_conference/back_end/conference_author_types(.:format) panel/personal_conference/back_end/conference_author_types#index - POST /panel/personal_conference/back_end/conference_author_types(.:format) panel/personal_conference/back_end/conference_author_types#create - new_panel_personal_conference_back_end_conference_author_type GET /panel/personal_conference/back_end/conference_author_types/new(.:format) panel/personal_conference/back_end/conference_author_types#new - edit_panel_personal_conference_back_end_conference_author_type GET /panel/personal_conference/back_end/conference_author_types/:id/edit(.:format) panel/personal_conference/back_end/conference_author_types#edit - panel_personal_conference_back_end_conference_author_type GET /panel/personal_conference/back_end/conference_author_types/:id(.:format) panel/personal_conference/back_end/conference_author_types#show - PUT /panel/personal_conference/back_end/conference_author_types/:id(.:format) panel/personal_conference/back_end/conference_author_types#update - DELETE /panel/personal_conference/back_end/conference_author_types/:id(.:format) panel/personal_conference/back_end/conference_author_types#destroy - panel_personal_conference_back_end_tags GET /panel/personal_conference/back_end/tags(.:format) panel/personal_conference/back_end/tags#index - POST /panel/personal_conference/back_end/tags(.:format) panel/personal_conference/back_end/tags#create - new_panel_personal_conference_back_end_tag GET /panel/personal_conference/back_end/tags/new(.:format) panel/personal_conference/back_end/tags#new - edit_panel_personal_conference_back_end_tag GET /panel/personal_conference/back_end/tags/:id/edit(.:format) panel/personal_conference/back_end/tags#edit - panel_personal_conference_back_end_tag GET /panel/personal_conference/back_end/tags/:id(.:format) panel/personal_conference/back_end/tags#show - PUT /panel/personal_conference/back_end/tags/:id(.:format) panel/personal_conference/back_end/tags#update - DELETE /panel/personal_conference/back_end/tags/:id(.:format) panel/personal_conference/back_end/tags#destroy - panel_personal_conference_front_end_writing_conferences GET /panel/personal_conference/front_end/writing_conferences(.:format) panel/personal_conference/front_end/writing_conferences#index - POST /panel/personal_conference/front_end/writing_conferences(.:format) panel/personal_conference/front_end/writing_conferences#create - new_panel_personal_conference_front_end_writing_conference GET /panel/personal_conference/front_end/writing_conferences/new(.:format) panel/personal_conference/front_end/writing_conferences#new - edit_panel_personal_conference_front_end_writing_conference GET /panel/personal_conference/front_end/writing_conferences/:id/edit(.:format) panel/personal_conference/front_end/writing_conferences#edit - panel_personal_conference_front_end_writing_conference GET /panel/personal_conference/front_end/writing_conferences/:id(.:format) panel/personal_conference/front_end/writing_conferences#show - PUT /panel/personal_conference/front_end/writing_conferences/:id(.:format) panel/personal_conference/front_end/writing_conferences#update - DELETE /panel/personal_conference/front_end/writing_conferences/:id(.:format) panel/personal_conference/front_end/writing_conferences#destroy - panel_personal_conference_plugin_writing_conferences GET /panel/personal_conference/plugin/writing_conferences(.:format) panel/personal_conference/plugin/writing_conferences#index - POST /panel/personal_conference/plugin/writing_conferences(.:format) panel/personal_conference/plugin/writing_conferences#create - new_panel_personal_conference_plugin_writing_conference GET /panel/personal_conference/plugin/writing_conferences/new(.:format) panel/personal_conference/plugin/writing_conferences#new - edit_panel_personal_conference_plugin_writing_conference GET /panel/personal_conference/plugin/writing_conferences/:id/edit(.:format) panel/personal_conference/plugin/writing_conferences#edit - panel_personal_conference_plugin_writing_conference GET /panel/personal_conference/plugin/writing_conferences/:id(.:format) panel/personal_conference/plugin/writing_conferences#show - PUT /panel/personal_conference/plugin/writing_conferences/:id(.:format) panel/personal_conference/plugin/writing_conferences#update - DELETE /panel/personal_conference/plugin/writing_conferences/:id(.:format) panel/personal_conference/plugin/writing_conferences#destroy - panel_personal_conference_widget_writing_conferences /panel/personal_conference/widget/writing_conferences(.:format) panel/personal_conference/widget/writing_conferences#index - panel_personal_conference_widget_home_list /panel/personal_conference/widget/home_list(.:format) panel/personal_conference/widget/writing_conferences#home_list - panel_personal_conference_widget_reload_writing_conferences /panel/personal_conference/widget/reload_writing_conferences(.:format) panel/personal_conference/widget/writing_conferences#reload_writing_conferences - /appfront/*path(.:format) :controller#:action - panel_personal_book_back_end_writing_book_setting /panel/personal_book/back_end/writing_book_setting(.:format) panel/personal_book/back_end/writing_books#writing_book_setting - delete_panel_personal_book_back_end_writing_books GET /panel/personal_book/back_end/writing_books/delete(.:format) panel/personal_book/back_end/writing_books#delete - panel_personal_book_back_end_writing_book_author_type_quick_add /panel/personal_book/back_end/writing_books/:writing_book_id/author_type_quick_add(.:format) panel/personal_book/back_end/writing_books#author_type_quick_add - panel_personal_book_back_end_writing_book_author_type_quick_edit /panel/personal_book/back_end/writing_books/:writing_book_id/author_type_quick_edit(.:format) panel/personal_book/back_end/writing_books#author_type_quick_edit - panel_personal_book_back_end_writing_book_paper_type_quick_add /panel/personal_book/back_end/writing_books/:writing_book_id/paper_type_quick_add(.:format) panel/personal_book/back_end/writing_books#paper_type_quick_add - panel_personal_book_back_end_writing_book_paper_type_quick_edit /panel/personal_book/back_end/writing_books/:writing_book_id/paper_type_quick_edit(.:format) panel/personal_book/back_end/writing_books#paper_type_quick_edit - panel_personal_book_back_end_writing_books GET /panel/personal_book/back_end/writing_books(.:format) panel/personal_book/back_end/writing_books#index - POST /panel/personal_book/back_end/writing_books(.:format) panel/personal_book/back_end/writing_books#create - new_panel_personal_book_back_end_writing_book GET /panel/personal_book/back_end/writing_books/new(.:format) panel/personal_book/back_end/writing_books#new - edit_panel_personal_book_back_end_writing_book GET /panel/personal_book/back_end/writing_books/:id/edit(.:format) panel/personal_book/back_end/writing_books#edit - panel_personal_book_back_end_writing_book GET /panel/personal_book/back_end/writing_books/:id(.:format) panel/personal_book/back_end/writing_books#show - PUT /panel/personal_book/back_end/writing_books/:id(.:format) panel/personal_book/back_end/writing_books#update - DELETE /panel/personal_book/back_end/writing_books/:id(.:format) panel/personal_book/back_end/writing_books#destroy - panel_personal_book_back_end_book_paper_types GET /panel/personal_book/back_end/book_paper_types(.:format) panel/personal_book/back_end/book_paper_types#index - POST /panel/personal_book/back_end/book_paper_types(.:format) panel/personal_book/back_end/book_paper_types#create - new_panel_personal_book_back_end_book_paper_type GET /panel/personal_book/back_end/book_paper_types/new(.:format) panel/personal_book/back_end/book_paper_types#new - edit_panel_personal_book_back_end_book_paper_type GET /panel/personal_book/back_end/book_paper_types/:id/edit(.:format) panel/personal_book/back_end/book_paper_types#edit - panel_personal_book_back_end_book_paper_type GET /panel/personal_book/back_end/book_paper_types/:id(.:format) panel/personal_book/back_end/book_paper_types#show - PUT /panel/personal_book/back_end/book_paper_types/:id(.:format) panel/personal_book/back_end/book_paper_types#update - DELETE /panel/personal_book/back_end/book_paper_types/:id(.:format) panel/personal_book/back_end/book_paper_types#destroy - panel_personal_book_back_end_book_author_types GET /panel/personal_book/back_end/book_author_types(.:format) panel/personal_book/back_end/book_author_types#index - POST /panel/personal_book/back_end/book_author_types(.:format) panel/personal_book/back_end/book_author_types#create - new_panel_personal_book_back_end_book_author_type GET /panel/personal_book/back_end/book_author_types/new(.:format) panel/personal_book/back_end/book_author_types#new - edit_panel_personal_book_back_end_book_author_type GET /panel/personal_book/back_end/book_author_types/:id/edit(.:format) panel/personal_book/back_end/book_author_types#edit - panel_personal_book_back_end_book_author_type GET /panel/personal_book/back_end/book_author_types/:id(.:format) panel/personal_book/back_end/book_author_types#show - PUT /panel/personal_book/back_end/book_author_types/:id(.:format) panel/personal_book/back_end/book_author_types#update - DELETE /panel/personal_book/back_end/book_author_types/:id(.:format) panel/personal_book/back_end/book_author_types#destroy - panel_personal_book_back_end_tags GET /panel/personal_book/back_end/tags(.:format) panel/personal_book/back_end/tags#index - POST /panel/personal_book/back_end/tags(.:format) panel/personal_book/back_end/tags#create - new_panel_personal_book_back_end_tag GET /panel/personal_book/back_end/tags/new(.:format) panel/personal_book/back_end/tags#new - edit_panel_personal_book_back_end_tag GET /panel/personal_book/back_end/tags/:id/edit(.:format) panel/personal_book/back_end/tags#edit - panel_personal_book_back_end_tag GET /panel/personal_book/back_end/tags/:id(.:format) panel/personal_book/back_end/tags#show - PUT /panel/personal_book/back_end/tags/:id(.:format) panel/personal_book/back_end/tags#update - DELETE /panel/personal_book/back_end/tags/:id(.:format) panel/personal_book/back_end/tags#destroy - panel_personal_book_front_end_writing_books GET /panel/personal_book/front_end/writing_books(.:format) panel/personal_book/front_end/writing_books#index - POST /panel/personal_book/front_end/writing_books(.:format) panel/personal_book/front_end/writing_books#create - new_panel_personal_book_front_end_writing_book GET /panel/personal_book/front_end/writing_books/new(.:format) panel/personal_book/front_end/writing_books#new - edit_panel_personal_book_front_end_writing_book GET /panel/personal_book/front_end/writing_books/:id/edit(.:format) panel/personal_book/front_end/writing_books#edit - panel_personal_book_front_end_writing_book GET /panel/personal_book/front_end/writing_books/:id(.:format) panel/personal_book/front_end/writing_books#show - PUT /panel/personal_book/front_end/writing_books/:id(.:format) panel/personal_book/front_end/writing_books#update - DELETE /panel/personal_book/front_end/writing_books/:id(.:format) panel/personal_book/front_end/writing_books#destroy - panel_personal_book_plugin_writing_books GET /panel/personal_book/plugin/writing_books(.:format) panel/personal_book/plugin/writing_books#index - POST /panel/personal_book/plugin/writing_books(.:format) panel/personal_book/plugin/writing_books#create - new_panel_personal_book_plugin_writing_book GET /panel/personal_book/plugin/writing_books/new(.:format) panel/personal_book/plugin/writing_books#new - edit_panel_personal_book_plugin_writing_book GET /panel/personal_book/plugin/writing_books/:id/edit(.:format) panel/personal_book/plugin/writing_books#edit - panel_personal_book_plugin_writing_book GET /panel/personal_book/plugin/writing_books/:id(.:format) panel/personal_book/plugin/writing_books#show - PUT /panel/personal_book/plugin/writing_books/:id(.:format) panel/personal_book/plugin/writing_books#update - DELETE /panel/personal_book/plugin/writing_books/:id(.:format) panel/personal_book/plugin/writing_books#destroy - panel_personal_book_widget_writing_books /panel/personal_book/widget/writing_books(.:format) panel/personal_book/widget/writing_books#index - panel_personal_book_widget_home_list /panel/personal_book/widget/home_list(.:format) panel/personal_book/widget/writing_books#home_list - panel_personal_book_widget_reload_writing_books /panel/personal_book/widget/reload_writing_books(.:format) panel/personal_book/widget/writing_books#reload_writing_books - /appfront/*path(.:format) :controller#:action - panel_page_content_back_end_root /panel/page_content/back_end(.:format) panel/page_content/back_end/page_contexts#index - panel_page_content_back_end_page_contexts GET /panel/page_content/back_end/page_contexts(.:format) panel/page_content/back_end/page_contexts#index - POST /panel/page_content/back_end/page_contexts(.:format) panel/page_content/back_end/page_contexts#create - new_panel_page_content_back_end_page_context GET /panel/page_content/back_end/page_contexts/new(.:format) panel/page_content/back_end/page_contexts#new - edit_panel_page_content_back_end_page_context GET /panel/page_content/back_end/page_contexts/:id/edit(.:format) panel/page_content/back_end/page_contexts#edit - panel_page_content_back_end_page_context GET /panel/page_content/back_end/page_contexts/:id(.:format) panel/page_content/back_end/page_contexts#show - PUT /panel/page_content/back_end/page_contexts/:id(.:format) panel/page_content/back_end/page_contexts#update - DELETE /panel/page_content/back_end/page_contexts/:id(.:format) panel/page_content/back_end/page_contexts#destroy - panel_page_content_back_end_view /panel/page_content/back_end/view/:page_id(.:format) panel/page_content/back_end/page_contexts#view - panel_page_content_front_end_root /panel/page_content/front_end(.:format) panel/page_content/front_end/page_contexts#index - panel_page_content_front_end_page_contexts GET /panel/page_content/front_end/page_contexts(.:format) panel/page_content/front_end/page_contexts#index - POST /panel/page_content/front_end/page_contexts(.:format) panel/page_content/front_end/page_contexts#create - new_panel_page_content_front_end_page_context GET /panel/page_content/front_end/page_contexts/new(.:format) panel/page_content/front_end/page_contexts#new - edit_panel_page_content_front_end_page_context GET /panel/page_content/front_end/page_contexts/:id/edit(.:format) panel/page_content/front_end/page_contexts#edit - panel_page_content_front_end_page_context GET /panel/page_content/front_end/page_contexts/:id(.:format) panel/page_content/front_end/page_contexts#show - PUT /panel/page_content/front_end/page_contexts/:id(.:format) panel/page_content/front_end/page_contexts#update - DELETE /panel/page_content/front_end/page_contexts/:id(.:format) panel/page_content/front_end/page_contexts#destroy - panel_page_content_front_end /panel/page_content/front_end/page_contexts/:page_id(.:format) panel/page_content/front_end/page_contexts#index - /appfront/*path(.:format) :controller#:action - panel_location_back_end_locations_get_locations /panel/location/back_end/locations/get_locations(.:format) panel/location/back_end/locations#get_locations - panel_location_back_end_locations GET /panel/location/back_end/locations(.:format) panel/location/back_end/locations#index - POST /panel/location/back_end/locations(.:format) panel/location/back_end/locations#create - new_panel_location_back_end_location GET /panel/location/back_end/locations/new(.:format) panel/location/back_end/locations#new - edit_panel_location_back_end_location GET /panel/location/back_end/locations/:id/edit(.:format) panel/location/back_end/locations#edit - panel_location_back_end_location GET /panel/location/back_end/locations/:id(.:format) panel/location/back_end/locations#show - PUT /panel/location/back_end/locations/:id(.:format) panel/location/back_end/locations#update - DELETE /panel/location/back_end/locations/:id(.:format) panel/location/back_end/locations#destroy - panel_gallery_back_end_get_albums /panel/gallery/back_end/get_albums(.:format) panel/gallery/back_end/albums#get_albums - panel_gallery_back_end_upload_image /panel/gallery/back_end/upload_image(.:format) panel/gallery/back_end/albums#upload_image - panel_gallery_back_end_save_tags /panel/gallery/back_end/save_tags(.:format) panel/gallery/back_end/tags#save_tags - panel_gallery_back_end_albums_save_tags /panel/gallery/back_end/albums/save_tags(.:format) panel/gallery/back_end/tags#save_tags - panel_gallery_back_end_album_set_cover /panel/gallery/back_end/albums/:album_id/set_cover(.:format) panel/gallery/back_end/albums#set_cover - panel_gallery_back_end_album_imgs /panel/gallery/back_end/albums/:album_id/imgs(.:format) panel/gallery/back_end/albums#imgs - panel_gallery_back_end_album_upload_panel /panel/gallery/back_end/albums/:album_id/upload_panel(.:format) panel/gallery/back_end/albums#upload_panel - panel_gallery_back_end_album_images_tags /panel/gallery/back_end/albums/:album_id/images_tags(.:format) panel/gallery/back_end/albums#images_tags - panel_gallery_back_end_album_get_imgs_json /panel/gallery/back_end/albums/:album_id/get_imgs_json(.:format) panel/gallery/back_end/albums#get_imgs_json - get_album_json_panel_gallery_back_end_albums GET /panel/gallery/back_end/albums/get_album_json(.:format) panel/gallery/back_end/albums#get_album_json - panel_gallery_back_end_albums GET /panel/gallery/back_end/albums(.:format) panel/gallery/back_end/albums#index - POST /panel/gallery/back_end/albums(.:format) panel/gallery/back_end/albums#create - new_panel_gallery_back_end_album GET /panel/gallery/back_end/albums/new(.:format) panel/gallery/back_end/albums#new - edit_panel_gallery_back_end_album GET /panel/gallery/back_end/albums/:id/edit(.:format) panel/gallery/back_end/albums#edit - panel_gallery_back_end_album GET /panel/gallery/back_end/albums/:id(.:format) panel/gallery/back_end/albums#show - PUT /panel/gallery/back_end/albums/:id(.:format) panel/gallery/back_end/albums#update - DELETE /panel/gallery/back_end/albums/:id(.:format) panel/gallery/back_end/albums#destroy - panel_gallery_back_end /panel/gallery/back_end/album_images/#!/:id(.:format) panel/gallery/back_end/album_images#show - panel_gallery_back_end_album_images GET /panel/gallery/back_end/album_images(.:format) panel/gallery/back_end/album_images#index - POST /panel/gallery/back_end/album_images(.:format) panel/gallery/back_end/album_images#create - new_panel_gallery_back_end_album_image GET /panel/gallery/back_end/album_images/new(.:format) panel/gallery/back_end/album_images#new - edit_panel_gallery_back_end_album_image GET /panel/gallery/back_end/album_images/:id/edit(.:format) panel/gallery/back_end/album_images#edit - panel_gallery_back_end_album_image GET /panel/gallery/back_end/album_images/:id(.:format) panel/gallery/back_end/album_images#show - PUT /panel/gallery/back_end/album_images/:id(.:format) panel/gallery/back_end/album_images#update - DELETE /panel/gallery/back_end/album_images/:id(.:format) panel/gallery/back_end/album_images#destroy - panel_gallery_back_end_gallery_categories GET /panel/gallery/back_end/gallery_categories(.:format) panel/gallery/back_end/gallery_categories#index - POST /panel/gallery/back_end/gallery_categories(.:format) panel/gallery/back_end/gallery_categories#create - new_panel_gallery_back_end_gallery_category GET /panel/gallery/back_end/gallery_categories/new(.:format) panel/gallery/back_end/gallery_categories#new - edit_panel_gallery_back_end_gallery_category GET /panel/gallery/back_end/gallery_categories/:id/edit(.:format) panel/gallery/back_end/gallery_categories#edit - panel_gallery_back_end_gallery_category GET /panel/gallery/back_end/gallery_categories/:id(.:format) panel/gallery/back_end/gallery_categories#show - PUT /panel/gallery/back_end/gallery_categories/:id(.:format) panel/gallery/back_end/gallery_categories#update - DELETE /panel/gallery/back_end/gallery_categories/:id(.:format) panel/gallery/back_end/gallery_categories#destroy - panel_gallery_back_end_tags GET /panel/gallery/back_end/tags(.:format) panel/gallery/back_end/tags#index - POST /panel/gallery/back_end/tags(.:format) panel/gallery/back_end/tags#create - new_panel_gallery_back_end_tag GET /panel/gallery/back_end/tags/new(.:format) panel/gallery/back_end/tags#new - edit_panel_gallery_back_end_tag GET /panel/gallery/back_end/tags/:id/edit(.:format) panel/gallery/back_end/tags#edit - panel_gallery_back_end_tag GET /panel/gallery/back_end/tags/:id(.:format) panel/gallery/back_end/tags#show - PUT /panel/gallery/back_end/tags/:id(.:format) panel/gallery/back_end/tags#update - DELETE /panel/gallery/back_end/tags/:id(.:format) panel/gallery/back_end/tags#destroy - panel_gallery_front_end_orbit_galleries /panel/gallery/front_end/orbit_galleries(.:format) panel/gallery/front_end/orbit_galleries#index - panel_gallery_front_end_get_albums /panel/gallery/front_end/get_albums(.:format) panel/gallery/front_end/albums#get_albums - imgs_panel_gallery_front_end_album GET /panel/gallery/front_end/albums/:id/imgs(.:format) panel/gallery/front_end/albums#imgs - theater_panel_gallery_front_end_album GET /panel/gallery/front_end/albums/:id/theater(.:format) panel/gallery/front_end/albums#theater - panel_gallery_front_end_albums GET /panel/gallery/front_end/albums(.:format) panel/gallery/front_end/albums#index - POST /panel/gallery/front_end/albums(.:format) panel/gallery/front_end/albums#create - new_panel_gallery_front_end_album GET /panel/gallery/front_end/albums/new(.:format) panel/gallery/front_end/albums#new - edit_panel_gallery_front_end_album GET /panel/gallery/front_end/albums/:id/edit(.:format) panel/gallery/front_end/albums#edit - panel_gallery_front_end_album GET /panel/gallery/front_end/albums/:id(.:format) panel/gallery/front_end/albums#show - PUT /panel/gallery/front_end/albums/:id(.:format) panel/gallery/front_end/albums#update - DELETE /panel/gallery/front_end/albums/:id(.:format) panel/gallery/front_end/albums#destroy - panel_gallery_front_end_album_images GET /panel/gallery/front_end/album_images(.:format) panel/gallery/front_end/album_images#index - POST /panel/gallery/front_end/album_images(.:format) panel/gallery/front_end/album_images#create - new_panel_gallery_front_end_album_image GET /panel/gallery/front_end/album_images/new(.:format) panel/gallery/front_end/album_images#new - edit_panel_gallery_front_end_album_image GET /panel/gallery/front_end/album_images/:id/edit(.:format) panel/gallery/front_end/album_images#edit - panel_gallery_front_end_album_image GET /panel/gallery/front_end/album_images/:id(.:format) panel/gallery/front_end/album_images#show - PUT /panel/gallery/front_end/album_images/:id(.:format) panel/gallery/front_end/album_images#update - DELETE /panel/gallery/front_end/album_images/:id(.:format) panel/gallery/front_end/album_images#destroy - panel_gallery_widget_widget1 /panel/gallery/widget/widget1(.:format) panel/gallery/widget/albums#widget1 - panel_calendar_back_end_cals_agenda_view GET /panel/calendar/back_end/cals/agenda_view(.:format) panel/calendar/back_end/cals#agenda_view - panel_calendar_back_end_cals_month_view GET /panel/calendar/back_end/cals/month_view(.:format) panel/calendar/back_end/cals#month_view - panel_calendar_back_end_cals_day_view GET /panel/calendar/back_end/cals/day_view(.:format) panel/calendar/back_end/cals#day_view - panel_calendar_back_end_cals_week_view GET /panel/calendar/back_end/cals/week_view(.:format) panel/calendar/back_end/cals#week_view - panel_calendar_back_end_cals_getMonthEvents GET /panel/calendar/back_end/cals/getMonthEvents(.:format) panel/calendar/back_end/cals#get_month_events - panel_calendar_back_end_cals_getWeekEvents GET /panel/calendar/back_end/cals/getWeekEvents(.:format) panel/calendar/back_end/cals#get_week_events - panel_calendar_back_end_cals_getDayEvents GET /panel/calendar/back_end/cals/getDayEvents(.:format) panel/calendar/back_end/cals#get_day_events - panel_calendar_back_end_cals GET /panel/calendar/back_end/cals(.:format) panel/calendar/back_end/cals#index - POST /panel/calendar/back_end/cals(.:format) panel/calendar/back_end/cals#create - new_panel_calendar_back_end_cal GET /panel/calendar/back_end/cals/new(.:format) panel/calendar/back_end/cals#new - edit_panel_calendar_back_end_cal GET /panel/calendar/back_end/cals/:id/edit(.:format) panel/calendar/back_end/cals#edit - panel_calendar_back_end_cal GET /panel/calendar/back_end/cals/:id(.:format) panel/calendar/back_end/cals#show - PUT /panel/calendar/back_end/cals/:id(.:format) panel/calendar/back_end/cals#update - DELETE /panel/calendar/back_end/cals/:id(.:format) panel/calendar/back_end/cals#destroy - panel_calendar_back_end_events GET /panel/calendar/back_end/events(.:format) panel/calendar/back_end/events#index - POST /panel/calendar/back_end/events(.:format) panel/calendar/back_end/events#create - new_panel_calendar_back_end_event GET /panel/calendar/back_end/events/new(.:format) panel/calendar/back_end/events#new - edit_panel_calendar_back_end_event GET /panel/calendar/back_end/events/:id/edit(.:format) panel/calendar/back_end/events#edit - panel_calendar_back_end_event GET /panel/calendar/back_end/events/:id(.:format) panel/calendar/back_end/events#show - PUT /panel/calendar/back_end/events/:id(.:format) panel/calendar/back_end/events#update - DELETE /panel/calendar/back_end/events/:id(.:format) panel/calendar/back_end/events#destroy - panel_calendar_back_end_tags GET /panel/calendar/back_end/tags(.:format) panel/calendar/back_end/tags#index - POST /panel/calendar/back_end/tags(.:format) panel/calendar/back_end/tags#create - new_panel_calendar_back_end_tag GET /panel/calendar/back_end/tags/new(.:format) panel/calendar/back_end/tags#new - edit_panel_calendar_back_end_tag GET /panel/calendar/back_end/tags/:id/edit(.:format) panel/calendar/back_end/tags#edit - panel_calendar_back_end_tag GET /panel/calendar/back_end/tags/:id(.:format) panel/calendar/back_end/tags#show - PUT /panel/calendar/back_end/tags/:id(.:format) panel/calendar/back_end/tags#update - DELETE /panel/calendar/back_end/tags/:id(.:format) panel/calendar/back_end/tags#destroy - panel_archive_back_end_root /panel/archive/back_end(.:format) panel/archive/back_end/archive_files#index - panel_archive_back_end_archive_files GET /panel/archive/back_end/archive_files(.:format) panel/archive/back_end/archive_files#index - POST /panel/archive/back_end/archive_files(.:format) panel/archive/back_end/archive_files#create - new_panel_archive_back_end_archive_file GET /panel/archive/back_end/archive_files/new(.:format) panel/archive/back_end/archive_files#new - edit_panel_archive_back_end_archive_file GET /panel/archive/back_end/archive_files/:id/edit(.:format) panel/archive/back_end/archive_files#edit - panel_archive_back_end_archive_file GET /panel/archive/back_end/archive_files/:id(.:format) panel/archive/back_end/archive_files#show - PUT /panel/archive/back_end/archive_files/:id(.:format) panel/archive/back_end/archive_files#update - DELETE /panel/archive/back_end/archive_files/:id(.:format) panel/archive/back_end/archive_files#destroy - panel_archive_back_end_archive_file_categorys GET /panel/archive/back_end/archive_file_categorys(.:format) panel/archive/back_end/archive_file_categorys#index - POST /panel/archive/back_end/archive_file_categorys(.:format) panel/archive/back_end/archive_file_categorys#create - new_panel_archive_back_end_archive_file_category GET /panel/archive/back_end/archive_file_categorys/new(.:format) panel/archive/back_end/archive_file_categorys#new - edit_panel_archive_back_end_archive_file_category GET /panel/archive/back_end/archive_file_categorys/:id/edit(.:format) panel/archive/back_end/archive_file_categorys#edit - panel_archive_back_end_archive_file_category GET /panel/archive/back_end/archive_file_categorys/:id(.:format) panel/archive/back_end/archive_file_categorys#show - PUT /panel/archive/back_end/archive_file_categorys/:id(.:format) panel/archive/back_end/archive_file_categorys#update - DELETE /panel/archive/back_end/archive_file_categorys/:id(.:format) panel/archive/back_end/archive_file_categorys#destroy - panel_archive_back_end_tags GET /panel/archive/back_end/tags(.:format) panel/archive/back_end/tags#index - POST /panel/archive/back_end/tags(.:format) panel/archive/back_end/tags#create - new_panel_archive_back_end_tag GET /panel/archive/back_end/tags/new(.:format) panel/archive/back_end/tags#new - edit_panel_archive_back_end_tag GET /panel/archive/back_end/tags/:id/edit(.:format) panel/archive/back_end/tags#edit - panel_archive_back_end_tag GET /panel/archive/back_end/tags/:id(.:format) panel/archive/back_end/tags#show - PUT /panel/archive/back_end/tags/:id(.:format) panel/archive/back_end/tags#update - DELETE /panel/archive/back_end/tags/:id(.:format) panel/archive/back_end/tags#destroy - panel_archive_front_end_root /panel/archive/front_end(.:format) panel/archive/front_end/archive_files#index - panel_archive_front_end_archive_files GET /panel/archive/front_end/archive_files(.:format) panel/archive/front_end/archive_files#index - POST /panel/archive/front_end/archive_files(.:format) panel/archive/front_end/archive_files#create - new_panel_archive_front_end_archive_file GET /panel/archive/front_end/archive_files/new(.:format) panel/archive/front_end/archive_files#new - edit_panel_archive_front_end_archive_file GET /panel/archive/front_end/archive_files/:id/edit(.:format) panel/archive/front_end/archive_files#edit - panel_archive_front_end_archive_file GET /panel/archive/front_end/archive_files/:id(.:format) panel/archive/front_end/archive_files#show - PUT /panel/archive/front_end/archive_files/:id(.:format) panel/archive/front_end/archive_files#update - DELETE /panel/archive/front_end/archive_files/:id(.:format) panel/archive/front_end/archive_files#destroy - panel_archive_widget_archive_files /panel/archive/widget/archive_files(.:format) panel/archive/widget/archive_files#index - panel_archive_widget_reload_archive_files /panel/archive/widget/reload_archive_files(.:format) panel/archive/widget/archive_files#reload_archive_files - /appfront/*path(.:format) :controller#:action - panel_announcement_back_end_public /panel/announcement/back_end/public(.:format) panel/announcement/back_end/announcements#public - panel_announcement_back_end_approval_setting GET /panel/announcement/back_end/approval_setting(.:format) panel/announcement/back_end/approvals#setting - panel_announcement_back_end_approval_setting POST /panel/announcement/back_end/approval_setting(.:format) panel/announcement/back_end/approvals#update_setting - panel_announcement_back_end_approval_user_list PUT /panel/announcement/back_end/approval_setting(.:format) panel/announcement/back_end/approvals#user_list - panel_announcement_back_end_bulletin_approval_preview PUT /panel/announcement/back_end/bulletins/:bulletin_id/approve/:bulletin_id(.:format) panel/announcement/back_end/approvals#preview_and_approve - panel_announcement_back_end_bulletin_approve POST /panel/announcement/back_end/bulletins/:bulletin_id/approve/:bulletin_id(.:format) panel/announcement/back_end/approvals#approve - panel_announcement_back_end_bulletin_link_quick_add /panel/announcement/back_end/bulletins/:bulletin_id/link_quick_add/:bulletin_id(.:format) panel/announcement/back_end/bulletins#link_quick_add - panel_announcement_back_end_bulletin_link_quick_edit /panel/announcement/back_end/bulletins/:bulletin_id/link_quick_edit/:bulletin_id(.:format) panel/announcement/back_end/bulletins#link_quick_edit - load_quick_edit_panel_announcement_back_end_bulletin GET /panel/announcement/back_end/bulletins/:id/load_quick_edit(.:format) panel/announcement/back_end/bulletins#load_quick_edit - preview_panel_announcement_back_end_bulletins POST /panel/announcement/back_end/bulletins/preview(.:format) panel/announcement/back_end/bulletins#preview - PUT /panel/announcement/back_end/bulletins/preview(.:format) panel/announcement/back_end/bulletins#preview - delete_panel_announcement_back_end_bulletins GET /panel/announcement/back_end/bulletins/delete(.:format) panel/announcement/back_end/bulletins#delete - panel_announcement_back_end_bulletin_file_quick_add /panel/announcement/back_end/bulletins/:bulletin_id/file_quick_add/:bulletin_id(.:format) panel/announcement/back_end/bulletins#file_quick_add - panel_announcement_back_end_bulletin_file_quick_edit /panel/announcement/back_end/bulletins/:bulletin_id/file_quick_edit/:bulletin_id(.:format) panel/announcement/back_end/bulletins#file_quick_edit - panel_announcement_back_end_bulletins GET /panel/announcement/back_end/bulletins(.:format) panel/announcement/back_end/bulletins#index - POST /panel/announcement/back_end/bulletins(.:format) panel/announcement/back_end/bulletins#create - new_panel_announcement_back_end_bulletin GET /panel/announcement/back_end/bulletins/new(.:format) panel/announcement/back_end/bulletins#new - edit_panel_announcement_back_end_bulletin GET /panel/announcement/back_end/bulletins/:id/edit(.:format) panel/announcement/back_end/bulletins#edit - panel_announcement_back_end_bulletin GET /panel/announcement/back_end/bulletins/:id(.:format) panel/announcement/back_end/bulletins#show - PUT /panel/announcement/back_end/bulletins/:id(.:format) panel/announcement/back_end/bulletins#update - DELETE /panel/announcement/back_end/bulletins/:id(.:format) panel/announcement/back_end/bulletins#destroy - get_categorys_json_panel_announcement_back_end_bulletin_categorys GET /panel/announcement/back_end/bulletin_categorys/get_categorys_json(.:format) panel/announcement/back_end/bulletin_categorys#get_categorys_json - panel_announcement_back_end_bulletin_categorys GET /panel/announcement/back_end/bulletin_categorys(.:format) panel/announcement/back_end/bulletin_categorys#index - POST /panel/announcement/back_end/bulletin_categorys(.:format) panel/announcement/back_end/bulletin_categorys#create - new_panel_announcement_back_end_bulletin_category GET /panel/announcement/back_end/bulletin_categorys/new(.:format) panel/announcement/back_end/bulletin_categorys#new - edit_panel_announcement_back_end_bulletin_category GET /panel/announcement/back_end/bulletin_categorys/:id/edit(.:format) panel/announcement/back_end/bulletin_categorys#edit - panel_announcement_back_end_bulletin_category GET /panel/announcement/back_end/bulletin_categorys/:id(.:format) panel/announcement/back_end/bulletin_categorys#show - PUT /panel/announcement/back_end/bulletin_categorys/:id(.:format) panel/announcement/back_end/bulletin_categorys#update - DELETE /panel/announcement/back_end/bulletin_categorys/:id(.:format) panel/announcement/back_end/bulletin_categorys#destroy - panel_announcement_back_end_bulletin_link_link_quick_edit /panel/announcement/back_end/bulletin_links/:bulletin_link_id/link_quick_edit/:bulletin_link_id(.:format) panel/announcement/back_end/bulletin_links#link_quick_edit - panel_announcement_back_end_bulletin_links GET /panel/announcement/back_end/bulletin_links(.:format) panel/announcement/back_end/bulletin_links#index - POST /panel/announcement/back_end/bulletin_links(.:format) panel/announcement/back_end/bulletin_links#create - new_panel_announcement_back_end_bulletin_link GET /panel/announcement/back_end/bulletin_links/new(.:format) panel/announcement/back_end/bulletin_links#new - edit_panel_announcement_back_end_bulletin_link GET /panel/announcement/back_end/bulletin_links/:id/edit(.:format) panel/announcement/back_end/bulletin_links#edit - panel_announcement_back_end_bulletin_link GET /panel/announcement/back_end/bulletin_links/:id(.:format) panel/announcement/back_end/bulletin_links#show - PUT /panel/announcement/back_end/bulletin_links/:id(.:format) panel/announcement/back_end/bulletin_links#update - DELETE /panel/announcement/back_end/bulletin_links/:id(.:format) panel/announcement/back_end/bulletin_links#destroy - panel_announcement_back_end_bulletin_file_file_quick_edit /panel/announcement/back_end/bulletin_files/:bulletin_file_id/file_quick_edit/:bulletin_file_id(.:format) panel/announcement/back_end/bulletin_files#file_quick_edit - panel_announcement_back_end_bulletin_files GET /panel/announcement/back_end/bulletin_files(.:format) panel/announcement/back_end/bulletin_files#index - POST /panel/announcement/back_end/bulletin_files(.:format) panel/announcement/back_end/bulletin_files#create - new_panel_announcement_back_end_bulletin_file GET /panel/announcement/back_end/bulletin_files/new(.:format) panel/announcement/back_end/bulletin_files#new - edit_panel_announcement_back_end_bulletin_file GET /panel/announcement/back_end/bulletin_files/:id/edit(.:format) panel/announcement/back_end/bulletin_files#edit - panel_announcement_back_end_bulletin_file GET /panel/announcement/back_end/bulletin_files/:id(.:format) panel/announcement/back_end/bulletin_files#show - PUT /panel/announcement/back_end/bulletin_files/:id(.:format) panel/announcement/back_end/bulletin_files#update - DELETE /panel/announcement/back_end/bulletin_files/:id(.:format) panel/announcement/back_end/bulletin_files#destroy - panel_announcement_back_end_tags GET /panel/announcement/back_end/tags(.:format) panel/announcement/back_end/tags#index - POST /panel/announcement/back_end/tags(.:format) panel/announcement/back_end/tags#create - new_panel_announcement_back_end_tag GET /panel/announcement/back_end/tags/new(.:format) panel/announcement/back_end/tags#new - edit_panel_announcement_back_end_tag GET /panel/announcement/back_end/tags/:id/edit(.:format) panel/announcement/back_end/tags#edit - panel_announcement_back_end_tag GET /panel/announcement/back_end/tags/:id(.:format) panel/announcement/back_end/tags#show - PUT /panel/announcement/back_end/tags/:id(.:format) panel/announcement/back_end/tags#update - DELETE /panel/announcement/back_end/tags/:id(.:format) panel/announcement/back_end/tags#destroy - panel_announcement_front_end_index_bulletins_by_unit /panel/announcement/front_end/index_by_unit(.:format) panel/announcement/front_end/bulletins#index_bulletins_by_unit - panel_announcement_front_end_bulletins GET /panel/announcement/front_end/bulletins(.:format) panel/announcement/front_end/bulletins#index - POST /panel/announcement/front_end/bulletins(.:format) panel/announcement/front_end/bulletins#create - new_panel_announcement_front_end_bulletin GET /panel/announcement/front_end/bulletins/new(.:format) panel/announcement/front_end/bulletins#new - edit_panel_announcement_front_end_bulletin GET /panel/announcement/front_end/bulletins/:id/edit(.:format) panel/announcement/front_end/bulletins#edit - panel_announcement_front_end_bulletin GET /panel/announcement/front_end/bulletins/:id(.:format) panel/announcement/front_end/bulletins#show - PUT /panel/announcement/front_end/bulletins/:id(.:format) panel/announcement/front_end/bulletins#update - DELETE /panel/announcement/front_end/bulletins/:id(.:format) panel/announcement/front_end/bulletins#destroy - panel_announcement_widget_index /panel/announcement/widget/index(.:format) panel/announcement/widget/bulletins#index - panel_announcement_widget_bulletins_and_web_links /panel/announcement/widget/bulletins_and_web_links(.:format) panel/announcement/widget/bulletins#bulletins_and_web_links - panel_announcement_widget_reload_bulletins /panel/announcement/widget/reload_bulletins(.:format) panel/announcement/widget/bulletins#reload_bulletins - panel_announcement_widget_reload_web_links /panel/announcement/widget/reload_web_links(.:format) panel/announcement/widget/bulletins#reload_web_links - panel_announcement_widget_bulletins_side_bar /panel/announcement/widget/bulletins_side_bar(.:format) panel/announcement/widget/bulletins#bulletins_side_bar - panel_announcement_widget_bulletins_search_block /panel/announcement/widget/bulletins_search_block(.:format) panel/announcement/widget/bulletins#bulletins_search_block From bca4478f68319dc6b2939bcdfbf714201753f961 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Fri, 1 Feb 2013 17:07:16 +0800 Subject: [PATCH 07/53] front_end widget breadcrumb done --- app/controllers/front_controller.rb | 2 +- app/views/front/show_breadcrumb.html.erb | 4 ++-- lib/parsers/parser_common.rb | 5 ++--- lib/parsers/parser_front_end.rb | 17 ++++++++++++++++- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/app/controllers/front_controller.rb b/app/controllers/front_controller.rb index 15a9d9863..3648f6a47 100644 --- a/app/controllers/front_controller.rb +++ b/app/controllers/front_controller.rb @@ -3,7 +3,7 @@ class FrontController < ApplicationController layout false def show_breadcrumb - @ancestors = Page.find(params[:menu_page_id]).ancestors_and_self.map{|m|m.title_translations[locale]}.delete_at(0) rescue [] + @ancestors = Page.find(params[:page_id]).ancestors_and_self @ancestors.delete_at(0) end diff --git a/app/views/front/show_breadcrumb.html.erb b/app/views/front/show_breadcrumb.html.erb index afba97b23..7b0fc9128 100644 --- a/app/views/front/show_breadcrumb.html.erb +++ b/app/views/front/show_breadcrumb.html.erb @@ -1,9 +1,9 @@ <% if not @ancestors.empty? %>
    - <%= @ancestors.each do |node| %> + <% @ancestors.each do |node| %>
  • - <%= link_to node.title, (node.class.to_s.eql?('Page') ? '/' + node.path : node.url) %> + <%= link_to node.title, "/#{node.path}" %>
  • <% end %>
diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 0d139ba70..bd0b86431 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -156,9 +156,7 @@ module ParserCommon res << " +<% end %> \ No newline at end of file From 3676de8a144d0a9bd24e4393a746ce107339074b Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 5 Feb 2013 18:22:23 +0800 Subject: [PATCH 14/53] Change validation for url: can include IPs --- app/models/ad_image.rb | 2 +- app/models/link.rb | 2 +- .../built_in_modules/announcement/app/models/bulletin_link.rb | 2 +- .../built_in_modules/personal_book/app/models/writing_book.rb | 2 +- .../personal_conference/app/models/writing_conference.rb | 2 +- vendor/built_in_modules/personal_diploma/app/models/diploma.rb | 2 +- .../personal_experience/app/models/experience.rb | 2 +- vendor/built_in_modules/personal_honor/app/models/honor.rb | 2 +- .../personal_journal/app/models/writing_journal.rb | 2 +- vendor/built_in_modules/personal_lab/app/models/lab.rb | 2 +- .../personal_patent/app/models/writing_patent.rb | 2 +- vendor/built_in_modules/personal_project/app/models/project.rb | 2 +- .../built_in_modules/personal_research/app/models/research.rb | 2 +- vendor/built_in_modules/web_resource/app/models/web_link.rb | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/models/ad_image.rb b/app/models/ad_image.rb index aad34852d..4d5227c98 100644 --- a/app/models/ad_image.rb +++ b/app/models/ad_image.rb @@ -23,7 +23,7 @@ class AdImage belongs_to :ad_banner before_validation :add_http - validates :out_link, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :allow_blank => true + validates :out_link, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :allow_blank => true def display? if (self.post_date <= Date.today && (self.unpost_date.nil? || self.unpost_date>= Date.today) rescue false) diff --git a/app/models/link.rb b/app/models/link.rb index ccd79c89c..d3e1448c4 100644 --- a/app/models/link.rb +++ b/app/models/link.rb @@ -2,7 +2,7 @@ class Link < Item field :url - validates :url, :presence => true, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix + validates :url, :presence => true, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i before_validation :add_http diff --git a/vendor/built_in_modules/announcement/app/models/bulletin_link.rb b/vendor/built_in_modules/announcement/app/models/bulletin_link.rb index 374ce5de2..476351351 100644 --- a/vendor/built_in_modules/announcement/app/models/bulletin_link.rb +++ b/vendor/built_in_modules/announcement/app/models/bulletin_link.rb @@ -12,7 +12,7 @@ class BulletinLink belongs_to :bulletin before_validation :add_http - validates :url, :presence => true, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix + validates :url, :presence => true, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i protected diff --git a/vendor/built_in_modules/personal_book/app/models/writing_book.rb b/vendor/built_in_modules/personal_book/app/models/writing_book.rb index bc5fbdb34..432711dac 100644 --- a/vendor/built_in_modules/personal_book/app/models/writing_book.rb +++ b/vendor/built_in_modules/personal_book/app/models/writing_book.rb @@ -51,7 +51,7 @@ class WritingBook after_save :save_writing_book_files - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.search( category_id = nil ) diff --git a/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb b/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb index d10a8afe5..559bc3514 100644 --- a/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb +++ b/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb @@ -50,7 +50,7 @@ class WritingConference after_save :save_writing_conference_files - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.search( category_id = nil ) diff --git a/vendor/built_in_modules/personal_diploma/app/models/diploma.rb b/vendor/built_in_modules/personal_diploma/app/models/diploma.rb index bdbab61ea..563cf62c2 100644 --- a/vendor/built_in_modules/personal_diploma/app/models/diploma.rb +++ b/vendor/built_in_modules/personal_diploma/app/models/diploma.rb @@ -38,7 +38,7 @@ class Diploma before_validation :add_http - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.widget_datas diff --git a/vendor/built_in_modules/personal_experience/app/models/experience.rb b/vendor/built_in_modules/personal_experience/app/models/experience.rb index 0f5f48f62..d8e95dd0d 100644 --- a/vendor/built_in_modules/personal_experience/app/models/experience.rb +++ b/vendor/built_in_modules/personal_experience/app/models/experience.rb @@ -38,7 +38,7 @@ class Experience before_validation :add_http - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.search( category_id = nil ) diff --git a/vendor/built_in_modules/personal_honor/app/models/honor.rb b/vendor/built_in_modules/personal_honor/app/models/honor.rb index a0954ac66..7e5f2f1f1 100644 --- a/vendor/built_in_modules/personal_honor/app/models/honor.rb +++ b/vendor/built_in_modules/personal_honor/app/models/honor.rb @@ -35,7 +35,7 @@ class Honor before_validation :add_http - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.search( category_id = nil ) diff --git a/vendor/built_in_modules/personal_journal/app/models/writing_journal.rb b/vendor/built_in_modules/personal_journal/app/models/writing_journal.rb index f91277586..64f123f05 100644 --- a/vendor/built_in_modules/personal_journal/app/models/writing_journal.rb +++ b/vendor/built_in_modules/personal_journal/app/models/writing_journal.rb @@ -37,7 +37,7 @@ class WritingJournal before_validation :add_http before_save :save_co_author validates :paper_title, :at_least_one => true - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def save_co_author authors_list = authors.split(",").map{|n| n.strip.gsub(/\s+/," ")}.reject{|n| n.empty? } diff --git a/vendor/built_in_modules/personal_lab/app/models/lab.rb b/vendor/built_in_modules/personal_lab/app/models/lab.rb index 4ff508d80..539a25759 100644 --- a/vendor/built_in_modules/personal_lab/app/models/lab.rb +++ b/vendor/built_in_modules/personal_lab/app/models/lab.rb @@ -44,7 +44,7 @@ class Lab after_save :save_lab_files - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.search( category_id = nil ) diff --git a/vendor/built_in_modules/personal_patent/app/models/writing_patent.rb b/vendor/built_in_modules/personal_patent/app/models/writing_patent.rb index 146320a5b..632e765c0 100644 --- a/vendor/built_in_modules/personal_patent/app/models/writing_patent.rb +++ b/vendor/built_in_modules/personal_patent/app/models/writing_patent.rb @@ -44,7 +44,7 @@ class WritingPatent after_save :save_writing_patent_files - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.search( category_id = nil ) diff --git a/vendor/built_in_modules/personal_project/app/models/project.rb b/vendor/built_in_modules/personal_project/app/models/project.rb index 339a1bd5f..32a4fbdce 100644 --- a/vendor/built_in_modules/personal_project/app/models/project.rb +++ b/vendor/built_in_modules/personal_project/app/models/project.rb @@ -46,7 +46,7 @@ class Project after_save :save_project_files - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.search( category_id = nil ) diff --git a/vendor/built_in_modules/personal_research/app/models/research.rb b/vendor/built_in_modules/personal_research/app/models/research.rb index 968dc151c..14080e12e 100644 --- a/vendor/built_in_modules/personal_research/app/models/research.rb +++ b/vendor/built_in_modules/personal_research/app/models/research.rb @@ -41,7 +41,7 @@ class Research after_save :save_research_files - validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?} + validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?} def self.search( category_id = nil ) diff --git a/vendor/built_in_modules/web_resource/app/models/web_link.rb b/vendor/built_in_modules/web_resource/app/models/web_link.rb index e2eea02bc..68b94cff8 100644 --- a/vendor/built_in_modules/web_resource/app/models/web_link.rb +++ b/vendor/built_in_modules/web_resource/app/models/web_link.rb @@ -27,7 +27,7 @@ class WebLink validates :title, :at_least_one => true before_validation :add_http - validates :url, :presence => true, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix + validates :url, :presence => true, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i def self.search( category_id = nil ) From 61648d23e1f62b5eea80b1897f825d0e468a9d9c Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 5 Feb 2013 18:26:45 +0800 Subject: [PATCH 15/53] Change delete_all to destroy_all --- app/controllers/admin/assets_controller.rb | 2 +- app/controllers/admin/designs_controller.rb | 2 +- lib/tasks/pages.rake | 2 +- lib/tasks/site.rake | 4 ++-- .../panel/announcement/back_end/bulletins_controller.rb | 2 +- .../panel/personal_book/back_end/writing_books_controller.rb | 2 +- .../panel/personal_book/plugin/writing_books_controller.rb | 2 +- .../back_end/writing_conferences_controller.rb | 2 +- .../plugin/writing_conferences_controller.rb | 2 +- .../panel/personal_diploma/back_end/diplomas_controller.rb | 2 +- .../panel/personal_diploma/plugin/diplomas_controller.rb | 2 +- .../personal_experience/back_end/experiences_controller.rb | 2 +- .../personal_experience/plugin/experiences_controller.rb | 2 +- .../panel/personal_honor/back_end/honors_controller.rb | 2 +- .../panel/personal_honor/plugin/honors_controller.rb | 2 +- .../personal_journal/back_end/writing_journals_controller.rb | 2 +- .../personal_journal/plugin/writing_journals_controller.rb | 2 +- .../panel/personal_lab/back_end/labs_controller.rb | 2 +- .../controllers/panel/personal_lab/plugin/labs_controller.rb | 2 +- .../personal_patent/back_end/writing_patents_controller.rb | 2 +- .../personal_patent/plugin/writing_patents_controller.rb | 2 +- .../panel/personal_project/back_end/projects_controller.rb | 2 +- .../panel/personal_project/plugin/projects_controller.rb | 2 +- .../panel/personal_research/back_end/researchs_controller.rb | 2 +- .../panel/personal_research/plugin/researchs_controller.rb | 2 +- .../panel/web_resource/back_end/web_links_controller.rb | 2 +- 26 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/controllers/admin/assets_controller.rb b/app/controllers/admin/assets_controller.rb index 77c52ffa8..d458045bd 100644 --- a/app/controllers/admin/assets_controller.rb +++ b/app/controllers/admin/assets_controller.rb @@ -88,7 +88,7 @@ class Admin::AssetsController < OrbitBackendController def delete if params[:ids] - asset = Asset.any_in(:_id => params[:ids]).delete_all + asset = Asset.any_in(:_id => params[:ids]).destroy_all end redirect_to assets_url(:filter => params[:filter], :direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/app/controllers/admin/designs_controller.rb b/app/controllers/admin/designs_controller.rb index a661a5c1e..826c025d3 100644 --- a/app/controllers/admin/designs_controller.rb +++ b/app/controllers/admin/designs_controller.rb @@ -114,7 +114,7 @@ class Admin::DesignsController < OrbitBackendController def delete if params[:ids] - designs = Design.any_in(:_id => params[:ids]).delete_all + designs = Design.any_in(:_id => params[:ids]).destroy_all end redirect_to admin_designs_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/lib/tasks/pages.rake b/lib/tasks/pages.rake index 598d4b539..8f5d5f8a0 100644 --- a/lib/tasks/pages.rake +++ b/lib/tasks/pages.rake @@ -4,7 +4,7 @@ namespace :pages do task :build => :environment do - Item.delete_all + Item.destroy_all var_10 = I18nVariable.create!( :document_class => 'Home', :key => 'home', :en => 'Homepage', :zh_tw => '首頁') diff --git a/lib/tasks/site.rake b/lib/tasks/site.rake index 74deba295..4415aed97 100644 --- a/lib/tasks/site.rake +++ b/lib/tasks/site.rake @@ -4,8 +4,8 @@ namespace :site do task :build => :environment do - Site.delete_all - Purchase.delete_all + Site.destroy_all + Purchase.destroy_all Site.create( :school => 'RulingDigital University', :department => 'Computer Science', :valid_locales => [ 'en', 'zh_tw' ], :in_use_locales => [ 'zh_tw', 'en' ]) diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb index 9457bb5b3..c132bce9b 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -286,7 +286,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController def delete if params[:ids] - bulletins = Bulletin.any_in(:_id => params[:ids]).delete_all + bulletins = Bulletin.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_announcement_back_end_bulletins_url(:filter => params[:filter], :direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/back_end/writing_books_controller.rb b/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/back_end/writing_books_controller.rb index 48ebf3331..b99091ed7 100644 --- a/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/back_end/writing_books_controller.rb +++ b/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/back_end/writing_books_controller.rb @@ -271,7 +271,7 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl def delete if params[:ids] - writing_books = WritingBook.any_in(:_id => params[:ids]).delete_all + writing_books = WritingBook.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_book_back_end_writing_books_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/plugin/writing_books_controller.rb b/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/plugin/writing_books_controller.rb index 583b4897e..2dfd4d8f2 100644 --- a/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/plugin/writing_books_controller.rb +++ b/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/plugin/writing_books_controller.rb @@ -146,7 +146,7 @@ class Panel::PersonalBook::Plugin::WritingBooksController < OrbitBackendControll def delete if params[:ids] - writing_books = WritingBook.any_in(:_id => params[:ids]).delete_all + writing_books = WritingBook.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_book_plugin_writing_books_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb index eb2d1b04c..a9b577fcb 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb @@ -269,7 +269,7 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa def delete if params[:ids] - writing_conferences = WritingConference.any_in(:_id => params[:ids]).delete_all + writing_conferences = WritingConference.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_conference_back_end_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/plugin/writing_conferences_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/plugin/writing_conferences_controller.rb index 5b754ec96..236528341 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/plugin/writing_conferences_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/plugin/writing_conferences_controller.rb @@ -147,7 +147,7 @@ class Panel::PersonalConference::Plugin::WritingConferencesController < OrbitBac def delete if params[:ids] - writing_conferences = WritingConference.any_in(:_id => params[:ids]).delete_all + writing_conferences = WritingConference.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_conference_plugin_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/back_end/diplomas_controller.rb b/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/back_end/diplomas_controller.rb index 8ed95657b..0f9a14027 100644 --- a/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/back_end/diplomas_controller.rb +++ b/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/back_end/diplomas_controller.rb @@ -145,7 +145,7 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll def delete if params[:ids] - diplomas = Diploma.any_in(:_id => params[:ids]).delete_all + diplomas = Diploma.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_diploma_back_end_diplomas_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/plugin/diplomas_controller.rb b/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/plugin/diplomas_controller.rb index 47b856037..695ad5416 100644 --- a/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/plugin/diplomas_controller.rb +++ b/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/plugin/diplomas_controller.rb @@ -132,7 +132,7 @@ class Panel::PersonalDiploma::Plugin::DiplomasController < OrbitBackendControlle def delete if params[:ids] - diplomas = Diploma.any_in(:_id => params[:ids]).delete_all + diplomas = Diploma.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_diploma_plugin_diplomas_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/back_end/experiences_controller.rb b/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/back_end/experiences_controller.rb index 438ff6d54..57489a3db 100644 --- a/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/back_end/experiences_controller.rb +++ b/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/back_end/experiences_controller.rb @@ -213,7 +213,7 @@ class Panel::PersonalExperience::BackEnd::ExperiencesController < OrbitBackendCo def delete if params[:ids] - experiences = Experience.any_in(:_id => params[:ids]).delete_all + experiences = Experience.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_experience_back_end_experiences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/plugin/experiences_controller.rb b/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/plugin/experiences_controller.rb index 5d6c5c9a9..ae37e98cf 100644 --- a/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/plugin/experiences_controller.rb +++ b/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/plugin/experiences_controller.rb @@ -201,7 +201,7 @@ class Panel::PersonalExperience::Plugin::ExperiencesController < OrbitBackendCon def delete if params[:ids] - experiences = Experience.any_in(:_id => params[:ids]).delete_all + experiences = Experience.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_experience_plugin_experiences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/back_end/honors_controller.rb b/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/back_end/honors_controller.rb index 18fe5255a..32f1e8fd4 100644 --- a/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/back_end/honors_controller.rb +++ b/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/back_end/honors_controller.rb @@ -216,7 +216,7 @@ class Panel::PersonalHonor::BackEnd::HonorsController < OrbitBackendController def delete if params[:ids] - honors = Honor.any_in(:_id => params[:ids]).delete_all + honors = Honor.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_honor_back_end_honors_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/plugin/honors_controller.rb b/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/plugin/honors_controller.rb index 0f4e5bc54..1510fcfc8 100644 --- a/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/plugin/honors_controller.rb +++ b/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/plugin/honors_controller.rb @@ -201,7 +201,7 @@ class Panel::PersonalHonor::Plugin::HonorsController < OrbitBackendController def delete if params[:ids] - honors = Honor.any_in(:_id => params[:ids]).delete_all + honors = Honor.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_honor_plugin_honors_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/back_end/writing_journals_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/back_end/writing_journals_controller.rb index 27e7e53da..951ab8eac 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/back_end/writing_journals_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/back_end/writing_journals_controller.rb @@ -323,7 +323,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC def delete if params[:ids] - writing_journals = WritingJournal.any_in(:_id => params[:ids]).delete_all + writing_journals = WritingJournal.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_journal_back_end_writing_journals_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/plugin/writing_journals_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/plugin/writing_journals_controller.rb index 133fb480a..c77231283 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/plugin/writing_journals_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/plugin/writing_journals_controller.rb @@ -147,7 +147,7 @@ class Panel::PersonalJournal::Plugin::WritingJournalsController < OrbitBackendCo def delete if params[:ids] - writing_journals = WritingJournal.any_in(:_id => params[:ids]).delete_all + writing_journals = WritingJournal.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_journal_plugin_writing_journals_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/back_end/labs_controller.rb b/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/back_end/labs_controller.rb index d0eef6449..45f8601e6 100644 --- a/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/back_end/labs_controller.rb +++ b/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/back_end/labs_controller.rb @@ -152,7 +152,7 @@ class Panel::PersonalLab::BackEnd::LabsController < OrbitBackendController def delete if params[:ids] - labs = Lab.any_in(:_id => params[:ids]).delete_all + labs = Lab.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_lab_back_end_labs_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/plugin/labs_controller.rb b/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/plugin/labs_controller.rb index 8910dd7c5..1a2f7452e 100644 --- a/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/plugin/labs_controller.rb +++ b/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/plugin/labs_controller.rb @@ -142,7 +142,7 @@ class Panel::PersonalLab::Plugin::LabsController < OrbitBackendController def delete if params[:ids] - labs = Lab.any_in(:_id => params[:ids]).delete_all + labs = Lab.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_lab_plugin_labs_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb b/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb index 479dc01ce..62af4c09a 100644 --- a/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb +++ b/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb @@ -213,7 +213,7 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon def delete if params[:ids] - writing_patents = WritingPatent.any_in(:_id => params[:ids]).delete_all + writing_patents = WritingPatent.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_patent_back_end_writing_patents_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/plugin/writing_patents_controller.rb b/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/plugin/writing_patents_controller.rb index da64ecd70..1b2811e9c 100644 --- a/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/plugin/writing_patents_controller.rb +++ b/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/plugin/writing_patents_controller.rb @@ -141,7 +141,7 @@ class Panel::PersonalPatent::Plugin::WritingPatentsController < OrbitBackendCont def delete if params[:ids] - writing_patents = WritingPatent.any_in(:_id => params[:ids]).delete_all + writing_patents = WritingPatent.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_patent_plugin_writing_patents_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/back_end/projects_controller.rb b/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/back_end/projects_controller.rb index c0cf14917..c28f2c278 100644 --- a/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/back_end/projects_controller.rb +++ b/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/back_end/projects_controller.rb @@ -213,7 +213,7 @@ class Panel::PersonalProject::BackEnd::ProjectsController < OrbitBackendControll def delete if params[:ids] - projects = Project.any_in(:_id => params[:ids]).delete_all + projects = Project.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_project_back_end_projects_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/plugin/projects_controller.rb b/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/plugin/projects_controller.rb index 2b46c2085..d3501cf6a 100644 --- a/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/plugin/projects_controller.rb +++ b/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/plugin/projects_controller.rb @@ -141,7 +141,7 @@ class Panel::PersonalProject::Plugin::ProjectsController < OrbitBackendControlle def delete if params[:ids] - projects = Project.any_in(:_id => params[:ids]).delete_all + projects = Project.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_project_plugin_projects_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/back_end/researchs_controller.rb b/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/back_end/researchs_controller.rb index 4d89f1c15..e4fa8e428 100644 --- a/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/back_end/researchs_controller.rb +++ b/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/back_end/researchs_controller.rb @@ -140,7 +140,7 @@ class Panel::PersonalResearch::BackEnd::ResearchsController < OrbitBackendContro def delete if params[:ids] - researchs = Research.any_in(:_id => params[:ids]).delete_all + researchs = Research.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_research_back_end_researchs_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/plugin/researchs_controller.rb b/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/plugin/researchs_controller.rb index b14c62f77..a4945ab2d 100644 --- a/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/plugin/researchs_controller.rb +++ b/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/plugin/researchs_controller.rb @@ -127,7 +127,7 @@ class Panel::PersonalResearch::Plugin::ResearchsController < OrbitBackendControl def delete if params[:ids] - researchs = Research.any_in(:_id => params[:ids]).delete_all + researchs = Research.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_personal_research_plugin_researchs_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end diff --git a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/back_end/web_links_controller.rb b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/back_end/web_links_controller.rb index a5e2419f7..88730883e 100644 --- a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/back_end/web_links_controller.rb +++ b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/back_end/web_links_controller.rb @@ -128,7 +128,7 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController def delete if params[:ids] - web_links = WebLink.any_in(:_id => params[:ids]).delete_all + web_links = WebLink.any_in(:_id => params[:ids]).destroy_all end redirect_to panel_web_resource_back_end_web_links_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) end From f36bcb8801cbed583d6c91e811c8e43e70d7956c Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 5 Feb 2013 18:38:09 +0800 Subject: [PATCH 16/53] Put missing changes for breadcrumb in page edit --- lib/parsers/parser_common.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index d25912009..cd6d9125c 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -150,17 +150,20 @@ module ParserCommon ancestors = Page.find(page.id).ancestors_and_self rescue nil ancestors.delete_at(0) res = '' - if ancestors - res << "
" - res << "
    " - ancestors.each do |node| - res << "
  • " - res << "#{node.title}" + res << "" - res << "
" end fragment = Nokogiri::HTML::DocumentFragment.new(body, res) breadcrumb.swap(fragment) From 17ac564fbb634bb67f9c3d50e38256871291f1d9 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 12:12:23 +0800 Subject: [PATCH 17/53] Fix sitemap nil Fix namespace of role in subrole --- app/controllers/admin/sub_roles_controller.rb | 2 +- app/models/item.rb | 4 ++-- lib/tasks/migrate.rake | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/sub_roles_controller.rb b/app/controllers/admin/sub_roles_controller.rb index e39f783df..f28149eae 100644 --- a/app/controllers/admin/sub_roles_controller.rb +++ b/app/controllers/admin/sub_roles_controller.rb @@ -1,4 +1,4 @@ -class Admin::SubRolesController < RolesController +class Admin::SubRolesController < Admin::RolesController end diff --git a/app/models/item.rb b/app/models/item.rb index a670435f2..17880e4a4 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -12,7 +12,7 @@ class Item field :enabled_for, :type => Array, :default => nil field :menu_enabled_for, :type => Array, :default => nil field :title, localize: true - field :sitemap_enabled, :type => Hash + field :sitemap_enabled, :type => Hash, :default => {} validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/ @@ -57,7 +57,7 @@ class Item end def show_in_sitemap_for(locale) - if sitemap_enabled && !sitemap_enabled[locale].blank? + if !sitemap_enabled.blank? && !sitemap_enabled[locale].blank? sitemap_enabled[locale].eql?('true') ? true : false else true diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index 0c7d6148c..bb92e72e7 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -307,7 +307,7 @@ namespace :migrate do task :sitemap_i18n => :environment do Item.all.each do |item| - item.sitemap_enabled = item.sitemap_enabled ? {'en' => 'true', 'zh_tw' => 'true'} : nil + item.sitemap_enabled = item.sitemap_enabled ? {'en' => 'true', 'zh_tw' => 'true'} : {} item.save end end From 1f11293fbeae353d78f2822a2cc89aa166e88227 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 12:28:10 +0800 Subject: [PATCH 18/53] Fix sitemap in page edit --- .../admin/sites/sitemap_frontend.html.erb | 23 ------------------- lib/parsers/parser_common.rb | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 app/views/admin/sites/sitemap_frontend.html.erb diff --git a/app/views/admin/sites/sitemap_frontend.html.erb b/app/views/admin/sites/sitemap_frontend.html.erb deleted file mode 100644 index bf126c90d..000000000 --- a/app/views/admin/sites/sitemap_frontend.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -
- <% @items.each_with_index do |item, i| %> -
-

<%= i+1 %> <%= item.title %>

-
    - <% item.children.each_with_index do |child, ii| %> -
  • <%= "#{i+1}-#{ii+1}" %> <%= child.title %>
  • - <% end if item.children %> -
-
- <% end %> -
- -<%= javascript_include_tag "lib/jquery.masonry.min.js" %> - \ No newline at end of file diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index cd6d9125c..26e6a57dd 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -214,7 +214,7 @@ module ParserCommon # sitemap def parse_sitemaps_edit(body = nil, page = nil, edit=nil) sitemap = body.css('sitemap').first - url = admin_site_sitemap_frontend_path(@site) + url = front_show_sitemap_path options = "?inner=true" fragment = Nokogiri::HTML::DocumentFragment.new(body, "
") sitemap.swap(fragment) From 236f68ba84ca136a9fc6c28cb010b7c86bafa294 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 16:26:17 +0800 Subject: [PATCH 19/53] Fix archive module back end pagination and front end html --- .../back_end/archive_files_controller.rb | 1 + .../app/models/archive_file_category.rb | 4 ++++ ...e_files.html.erb => _archive_file.html.erb} | 18 +++++++++--------- .../back_end/archive_files/index.html.erb | 13 +++++-------- .../back_end/archive_files/index.js.erb | 2 ++ .../front_end/archive_files/index.html.erb | 18 +++++++++--------- .../built_in_modules/archive/config/routes.rb | 1 - 7 files changed, 30 insertions(+), 27 deletions(-) rename vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/{_archive_files.html.erb => _archive_file.html.erb} (53%) create mode 100644 vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.js.erb diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb index 3d3a6b21e..41a4fb1a9 100644 --- a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb +++ b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb @@ -13,6 +13,7 @@ class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController respond_to do |format| format.html # index.html.erb + format.js format.xml { render :xml => @archive_files } end end diff --git a/vendor/built_in_modules/archive/app/models/archive_file_category.rb b/vendor/built_in_modules/archive/app/models/archive_file_category.rb index f3d2fcd95..cd1a011f4 100644 --- a/vendor/built_in_modules/archive/app/models/archive_file_category.rb +++ b/vendor/built_in_modules/archive/app/models/archive_file_category.rb @@ -12,5 +12,9 @@ class ArchiveFileCategory has_many :archive_files validates :title, :at_least_one => true + + def self.from_id(id) + ArchiveFileCategory.find(id) rescue nil + end end \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_files.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_file.html.erb similarity index 53% rename from vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_files.html.erb rename to vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_file.html.erb index 36d57f4ee..2246d5254 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_files.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_file.html.erb @@ -1,30 +1,30 @@ - + - <% if post.is_top? %> + <% if archive_file.is_top? %> <%= t(:top) %> <% end %> - <% if post.is_hot? %> + <% if archive_file.is_hot? %> <%= t(:hot) %> <% end %> - <% if post.is_hidden? %> + <% if archive_file.is_hidden? %> <%= t(:hidden) %> <% end %> <% if is_manager?%>
<%end%> - <%= post.archive_file_category.title %> + <%= archive_file.archive_file_category.title %> - <%= link_to post.title, panel_archive_front_end_archive_file_path(post) %> + <%= link_to archive_file.title, panel_archive_front_end_archive_file_path(archive_file) %> - <% post.tags.each do |tag| %> + <% archive_file.tags.each do |tag| %> <%= tag[I18n.locale] %> <% end %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb index d1bfa6c16..dd54bcb59 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb @@ -10,14 +10,11 @@ <%= t('archive_file.tags') %> - - - <% @archive_files.each do |post| %> - <%= render :partial => 'archive_files', :locals => {:post => post} %> - <% end %> - + + <%= render :partial => 'archive_file', :collection => @archive_files %> -<%= paginate @archive_files %> - +
+ <%= paginate @archive_files %> +
diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.js.erb new file mode 100644 index 000000000..7608ab331 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.js.erb @@ -0,0 +1,2 @@ +$("#tbody_archive").html("<%= j render :partial => 'archive_file', :collection => @archive_files %>"); +$("#archive_pagination").html("<%= j paginate @archive_files %>"); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.html.erb index cfcf47f92..2fa343897 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.html.erb @@ -4,17 +4,17 @@ <%#= paginate @archive_files, :params => {:inner => false}%> -<% if @title %> -

<%= @title %>

-<% end %> +<%# if @title %> + +<%# end %> -
    - <% @archive_file_categorys.each do |afcpost| %> -
  • <%= link_to afcpost.title, panel_archive_front_end_archive_files_path(:category_id => afcpost.id) %>
  • - <% end %> -
+ + <%# @archive_file_categorys.each do |afcpost| %> + + <%# end %> + -

<%= @archive_files.first.archive_file_category.title rescue nil %>

+

<%= @current_category.title rescue nil %>

<% @archive_files.each do |post| %> diff --git a/vendor/built_in_modules/archive/config/routes.rb b/vendor/built_in_modules/archive/config/routes.rb index ad23d554d..ea923bba1 100644 --- a/vendor/built_in_modules/archive/config/routes.rb +++ b/vendor/built_in_modules/archive/config/routes.rb @@ -3,7 +3,6 @@ Rails.application.routes.draw do namespace :panel do namespace :archive do namespace :back_end do - root :to => "archive_files#index" resources :archive_files resources :archive_file_categorys resources :tags From c7cf58758144c860f7a604a985f6a43f38c878f7 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 16:28:05 +0800 Subject: [PATCH 20/53] Fix web links html and index query --- app/views/front/show_page_sub_menu.html.erb | 2 +- .../front_end/web_links_controller.rb | 15 +++++++++++--- .../app/models/web_link_category.rb | 4 ++++ .../front_end/web_links/index.html.erb | 20 +++++++------------ 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/app/views/front/show_page_sub_menu.html.erb b/app/views/front/show_page_sub_menu.html.erb index ebe51f73c..9f985d3cf 100644 --- a/app/views/front/show_page_sub_menu.html.erb +++ b/app/views/front/show_page_sub_menu.html.erb @@ -1,6 +1,6 @@ <% if @menu_page && @menu_page.visible_children.size > 0 %>
-

<%= @menu_page.title %>

+
    <% @menu_page.visible_children.each do |child| %>
  • diff --git a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/front_end/web_links_controller.rb b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/front_end/web_links_controller.rb index 9b0698a8e..f99ce86b6 100644 --- a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/front_end/web_links_controller.rb +++ b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/front_end/web_links_controller.rb @@ -10,11 +10,20 @@ class Panel::WebResource::FrontEnd::WebLinksController < OrbitWidgetController def index - date_now = Time.now + date_now = Time.now - @web_links = WebLink.where( :is_hidden => false ).desc(:is_top, :title).page(params[:page]).per(10) + if !params[:category_id].blank? + @web_links = WebLink.where( :is_hidden => false ).where(:web_link_category_id => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(10) + @current_category = WebLinkCategory.from_id(params[:category_id]) rescue nil + elsif !params[:tag_id].blank? + @tag = WebResourceTag.find(params[:tag_id]) rescue nil + @tag = WebResourceTag.where(key: params[:tag_id])[0] unless @tag + @web_links = @tag.archive_files.where( :is_hidden => false ).desc( :is_top ).page( params[:page_main] ).per(10) + else + @web_links = WebLink.where( :is_hidden => false ).desc( :is_top ).page( params[:page_main] ).per(10) + end - get_categorys + get_categorys end def show diff --git a/vendor/built_in_modules/web_resource/app/models/web_link_category.rb b/vendor/built_in_modules/web_resource/app/models/web_link_category.rb index 57f01981f..0b2d3bc68 100644 --- a/vendor/built_in_modules/web_resource/app/models/web_link_category.rb +++ b/vendor/built_in_modules/web_resource/app/models/web_link_category.rb @@ -20,4 +20,8 @@ class WebLinkCategory title end + def self.from_id(id) + WebLinkCategory.find(id) rescue nil + end + end \ No newline at end of file diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb index ed145646b..cd5b480d6 100644 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb @@ -2,29 +2,23 @@ <%= flash_messages %> -<%= paginate @web_links, :params => {:inner => false}%> - -

    <%= t('web_link.list_web_resource') %>

    - + +

    <%= @current_category.title rescue nil %>

    - - + + <% @web_links.each do |post| %> - - + + <% end %>
    <%= t(:category) %><%= t(:name) %><%= t(:category) %><%= t(:name) %>
    <%= post.web_link_category.title rescue nil %> - <%#= link_to post.title, panel_web_resource_front_end_web_link_path(post) %> - <%= link_to post.title, post.url, {:target => '_blank', :title => post.title} %> - <%= post.web_link_category.title rescue nil %><%= link_to post.title, post.url, {:target => '_blank', :title => post.title} %>
    -
    - +<%= paginate @web_links, :param_name => :page_main, :params => {:inner => false}%> From 0cacfb7c05dabe47f5dad45a70153f95fc64c08f Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 18:14:24 +0800 Subject: [PATCH 21/53] Fix path error in parser for breadcrumb --- lib/parsers/parser_front_end.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index e706e5cc9..385b4f82f 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -98,7 +98,7 @@ module ParserFrontEnd page_breadcrumb = body.css('.page_breadcrumb').first if page_breadcrumb res = "
    " - res << "
    " + res << "
    " res << "
    " fragment = Nokogiri::HTML::DocumentFragment.new(body, res) page_breadcrumb.swap(fragment) From a9fecec98532f3775a22819ffb9bfa7acafc4b0d Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 18:20:45 +0800 Subject: [PATCH 22/53] Add pagination to default widget for front end page --- app/controllers/default_widget_controller.rb | 23 ++++++++++------ app/controllers/pages_controller.rb | 26 +++++++++++-------- .../{typeA.html.erb => _typeA.html.erb} | 0 .../{typeB.html.erb => _typeB.html.erb} | 0 .../{typeC.html.erb => _typeC.html.erb} | 0 .../default_widget/default_widget.html.erb | 4 +++ config/routes.rb | 4 ++- 7 files changed, 37 insertions(+), 20 deletions(-) rename app/views/default_widget/{typeA.html.erb => _typeA.html.erb} (100%) rename app/views/default_widget/{typeB.html.erb => _typeB.html.erb} (100%) rename app/views/default_widget/{typeC.html.erb => _typeC.html.erb} (100%) create mode 100644 app/views/default_widget/default_widget.html.erb diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index 3f8c87594..c274062e0 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -12,31 +12,38 @@ class DefaultWidgetController< OrbitWidgetController def default_widget if !params[:id].blank? - redirect_to eval("#{@page_part.module_app.widget_fields_link_method['title']['method']}('#{params[:id]}', {inner: true})") + redirect_to eval("#{@page_part.module_app.widget_fields_link_method['title']['method']}('#{params[:id]}', {inner: #{params[:inner] || true}})") else @tag_class = nil @default_widget = @page_part.module_app.get_default_widget @widget_image_field = @default_widget["image"] || @default_widget[:image] - data_limit = case @page_part + case @page_part when Page @fields = @page_part.frontend_field - @page_part.frontend_data_count.is_a?(Fixnum) ? @page_part.frontend_data_count : (@page_part.frontend_data_count.to_i rescue 3) + @data_limit = @page_part.frontend_data_count.is_a?(Fixnum) ? @page_part.frontend_data_count : (@page_part.frontend_data_count.to_i rescue 3) + @paginate = true + @page_id = @page_part.id when PagePart @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) + @data_limit = @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).desc(:created_at) + if @paginate + @data = eval(@default_widget["query"]).includes(@widget_image_field).page(params[:page_main]).per(@data_limit).desc(:created_at) + else + @data = eval(@default_widget["query"]).limit(@data_limit).includes(@widget_image_field).desc(:created_at) + end + case params[:type] when "typeA" @tag_class = 'default_widget_typeA' - render "typeA" + @partial = "typeA" when /typeB_/ @tag_class = "default_widget_#{params[:type]}" - render "typeB" + @partial = "typeB" when "typeC" @tag_class = 'default_widget_typeC' - render "typeC" + @partial = "typeC" end end end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 4d84d9c9d..ece047f12 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -64,18 +64,22 @@ class PagesController < ApplicationController protected def get_item - module_app = ModuleApp.first(:conditions => {:key => params[:app_name]}) - if !params[:category_id].blank? && !params[:tag_id].blank? - @item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => params[:tag_id]}) - @item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => ''}) unless @item - elsif !params[:category_id].blank? - @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action], category: params[:category_id]).any_in(tag: [nil,'']).first - elsif !params[:tag_id].blank? - @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action], tag: params[:tag_id]).any_in(category: [nil,'']).first + if params[:same_page_id] + @item = Item.find(params[:same_page_id]) + else + module_app = ModuleApp.first(:conditions => {:key => params[:app_name]}) + if !params[:category_id].blank? && !params[:tag_id].blank? + @item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => params[:tag_id]}) + @item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => ''}) unless @item + elsif !params[:category_id].blank? + @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action], category: params[:category_id]).any_in(tag: [nil,'']).first + elsif !params[:tag_id].blank? + @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action], tag: params[:tag_id]).any_in(category: [nil,'']).first + end + @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).all_of("tag" => {"$in" => [nil,'']},"category" => { "$in" => [nil,'']}).first unless @item + @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).first unless @item + @item = Item.where(module_app_id: module_app.id, app_frontend_url: 'default_widget').first unless @item end - @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).all_of("tag" => {"$in" => [nil,'']},"category" => { "$in" => [nil,'']}).first unless @item - @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).first unless @item - @item = Item.where(module_app_id: module_app.id, app_frontend_url: 'default_widget').first unless @item raise PageError,'Missing Frontend Page' if @item.nil? end diff --git a/app/views/default_widget/typeA.html.erb b/app/views/default_widget/_typeA.html.erb similarity index 100% rename from app/views/default_widget/typeA.html.erb rename to app/views/default_widget/_typeA.html.erb diff --git a/app/views/default_widget/typeB.html.erb b/app/views/default_widget/_typeB.html.erb similarity index 100% rename from app/views/default_widget/typeB.html.erb rename to app/views/default_widget/_typeB.html.erb diff --git a/app/views/default_widget/typeC.html.erb b/app/views/default_widget/_typeC.html.erb similarity index 100% rename from app/views/default_widget/typeC.html.erb rename to app/views/default_widget/_typeC.html.erb diff --git a/app/views/default_widget/default_widget.html.erb b/app/views/default_widget/default_widget.html.erb new file mode 100644 index 000000000..b134d8ad5 --- /dev/null +++ b/app/views/default_widget/default_widget.html.erb @@ -0,0 +1,4 @@ +<%= render @partial %> +<% if @paginate %> + <%= paginate @data, :param_name => :page_main, :params => {:same_page_id => @page_id} %> +<% end %> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index ad58dd120..e65f5dea4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -274,7 +274,9 @@ Orbit::Application.routes.draw do root :to => 'mobile#index', :as => 'mobile' end - + match '/panel/orbit_app/widget/:type' => 'pages#index_from_link', :constraints => lambda { |request| + request.query_string.include?("same_page_id=") + } match '/panel/orbit_app/widget/:type' => 'default_widget#default_widget' From 5a177f34a8db0b74485282591202c827c38cc5c1 Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Wed, 6 Feb 2013 19:51:53 +0800 Subject: [PATCH 23/53] default widget query for category and tags --- app/controllers/default_widget_controller.rb | 25 +++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index c274062e0..90d8cf3d3 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -10,6 +10,24 @@ class DefaultWidgetController< OrbitWidgetController @page_part.module_app.enable_frontend? end + def query_for_default_widget + ori_class_name = @default_widget["query"].split('.')[0] + result = nil + if !params["tag_id"].blank? + @tag = Tag.find(params["tag_id"]) rescue nil + if params["category_id"].blank? + result = @tag.send(ori_class_name.downcase.pluralize) + else + result = @tag.send(ori_class_name.downcase.pluralize).where(:category_id=>params["category_id"]) + end + elsif params["category_id"].blank? + result = eval(@default_widget["query"]) + else + result = eval("#{ori_class_name}.where(:category_id=>params['category_id'])") + end + result.available_for_lang(I18n.locale).can_display + end + def default_widget if !params[:id].blank? redirect_to eval("#{@page_part.module_app.widget_fields_link_method['title']['method']}('#{params[:id]}', {inner: #{params[:inner] || true}})") @@ -29,11 +47,16 @@ class DefaultWidgetController< OrbitWidgetController @data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3) end if @paginate +<<<<<<< HEAD @data = eval(@default_widget["query"]).includes(@widget_image_field).page(params[:page_main]).per(@data_limit).desc(:created_at) else @data = eval(@default_widget["query"]).limit(@data_limit).includes(@widget_image_field).desc(:created_at) +======= + @data = query_for_default_widget.includes(@widget_image_field).page(params[:page_main]).per(@data_limit) + else + @data = query_for_default_widget.limit(@data_limit).includes(@widget_image_field) +>>>>>>> 4650f80... default widget query for category and tags end - case params[:type] when "typeA" @tag_class = 'default_widget_typeA' From c27141ff5a911783344a7ee5e3846083aaa995f8 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 20:28:06 +0800 Subject: [PATCH 24/53] Fix query for category in default widget --- app/controllers/default_widget_controller.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index 90d8cf3d3..c6bf9d27b 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -23,7 +23,7 @@ class DefaultWidgetController< OrbitWidgetController elsif params["category_id"].blank? result = eval(@default_widget["query"]) else - result = eval("#{ori_class_name}.where(:category_id=>params['category_id'])") + result = eval("#{ori_class_name}.where(get_category_field_name(ori_class_name) => params['category_id'])") end result.available_for_lang(I18n.locale).can_display end @@ -47,15 +47,9 @@ class DefaultWidgetController< OrbitWidgetController @data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3) end if @paginate -<<<<<<< HEAD @data = eval(@default_widget["query"]).includes(@widget_image_field).page(params[:page_main]).per(@data_limit).desc(:created_at) else @data = eval(@default_widget["query"]).limit(@data_limit).includes(@widget_image_field).desc(:created_at) -======= - @data = query_for_default_widget.includes(@widget_image_field).page(params[:page_main]).per(@data_limit) - else - @data = query_for_default_widget.limit(@data_limit).includes(@widget_image_field) ->>>>>>> 4650f80... default widget query for category and tags end case params[:type] when "typeA" @@ -71,4 +65,11 @@ class DefaultWidgetController< OrbitWidgetController end end + def get_category_field_name(ori_class_name) + ori_class_name = ori_class_name.constantize + ori_class_name.fields.each_key do |key| + return key if key.include?('category_id') + end + nil + end end From b049e16634437b6a5bc2ed8c04e6ff924a7008d9 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 21:05:17 +0800 Subject: [PATCH 25/53] Create part and save pages when layout is edited --- app/models/page.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/page.rb b/app/models/page.rb index bc257eaa1..1f13d64cf 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -27,6 +27,11 @@ class Page < Item before_save :create_parts, if: Proc.new { |page| page.new_record? || page.design_id_changed? } before_save :delete_empty_frontend_field, :generate_html + def generate_parts + create_parts + self.save + end + protected def create_parts From f5728a4f9202b5c81fe65f7be8d5e5c250e84f4b Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Feb 2013 21:06:08 +0800 Subject: [PATCH 26/53] Enable designer to add the class "page_breadcrumb" --- lib/parsers/parser_front_end.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index 385b4f82f..94f7cc656 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -97,9 +97,7 @@ module ParserFrontEnd def parse_breadcrumb(body, page, site) page_breadcrumb = body.css('.page_breadcrumb').first if page_breadcrumb - res = "
    " - res << "
    " - res << "
    " + res = "" fragment = Nokogiri::HTML::DocumentFragment.new(body, res) page_breadcrumb.swap(fragment) else From 324ab266af1ccb03eef3eed4e6509415ceafb624 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 7 Feb 2013 16:48:12 +0800 Subject: [PATCH 27/53] Fix query in default widget for tags --- app/controllers/default_widget_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index c6bf9d27b..780453bd1 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -18,7 +18,7 @@ class DefaultWidgetController< OrbitWidgetController if params["category_id"].blank? result = @tag.send(ori_class_name.downcase.pluralize) else - result = @tag.send(ori_class_name.downcase.pluralize).where(:category_id=>params["category_id"]) + result = @tag.send(ori_class_name.downcase.pluralize).where(get_category_field_name(ori_class_name) => params['category_id']) end elsif params["category_id"].blank? result = eval(@default_widget["query"]) From bc21840262c43ef7fa9231a555093ab67634503e Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 7 Feb 2013 16:55:23 +0800 Subject: [PATCH 28/53] Comment out delete link for archive category Modify the import: - hot_news to announcement - iso_zone of 20000 to 21100 --- lib/tasks/migrate.rake | 316 +----------------- .../_archive_file_category.html.erb | 2 +- 2 files changed, 14 insertions(+), 304 deletions(-) diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index bb92e72e7..fcb979be8 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -1,309 +1,6 @@ # encoding: utf-8 namespace :migrate do - - task :i18n => :environment do - - p 'Start Bulletin' - bulletins = Bulletin.admin_manager_all - i = 1 - bulletins.each do |bulletin| - p "#{i}/#{bulletins.size} - #{bulletin.id}" - title = I18nVariable.first(:conditions => {:key => 'title', :language_value_id => bulletin.id, :language_value_type => bulletin.class}) - bulletin.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - subtitle = I18nVariable.first(:conditions => {:key => 'subtitle', :language_value_id => bulletin.id, :language_value_type => bulletin.class}) - bulletin.subtitle_translations = {'en' => subtitle['en'], 'zh_tw' => subtitle['zh_tw']} if subtitle - text = I18nVariable.first(:conditions => {:key => 'text', :language_value_id => bulletin.id, :language_value_type => bulletin.class}) - bulletin.text_translations = {'en' => text['en'], 'zh_tw' => text['zh_tw']} if text - p bulletin.save(:validate => false) - i += 1 - end - p 'End Bulletin' - - p '=====================================================' - - p 'Start BulletinCategory' - categories = BulletinCategory.admin_manager_all - i = 1 - categories.each do |category| - p "#{i}/#{categories.size} - #{category.id}" - title = I18nVariable.first(:conditions => {:language_value_id => category.id, :language_value_type => category.class}) - category.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p category.save(:validate => false) - i += 1 - end - p 'End BulletinCategory' - - p '=====================================================' - - p 'Start BulletinFile' - files = BulletinFile.all - i = 1 - files.each do |file| - p "#{i}/#{files.size} - #{file.id}" - description = I18nVariable.first(:conditions => {:language_value_id => file.id, :language_value_type => file.class}) - file.description_translations = {'en' => description['en'], 'zh_tw' => description['zh_tw']} if description - title = I18nVariable.first(:conditions => {:language_value_id => file.id, :language_value_type => file.class}) - file.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p file.save(:validate => false) - i += 1 - end - p 'End BulletinFile' - - p '=====================================================' - - p 'Start BulletinLink' - links = BulletinLink.all - i = 1 - links.each do |link| - p "#{i}/#{links.size} - #{link.id}" - title = I18nVariable.first(:conditions => {:language_value_id => link.id, :language_value_type => link.class}) - link.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p link.save(:validate => false) - i += 1 - end - p 'End BulletinLink' - - p '=====================================================' - - p 'Start UnitListForAnc' - units = UnitListForAnc.all - i = 1 - units.each do |unit| - p "#{i}/#{units.size} - #{unit.id}" - title = I18nVariable.first(:conditions => {:language_value_id => unit.id, :language_value_type => unit.class}) - unit.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p unit.save(:validate => false) - i += 1 - end - p 'End UnitListForAnc' - - p '=====================================================' - p '=====================================================' - - p 'Start PageContext' - page_contexts = PageContext.all - i = 1 - page_contexts.each do |page_context| - p "#{i}/#{page_contexts.size} - #{page_context.id}" - context = I18nVariable.first(:conditions => {:language_value_id => page_context.id, :language_value_type => page_context.class}) - page_context.context_translations = {'en' => context['en'], 'zh_tw' => context['zh_tw']} if context - p page_context.save(:validate => false) - i += 1 - end - p 'End PageContext' - - p '=====================================================' - p '=====================================================' - - p 'Start WebLink' - links = WebLink.all - i = 1 - links.each do |link| - p "#{i}/#{links.size} - #{link.id}" - # the original key was 'name' - title = I18nVariable.first(:conditions => {:key => 'name', :language_value_id => link.id, :language_value_type => link.class}) - link.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - context = I18nVariable.first(:conditions => {:key => 'context', :language_value_id => link.id, :language_value_type => link.class}) - link.context_translations = {'en' => context['en'], 'zh_tw' => context['zh_tw']} if context - p link.save(:validate => false) - i += 1 - end - p 'End WebLink' - - p '=====================================================' - - p 'Start WebLinkCategory' - categories = WebLinkCategory.admin_manager_all - i = 1 - categories.each do |category| - p "#{i}/#{categories.size} - #{category.id}" - title = I18nVariable.first(:conditions => {:language_value_id => category.id, :language_value_type => category.class}) - category.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p category.save(:validate => false) - i += 1 - end - p 'End WebLinkCategory' - - p '=====================================================' - p '=====================================================' - - p 'Start Meta' - metas = Meta.all - i = 1 - metas.each do |meta| - p "#{i}/#{metas.size} - #{meta.id}" - title = I18nVariable.first(:conditions => {:language_value_id => meta.id, :language_value_type => meta.class}) - meta.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p meta.save(:validate => false) - i += 1 - end - p 'End Meta' - - p '=====================================================' - p '=====================================================' - - p 'Start Attribute' - attributes = Attribute.all - i = 1 - attributes.each do |attribute| - p "#{i}/#{attributes.size} - #{attribute.id}" - title = I18nVariable.first(:conditions => {:language_value_id => attribute.id, :language_value_type => attribute.class}) - attribute.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p attribute.save(:validate => false) - i += 1 - end - p 'End Attribute' - - p '=====================================================' - - p 'Start AttributeField' - attribute_fields = AttributeField.all - i = 1 - attribute_fields.each do |attribute_field| - p "#{i}/#{attribute_fields.size} - #{attribute_field.id}" - title = I18nVariable.first(:conditions => {:language_value_id => attribute_field.id, :language_value_type => attribute_field.class}) - attribute_field.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p attribute_field.save(:validate => false) - i += 1 - end - p 'End AttributeField' - - p '=====================================================' - - p 'Start Role' - roles = Role.all - i = 1 - roles.each do |role| - p "#{i}/#{roles.size} - #{role.id}" - title = I18nVariable.first(:conditions => {:language_value_id => role.id, :language_value_type => role.class}) - role.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p role.save(:validate => false) - i += 1 - end - p 'End Role' - - p '=====================================================' - p '=====================================================' - - p 'Start AdImage' - ad_images = AdImage.all - i = 1 - ad_images.each do |image| - p "#{i}/#{ad_images.size} - #{image.id}" - # no key is set and title = context, this is due to original error in the code - title = I18nVariable.first(:conditions => {:language_value_id => image.id, :language_value_type => image.class}) - image.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - image.context_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p image.save(:validate => false) - i += 1 - end - p 'End AdImage' - - p '=====================================================' - p '=====================================================' - - p 'Start Asset' - assets = Asset.all - i = 1 - assets.each do |asset| - p "#{i}/#{assets.size} - #{asset.id}" - title = I18nVariable.first(:conditions => {:key => 'title', :language_value_id => asset.id, :language_value_type => asset.class}) - asset.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - description = I18nVariable.first(:conditions => {:key => 'description', :language_value_id => asset.id, :language_value_type => asset.class}) - asset.description_translations = {'en' => description['en'], 'zh_tw' => description['zh_tw']} if description - p asset.save(:validate => false) - i += 1 - end - p 'End Asset' - - p '=====================================================' - - p 'Start AssetCategory' - categories = AssetCategory.all - i = 1 - categories.each do |category| - p "#{i}/#{categories.size} - #{category.id}" - title = I18nVariable.first(:conditions => {:language_value_id => category.id, :language_value_type => category.class}) - category.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p category.save(:validate => false) - i += 1 - end - p 'End AssetCategory' - - p '=====================================================' - p '=====================================================' - - p 'Start Item' - items = Item.all - i = 1 - items.each do |item| - p "#{i}/#{items.size} - #{item.id}" - title = I18nVariable.first(:conditions => {:language_value_id => item.id, :language_value_type => item.class}) - item.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p item.save(:validate => false) - i += 1 - end - p 'End Item' - - p '=====================================================' - - p 'Start Page' - pages = Page.all - i = 1 - pages.each do |item| - p "#{i}/#{pages.size} - #{item.id}" - # the key was originally 'title', changed to 'page_title' to avoit conflict with parent - title = I18nVariable.first(:conditions => {:key => 'title', :language_value_id => item.id, :language_value_type => item.class}) - item.page_title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - p item.save(:validate => false) - i += 1 - end - p 'End Page' - - p '=====================================================' - - p 'Start PagePart' - page_parts = PagePart.all - i = 1 - page_parts.each do |part| - p "#{i}/#{page_parts.size} - #{part.id}" - title = I18nVariable.first(:conditions => {:key => 'title', :language_value_id => part.id, :language_value_type => part.class}) - part.page_title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - content = I18nVariable.first(:conditions => {:key => 'i18n_variable', :language_value_id => part.id, :language_value_type => part.class}) - part.content_translations = {'en' => content['en'], 'zh_tw' => content['zh_tw']} if content - p part.save(:validate => false) - i += 1 - end - p 'End PagePart' - - p '=====================================================' - p '=====================================================' - - p 'Start Site' - site = Site.first - title = I18nVariable.first(:conditions => {:key => 'title', :language_value_id => site.id, :language_value_type => site.class}) - site.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title - footer = I18nVariable.first(:conditions => {:key => 'footer', :language_value_id => site.id, :language_value_type => site.class}) - site.footer_translations = {'en' => footer['en'], 'zh_tw' => footer['zh_tw']} if footer - sub_menu = I18nVariable.first(:conditions => {:key => 'sub_menu', :language_value_id => site.id, :language_value_type => site.class}) - site.sub_menu_translations = {'en' => sub_menu['en'], 'zh_tw' => sub_menu['zh_tw']} if sub_menu - p site.save(:validate => false) - p 'End Site' - - end - - - task :news_p => :environment do - news_bulletins = NewsBulletin.admin_manager_all rescue nil - i = 1 - news_bulletins.each do |news| - p "#{i}/#{news_bulletins.size} - #{news.id}" - news.subtitle_translations = {'en' => (news.subtitle_translations['en'].gsub(/^\/, '').gsub(/\<\/p\>$/, '') rescue ''), 'zh_tw' => (news.subtitle_translations['zh_tw'].gsub(/^\/, '').gsub(/\<\/p\>$/, '') rescue nil)} - p news.save(:validate => false) if news.changed? - i += 1 - end if news_bulletins - end task :sitemap_i18n => :environment do Item.all.each do |item| @@ -498,4 +195,17 @@ namespace :migrate do PagePart.where(widget_style: /\d/).each{|part| part.update_attributes({widget_style: nil, widget_field: nil})} end + task :delete_import_archive => :environment do + categories = ArchiveFileCategory.where(key: /import_/).entries + unless categories.blank? + categories.each do |category| + files = category.archive_files + unless files.blank? + files.each(&:destroy) + end + category.destroy + end + end + end + end diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb index f92168ad5..9022282a0 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb @@ -6,7 +6,7 @@
    From 25d9a3d9b937d63edaee595f706fb90f271eff59 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 7 Feb 2013 17:09:02 +0800 Subject: [PATCH 29/53] Add home to breadcrum --- app/controllers/front_controller.rb | 1 - lib/parsers/parser_common.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/app/controllers/front_controller.rb b/app/controllers/front_controller.rb index 686c504ec..4158bf155 100644 --- a/app/controllers/front_controller.rb +++ b/app/controllers/front_controller.rb @@ -4,7 +4,6 @@ class FrontController < ApplicationController def show_breadcrumb @ancestors = Page.find(params[:id]).ancestors_and_self - @ancestors.delete_at(0) end def show_banner diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 26e6a57dd..491b7a4e3 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -148,7 +148,6 @@ module ParserCommon def parse_breadcrumbs_edit(body = nil, page = nil, edit=nil) body.css('breadcrumb').each do |breadcrumb| ancestors = Page.find(page.id).ancestors_and_self rescue nil - ancestors.delete_at(0) res = '' if ancestors res << "
" else part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil @@ -137,7 +136,7 @@ module ParserFrontEnd else "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" end - options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category] : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part" + options = "&part_id=\#{part.id}&category_id=\#{part[:category]}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part" ret << "" when 'public_r_tag' From d2f837f342a425a5ffca8b2ee53afb402d0dfed7 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 7 Feb 2013 19:08:35 +0800 Subject: [PATCH 34/53] Add task to save pages --- lib/tasks/migrate.rake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index fcb979be8..9bbd7cf46 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -206,6 +206,12 @@ namespace :migrate do category.destroy end end + end + + task :save_pages => :environment do + Page.all.each do |page| + page.save + end end end From 6324233f583856f6c7f3e43add90814e545d5d9e Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 7 Feb 2013 19:35:42 +0800 Subject: [PATCH 35/53] Fix breadcrumb again --- app/views/front/show_breadcrumb.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/front/show_breadcrumb.html.erb b/app/views/front/show_breadcrumb.html.erb index 734c68127..d06d70e20 100644 --- a/app/views/front/show_breadcrumb.html.erb +++ b/app/views/front/show_breadcrumb.html.erb @@ -1,4 +1,4 @@ -<% if not @ancestors.empty? %> +<% unless @ancestors.blank? %>
<% @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], orig_page: @page_id.to_s, field[2]),:class=>field[1])%> <% end %>
<% end %> diff --git a/app/views/default_widget/_typeC.html.erb b/app/views/default_widget/_typeC.html.erb index 1fa99ee06..f6e2adde1 100644 --- a/app/views/default_widget/_typeC.html.erb +++ b/app/views/default_widget/_typeC.html.erb @@ -6,7 +6,7 @@ <% @data.each do |row_data| %> <%= content_tag(:li) do %> <% @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], orig_page: @page_id.to_s, field[2]),:class=>field[1])%> <% end %> <% end %> <% end %> diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index 8cc2a668f..2ab10cdd8 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -20,6 +20,7 @@ module ParserFrontEnd def parse_page_content(page) tag = params[:tag_id].blank? ? page[:tag] : params[:tag_id] + category = params[:category_id].blank? ? page[:category] : params[:category_id] body = Nokogiri::HTML(page.content) body.css('orbit_front').each do |front| if front['value'] @@ -119,7 +120,7 @@ module ParserFrontEnd end - options = "&page_id=#{page.id}&category_id=\#{page[:category]}&tag_id=\#{tag}&preview=\#{params[:preview]}&page_main=\#{params[:page_main]}&search_query=\#{params[:search_query]}&name=\#{params[:name]}&item_type=page" + options = "&page_id=#{page.id}&category_id=\#{category}&tag_id=\#{tag}&preview=\#{params[:preview]}&page_main=\#{params[:page_main]}&search_query=\#{params[:search_query]}&name=\#{params[:name]}&item_type=page" ret << "" else part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil @@ -136,7 +137,7 @@ module ParserFrontEnd else "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" end - options = "&part_id=\#{part.id}&category_id=\#{part[:category]}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part" + options = "&part_id=\#{part.id}&category_id=\#{part[:category]}&tag_id=\#{part[:tag]}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part" ret << "" when 'public_r_tag' From 9e9620c04afa80e6f17aabe4c526d57e2eabfdbb Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 8 Feb 2013 12:56:35 +0800 Subject: [PATCH 37/53] Fix item looking for widget when no front end --- app/controllers/admin/pages_controller.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index f2de0c9e4..779302055 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -36,12 +36,11 @@ helper Admin::PagePartsHelper if @item.module_app @module_app = @item.module_app - - @frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0] + @frontend_path = @item.app_frontend_url - if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array} - @frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank? - end + if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array} + @frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank? + end case @item.module_app.key when 'announcement' @@ -59,7 +58,7 @@ helper Admin::PagePartsHelper end else @categories = nil - @module_app = @module_apps[0] + @module_app = @module_apps[0] end end From a9aa1dd150a1236d54c81a7556ed459caf9567af Mon Sep 17 00:00:00 2001 From: chris Date: Mon, 18 Feb 2013 18:21:33 +0800 Subject: [PATCH 38/53] Fix for path renaming --- app/models/item.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/item.rb b/app/models/item.rb index 17880e4a4..a149358f8 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -23,6 +23,7 @@ class Item before_destroy :destroy_children after_rearrange :rebuild_path, :if => "parent_id_changed? || name_changed?" + after_save :rebuild_children_path, :if => "path_changed?" def enabled_for_lang(lang) enabled_for.include?(lang) @@ -68,7 +69,6 @@ class Item def rebuild_path self.path = (self.ancestors_and_self - [Item.root]).collect{|x| x.name unless x.root?}.join('/') - self.rebuild_children_path end def rebuild_children_path From d19ba7b1c66178fde916e14c4fe394d8e0c516f7 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 8 Feb 2013 16:16:33 +0800 Subject: [PATCH 39/53] Change css mobile for 3 columns --- ...obile.css.erb => orbit-mobile.css.erb.css} | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) rename app/assets/stylesheets/mobile/{orbit-mobile.css.erb => orbit-mobile.css.erb.css} (97%) diff --git a/app/assets/stylesheets/mobile/orbit-mobile.css.erb b/app/assets/stylesheets/mobile/orbit-mobile.css.erb.css similarity index 97% rename from app/assets/stylesheets/mobile/orbit-mobile.css.erb rename to app/assets/stylesheets/mobile/orbit-mobile.css.erb.css index 72a3c8879..dff993c85 100644 --- a/app/assets/stylesheets/mobile/orbit-mobile.css.erb +++ b/app/assets/stylesheets/mobile/orbit-mobile.css.erb.css @@ -35,7 +35,7 @@ div[data-role="page"] { } .main-menu ul { background-color: #333; - width: 280px; + width: 210px; list-style: none; margin: 0 auto; padding: 0; @@ -128,8 +128,8 @@ div[data-role="page"] { left: 0; } .header .language .ui-btn-text i { - font-size: .83em; - margin-top: .2em; + font-size: 1.1em; + margin-top: .33em; } .header .language .ui-icon { background-image: none; @@ -213,6 +213,9 @@ div[data-role="page"] { padding: 0 10px 20px; margin-bottom: 0; } +#announcement_content .content { + padding: 10px; +} #map div[data-role="content"] { padding: 0; } @@ -323,7 +326,7 @@ div[id^="dialog"] .content { } @media(min-width:600px) { .main-menu ul { - width: 560px; + width: 420px; } .main-menu ul li { width: 128px; @@ -331,7 +334,7 @@ div[id^="dialog"] .content { } @media(min-width:768px) { .main-menu ul { - width: 640px; + width: 480px; } .main-menu ul li { width: 148px; @@ -342,7 +345,7 @@ div[id^="dialog"] .content { } @media(min-width:800px) { .main-menu ul { - width: 640px; + width: 480px; } .main-menu ul li { width: 148px; @@ -350,7 +353,7 @@ div[id^="dialog"] .content { } @media(min-width:961px) { .main-menu ul { - width: 640px; + width: 480px; } .main-menu ul li { width: 148px; @@ -358,7 +361,7 @@ div[id^="dialog"] .content { } @media(min-width: 1024px) { .main-menu ul { - width: 800px; + width: 600px; } .main-menu ul li { width: 188px; From 39c6660c6738170e3649b078cea013e97f08ba3f Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 19 Feb 2013 20:42:46 +0800 Subject: [PATCH 40/53] Remove useless code not removed in merge Fix argument bug in link_to_field --- app/controllers/default_widget_controller.rb | 27 +------------------- app/helpers/default_widget_helper.rb | 2 +- app/views/default_widget/_typeA.html.erb | 2 +- app/views/default_widget/_typeB.html.erb | 2 +- app/views/default_widget/_typeC.html.erb | 2 +- 5 files changed, 5 insertions(+), 30 deletions(-) diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index 1df460471..bb7600eb1 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -10,24 +10,6 @@ class DefaultWidgetController< OrbitWidgetController @page_part.module_app.enable_frontend? end - def query_for_default_widget - ori_class_name = @default_widget["query"].split('.')[0] - result = nil - if !params["tag_id"].blank? - @tag = Tag.find(params["tag_id"]) rescue nil - if params["category_id"].blank? - result = @tag.send(ori_class_name.downcase.pluralize).desc(:created_at) - else - result = @tag.send(ori_class_name.downcase.pluralize).where(get_category_field_name(ori_class_name) => params['category_id']).desc(:created_at) - end - elsif params["category_id"].blank? - result = eval(@default_widget["query"]).desc(:created_at) - else - result = eval("#{ori_class_name}.where(get_category_field_name(ori_class_name) => params['category_id'])").desc(:created_at) - end - result.available_for_lang(I18n.locale).can_display.desc(:created_at) - end - def default_widget if !params[:id].blank? redirect_to eval("#{@page_part.module_app.widget_fields_link_method['title']['method']}('#{params[:id]}', {inner: #{params[:inner] || true}})") @@ -64,12 +46,5 @@ class DefaultWidgetController< OrbitWidgetController end end end - - def get_category_field_name(ori_class_name) - ori_class_name = ori_class_name.constantize - ori_class_name.fields.each_key do |key| - return key if key.include?('category_id') - end - nil - end + end diff --git a/app/helpers/default_widget_helper.rb b/app/helpers/default_widget_helper.rb index 9173b823c..fdaa638fa 100644 --- a/app/helpers/default_widget_helper.rb +++ b/app/helpers/default_widget_helper.rb @@ -3,7 +3,7 @@ module DefaultWidgetHelper I18n.t("#{@page_part.module_app.key}.default_widget.#{field}") end - def link_to_field(row_data,field, options=nil, switch) + def link_to_field(row_data,field, switch, options=nil) method_ary = @page_part.module_app.widget_fields_link_method field = field.to_sym if(method_ary.has_key?(field) and (switch == "true")) diff --git a/app/views/default_widget/_typeA.html.erb b/app/views/default_widget/_typeA.html.erb index 02dabedb0..423024840 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], orig_page: @page_id.to_s, field[2]),:class=>field[1])%> + <%= content_tag(:span,link_to_field(row_data,field[0], field[2], {orig_page: @page_id.to_s}),:class=>field[1])%> <% end %> <% end %> diff --git a/app/views/default_widget/_typeB.html.erb b/app/views/default_widget/_typeB.html.erb index 1fa821505..fcf70065e 100644 --- a/app/views/default_widget/_typeB.html.erb +++ b/app/views/default_widget/_typeB.html.erb @@ -7,7 +7,7 @@
<% @fields.each do |field|%> - <%= content_tag(:span,link_to_field(row_data,field[0], orig_page: @page_id.to_s, field[2]),:class=>field[1])%> + <%= content_tag(:span,link_to_field(row_data,field[0], field[2], {orig_page: @page_id.to_s}),:class=>field[1])%> <% end %>
<% end %> diff --git a/app/views/default_widget/_typeC.html.erb b/app/views/default_widget/_typeC.html.erb index f6e2adde1..d3b3e49fe 100644 --- a/app/views/default_widget/_typeC.html.erb +++ b/app/views/default_widget/_typeC.html.erb @@ -6,7 +6,7 @@ <% @data.each do |row_data| %> <%= content_tag(:li) do %> <% @fields.each do |field|%> - <%= content_tag(:span, link_to_field(row_data,field[0], orig_page: @page_id.to_s, field[2]),:class=>field[1])%> + <%= content_tag(:span, link_to_field(row_data,field[0], field[2], {orig_page: @page_id.to_s}),:class=>field[1])%> <% end %> <% end %> <% end %> From a61ec183c97bcebe4187bd84c0886d122fd3dd01 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Fri, 25 Jan 2013 09:59:29 +0800 Subject: [PATCH 41/53] change add/edit url of personal_conference --- .../panel/personal_conference/desktop/conference_p.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_p.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_p.html.erb index 23e1484cc..a45573a65 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_p.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_p.html.erb @@ -14,8 +14,8 @@
  • List
  • -
  • Add/Edit
  • -
  • Conference
  • +
  • Add/Edit
  • +
  • Conference
  • Co-Authors
  • Tags & Keywords
  • Analysis
  • From f1db7be14e2d3cc0a8e04075ae33a08a297e3d63 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Mon, 28 Jan 2013 10:56:46 +0800 Subject: [PATCH 42/53] remove test and change for personal journal --- db/seeds.rb | 21 +++++- .../spec/factories/co_author_relations.rb | 0 .../spec/factories/co_authors.rb | 0 .../spec/factories/journal_level_types.rb | 10 +++ .../factories/writing_conference_files.rb | 18 +++++ .../spec/factories/writing_conferences.rb | 75 +++++++++++++++++++ .../personal_conference/test/dummy/Rakefile | 7 -- .../app/assets/javascripts/application.js | 9 --- .../app/assets/stylesheets/application.css | 7 -- .../app/controllers/application_controller.rb | 3 - .../dummy/app/helpers/application_helper.rb | 2 - .../test/dummy/app/mailers/.gitkeep | 0 .../test/dummy/app/models/.gitkeep | 0 .../app/views/layouts/application.html.erb | 14 ---- .../personal_conference/test/dummy/config.ru | 4 - .../test/dummy/config/application.rb | 45 ----------- .../test/dummy/config/boot.rb | 10 --- .../test/dummy/config/database.yml | 25 ------- .../test/dummy/config/environment.rb | 5 -- .../dummy/config/environments/development.rb | 30 -------- .../dummy/config/environments/production.rb | 60 --------------- .../test/dummy/config/environments/test.rb | 39 ---------- .../initializers/backtrace_silencers.rb | 7 -- .../dummy/config/initializers/inflections.rb | 10 --- .../dummy/config/initializers/mime_types.rb | 5 -- .../dummy/config/initializers/secret_token.rb | 7 -- .../config/initializers/session_store.rb | 8 -- .../config/initializers/wrap_parameters.rb | 14 ---- .../test/dummy/config/locales/en.yml | 5 -- .../test/dummy/config/routes.rb | 58 -------------- .../test/dummy/lib/assets/.gitkeep | 0 .../test/dummy/log/.gitkeep | 0 .../test/dummy/public/404.html | 26 ------- .../test/dummy/public/422.html | 26 ------- .../test/dummy/public/500.html | 26 ------- .../test/dummy/public/favicon.ico | 0 .../test/dummy/script/rails | 6 -- .../test/integration/navigation_test.rb | 10 --- .../test/personal_conference_test.rb | 7 -- .../personal_conference/test/test_helper.rb | 10 --- .../desktop/co_author_relations_controller.rb | 63 ---------------- .../desktop/co_authors_controller.rb | 59 --------------- .../journal_co_author_relations_controller.rb | 64 ++++++++++++++++ .../desktop/journal_co_authors_controller.rb | 59 +++++++++++++++ .../desktop/journal_pages_controller.rb | 4 +- .../{co_author.rb => journal_co_author.rb} | 4 +- ...ation.rb => journal_co_author_relation.rb} | 4 +- .../co_author_relations/_form.html.erb | 8 -- .../desktop/co_author_relations/_new.html.erb | 3 - .../co_author_relations/_show_form.html.erb | 17 ----- .../desktop/co_author_relations/edit.html.erb | 3 - .../desktop/co_authors/edit.html.erb | 3 - .../desktop/co_authors/new.html.erb | 3 - .../_form.html.erb | 11 +++ .../journal_co_author_relations/_new.html.erb | 3 + .../_show_form.html.erb | 17 +++++ .../journal_co_author_relations/edit.html.erb | 3 + .../index.html.erb | 0 .../_form.html.erb | 15 ++-- .../desktop/journal_co_authors/edit.html.erb | 3 + .../index.html.erb | 12 +-- .../desktop/journal_co_authors/new.html.erb | 3 + .../show.html.erb | 0 .../desktop/journal_p.html.erb | 2 +- .../personal_journal/config/routes.rb | 4 +- .../factories/journal_co_author_relations.rb | 11 +++ .../spec/factories/journal_co_authors.rb | 21 ++++++ .../spec/factories/writing_journals.rb | 2 +- .../personal_journal/test/dummy/Rakefile | 7 -- .../app/assets/javascripts/application.js | 9 --- .../app/assets/stylesheets/application.css | 7 -- .../app/controllers/application_controller.rb | 3 - .../dummy/app/helpers/application_helper.rb | 2 - .../test/dummy/app/mailers/.gitkeep | 0 .../test/dummy/app/models/.gitkeep | 0 .../app/views/layouts/application.html.erb | 14 ---- .../personal_journal/test/dummy/config.ru | 4 - .../test/dummy/config/application.rb | 45 ----------- .../test/dummy/config/boot.rb | 10 --- .../test/dummy/config/database.yml | 25 ------- .../test/dummy/config/environment.rb | 5 -- .../dummy/config/environments/development.rb | 30 -------- .../dummy/config/environments/production.rb | 60 --------------- .../test/dummy/config/environments/test.rb | 39 ---------- .../initializers/backtrace_silencers.rb | 7 -- .../dummy/config/initializers/inflections.rb | 10 --- .../dummy/config/initializers/mime_types.rb | 5 -- .../dummy/config/initializers/secret_token.rb | 7 -- .../config/initializers/session_store.rb | 8 -- .../config/initializers/wrap_parameters.rb | 14 ---- .../test/dummy/config/locales/en.yml | 5 -- .../test/dummy/config/routes.rb | 58 -------------- .../test/dummy/lib/assets/.gitkeep | 0 .../personal_journal/test/dummy/log/.gitkeep | 0 .../test/dummy/public/404.html | 26 ------- .../test/dummy/public/422.html | 26 ------- .../test/dummy/public/500.html | 26 ------- .../test/dummy/public/favicon.ico | 0 .../personal_journal/test/dummy/script/rails | 6 -- .../test/integration/navigation_test.rb | 10 --- .../test/personal_journal_test.rb | 7 -- .../personal_journal/test/test_helper.rb | 10 --- 102 files changed, 341 insertions(+), 1154 deletions(-) rename vendor/built_in_modules/{personal_journal => personal_conference}/spec/factories/co_author_relations.rb (100%) rename vendor/built_in_modules/{personal_journal => personal_conference}/spec/factories/co_authors.rb (100%) create mode 100644 vendor/built_in_modules/personal_conference/spec/factories/journal_level_types.rb create mode 100644 vendor/built_in_modules/personal_conference/spec/factories/writing_conference_files.rb create mode 100644 vendor/built_in_modules/personal_conference/spec/factories/writing_conferences.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/Rakefile delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/app/assets/javascripts/application.js delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/app/assets/stylesheets/application.css delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/app/controllers/application_controller.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/app/helpers/application_helper.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/app/mailers/.gitkeep delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/app/models/.gitkeep delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/app/views/layouts/application.html.erb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config.ru delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/application.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/boot.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/database.yml delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/environment.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/environments/development.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/environments/production.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/environments/test.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/initializers/backtrace_silencers.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/initializers/inflections.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/initializers/mime_types.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/initializers/secret_token.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/initializers/session_store.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/initializers/wrap_parameters.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/locales/en.yml delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/config/routes.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/lib/assets/.gitkeep delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/log/.gitkeep delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/public/404.html delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/public/422.html delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/public/500.html delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/public/favicon.ico delete mode 100644 vendor/built_in_modules/personal_conference/test/dummy/script/rails delete mode 100644 vendor/built_in_modules/personal_conference/test/integration/navigation_test.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/personal_conference_test.rb delete mode 100644 vendor/built_in_modules/personal_conference/test/test_helper.rb delete mode 100644 vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb delete mode 100644 vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb create mode 100644 vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb create mode 100644 vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb rename vendor/built_in_modules/personal_journal/app/models/{co_author.rb => journal_co_author.rb} (88%) rename vendor/built_in_modules/personal_journal/app/models/{co_author_relation.rb => journal_co_author_relation.rb} (71%) delete mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_form.html.erb delete mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb delete mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb delete mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb delete mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb delete mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb create mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_form.html.erb create mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_new.html.erb create mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_show_form.html.erb create mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/edit.html.erb rename vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/{co_author_relations => journal_co_author_relations}/index.html.erb (100%) rename vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/{co_authors => journal_co_authors}/_form.html.erb (70%) create mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/edit.html.erb rename vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/{co_authors => journal_co_authors}/index.html.erb (59%) create mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/new.html.erb rename vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/{co_authors => journal_co_authors}/show.html.erb (100%) create mode 100644 vendor/built_in_modules/personal_journal/spec/factories/journal_co_author_relations.rb create mode 100644 vendor/built_in_modules/personal_journal/spec/factories/journal_co_authors.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/Rakefile delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/app/assets/javascripts/application.js delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/app/assets/stylesheets/application.css delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/app/controllers/application_controller.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/app/helpers/application_helper.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/app/mailers/.gitkeep delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/app/models/.gitkeep delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/app/views/layouts/application.html.erb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config.ru delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/application.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/boot.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/database.yml delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/environment.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/environments/development.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/environments/production.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/environments/test.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/initializers/backtrace_silencers.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/initializers/inflections.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/initializers/mime_types.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/initializers/secret_token.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/initializers/session_store.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/initializers/wrap_parameters.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/locales/en.yml delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/config/routes.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/lib/assets/.gitkeep delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/log/.gitkeep delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/public/404.html delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/public/422.html delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/public/500.html delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/public/favicon.ico delete mode 100644 vendor/built_in_modules/personal_journal/test/dummy/script/rails delete mode 100644 vendor/built_in_modules/personal_journal/test/integration/navigation_test.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/personal_journal_test.rb delete mode 100644 vendor/built_in_modules/personal_journal/test/test_helper.rb diff --git a/db/seeds.rb b/db/seeds.rb index 607884650..91469233c 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -19,15 +19,30 @@ WritingJournal.destroy_all end 10.times do - FactoryGirl.create(:relations) + FactoryGirl.create(:journal_relation) end 50.times do - FactoryGirl.create(:paper_record) + FactoryGirl.create(:journal) end 50.times do - FactoryGirl.create(:co_author_candidate) + FactoryGirl.create(:journal_co_author) end +10.size.times do + FactoryGirl.create(:conference_level) +end + +10.times do + FactoryGirl.create(:conference_relation) +end + +50.times do + FactoryGirl.create(:conference) +end + +50.times do + FactoryGirl.create(:conference_co_author) +end puts "Success!" diff --git a/vendor/built_in_modules/personal_journal/spec/factories/co_author_relations.rb b/vendor/built_in_modules/personal_conference/spec/factories/co_author_relations.rb similarity index 100% rename from vendor/built_in_modules/personal_journal/spec/factories/co_author_relations.rb rename to vendor/built_in_modules/personal_conference/spec/factories/co_author_relations.rb diff --git a/vendor/built_in_modules/personal_journal/spec/factories/co_authors.rb b/vendor/built_in_modules/personal_conference/spec/factories/co_authors.rb similarity index 100% rename from vendor/built_in_modules/personal_journal/spec/factories/co_authors.rb rename to vendor/built_in_modules/personal_conference/spec/factories/co_authors.rb diff --git a/vendor/built_in_modules/personal_conference/spec/factories/journal_level_types.rb b/vendor/built_in_modules/personal_conference/spec/factories/journal_level_types.rb new file mode 100644 index 000000000..631a39c9e --- /dev/null +++ b/vendor/built_in_modules/personal_conference/spec/factories/journal_level_types.rb @@ -0,0 +1,10 @@ + +level = ["SCI", "SCIE", "SSCI", "AH & HCI", "EI", "CSCI", "CSSCI", "TSCI", "TSSCI", "THCI"] +FactoryGirl.define do + factory(:journal_level, class: "JournalLevelType") do |f| + f.sequence(:title_translations) do |n| + { zh_tw: "#{level[n]}", + en: "#{level[n]}" } + end + end +end diff --git a/vendor/built_in_modules/personal_conference/spec/factories/writing_conference_files.rb b/vendor/built_in_modules/personal_conference/spec/factories/writing_conference_files.rb new file mode 100644 index 000000000..67c47e3dc --- /dev/null +++ b/vendor/built_in_modules/personal_conference/spec/factories/writing_conference_files.rb @@ -0,0 +1,18 @@ + +file_desc = Array.new 7, "" +file_desc = file_desc.map do |p| Faker::Lorem.word end + +file = ["1.png", "5.pdf", "2.png", "6.pdf", "3.png", "7.pdf", "4.png"] + +rand = Random.new + +FactoryGirl.define do + factory(:upload_file, class: "WritingJournalFile") do |f| + f.sequence(:file) do |n| + File.new(File.join(Rails.root, "db" ,"files", file[rand.rand(0..6)])) + end + f.sequence(:title) do |n| + "#{file_desc[rand.rand(0..6)]}" + end + end +end diff --git a/vendor/built_in_modules/personal_conference/spec/factories/writing_conferences.rb b/vendor/built_in_modules/personal_conference/spec/factories/writing_conferences.rb new file mode 100644 index 000000000..3c9b20cab --- /dev/null +++ b/vendor/built_in_modules/personal_conference/spec/factories/writing_conferences.rb @@ -0,0 +1,75 @@ +require 'json' + + +data = File.read("#{Rails.root}/db/data") +data_json = JSON.parse(data) + +rand = Random.new + +FactoryGirl.define do + factory :paper_record, class: "WritingJournal" do |f| + f.sequence(:paper_title_translations) do |n| + { zh_tw: "#{data_json[n]["paper_title"]}_tw", + en: "#{data_json[n]["paper_title"]}_en" } + end + + f.sequence(:journal_title_translations) do |n| + {zh_tw: "#{data_json[n]["booktitle"]}_tw", + en: "#{data_json[n]["booktitle"]}_en"} + end + + f.sequence(:abstract) do |n| + "#{data_json[n]["abstract"]}" + end + + f.sequence(:isbn) do |n| + "#{data_json[n]["isbn"]}" + end + + f.sequence(:year) do |n| + "#{data_json[n]["year"]}" + end + + f.sequence(:authors) do |n| + "#{data_json[n]["author"].map{|m| m.split(",").reverse.join(" ")}.join(",")}" + end + + f.sequence(:form_to_start) do |n| + "#{data_json[n]["page_from"]}" + end + + f.sequence(:form_to_end) do |n| + "#{data_json[n]["page_to"]}" + end + + f.sequence(:total_pages) do |n| + "#{data_json[n]["total_page"]}" + end + + f.sequence(:language) do |n| + "#{data_json[n]["language"]}" + end + + f.sequence(:keywords) do |n| + "#{data_json[n]["abstract"].split[-3..-1].join(",")}" + end + + f.sequence(:journal_level_types) do |n| + level = [] + total_levels = rand.rand(1..JournalLevelType.count) + total_levels.times do + level << JournalLevelType.all[rand.rand(0..JournalLevelType.count-1)] + end + level.uniq + end + + f.sequence(:writing_journal_files) do |n| + files = [] + total_files = rand.rand(1..7) + total_files.times do files << FactoryGirl.create(:upload_file) end + files + end + f.create_user_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account + f.update_user_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account + end + end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/Rakefile b/vendor/built_in_modules/personal_conference/test/dummy/Rakefile deleted file mode 100644 index 36458522c..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Dummy::Application.load_tasks diff --git a/vendor/built_in_modules/personal_conference/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/personal_conference/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfcdb..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,9 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/vendor/built_in_modules/personal_conference/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/personal_conference/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index fc25b5723..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,7 +0,0 @@ -/* - * This is a manifest file that'll automatically include all the stylesheets available in this directory - * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at - * the top of the compiled file, but it's generally better to create a new file per style scope. - *= require_self - *= require_tree . -*/ \ No newline at end of file diff --git a/vendor/built_in_modules/personal_conference/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/personal_conference/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d950..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/personal_conference/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be7945..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/personal_conference/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/built_in_modules/personal_conference/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/personal_conference/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/built_in_modules/personal_conference/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/personal_conference/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 9a8a761bd..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config.ru b/vendor/built_in_modules/personal_conference/test/dummy/config.ru deleted file mode 100644 index 1989ed8d0..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/application.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/application.rb deleted file mode 100644 index 82ff29a4a..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/application.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require -require "personal_conference" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end - diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/boot.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/boot.rb deleted file mode 100644 index eba068137..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/boot.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/database.yml b/vendor/built_in_modules/personal_conference/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd459..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/environment.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91d..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Dummy::Application.initialize! diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/environments/development.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/environments/development.rb deleted file mode 100644 index 95a50b91e..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,30 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/environments/production.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/environments/production.rb deleted file mode 100644 index ca2c58883..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/environments/production.rb +++ /dev/null @@ -1,60 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Use a different logger for distributed setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify -end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/environments/test.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/environments/test.rb deleted file mode 100644 index 6810c9147..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/environments/test.rb +++ /dev/null @@ -1,39 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf3..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 9e8b0131f..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e44..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 87c0a946c..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Dummy::Application.config.secret_token = '08ae1abb617d588b6d3b9c5453dd61ec5560d0cba784ab4a4ac34a99f233c36b5bf7857b8a1bab5b5f5423cf87c9ac7bcc45c62290916c0e870a23a1c69ed273' diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff9..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Dummy::Application.config.session_store :active_record_store diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df2018..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/locales/en.yml b/vendor/built_in_modules/personal_conference/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca5..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/vendor/built_in_modules/personal_conference/test/dummy/config/routes.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/routes.rb deleted file mode 100644 index bb509f27a..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -Dummy::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' -end diff --git a/vendor/built_in_modules/personal_conference/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/personal_conference/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/built_in_modules/personal_conference/test/dummy/log/.gitkeep b/vendor/built_in_modules/personal_conference/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/built_in_modules/personal_conference/test/dummy/public/404.html b/vendor/built_in_modules/personal_conference/test/dummy/public/404.html deleted file mode 100644 index 9a48320a5..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
    -

    The page you were looking for doesn't exist.

    -

    You may have mistyped the address or the page may have moved.

    -
    - - diff --git a/vendor/built_in_modules/personal_conference/test/dummy/public/422.html b/vendor/built_in_modules/personal_conference/test/dummy/public/422.html deleted file mode 100644 index 83660ab18..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
    -

    The change you wanted was rejected.

    -

    Maybe you tried to change something you didn't have access to.

    -
    - - diff --git a/vendor/built_in_modules/personal_conference/test/dummy/public/500.html b/vendor/built_in_modules/personal_conference/test/dummy/public/500.html deleted file mode 100644 index b80307fc1..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
    -

    We're sorry, but something went wrong.

    -

    We've been notified about this issue and we'll take a look at it shortly.

    -
    - - diff --git a/vendor/built_in_modules/personal_conference/test/dummy/public/favicon.ico b/vendor/built_in_modules/personal_conference/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/built_in_modules/personal_conference/test/dummy/script/rails b/vendor/built_in_modules/personal_conference/test/dummy/script/rails deleted file mode 100644 index 81eab02f5..000000000 --- a/vendor/built_in_modules/personal_conference/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby.exe -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/vendor/built_in_modules/personal_conference/test/integration/navigation_test.rb b/vendor/built_in_modules/personal_conference/test/integration/navigation_test.rb deleted file mode 100644 index 97a94c9bb..000000000 --- a/vendor/built_in_modules/personal_conference/test/integration/navigation_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'test_helper' - -class NavigationTest < ActionDispatch::IntegrationTest - fixtures :all - - # test "the truth" do - # assert true - # end -end - diff --git a/vendor/built_in_modules/personal_conference/test/personal_conference_test.rb b/vendor/built_in_modules/personal_conference/test/personal_conference_test.rb deleted file mode 100644 index c3e0a3ba4..000000000 --- a/vendor/built_in_modules/personal_conference/test/personal_conference_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class PersonalConferenceTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, PersonalConference - end -end diff --git a/vendor/built_in_modules/personal_conference/test/test_helper.rb b/vendor/built_in_modules/personal_conference/test/test_helper.rb deleted file mode 100644 index dcd3b276e..000000000 --- a/vendor/built_in_modules/personal_conference/test/test_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Configure Rails Environment -ENV["RAILS_ENV"] = "test" - -require File.expand_path("../dummy/config/environment.rb", __FILE__) -require "rails/test_help" - -Rails.backtrace_cleaner.remove_silencers! - -# Load support files -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb deleted file mode 100644 index 26b5acd9c..000000000 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Panel::PersonalJournal::Desktop::CoAuthorRelationsController < ApplicationController - def index - @co_author_relations = CoAuthorRelation.all - new - - respond_to do |format| - format.html {render layout: false } - end - end - - def edit - @co_author_relation = CoAuthorRelation.find(params[:id]) - respond_to do |format| - format.html { render :layout => false} - end - end - - def new - @co_author_relation = CoAuthorRelation.new - end - - def create - @co_author_relation = CoAuthorRelation.new(params[:co_author_relation]) - @co_author_relations = CoAuthorRelation.all - - if @co_author_relation.save - newv = render_to_string partial: "show_form", object: @co_author_relations - render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json - else - error_msg = @co_author_relation.errors.full_messages.join("
    ") - render json: {success: false, msg: error_msg}.to_json - end - end - - def update - @co_author_relation = CoAuthorRelation.find(params[:id]) - if @co_author_relation.update_attributes(params[:co_author_relation]) - @co_author_relations = CoAuthorRelation.all - newv = render_to_string partial: "show_form", object: @co_author_relations - render json: {success: true, msg: "New Relation successfully updated!", newvalue: newv}.to_json - else - error_msg = @co_author.errors.full_messages.join("
    ") - render json: {success: false, msg: error_msg}.to_json - end - end - - def destroy - @co_author_relation = CoAuthorRelation.find(params[:id]) - @co_author_relation.destroy - reset_co_author_relation - - render :json => {success: true, msg: "deleted successfully!"} - end - - private - - def reset_co_author_relation - co_author = CoAuthor.where(co_author_relations_id: @co_author_relation.id) - co_author.map do |c| - c.update_attributes(co_author_relations_id: nil) - end - end -end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb deleted file mode 100644 index b9e1deaa5..000000000 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Panel::PersonalJournal::Desktop::CoAuthorsController < ApplicationController - def index - nils, not_nils = CoAuthor.where(name_id: current_user.id)\ - .asc(:co_author).partition{|p| p.email.nil?} - @co_authors = not_nils + nils - @co_author_relations = CoAuthorRelation.all - - respond_to do |format| - format.html { render :layout => false} - end - end - - def new - @co_author = CoAuthor.new - @co_author_relations = CoAuthorRelation.all - - respond_to do |format| - format.html { render :layout => false} - end - end - - def edit - @co_author = CoAuthor.find(params[:id]) - @co_author_relations = CoAuthorRelation.all - respond_to do |format| - format.html { render :layout => false} - end - end - - def create - @co_author = CoAuthor.new(params[:co_author]) - @co_author.name_id= current_user.id - - if @co_author.save - render json: {success:true, msg: t('create.sucess.co_author')}.to_json - else - error_msg = @co_author.errors.full_messages.join("
    ") - render json: {success: false, msg: error_msg}.to_json - end - end - - def update - @co_author = CoAuthor.find(params[:id]) - - if @co_author.update_attributes(params[:co_author]) - render json: {success:true, msg: t('update.sucess.co_author')}.to_json - else - error_msg = @co_author.errors.full_messages.join("
    ") - render json: {success: false, msg: error_msg}.to_json - end - end - - def destroy - @co_author = CoAuthor.find(params[:id]) - @co_author.destroy - - render :json => {success: true, msg: "Co-author deleted successfully!"} - end -end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb new file mode 100644 index 000000000..735098d05 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb @@ -0,0 +1,64 @@ +class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < ApplicationController + def index + @journal_co_author_relations = JournalCoAuthorRelation.all + new + + respond_to do |format| + format.html {render layout: false } + end + end + + def edit + @journal_co_author_relation = JournalCoAuthorRelation.find(params[:id]) + respond_to do |format| + format.html { render :layout => false} + end + end + + def new + @journal_co_author_relation = JournalCoAuthorRelation.new + end + + def create + @journal_co_author_relation = JournalCoAuthorRelation.new(params[:journal_co_author_relation]) + @journal_co_author_relations = JournalCoAuthorRelation.all + binding.pry + + if @journal_co_author_relation.save + newv = render_to_string partial: "show_form", object: @journal_co_author_relations + render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json + else + error_msg = @journal_co_author_relation.errors.full_messages.join("
    ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def update + @journal_co_author_relation = JournalCoAuthorRelation.find(params[:id]) + if @journal_co_author_relation.update_attributes(params[:journal_co_author_relation]) + @journal_co_author_relations = JournalCoAuthorRelation.all + newv = render_to_string partial: "show_form", object: @journal_co_author_relations + render json: {success: true, msg: "New Relation successfully updated!", newvalue: newv}.to_json + else + error_msg = @journal_co_author.errors.full_messages.join("
    ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def destroy + @journal_co_author_relation = JournalCoAuthorRelation.find(params[:id]) + @journal_co_author_relation.destroy + reset_co_author_relation + + render :json => {success: true, msg: "deleted successfully!"} + end + + private + + def reset_co_author_relation + co_author = JournalCoAuthor.where(co_author_relations_id: @co_author_relation.id) + co_author.map do |c| + c.update_attributes(co_author_relations_id: nil) + end + end +end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb new file mode 100644 index 000000000..6ddd86bda --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb @@ -0,0 +1,59 @@ +class Panel::PersonalJournal::Desktop::JournalCoAuthorsController < ApplicationController + def index + nils, not_nils = JournalCoAuthor.where(name_id: current_user.id)\ + .asc(:co_author).partition{|p| p.email.nil?} + @journal_co_authors = not_nils + nils + @journal_co_author_relations = JournalCoAuthorRelation.all + + respond_to do |format| + format.html { render :layout => false} + end + end + + def new + @journal_co_author = JournalCoAuthor.new + @journal_co_author_relations = JournalCoAuthorRelation.all + + respond_to do |format| + format.html { render :layout => false} + end + end + + def edit + @journal_co_author = JournalCoAuthor.find(params[:id]) + @journal_co_author_relations = JournalCoAuthorRelation.all + respond_to do |format| + format.html { render :layout => false} + end + end + + def create + @journal_co_author = JournalCoAuthor.new(params[:co_author]) + @journal_co_author.name_id= current_user.id + + if @journal_co_author.save + render json: {success:true, msg: t('create.sucess.co_author')}.to_json + else + error_msg = @journal_co_author.errors.full_messages.join("
    ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def update + @journal_co_author = JournalCoAuthor.find(params[:id]) + + if @journal_co_author.update_attributes(params[:co_author]) + render json: {success:true, msg: t('update.sucess.co_author')}.to_json + else + error_msg = @journal_co_author.errors.full_messages.join("
    ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def destroy + @journal_co_author = JournalCoAuthor.find(params[:id]) + @journal_co_author.destroy + + render :json => {success: true, msg: "Co-author deleted successfully!"} + end +end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb index 9599ce9a1..83f9408de 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb @@ -13,8 +13,8 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr @level_types = JournalLevelType.all @author_types = JournalAuthorType.all @paper_types= JournalPaperType.all - @co_author_candidate = - CoAuthor.where(name_id: current_user.id).map{|c|c.co_author} + @journal_co_author_candidate = + JournalCoAuthor.where(name_id: current_user.id).map{|c|c.co_author} @journal_candidate = WritingJournal.where(create_user_id: current_user.id).map{|j|j.journal_title}.uniq diff --git a/vendor/built_in_modules/personal_journal/app/models/co_author.rb b/vendor/built_in_modules/personal_journal/app/models/journal_co_author.rb similarity index 88% rename from vendor/built_in_modules/personal_journal/app/models/co_author.rb rename to vendor/built_in_modules/personal_journal/app/models/journal_co_author.rb index 4c662acb8..5d8617c7a 100644 --- a/vendor/built_in_modules/personal_journal/app/models/co_author.rb +++ b/vendor/built_in_modules/personal_journal/app/models/journal_co_author.rb @@ -1,4 +1,4 @@ -class CoAuthor +class JournalCoAuthor include Mongoid::Document LANGUAGE_TYPES = [ "English", "Chinese" ] @@ -7,7 +7,7 @@ class CoAuthor field :co_author, localize: true field :email - belongs_to :co_author_relations + belongs_to :journal_co_author_relations VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/ validates :email, format: { with: VALID_EMAIL_REGEX }, diff --git a/vendor/built_in_modules/personal_journal/app/models/co_author_relation.rb b/vendor/built_in_modules/personal_journal/app/models/journal_co_author_relation.rb similarity index 71% rename from vendor/built_in_modules/personal_journal/app/models/co_author_relation.rb rename to vendor/built_in_modules/personal_journal/app/models/journal_co_author_relation.rb index f0d5f17c3..2218605b6 100644 --- a/vendor/built_in_modules/personal_journal/app/models/co_author_relation.rb +++ b/vendor/built_in_modules/personal_journal/app/models/journal_co_author_relation.rb @@ -1,10 +1,10 @@ -class CoAuthorRelation +class JournalCoAuthorRelation include Mongoid::Document include Mongoid::Timestamps field :relation, localize: true - has_and_belongs_to_many :co_authors + has_and_belongs_to_many :journal_co_authors validates :relation, presence: true, uniqueness: { case_sensitive: false } diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_form.html.erb deleted file mode 100644 index ed0aa3180..000000000 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_form.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<%= f.fields_for :co_author_relation_translations do |f| %> - <%= f.text_field locale, - value: (@co_author_relation.co_author_relation_translations[locale] rescue nil) %> -<% end %> -<%= f.submit "Save", class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %> -<% if not @co_author_relation.new_record? %> - <%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %> -<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb deleted file mode 100644 index 68bf9ed63..000000000 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for(@co_author_relation, url: panel_personal_journal_desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %> - <%= render partial: 'panel/personal_journal/desktop/co_author_relations/form' , locals: {:f => f}%> -<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb deleted file mode 100644 index 246f0413b..000000000 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<% @co_author_relations.each_with_index do |co_author_relation,i| %> - <% if ( i % 6 ) == 0 %> -
    -
      - <% end %> -
    • -
      <%= co_author_relation.relation %>
      -
      - <%= link_to 'Edit', edit_panel_personal_journal_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %> - <%= link_to 'Destroy', panel_personal_journal_desktop_co_author_relation_path(co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %> -
      -
    • - <% if ( i % 6 ) == 5 %> -
    -
    - <% end %> -<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb deleted file mode 100644 index 66fc1dff3..000000000 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for(@co_author_relation, url: panel_personal_journal_desktop_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %> - <%= render partial: 'panel/personal_journal/desktop/co_author_relations/form' , locals: {:f => f}%> -<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb deleted file mode 100644 index a8250528d..000000000 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_journal_desktop_co_author_path(@co_author) do |f| %> - <%= render partial: 'panel/personal_journal/desktop/co_authors/form', locals: {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb deleted file mode 100644 index ed12b132c..000000000 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_journal_desktop_co_authors_path do |f| %> - <%= render partial: 'panel/personal_journal/desktop/co_authors/form', locals: {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_form.html.erb new file mode 100644 index 000000000..c6f9ef531 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_form.html.erb @@ -0,0 +1,11 @@ +<%= f.text_field :journal_co_author_relation %> + +<%= f.submit "Save", class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %> +<% if not @journal_co_author_relation.new_record? %> + <%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %> +<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_new.html.erb new file mode 100644 index 000000000..803dbc0a1 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_new.html.erb @@ -0,0 +1,3 @@ +<%= form_for(@journal_co_author_relation, url: panel_personal_journal_desktop_journal_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/journal_co_author_relations/form' , locals: {:f => f}%> +<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_show_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_show_form.html.erb new file mode 100644 index 000000000..2ef640c4e --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/_show_form.html.erb @@ -0,0 +1,17 @@ +<% @journal_co_author_relations.each_with_index do |journal_co_author_relation,i| %> + <% if ( i % 6 ) == 0 %> +
    +
      + <% end %> +
    • +
      <%= journal_co_author_relation.relation %>
      +
      + <%= link_to 'Edit', edit_panel_personal_journal_desktop_journal_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %> + <%= link_to 'Destroy', panel_personal_journal_desktop_journal_co_author_relation_path(co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %> +
      +
    • + <% if ( i % 6 ) == 5 %> +
    +
    + <% end %> +<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/edit.html.erb new file mode 100644 index 000000000..b491c865c --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/edit.html.erb @@ -0,0 +1,3 @@ +<%= form_for(@journal_co_author_relation, url: panel_personal_journal_desktop_journal_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/journal_co_author_relations/form' , locals: {:f => f}%> +<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb similarity index 100% rename from vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/index.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/_form.html.erb similarity index 70% rename from vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/_form.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/_form.html.erb index 0c2d0f1a6..918ff4ef9 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/_form.html.erb @@ -8,11 +8,14 @@
    • <%= f.label :co_author, class: "s_grid s_grid_2" %> - <%= f.fields_for :co_author_translations do |f| %> - <%= f.text_field locale, - class: "s_grid_6 s_grid", - value: (@co_author.co_author_translations[locale] rescue nil) %> - <% end %> + <%= f.text_field :co_author, class: "s_grid_4 s_grid"%> +
    • <%= f.label :email, class: "s_grid s_grid_2"%> @@ -22,7 +25,7 @@ <%= f.label :type, class: "s_grid s_grid_2"%>
    • +
    • + OralPoster
    • +
    • + +
    • + + + + + +
    • + +
    • +
    • + +
    +
+
+
    +
  • +
  • + + +
  • + +
  • + +
  • +
  • +
  • +
  • +
  • + + +
+
+
+
    +
  • +
  • +
+
+ + + From 2afbae7c087e2e26a1ec8a2f17a2a8d7e6884d45 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 7 Feb 2013 18:33:06 +0800 Subject: [PATCH 46/53] make a fake data for personal conference plugin --- db/seeds.rb | 66 +++++++++++-------- .../app/models/conference_co_author.rb | 20 ++++++ .../models/conference_co_author_relation.rb | 11 ++++ ...s.rb => conference_co_author_relations.rb} | 2 +- ...co_authors.rb => conference_co_authors.rb} | 4 +- .../spec/factories/conference_paper_type.rb | 10 +++ .../spec/factories/journal_level_types.rb | 10 --- .../factories/writing_conference_files.rb | 2 +- .../spec/factories/writing_conferences.rb | 36 +++++----- 9 files changed, 99 insertions(+), 62 deletions(-) create mode 100644 vendor/built_in_modules/personal_conference/app/models/conference_co_author.rb create mode 100644 vendor/built_in_modules/personal_conference/app/models/conference_co_author_relation.rb rename vendor/built_in_modules/personal_conference/spec/factories/{co_author_relations.rb => conference_co_author_relations.rb} (77%) rename vendor/built_in_modules/personal_conference/spec/factories/{co_authors.rb => conference_co_authors.rb} (71%) create mode 100644 vendor/built_in_modules/personal_conference/spec/factories/conference_paper_type.rb delete mode 100644 vendor/built_in_modules/personal_conference/spec/factories/journal_level_types.rb diff --git a/db/seeds.rb b/db/seeds.rb index 91469233c..a0458dd15 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -6,43 +6,53 @@ FactoryGirl.definition_file_paths = Dir["#{Rails.root}/vendor/built_in_modules/* FactoryGirl.find_definitions -CoAuthorRelation.destroy_all -CoAuthor.destroy_all -JournalLevelType.destroy_all -WritingJournalFile.destroy_all -WritingJournal.destroy_all +ConferenceCoAuthorRelation.destroy_all +ConferenceCoAuthor.destroy_all +ConferencePaperType.destroy_all +WritingConferenceFile.destroy_all +WritingConference.destroy_all #Dir[Rails.root.join("spec/factories/*.rb")].each {|f| require f} -10.size.times do - FactoryGirl.create(:journal_level) +2.times do + FactoryGirl.create(:conference_paper_type) end 10.times do - FactoryGirl.create(:journal_relation) -end - -50.times do - FactoryGirl.create(:journal) -end - -50.times do - FactoryGirl.create(:journal_co_author) -end - -10.size.times do - FactoryGirl.create(:conference_level) -end - -10.times do - FactoryGirl.create(:conference_relation) -end - -50.times do - FactoryGirl.create(:conference) + FactoryGirl.create(:conference_co_author_relation) end 50.times do FactoryGirl.create(:conference_co_author) end + +50.times do + FactoryGirl.create(:writing_conference) +end + puts "Success!" + +# ======= +# +#CoAuthorRelation.destroy_all +#CoAuthor.destroy_all +#JournalLevelType.destroy_all +#WritingJournalFile.destroy_all +#WritingJournal.destroy_all +# +#10.size.times do +# FactoryGirl.create(:journal_level) +#end +# +#10.times do +# FactoryGirl.create(:journal_relation) +#end +# +#50.times do +# FactoryGirl.create(:journal) +#end +# +#50.times do +# FactoryGirl.create(:journal_co_author) +#end +#puts "Success!" diff --git a/vendor/built_in_modules/personal_conference/app/models/conference_co_author.rb b/vendor/built_in_modules/personal_conference/app/models/conference_co_author.rb new file mode 100644 index 000000000..71e5b17f3 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/models/conference_co_author.rb @@ -0,0 +1,20 @@ +class ConferenceCoAuthor + include Mongoid::Document + + LANGUAGE_TYPES = [ "English", "Chinese" ] + + field :name_id, type: BSON::ObjectId + field :co_author, localize: true + field :email + + belongs_to :conference_co_author_relations + + VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/ + validates :email, format: { with: VALID_EMAIL_REGEX }, + allow_blank: true, + uniqueness: { case_sensitive: false } + + validates :co_author, presence: true + before_save { |coauthor| coauthor.email = email.downcase if not coauthor.email.nil?} +end + diff --git a/vendor/built_in_modules/personal_conference/app/models/conference_co_author_relation.rb b/vendor/built_in_modules/personal_conference/app/models/conference_co_author_relation.rb new file mode 100644 index 000000000..f36e51326 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/models/conference_co_author_relation.rb @@ -0,0 +1,11 @@ +class ConferenceCoAuthorRelation + include Mongoid::Document + include Mongoid::Timestamps + + field :relation, localize: true + + has_and_belongs_to_many :conference_co_authors + + validates :relation, presence: true, + uniqueness: { case_sensitive: false } +end diff --git a/vendor/built_in_modules/personal_conference/spec/factories/co_author_relations.rb b/vendor/built_in_modules/personal_conference/spec/factories/conference_co_author_relations.rb similarity index 77% rename from vendor/built_in_modules/personal_conference/spec/factories/co_author_relations.rb rename to vendor/built_in_modules/personal_conference/spec/factories/conference_co_author_relations.rb index 09fc6d88f..4e4de2574 100644 --- a/vendor/built_in_modules/personal_conference/spec/factories/co_author_relations.rb +++ b/vendor/built_in_modules/personal_conference/spec/factories/conference_co_author_relations.rb @@ -2,7 +2,7 @@ types = ["friend", "teacher", "student", "schoolmate", "parent", "best friend", "instructor", "labmate", "TA", "mate"] FactoryGirl.define do - factory(:relations, class: "CoAuthorRelation") do |f| + factory(:conference_co_author_relation, class: "ConferenceCoAuthorRelation") do |f| f.sequence(:relation_translations) do |n| { zh_tw: "#{types[n%types.size]}", en: "#{types[n%types.size]}" } diff --git a/vendor/built_in_modules/personal_conference/spec/factories/co_authors.rb b/vendor/built_in_modules/personal_conference/spec/factories/conference_co_authors.rb similarity index 71% rename from vendor/built_in_modules/personal_conference/spec/factories/co_authors.rb rename to vendor/built_in_modules/personal_conference/spec/factories/conference_co_authors.rb index 75a11c9bd..cc9954bfc 100644 --- a/vendor/built_in_modules/personal_conference/spec/factories/co_authors.rb +++ b/vendor/built_in_modules/personal_conference/spec/factories/conference_co_authors.rb @@ -8,13 +8,13 @@ email = Array.new 51,"" email= email.map do |p| Faker::Internet.email end FactoryGirl.define do - factory(:co_author_candidate, class: "CoAuthor") do |f| + factory(:conference_co_author, class: "ConferenceCoAuthor") do |f| f.sequence(:co_author_translations) do |n| { zh_tw: "#{name_tw[n]}", en: "#{name_en[n]}" } end - f.sequence(:co_author_relations_id) do |n| "#{CoAuthorRelation.all[n%CoAuthorRelation.count].id}" end + f.sequence(:conference_co_author_relations_id) do |n| "#{ConferenceCoAuthorRelation.all[n%ConferenceCoAuthorRelation.count].id}" end f.sequence(:email) do |n| "#{email[n]}" end f.name_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account end diff --git a/vendor/built_in_modules/personal_conference/spec/factories/conference_paper_type.rb b/vendor/built_in_modules/personal_conference/spec/factories/conference_paper_type.rb new file mode 100644 index 000000000..130b8a9bc --- /dev/null +++ b/vendor/built_in_modules/personal_conference/spec/factories/conference_paper_type.rb @@ -0,0 +1,10 @@ + +level = ["Oral","Poster"] +FactoryGirl.define do + factory(:conference_paper_type, class: "ConferencePaperType") do |f| + f.sequence(:title_translations) do |n| + { zh_tw: "#{level[n-1]}", + en: "#{level[n-1]}" } + end + end +end diff --git a/vendor/built_in_modules/personal_conference/spec/factories/journal_level_types.rb b/vendor/built_in_modules/personal_conference/spec/factories/journal_level_types.rb deleted file mode 100644 index 631a39c9e..000000000 --- a/vendor/built_in_modules/personal_conference/spec/factories/journal_level_types.rb +++ /dev/null @@ -1,10 +0,0 @@ - -level = ["SCI", "SCIE", "SSCI", "AH & HCI", "EI", "CSCI", "CSSCI", "TSCI", "TSSCI", "THCI"] -FactoryGirl.define do - factory(:journal_level, class: "JournalLevelType") do |f| - f.sequence(:title_translations) do |n| - { zh_tw: "#{level[n]}", - en: "#{level[n]}" } - end - end -end diff --git a/vendor/built_in_modules/personal_conference/spec/factories/writing_conference_files.rb b/vendor/built_in_modules/personal_conference/spec/factories/writing_conference_files.rb index 67c47e3dc..54dc99142 100644 --- a/vendor/built_in_modules/personal_conference/spec/factories/writing_conference_files.rb +++ b/vendor/built_in_modules/personal_conference/spec/factories/writing_conference_files.rb @@ -7,7 +7,7 @@ file = ["1.png", "5.pdf", "2.png", "6.pdf", "3.png", "7.pdf", "4.png"] rand = Random.new FactoryGirl.define do - factory(:upload_file, class: "WritingJournalFile") do |f| + factory(:writing_conference_file, class: "WritingConferenceFile") do |f| f.sequence(:file) do |n| File.new(File.join(Rails.root, "db" ,"files", file[rand.rand(0..6)])) end diff --git a/vendor/built_in_modules/personal_conference/spec/factories/writing_conferences.rb b/vendor/built_in_modules/personal_conference/spec/factories/writing_conferences.rb index 3c9b20cab..759e47d46 100644 --- a/vendor/built_in_modules/personal_conference/spec/factories/writing_conferences.rb +++ b/vendor/built_in_modules/personal_conference/spec/factories/writing_conferences.rb @@ -7,13 +7,13 @@ data_json = JSON.parse(data) rand = Random.new FactoryGirl.define do - factory :paper_record, class: "WritingJournal" do |f| + factory :writing_conference, class: "WritingConference" do |f| f.sequence(:paper_title_translations) do |n| { zh_tw: "#{data_json[n]["paper_title"]}_tw", en: "#{data_json[n]["paper_title"]}_en" } end - f.sequence(:journal_title_translations) do |n| + f.sequence(:conference_title_translations) do |n| {zh_tw: "#{data_json[n]["booktitle"]}_tw", en: "#{data_json[n]["booktitle"]}_en"} end @@ -22,10 +22,6 @@ FactoryGirl.define do "#{data_json[n]["abstract"]}" end - f.sequence(:isbn) do |n| - "#{data_json[n]["isbn"]}" - end - f.sequence(:year) do |n| "#{data_json[n]["year"]}" end @@ -34,17 +30,17 @@ FactoryGirl.define do "#{data_json[n]["author"].map{|m| m.split(",").reverse.join(" ")}.join(",")}" end - f.sequence(:form_to_start) do |n| - "#{data_json[n]["page_from"]}" - end + #f.sequence(:form_to_start) do |n| + #"#{data_json[n]["page_from"]}" + #end - f.sequence(:form_to_end) do |n| - "#{data_json[n]["page_to"]}" - end + #f.sequence(:form_to_end) do |n| + #"#{data_json[n]["page_to"]}" + #end - f.sequence(:total_pages) do |n| - "#{data_json[n]["total_page"]}" - end + #f.sequence(:total_pages) do |n| + #"#{data_json[n]["total_page"]}" + #end f.sequence(:language) do |n| "#{data_json[n]["language"]}" @@ -54,19 +50,19 @@ FactoryGirl.define do "#{data_json[n]["abstract"].split[-3..-1].join(",")}" end - f.sequence(:journal_level_types) do |n| + f.sequence(:conference_paper_types) do |n| level = [] - total_levels = rand.rand(1..JournalLevelType.count) + total_levels = rand.rand(0..ConferencePaperType.count-1) total_levels.times do - level << JournalLevelType.all[rand.rand(0..JournalLevelType.count-1)] + level << ConferencePaperType.all[rand.rand(0..ConferencePaperType.count-1)] end level.uniq end - f.sequence(:writing_journal_files) do |n| + f.sequence(:writing_conference_files) do |n| files = [] total_files = rand.rand(1..7) - total_files.times do files << FactoryGirl.create(:upload_file) end + total_files.times do files << FactoryGirl.create(:writing_conference_file) end files end f.create_user_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account From 6d65af0312a23060bf97a42cd0d28b724e929e0b Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Wed, 20 Feb 2013 13:43:30 +0800 Subject: [PATCH 47/53] done personal conference list page, but it need to js. --- .../app/helpers/panel/.gitkeep | 0 .../panel/personal_conference/.gitkeep | 0 .../personal_conference/desktop/.gitkeep | 0 .../desktop/conference_pages_helper.rb | 65 ++++++++ .../desktop/conference_pages/index.html.erb | 146 +++++++++--------- 5 files changed, 139 insertions(+), 72 deletions(-) create mode 100644 vendor/built_in_modules/personal_conference/app/helpers/panel/.gitkeep create mode 100644 vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/.gitkeep create mode 100644 vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/.gitkeep create mode 100644 vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/.gitkeep b/vendor/built_in_modules/personal_conference/app/helpers/panel/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/.gitkeep b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/.gitkeep b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb new file mode 100644 index 000000000..cac790d3a --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb @@ -0,0 +1,65 @@ +module Panel::PersonalConference::Desktop::ConferencePagesHelper + def publication_record publication + content_tag :li, + :class => "list_t_item" do + marker + \ + content(publication) + \ + edit_or_delete(publication) + end + end + + def marker + content_tag :div, + :class => "list_item_action" + content_tag(:a, "", :class => "icon-check-empty") + \ + content_tag(:a, "", :class => "icon-star-empty") + end + + def content publication + content_tag(:div, "conference : " + publication.conference_title, + :class => "list_t_title") + \ + content_tag(:div, "title : " + publication.paper_title, + :class => "list_t_des") + \ + content_tag(:div, "keyword :" + publication.keywords, + :class => "list_t_des") + \ + content_tag(:div, "abstract : " + publication.abstract, + :class => "list_t_des") + \ + content_tag(:div, link_publication_file(publication), + :class => "list_t_des") + end + + def edit_or_delete publication + content_tag :div, + :class => "list_item_function" do + content_tag(:a, t("edit"), + :class => "journal_paper_edit admbg2 admtxt", + :href => edit_panel_personal_conference_desktop_conference_page_path(publication), + "ajax-remote" => "get") + \ + content_tag(:a, t("delete"), + "ajax-remote" => "delete", + "confirm-message" => t("sure?"), + "callback-method" => "paperDelete", + :class => "journal_paper_delete admbg2 admtxt", + :href => panel_personal_conference_desktop_conference_page_path(publication)) + end + end + + def link_publication_file publication + publication.writing_conference_files.map{|file| + link_to(image_tag(check_file_type(file.file.url)) + \ + content_tag(:span, file.title, :class => "filetitle"), + file.file.url, + :class => "file", + "target" => "_blank") + }.inject(:+) + end + + def check_file_type file + if not file.nil? + file_type = MIME::Types.type_for(file).first.to_s.split("/")[1] + file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png" + else + file_type = "" + end + end +end diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb index e32e4d6c5..7a3848df0 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb @@ -1,75 +1,77 @@
-
-
-
- -
-
-
-
More
-
- -
-
-
-
Tag
-
- -
-
-
-
Status
-
- -
-
-
-
View
-
- -
-
-
-
Share
-
- -
-
-
-
-
+
+
+
+ +
+
+
+
More
+
+ +
+
+
+
Tag
+
+ +
+
+
+
Status
+
+ +
+
+
+
View
+ +
+
+
Share
+
+ +
+
+
+
+
-
-
-
- -
-
-
\ No newline at end of file +
+
+
+ <% @writing_conferences.each do |w| %> + <%= publication_record w%> + <% end %> +
+
+ From 16fda25ace51da0038fd45883c0b694161f12103 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Wed, 20 Feb 2013 16:02:54 +0800 Subject: [PATCH 48/53] done personal conference add/edit page --- .../desktop/conference_pages_controller.rb | 1 + .../desktop/conference_pages/_form.html.erb | 207 +++++++++++------- .../desktop/conference_pages/new.html.erb | 109 +-------- .../desktop/conference_window.html.erb | 2 +- .../personal_conference/config/locales/en.yml | 3 +- .../config/locales/zh_tw.yml | 3 +- 6 files changed, 142 insertions(+), 183 deletions(-) diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb index 42dd5163a..2bf75b437 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb @@ -14,6 +14,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio def new @writing_conference = WritingConference.new @paper_types = ConferencePaperType.all + @author_types = ConferenceAuthorType.all #@co_author_candidate = # CoAuthor.where(name_id: current_user.id).map{|c|c.co_author} #@conference_candidate = diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb index 8b30adcc0..472c405a4 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb @@ -1,90 +1,149 @@
-
+
<%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> <% if not @writing_conference.new_record? %> <%= submit_tag t("cancel"), :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %> <% end %> -
-
-
-
+
+
+
Share
+
+ +
+
+
+
+
-
-
-
-
-
    -
  • - <%= f.fields_for :paper_title_translations do |f| %> - <%= f.text_area locale, - class: "s_grid_6 s_grid", - size: "20x2", - placeholder: t("personal_journal.paper_title"), - value: (@writing_journal.paper_title_translations[locale] rescue nil) %> - <% end %> -
  • -
  • - OralPoster
  • -
  • - -
  • - - - - - -
  • +
    +
    +
    +
    +
      +
    • + <%= f.fields_for :paper_title_translations do |f| %> + <%= f.text_area locale, + class: "s_grid_6 s_grid", + size: "20x2", + placeholder: t("personal_conference.paper_title"), + value: (@writing_conference.paper_title_translations[locale] rescue nil) %> + <% end %> +
    • -
    • -
    • +
    • + <%= f.fields_for :conference_title_translations do |f| %> + <%= f.text_field locale, + size: "20", + placeholder: t("personal_conference.conference_title"), + class: "s_grid_6 s_grid", +# "autocomplete-list" => "conference_title_autocomplete_list", + value: (@writing_conference.conferece_title_translations[locale] rescue nil) %> + <% end %> + +
    • -
    -
    -
    -
      -
    • -
    • - - -
    • +
      + <%= label_tag("", t("personal_conference.paper_type")) %> +
        + <% @paper_types.each_with_index do |paper_type, i| %> +
      • + <%= radio_button_tag "writing_conference[conference_paper_type_ids][]", + paper_type.id, + @writing_conference.conference_paper_type_ids.include?(paper_type.id), + id: "field-#{i}" + %><%= label_tag("field-#{i}", paper_type.title) %> +
      • + <% end %> +
      +
      -
    • +
    • + <%= f.text_field :keywords, size: "20", placeholder: t("personal_conference.keywords"), class: "s_grid_6 s_grid"%> +
    • -
    • -
    • -
    • -
    • -
    • +
      + <%= label_tag("", t("personal_conference.conference_time")) %> +
        +
      • + <%= label_tag("", t("personal_conference.period_start_date"), class: "s_grid_1 s_grid") %> + <%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %> +
      • +
      • + <%= label_tag("", t("personal_conference.period_end_date"), class: "s_grid_1 s_grid") %> + <%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %> +
      • +
      +
      -
    -
    -
    -
      -
    • -
    • -
    -
    -
    +
  • + <%= label_tag("", t("personal_conference.sponsor"), class: "s_grid_2 s_grid") %><%= f.text_field :sponsor, size: "20", placeholder: "Sponsor", class: "s_grid_4 s_grid"%> +
  • +
  • + <%= label_tag("", t("personal_conference.location"), class: "s_grid_2 s_grid") %><%= f.text_field :location, size: "20", placeholder: "Location", class: "s_grid_4 s_grid"%> +
  • + +
  • + <%= label_tag("", t("personal_conference.url"), class: "s_grid_2 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_4 s_grid"%> +
  • + +
    +
      +
    • + <%= f.fields_for :authors_translations do |f| %> + <%= f.text_area locale, + class: "s_grid_6 s_grid", + size: "20x2", + placeholder: t("personal_conference.authors"), +# "autocomplete-list" => "coauthor_autocomplete_list", + value: (@writing_conference.authors_translations[locale] rescue nil) %> + <% end %> + + + + + +
    • + +
    • + <%= label_tag("", t("personal_conference.publication_date"), class: "s_grid_3 s_grid") %> + <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %> +
    • + +
    • + +
    • + <%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_6 s_grid full_height"%> +
    • +
    +
    +
    +
  • +
      + <%= f.text_area :note, size: "20x22", placeholder: t("personal_journal.note"), class: "s_grid_6 s_grid full_height"%> +
    +
  • +
diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb index 28283456f..eb8f87519 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb @@ -1,107 +1,4 @@ -
-
- - -
-
-
Year
-
- -
-
-
-
Language
-
- -
-
-
-
-
-
-
-
-
-
-
-
    -
  • -
  • - OralPoster
  • -
  • - -
  • - - - - - -
  • +<%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_conference_desktop_conference_pages_path do |f| %> + <%= render partial: 'panel/personal_conference/desktop/conference_pages/form', locals: {:f => f} %> +<%end%> -
  • -
  • - -
-
-
-
    -
  • -
  • - - -
  • - -
  • - -
  • -
  • -
  • -
  • -
  • - - -
-
-
-
    -
  • -
  • -
-
-
-
-
diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb index a45573a65..60164125b 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb @@ -13,7 +13,7 @@
    -
  • List
  • +
  • List
  • Add/Edit
  • Conference
  • Co-Authors
  • diff --git a/vendor/built_in_modules/personal_conference/config/locales/en.yml b/vendor/built_in_modules/personal_conference/config/locales/en.yml index 260f4fd52..b137de643 100644 --- a/vendor/built_in_modules/personal_conference/config/locales/en.yml +++ b/vendor/built_in_modules/personal_conference/config/locales/en.yml @@ -6,6 +6,7 @@ en: paper_title : "Paper Title" paper_type : "Paper Type" conference_title : "Conference Name" + conference_time: "Conference Time" period_start_date : "Start Date" period_end_date : "End Date" location : "Location" @@ -22,7 +23,7 @@ en: publication_date : "Date of Publication" url : "Reference URL" note : "Note" -# author_type : "Author Type" + author_type : "Author Type" file : "File" file_name : "File Name" description : "File Description" 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 0a977b916..6d10cf65e 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 @@ -6,6 +6,7 @@ zh_tw: paper_title : "論文名稱" paper_type : "論文型態" conference_title : " 會議名稱" + conference_time: "會議時間" period_start_date : "起" period_end_date : "訖" location : "地點" @@ -22,7 +23,7 @@ zh_tw: publication_date : "發表日期" url : "參考連結" note : "記事" -# author_type : "作者類別" + author_type : "作者類別" file : "檔案" file_name : "檔案名稱" description : "描述" From 13c757e8a96f6ceab97a4f658c9531d59d3d06bd Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 21 Feb 2013 01:48:10 +0800 Subject: [PATCH 49/53] clean add/edit page and add conference list page --- Gemfile.lock | 203 ++++++++--------- config/routes.rb | 5 - .../desktop/conference_pages_controller.rb | 49 ++++- .../desktop/conference_pages/_form.html.erb | 207 ++++++++++++------ .../conference_pages/_form_file.html.erb | 31 +++ .../conference_pages/conference_type.html.erb | 40 ++++ .../desktop/conference_pages/edit.html.erb | 4 + .../desktop/conference_window.html.erb | 2 +- .../personal_conference/config/routes.rb | 1 + 9 files changed, 367 insertions(+), 175 deletions(-) create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form_file.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/conference_type.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/edit.html.erb diff --git a/Gemfile.lock b/Gemfile.lock index 587d78413..5a930ca3b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,62 +8,61 @@ GIT GIT remote: git://github.com/charlotte-ruby/impressionist.git - revision: 7a93fff25568cd3edcc63c1a3c4b60dc6b81d2b7 + revision: 0894f6a550a33f83f4937d655e9f0774521781e4 specs: - impressionist (1.1.1) + impressionist (1.2.0) httpclient (~> 2.2) nokogiri (~> 1.5) GEM remote: http://rubygems.org/ specs: - actionmailer (3.2.9) - actionpack (= 3.2.9) + actionmailer (3.2.12) + actionpack (= 3.2.12) mail (~> 2.4.4) - actionpack (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) + actionpack (3.2.12) + activemodel (= 3.2.12) + activesupport (= 3.2.12) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) - rack (~> 1.4.0) + rack (~> 1.4.5) rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.9) - activesupport (= 3.2.9) + activemodel (3.2.12) + activesupport (= 3.2.12) builder (~> 3.0.0) - activerecord (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) + activerecord (3.2.12) + activemodel (= 3.2.12) + activesupport (= 3.2.12) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) - activesupport (3.2.9) + activeresource (3.2.12) + activemodel (= 3.2.12) + activesupport (= 3.2.12) + activesupport (3.2.12) i18n (~> 0.6) multi_json (~> 1.0) - addressable (2.3.2) arel (3.0.2) - bcrypt-ruby (3.0.1) + bcrypt-ruby (3.0.0) + binding_of_caller (0.7.1) + debug_inspector (>= 0.0.1) bourne (1.1.2) mocha (= 0.10.5) - brakeman (1.9.0) - activesupport + brakeman (1.9.2) erubis (~> 2.6) fastercsv (~> 1.5) haml (~> 3.0) highline (~> 1.6) - i18n - multi_json (~> 1.3) + multi_json (~> 1.2) ruby2ruby (~> 2.0) - ruby_parser (~> 3.0.4) + ruby_parser (~> 3.1.1) sass (~> 3.0) terminal-table (~> 1.4) - bson (1.8.1) - bson_ext (1.8.1) - bson (~> 1.8.1) + bson (1.8.2) + bson_ext (1.8.2) + bson (~> 1.8.2) builder (3.0.4) capybara (2.0.2) mime-types (>= 1.16) @@ -75,13 +74,14 @@ GEM carrierwave (0.6.2) activemodel (>= 3.2.0) activesupport (>= 3.2.0) - carrierwave-mongoid (0.2.1) + carrierwave-mongoid (0.2.2) carrierwave (~> 0.6.1) mongoid (~> 2.1) - childprocess (0.3.6) - ffi (~> 1.0, >= 1.0.6) + childprocess (0.3.8) + ffi (~> 1.0, >= 1.0.11) chinese_pinyin (0.4.1) chronic (0.9.0) + coderay (1.0.8) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) @@ -91,13 +91,14 @@ GEM coffee-script-source (1.4.0) columnize (0.3.6) database_cleaner (0.9.1) - debugger (1.2.3) + debug_inspector (0.0.2) + debugger (1.2.4) columnize (>= 0.3.1) debugger-linecache (~> 1.1.1) - debugger-ruby_core_source (~> 1.1.5) + debugger-ruby_core_source (~> 1.1.7) debugger-linecache (1.1.2) debugger-ruby_core_source (>= 1.1.1) - debugger-ruby_core_source (1.1.6) + debugger-ruby_core_source (1.1.8) delorean (2.1.0) chronic devise (1.5.3) @@ -107,60 +108,51 @@ GEM diff-lcs (1.1.3) encrypted_strings (0.3.3) erubis (2.7.0) - eventmachine (1.0.0) - exception_notification (3.0.0) + exception_notification (3.0.1) actionmailer (>= 3.0.4) - tinder (~> 1.8) execjs (1.4.0) multi_json (~> 1.0) - factory_girl (4.1.0) + factory_girl (4.2.0) activesupport (>= 3.0.0) - factory_girl_rails (4.1.0) - factory_girl (~> 4.1.0) + factory_girl_rails (4.2.1) + factory_girl (~> 4.2.0) railties (>= 3.0.0) faker (1.1.2) i18n (~> 0.5) - faraday (0.8.4) - multipart-post (~> 1.1) - faraday_middleware (0.9.0) - faraday (>= 0.7.4, < 0.9) fastercsv (1.5.5) fattr (2.2.1) - ffi (1.2.0) - haml (3.1.7) - hashie (1.2.0) + ffi (1.4.0) + haml (3.1.8) highline (1.6.15) hike (1.2.1) - http_parser.rb (0.5.3) httpclient (2.3.2) i18n (0.6.1) journey (1.0.4) - jquery-rails (2.1.4) + jquery-rails (2.2.1) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (3.0.0) + jquery-ui-rails (4.0.1) jquery-rails railties (>= 3.1.0) - json (1.7.6) - libwebsocket (0.1.7.1) - addressable - websocket + json (1.7.7) + libv8 (3.11.8.13) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) metaclass (0.0.1) - mime-types (1.19) - mini_magick (3.4) + method_source (0.8.1) + mime-types (1.21) + mini_magick (3.5.0) subexec (~> 0.2.1) mocha (0.10.5) metaclass (~> 0.0.1) - mongo (1.8.1) - bson (~> 1.8.1) + mongo (1.8.2) + bson (~> 1.8.2) mongo_session_store-rails3 (3.0.6) actionpack (>= 3.0) mongo - mongoid (2.5.1) + mongoid (2.6.0) activemodel (~> 3.1) mongo (~> 1.7) tzinfo (~> 0.3.22) @@ -170,8 +162,7 @@ GEM mongoid (~> 2) mongoid-tree (0.7.0) mongoid (~> 2.0) - multi_json (1.5.0) - multipart-post (1.1.5) + multi_json (1.6.1) net-ldap (0.3.1) nokogiri (1.5.6) options (2.3.0) @@ -182,7 +173,20 @@ GEM progress_bar (0.4.0) highline (~> 1.6.1) options (~> 2.3.0) - rack (1.4.4) + pry (0.9.12) + coderay (~> 1.0.5) + method_source (~> 0.8) + slop (~> 3.4) + pry-debugger (0.2.1) + debugger (~> 1.2.0) + pry (~> 0.9.10) + pry-remote (0.1.6) + pry (~> 0.9) + slop (~> 3.0) + pry-stack_explorer (0.4.9) + binding_of_caller (>= 0.7) + pry (~> 0.9.11) + rack (1.4.5) rack-cache (1.2) rack (>= 0.4) rack-protection (1.3.2) @@ -192,23 +196,24 @@ GEM rack-test (0.6.2) rack (>= 1.0) radius (0.7.3) - rails (3.2.9) - actionmailer (= 3.2.9) - actionpack (= 3.2.9) - activerecord (= 3.2.9) - activeresource (= 3.2.9) - activesupport (= 3.2.9) + rails (3.2.12) + actionmailer (= 3.2.12) + actionpack (= 3.2.12) + activerecord (= 3.2.12) + activeresource (= 3.2.12) + activesupport (= 3.2.12) bundler (~> 1.0) - railties (= 3.2.9) - railties (3.2.9) - actionpack (= 3.2.9) - activesupport (= 3.2.9) + railties (= 3.2.12) + railties (3.2.12) + actionpack (= 3.2.12) + activesupport (= 3.2.12) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) rake (10.0.3) - rdoc (3.12) + rb-readline (0.4.2) + rdoc (3.12.1) json (~> 1.4) redis (3.0.2) redis-namespace (1.2.1) @@ -217,6 +222,7 @@ GEM chinese_pinyin (>= 0.3.0) redis (>= 2.1.1) redis-namespace (>= 1.0.2) + ref (1.0.2) resque (1.23.0) multi_json (~> 1.0) redis-namespace (~> 1.0) @@ -238,45 +244,45 @@ GEM rspec-core (2.12.2) rspec-expectations (2.12.1) diff-lcs (~> 1.1.3) - rspec-mocks (2.12.1) - rspec-rails (2.12.0) + rspec-mocks (2.12.2) + rspec-rails (2.12.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) rspec-core (~> 2.12.0) rspec-expectations (~> 2.12.0) rspec-mocks (~> 2.12.0) - ruby2ruby (2.0.1) - ruby_parser (~> 3.0.0) + ruby2ruby (2.0.3) + ruby_parser (~> 3.1) sexp_processor (~> 4.0) - ruby_parser (3.0.4) + ruby_parser (3.1.1) sexp_processor (~> 4.1) rubyzip (0.9.9) rufus-scheduler (2.0.17) tzinfo (>= 0.3.23) sass (3.2.5) - sass-rails (3.2.5) + sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - selenium-webdriver (2.27.2) + selenium-webdriver (2.30.0) childprocess (>= 0.2.5) - libwebsocket (~> 0.1.3) multi_json (~> 1.0) rubyzip - sexp_processor (4.1.3) + websocket (~> 1.0.4) + sexp_processor (4.1.5) shoulda-matchers (1.4.2) activesupport (>= 3.0.0) bourne (~> 1.1.2) - simple_oauth (0.1.9) simplecov (0.7.1) multi_json (~> 1.0) simplecov-html (~> 0.7.1) simplecov-html (0.7.1) - sinatra (1.3.3) - rack (~> 1.3, >= 1.3.6) - rack-protection (~> 1.2) + sinatra (1.3.4) + rack (~> 1.4) + rack-protection (~> 1.3) tilt (~> 1.3, >= 1.3.3) + slop (3.4.3) social-share-button (0.1.1) spork (0.9.2) sprockets (2.2.2) @@ -297,26 +303,16 @@ GEM sunspot (= 1.3.3) sunspot_solr (1.3.3) terminal-table (1.4.5) + therubyracer (0.11.3) + libv8 (~> 3.11.8.12) + ref thor (0.17.0) tilt (1.3.3) - tinder (1.9.2) - eventmachine (~> 1.0) - faraday (~> 0.8) - faraday_middleware (~> 0.9) - hashie (~> 1.0) - json (~> 1.7.5) - mime-types (~> 1.19) - multi_json (~> 1.5) - twitter-stream (~> 0.1) tinymce-rails (3.5.8) railties (>= 3.1.1) treetop (1.4.12) polyglot polyglot (>= 0.3.1) - twitter-stream (0.1.16) - eventmachine (>= 0.12.8) - http_parser.rb (~> 0.5.1) - simple_oauth (~> 0.1.4) tzinfo (0.3.35) uglifier (1.3.0) execjs (>= 0.3.0) @@ -326,7 +322,7 @@ GEM warden (1.2.1) rack (>= 1.0) watchr (0.7) - websocket (1.0.6) + websocket (1.0.7) xpath (1.0.0) nokogiri (~> 1.3) @@ -350,9 +346,10 @@ DEPENDENCIES factory_girl_rails faker impressionist! - jquery-rails (= 2.1.4) + jquery-rails jquery-ui-rails kaminari! + libv8 (~> 3.11.8) mime-types mini_magick mongo_session_store-rails3 (= 3.0.6) @@ -362,9 +359,14 @@ DEPENDENCIES net-ldap (~> 0.3.1) nokogiri progress_bar + pry + pry-debugger + pry-remote + pry-stack_explorer radius rails (~> 3.2.9) rake + rb-readline redis (>= 2.1.1) redis-namespace redis-search @@ -385,6 +387,7 @@ DEPENDENCIES sunspot-rails-tester sunspot_mongo sunspot_solr + therubyracer tinymce-rails uglifier watchr diff --git a/config/routes.rb b/config/routes.rb index e65f5dea4..cc272ffca 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -209,11 +209,6 @@ Orbit::Application.routes.draw do match 'desktop_publications/books_list'=>'desktop_publications#books_list' match 'desktop_publications/books_add'=>'desktop_publications#books_add' - match 'desktop_publications/conference_p' => 'desktop_publications#conference_p' - match 'desktop_publications/conference_p_list/'=>'desktop_publications#conference_p_list' - match 'desktop_publications/conference_p_add/'=>'desktop_publications#conference_p_add' - # end - # namespace :desktop_research do match 'desktop_research/research_d' => 'desktop_research#research_d' match 'desktop_research/research_d_list/' => 'desktop_research#research_d_list' diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb index 2bf75b437..4915d5c73 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb @@ -26,13 +26,60 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio end def edit - @writing_conference = WritingConference.new + @writing_conference = WritingConference.find(params[:id]) + @paper_types = ConferencePaperType.all + @author_types = ConferenceAuthorType.all + respond_to do |format| + format.html { render :layout => false} + end end def create + params[:writing_conference][:create_user_id] = current_user.id + @writing_conference = WritingConference.new(params[:writing_conference]) + + if @writing_conference.save + render json: {success: true, msg: t('create.success.paper')}.to_json + else + error_msg = @writing_conference.errors.full_messages.join("
    ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def update + params[:writing_conference][:update_user_id] = current_user.id + @writing_conference= WritingConference.find(params[:id]) + + if @writing_conference.update_attributes(params[:writing_conference]) + render json: {success: true, msg: t('update.success.paper')}.to_json + else + error_msg = @writing_conference.errors.full_messages.join("
    ") + render json: {success: false, msg: error_msg}.to_json + end end def destroy + @writing_conference = WritingConference.find(params[:id]) + @writing_conference.destroy + render :json => {success: true, msg: t('delete.success.paper')} + end + + def conference_type + conference_types = ConferencePaperType.all + all_conference_lists = WritingConference.where(create_user_id: current_user.id) + all_conference_lists = all_conference_lists.map do |j| + [ j.conference_title, + j.conference_paper_type_ids.map do |type| + conference_types.find(type).title + end + ] + end + + @conference_lists = all_conference_lists.uniq + + respond_to do |format| + format.html { render :layout => false} + end end end diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb index 472c405a4..8c5eb261a 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form.html.erb @@ -34,41 +34,44 @@ class: "s_grid_6 s_grid", size: "20x2", placeholder: t("personal_conference.paper_title"), - value: (@writing_conference.paper_title_translations[locale] rescue nil) %> + value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %> <% end %>
  • - <%= f.fields_for :conference_title_translations do |f| %> - <%= f.text_field locale, - size: "20", - placeholder: t("personal_conference.conference_title"), - class: "s_grid_6 s_grid", -# "autocomplete-list" => "conference_title_autocomplete_list", - value: (@writing_conference.conferece_title_translations[locale] rescue nil) %> - <% end %> - + <%= f.fields_for :conference_title_translations do |f| %> + <%= f.text_field locale, + size: "20", + placeholder: t("personal_conference.conference_title"), + class: "s_grid_6 s_grid", + # "autocomplete-list" => "conference_title_autocomplete_list", + value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %> + <% end %> +
  • +
  • <%= label_tag("", t("personal_conference.paper_type")) %>
      <% @paper_types.each_with_index do |paper_type, i| %> -
    • - <%= radio_button_tag "writing_conference[conference_paper_type_ids][]", - paper_type.id, - @writing_conference.conference_paper_type_ids.include?(paper_type.id), - id: "field-#{i}" - %><%= label_tag("field-#{i}", paper_type.title) %> -
    • +
    • + <%= radio_button_tag "writing_conference[conference_paper_type_ids][]", + paper_type.id, + @writing_conference.conference_paper_type_ids.include?(paper_type.id), + id: "field-#{i}" + %><%= label_tag("field-#{i}", paper_type.title) %> +
    • <% end %>
    - -
  • - <%= f.text_field :keywords, size: "20", placeholder: t("personal_conference.keywords"), class: "s_grid_6 s_grid"%>
  • +
  • + <%= f.text_field :keywords, size: "20", placeholder: t("personal_conference.keywords"), class: "s_grid_6 s_grid"%> +
  • + +
  • <%= label_tag("", t("personal_conference.conference_time")) %>
      @@ -83,67 +86,135 @@
    - -
  • - <%= label_tag("", t("personal_conference.sponsor"), class: "s_grid_2 s_grid") %><%= f.text_field :sponsor, size: "20", placeholder: "Sponsor", class: "s_grid_4 s_grid"%> -
  • -
  • - <%= label_tag("", t("personal_conference.location"), class: "s_grid_2 s_grid") %><%= f.text_field :location, size: "20", placeholder: "Location", class: "s_grid_4 s_grid"%>
  • - <%= label_tag("", t("personal_conference.url"), class: "s_grid_2 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_4 s_grid"%> + <%= label_tag("", t("personal_conference.sponsor"), class: "s_grid_2 s_grid") %><%= f.text_field :sponsor, size: "20", placeholder: "Sponsor", class: "s_grid_4 s_grid"%>
  • -
    -
    • + <%= label_tag("", t("personal_conference.location"), class: "s_grid_2 s_grid") %><%= f.text_field :location, size: "20", placeholder: "Location", class: "s_grid_4 s_grid"%> +
    • + +
    • + <%= label_tag("", t("personal_conference.url"), class: "s_grid_2 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_4 s_grid"%> +
    • + +
    +
    +
      +
    • <%= f.fields_for :authors_translations do |f| %> <%= f.text_area locale, class: "s_grid_6 s_grid", size: "20x2", placeholder: t("personal_conference.authors"), -# "autocomplete-list" => "coauthor_autocomplete_list", - value: (@writing_conference.authors_translations[locale] rescue nil) %> + # "autocomplete-list" => "coauthor_autocomplete_list", + value: (@writing_conference.authors_translations[locale.to_s] rescue nil) %> <% end %> - - - - -
    • - -
    • - <%= label_tag("", t("personal_conference.publication_date"), class: "s_grid_3 s_grid") %> - <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %> -
    • - -
    • - -
    • - <%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_6 s_grid full_height"%>
    • -
    -
    -
    +
  • -
      - <%= f.text_area :note, size: "20x22", placeholder: t("personal_journal.note"), class: "s_grid_6 s_grid full_height"%> -
    + +
  • + +
  • + +
  • + +
  • + <%= label_tag("", t("personal_conference.publication_date"), class: "s_grid_3 s_grid") %> + <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %> +
  • + +
  • + <%= f.label :year, t("personal_conference.year"), :class => "s_grid_2 s_grid" %> + <%= select_year((@writing_conference.year ? @writing_conference.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_conference[year]', :class => "s_grid_4 s_grid"} ) %> +
  • + +
  • >
  • + +
  • + <%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_6 s_grid full_height"%> +
  • +
+
+
+
    +
  • + + + + + + + + + + + + + + + <% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %> + <%= f.fields_for :writing_conference_files, writing_conference_file do |f| %> + <%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %> + <% end %> + <% end %> + +
    <%= t("personal_conference.file")%><%= t("personal_conference.file_name")%><%= t("personal_conference.description") %>
    +
    + <%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %> + add +
    +
  • -
-
-
+
+
+
  • +
      + <%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_6 s_grid full_height"%> +
    +
  • +
    +
    + + + + + diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form_file.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form_file.html.erb new file mode 100644 index 000000000..dfbf9f221 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/_form_file.html.erb @@ -0,0 +1,31 @@ +" class="list_item"> + +
    + <% if form_file.new_record? %> + <%= f.file_field :file, class: "s_grid_2 s_grid" %> + <% end %> +
    + + + <%= f.text_field :title %> + <%= f.fields_for :file_title_translations do |f| %> + <%= f.text_field locale, + class: 's_grid_3 s_grid', + value: (form_file.file_title_translations[locale] rescue nil) %> + <% end %> + + + + + <% if form_file.new_record? %> + + <% else %> + <%= f.hidden_field :id %> + + <%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %> + <% end %> + <%= form_file.file.file ? ( link_to '', form_file.file.url, {:class => 'icon-eye-open', :target => '_blank', :title => t(:view)} ) : '' %> + + + + diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/conference_type.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/conference_type.html.erb new file mode 100644 index 000000000..a4fd58b24 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/conference_type.html.erb @@ -0,0 +1,40 @@ +
    +
    +
    Share
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + <% @conference_lists.each_with_index do |conference_list,i| %> + <% if ( i % 5 ) == 0 %> +
    +
      + <% end %> +
    • +
      + +
      + <% title, level = conference_list %> +
      <%= title %>
      +
      <%= level.join(",") %>
      +
    • + <% if ( i % 5 ) == 4 %> +
    +
    + <% end %> + <% end %> +
    +
    +
    diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/edit.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/edit.html.erb new file mode 100644 index 000000000..860d2ef4f --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/edit.html.erb @@ -0,0 +1,4 @@ +<%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_conference_desktop_conference_page_path(@writing_conference) do |f| %> + <%= render partial: 'form', locals: {:f => f} %> +<%end%> + diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb index 60164125b..00289e32a 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb @@ -15,7 +15,7 @@
    • List
    • Add/Edit
    • -
    • Conference
    • +
    • Conference
    • Co-Authors
    • Tags & Keywords
    • Analysis
    • diff --git a/vendor/built_in_modules/personal_conference/config/routes.rb b/vendor/built_in_modules/personal_conference/config/routes.rb index 250458776..37515409d 100644 --- a/vendor/built_in_modules/personal_conference/config/routes.rb +++ b/vendor/built_in_modules/personal_conference/config/routes.rb @@ -4,6 +4,7 @@ Rails.application.routes.draw do namespace :personal_conference do namespace :desktop do match 'conference_window' => 'conference_windows#conference_window' + match 'conference_type' => 'conference_pages#conference_type' resources :conference_pages end namespace :back_end do From 4ee85a8c0912817fd50494ef4b861c2ea32cc1f6 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 21 Feb 2013 02:33:53 +0800 Subject: [PATCH 50/53] add coauthor and coauthor relation function --- ...nference_co_author_relations_controller.rb | 63 +++++++++++++++++++ .../conference_co_authors_controller.rb | 59 +++++++++++++++++ .../_form.html.erb | 11 ++++ .../_new.html.erb | 3 + .../_show_form.html.erb | 17 +++++ .../edit.html.erb | 3 + .../index.html.erb | 22 +++++++ .../conference_co_authors/_form.html.erb | 35 +++++++++++ .../conference_co_authors/edit.html.erb | 3 + .../conference_co_authors/index.html.erb | 34 ++++++++++ .../conference_co_authors/new.html.erb | 3 + .../conference_co_authors/show.html.erb | 0 .../desktop/conference_window.html.erb | 2 +- .../personal_conference/config/routes.rb | 4 +- .../journal_co_author_relations_controller.rb | 1 - 15 files changed, 257 insertions(+), 3 deletions(-) create mode 100644 vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb create mode 100644 vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_form.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_new.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_show_form.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/edit.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/_form.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/edit.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/new.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/show.html.erb diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb new file mode 100644 index 000000000..bfc09055c --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb @@ -0,0 +1,63 @@ +class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController < ApplicationController + def index + @conference_co_author_relations = ConferenceCoAuthorRelation.all + new + + respond_to do |format| + format.html {render layout: false } + end + end + + def edit + @conference_co_author_relation = ConferenceCoAuthorRelation.find(params[:id]) + respond_to do |format| + format.html { render :layout => false} + end + end + + def new + @conference_co_author_relation = ConferenceCoAuthorRelation.new + end + + def create + @conference_co_author_relation = ConferenceCoAuthorRelation.new(params[:conference_co_author_relation]) + @conference_co_author_relations = ConferenceCoAuthorRelation.all + + if @conference_co_author_relation.save + newv = render_to_string partial: "show_form", object: @conference_co_author_relations + render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json + else + error_msg = @conference_co_author_relation.errors.full_messages.join("
      ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def update + @conference_co_author_relation = ConferenceCoAuthorRelation.find(params[:id]) + if @conference_co_author_relation.update_attributes(params[:conference_co_author_relation]) + @conference_co_author_relations = ConferenceCoAuthorRelation.all + newv = render_to_string partial: "show_form", object: @conference_co_author_relations + render json: {success: true, msg: "New Relation successfully updated!", newvalue: newv}.to_json + else + error_msg = @conference_co_author.errors.full_messages.join("
      ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def destroy + @conference_co_author_relation = ConferenceCoAuthorRelation.find(params[:id]) + @conference_co_author_relation.destroy + reset_co_author_relation + + render :json => {success: true, msg: "deleted successfully!"} + end + + private + + def reset_co_author_relation + co_author = ConferenceCoAuthor.where(co_author_relations_id: @co_author_relation.id) + co_author.map do |c| + c.update_attributes(co_author_relations_id: nil) + end + end +end diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb new file mode 100644 index 000000000..f371b7e75 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb @@ -0,0 +1,59 @@ +class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < ApplicationController + def index + nils, not_nils = ConferenceCoAuthor.where(name_id: current_user.id)\ + .asc(:co_author).partition{|p| p.email.nil?} + @conference_co_authors = not_nils + nils + @conference_co_author_relations = ConferenceCoAuthorRelation.all + + respond_to do |format| + format.html { render :layout => false} + end + end + + def new + @conference_co_author = ConferenceCoAuthor.new + @conference_co_author_relations = ConferenceCoAuthorRelation.all + + respond_to do |format| + format.html { render :layout => false} + end + end + + def edit + @conference_co_author = ConferenceCoAuthor.find(params[:id]) + @conference_co_author_relations = ConferenceCoAuthorRelation.all + respond_to do |format| + format.html { render :layout => false} + end + end + + def create + @conference_co_author = ConferenceCoAuthor.new(params[:conference_co_author]) + @conference_co_author.name_id= current_user.id + + if @conference_co_author.save + render json: {success:true, msg: t('create.sucess.co_author')}.to_json + else + error_msg = @conference_co_author.errors.full_messages.join("
      ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def update + @conference_co_author = ConferenceCoAuthor.find(params[:id]) + + if @conference_co_author.update_attributes(params[:co_author]) + render json: {success:true, msg: t('update.sucess.co_author')}.to_json + else + error_msg = @conference_co_author.errors.full_messages.join("
      ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def destroy + @conference_co_author = ConferenceCoAuthor.find(params[:id]) + @conference_co_author.destroy + + render :json => {success: true, msg: "Co-author deleted successfully!"} + end +end diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_form.html.erb new file mode 100644 index 000000000..d6f16b23d --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_form.html.erb @@ -0,0 +1,11 @@ +<%= f.text_field :relation %> + +<%= f.submit "Save", class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %> +<% if not @conference_co_author_relation.new_record? %> + <%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %> +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_new.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_new.html.erb new file mode 100644 index 000000000..42c5a8a8e --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_new.html.erb @@ -0,0 +1,3 @@ +<%= form_for(@conference_co_author_relation, url: panel_personal_conference_desktop_conference_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %> + <%= render partial: 'form' , locals: {:f => f}%> +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_show_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_show_form.html.erb new file mode 100644 index 000000000..72566f1a9 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/_show_form.html.erb @@ -0,0 +1,17 @@ +<% @conference_co_author_relations.each_with_index do |conference_co_author_relation,i| %> + <% if ( i % 6 ) == 0 %> +
      +
        + <% end %> +
      • +
        <%= conference_co_author_relation.relation %>
        +
        + <%= link_to 'Edit', edit_panel_personal_conference_desktop_conference_co_author_relation_path(conference_co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %> + <%= link_to 'Destroy', panel_personal_conference_desktop_conference_co_author_relation_path(conference_co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %> +
        +
      • + <% if ( i % 6 ) == 5 %> +
      +
      + <% end %> +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/edit.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/edit.html.erb new file mode 100644 index 000000000..3f40e44aa --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/edit.html.erb @@ -0,0 +1,3 @@ +<%= form_for(@conference_co_author_relation, url: panel_personal_conference_desktop_conference_co_author_relation_path(@conference_co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %> + <%= render partial: 'form' , locals: {:f => f}%> +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb new file mode 100644 index 000000000..d8b4451a2 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb @@ -0,0 +1,22 @@ +
      +
      +
      +
      Create
      +
      +
        +
      • <%= render 'new' %>
      • +
      +
      +
      + <%= submit_tag "Back", :type => "button", class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %> +
      +
      + +
      +
      +
      +
      + <%= render :partial => 'show_form'%> +
      +
      +
      diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/_form.html.erb new file mode 100644 index 000000000..0df7a876c --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/_form.html.erb @@ -0,0 +1,35 @@ +
      +
      + <%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> + <%= submit_tag "Cancel", :type => "button", class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %> +
      +
      +
      +
        +
      • + <%= f.label :co_author, class: "s_grid s_grid_2" %> + <%= f.text_field :co_author, class: "s_grid_4 s_grid"%> + +
      • +
      • + <%= f.label :email, class: "s_grid s_grid_2"%> + <%= f.text_field :email, class: "s_grid s_grid_4" %> +
      • +
      • + <%= f.label :type, class: "s_grid s_grid_2"%> + +
      • +
      +
      diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/edit.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/edit.html.erb new file mode 100644 index 000000000..6d53c3354 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/edit.html.erb @@ -0,0 +1,3 @@ +<%= form_for @conference_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_conference_desktop_conference_co_author_path(@conference_co_author) do |f| %> + <%= render partial: 'form', locals: {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb new file mode 100644 index 000000000..bc1e6bca8 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb @@ -0,0 +1,34 @@ +
      +
      + <%= link_to "New Co-Author", new_panel_personal_conference_desktop_conference_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %> + <%= link_to "New Type", panel_personal_conference_desktop_conference_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %> +
      +
      +
      +
      +
      +
      + <% @conference_co_authors.each_with_index do |co_author,i| %> + <% if ( i % 4 ) == 0 %> +
      +
        + <% end %> +
      • +
          +
        • <%= co_author.co_author %>
        • +
        • +
        • <%= @conference_co_author_relations.find(co_author.conference_co_author_relations_id).relation unless co_author.conference_co_author_relations_id.nil?%>
        • +
        +
        + <%= link_to 'Edit', edit_panel_personal_conference_desktop_conference_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %> + <%= link_to 'Destroy', panel_personal_conference_desktop_conference_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %> +
        +
      • + <% if ( i % 4 ) == 3 %> +
      +
      + <% end %> + <% end %> +
      +
      +
      diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/new.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/new.html.erb new file mode 100644 index 000000000..14e5a8b56 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/new.html.erb @@ -0,0 +1,3 @@ +<%= form_for @conference_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"conferenceCoAuthorformCallback"} , url: panel_personal_conference_desktop_conference_co_authors_path do |f| %> + <%= render partial: 'form', locals: {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/show.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/show.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb index 00289e32a..303aa092e 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_window.html.erb @@ -16,7 +16,7 @@
    • List
    • Add/Edit
    • Conference
    • -
    • Co-Authors
    • +
    • Co-Authors
    • Tags & Keywords
    • Analysis
    • Import
    • diff --git a/vendor/built_in_modules/personal_conference/config/routes.rb b/vendor/built_in_modules/personal_conference/config/routes.rb index 37515409d..bf6466b77 100644 --- a/vendor/built_in_modules/personal_conference/config/routes.rb +++ b/vendor/built_in_modules/personal_conference/config/routes.rb @@ -5,7 +5,9 @@ Rails.application.routes.draw do namespace :desktop do match 'conference_window' => 'conference_windows#conference_window' match 'conference_type' => 'conference_pages#conference_type' - resources :conference_pages + resources :conference_pages, except: :show + resources :conference_co_authors, except: :show + resources :conference_co_author_relations, except: :show end namespace :back_end do match 'writing_conference_setting' => "writing_conferences#writing_conference_setting" ,:as => :writing_conference_setting diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb index 735098d05..22e42f221 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb @@ -22,7 +22,6 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < Appl def create @journal_co_author_relation = JournalCoAuthorRelation.new(params[:journal_co_author_relation]) @journal_co_author_relations = JournalCoAuthorRelation.all - binding.pry if @journal_co_author_relation.save newv = render_to_string partial: "show_form", object: @journal_co_author_relations From 79f0fc1a3b7b1051f7b05ca7b1fc132a0bed7bbe Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Wed, 20 Feb 2013 22:39:15 +0800 Subject: [PATCH 51/53] add announcement header translation file --- .../announcement/config/locales/en.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/vendor/built_in_modules/announcement/config/locales/en.yml b/vendor/built_in_modules/announcement/config/locales/en.yml index d57797d91..98d5f5c4c 100644 --- a/vendor/built_in_modules/announcement/config/locales/en.yml +++ b/vendor/built_in_modules/announcement/config/locales/en.yml @@ -16,4 +16,17 @@ en: 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 + add_new: New + widget: + index: Index widget + bulletins_and_web_links: "Abreast of bulletins and web link" + #init don't merge + all_articles: "All article" + add_new: New + categories: Categories + approval_setting: "Approval setting" + tags: Tag + default_widget: + bulletin_category_with_title: Category + title: Title + postdate: "Post date" From d46abd7caf10fdd8811efb9f406d75282f30d192 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2013 11:12:08 +0800 Subject: [PATCH 52/53] member list edit --- app/controllers/admin/plugins_controller.rb | 12 +- app/views/admin/attributes/edit.html.erb | 27 ++- app/views/admin/plugins/_plugin_list.html.erb | 18 ++ app/views/admin/plugins/index.html.erb | 19 +- .../admin/roles/_attribute_field.html.erb | 26 ++- app/views/admin/roles/edit_sub_role.html.erb | 23 +- app/views/admin/roles/role_field.html.erb | 2 +- app/views/admin/roles/sub_role.html.erb | 2 +- app/views/admin/roles/sub_role_field.html.erb | 2 +- .../users_new_interface/_side_bar.html.erb | 20 +- .../_user_for_listing.html.erb | 9 +- .../admin/users_new_interface/edit.html.erb | 1 + .../attribute_field/_attribute_field.html.erb | 25 ++- .../attribute_field/_list_block.html.erb | 2 +- config/locales/en.yml | 46 ++-- config/locales/zh_tw.yml | 92 +++++++- lib/orbit_app/plugin/registration.rb | 6 + .../back_end/writing_books_controller.rb | 13 ++ .../back_end/writing_books/_filter.html.erb | 8 +- .../writing_books/_writing_book.html.erb | 8 +- .../back_end/writing_books/edit.html.erb | 11 + .../back_end/writing_books/index.html.erb | 16 +- .../back_end/writing_books/new.html.erb | 12 + .../writing_book_setting.html.erb | 9 + vendor/built_in_modules/personal_book/init.rb | 7 +- .../writing_conferences/_filter.html.erb | 8 +- .../writing_conference_setting.html.erb | 9 + .../personal_conference/init.rb | 7 +- .../back_end/diplomas_controller.rb | 13 ++ .../back_end/diplomas/_diploma.html.erb | 8 +- .../back_end/diplomas/_filter.html.erb | 8 +- .../diplomas/diploma_setting.html.erb | 5 + .../back_end/diplomas/edit.html.erb | 7 + .../back_end/diplomas/index.html.erb | 17 +- .../back_end/diplomas/new.html.erb | 8 + .../built_in_modules/personal_diploma/init.rb | 7 +- .../back_end/experiences_controller.rb | 13 ++ .../back_end/experiences/_experience.html.erb | 12 +- .../back_end/experiences/_filter.html.erb | 8 +- .../back_end/experiences/edit.html.erb | 10 + .../experiences/experience_setting.html.erb | 9 + .../back_end/experiences/index.html.erb | 19 +- .../back_end/experiences/new.html.erb | 11 + .../personal_experience/init.rb | 8 +- .../back_end/honors_controller.rb | 13 ++ .../back_end/honors/_filter.html.erb | 8 +- .../back_end/honors/_honor.html.erb | 10 +- .../back_end/honors/edit.html.erb | 10 + .../back_end/honors/honor_setting.html.erb | 9 + .../back_end/honors/index.html.erb | 17 +- .../back_end/honors/new.html.erb | 11 + .../built_in_modules/personal_honor/init.rb | 7 +- .../back_end/writing_journals_controller.rb | 15 +- .../writing_journals/_filter.html.erb | 36 +-- .../_writing_journal.html.erb | 8 +- .../back_end/writing_journals/edit.html.erb | 10 + .../back_end/writing_journals/index.html.erb | 16 +- .../back_end/writing_journals/new.html.erb | 11 + .../writing_journal_setting.html.erb | 9 + .../built_in_modules/personal_journal/init.rb | 7 +- .../personal_lab/back_end/labs_controller.rb | 13 ++ .../back_end/labs/_filter.html.erb | 8 +- .../personal_lab/back_end/labs/_lab.html.erb | 10 +- .../personal_lab/back_end/labs/edit.html.erb | 10 + .../personal_lab/back_end/labs/index.html.erb | 17 +- .../back_end/labs/lab_setting.html.erb | 9 + .../personal_lab/back_end/labs/new.html.erb | 11 + vendor/built_in_modules/personal_lab/init.rb | 7 +- .../back_end/writing_patents/_form.html.erb | 209 ------------------ .../plugin/writing_patents/_form.html.erb | 209 ------------------ .../back_end/writing_patents_controller.rb | 13 ++ .../back_end/writing_patents/_filter.html.erb | 8 +- .../writing_patents/_writing_patent.html.erb | 16 +- .../back_end/writing_patents/edit.html.erb | 10 + .../back_end/writing_patents/index.html.erb | 20 +- .../back_end/writing_patents/new.html.erb | 11 + .../writing_patent_setting.html.erb | 9 + .../built_in_modules/personal_patent/init.rb | 7 +- .../back_end/projects_controller.rb | 13 ++ .../back_end/projects/_filter.html.erb | 8 +- .../back_end/projects/_project.html.erb | 14 +- .../back_end/projects/edit.html.erb | 10 + .../back_end/projects/index.html.erb | 19 +- .../back_end/projects/new.html.erb | 11 + .../projects/project_setting.html.erb | 9 + .../built_in_modules/personal_project/init.rb | 9 +- .../back_end/researchs_controller.rb | 12 +- .../back_end/researchs/_filter.html.erb | 8 +- .../back_end/researchs/_research.html.erb | 10 +- .../back_end/researchs/edit.html.erb | 10 + .../back_end/researchs/index.html.erb | 17 +- .../back_end/researchs/new.html.erb | 11 + .../personal_research/init.rb | 7 +- .../front_end/writing_seminars_controller.rb | 31 --- .../front_end/writing_seminars/index.html.erb | 26 --- .../front_end/writing_seminars/show.html.erb | 36 --- 96 files changed, 844 insertions(+), 814 deletions(-) create mode 100644 app/views/admin/plugins/_plugin_list.html.erb delete mode 100644 vendor/built_in_modules/personal_patent/app - %BDƻs/views/panel/personal_patent/back_end/writing_patents/_form.html.erb delete mode 100644 vendor/built_in_modules/personal_patent/app - %BDƻs/views/panel/personal_patent/plugin/writing_patents/_form.html.erb delete mode 100644 vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/front_end/writing_seminars_controller.rb delete mode 100644 vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/front_end/writing_seminars/index.html.erb delete mode 100644 vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/front_end/writing_seminars/show.html.erb diff --git a/app/controllers/admin/plugins_controller.rb b/app/controllers/admin/plugins_controller.rb index feeff300c..424a482df 100644 --- a/app/controllers/admin/plugins_controller.rb +++ b/app/controllers/admin/plugins_controller.rb @@ -7,7 +7,17 @@ class Admin::PluginsController < ApplicationController @plugins = OrbitApp::Module::Registration.all if(!params[:show_plugin_profile].nil?) - @right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).profile_partial_path rescue 'plugin_summary' + + @right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).admin_partial_path + + if !@right_partial.blank? + respond_to do |format| + format.html { redirect_to( @right_partial ) } + end + else + @right_partial = "admin/users_new_interface/plugin_summary" + end + else @right_partial = "admin/users_new_interface/plugin_summary" end diff --git a/app/views/admin/attributes/edit.html.erb b/app/views/admin/attributes/edit.html.erb index aa87d73c5..252cdf712 100644 --- a/app/views/admin/attributes/edit.html.erb +++ b/app/views/admin/attributes/edit.html.erb @@ -8,6 +8,20 @@

      <%= t(eval(":#{@attribute_type}"))%>

      + +
      + +
      + <% if @attribute.new_record? %> + <%= f.text_field :key, :placeholder => t(:key) %> + <% else %> +
      <%= @attribute.key%>
      + <% end %> +
      +
      + <%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%> + +
      @@ -23,24 +37,13 @@
      -
      - -
      - <% if @attribute.new_record? %> - <%= f.text_field :key, :placeholder => t(:key) %> - <% else %> -
      <%= @attribute.key%>
      - <% end %> -
      -
      - <%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%>
      <% if @attribute._type == "Info" %>
      -

      <%= @attribute.title+ t(:attributes)%>

      +

      <%= @attribute.title+ t(:field)%>

      <%= render :partial=>"shared/attribute_field/attribute_field",:collection=>@attribute.attribute_fields%>
      diff --git a/app/views/admin/plugins/_plugin_list.html.erb b/app/views/admin/plugins/_plugin_list.html.erb new file mode 100644 index 000000000..f583f92ee --- /dev/null +++ b/app/views/admin/plugins/_plugin_list.html.erb @@ -0,0 +1,18 @@ +
      +
      +
      +
      + +
      +
      \ No newline at end of file diff --git a/app/views/admin/plugins/index.html.erb b/app/views/admin/plugins/index.html.erb index f2b0c21bc..cb0d5c7ee 100644 --- a/app/views/admin/plugins/index.html.erb +++ b/app/views/admin/plugins/index.html.erb @@ -4,23 +4,6 @@
      -
      -
      -
      -
      - -
      -
      + <%= render :partial => 'plugin_list' %> <%= render :partial => @right_partial %>
      \ No newline at end of file diff --git a/app/views/admin/roles/_attribute_field.html.erb b/app/views/admin/roles/_attribute_field.html.erb index 8ec2675d2..d9acf6dee 100644 --- a/app/views/admin/roles/_attribute_field.html.erb +++ b/app/views/admin/roles/_attribute_field.html.erb @@ -10,6 +10,17 @@ <%= hidden_field "#{@field_name}[attribute_fields][#{@af_counter}]","to_delete",:value=>false,:class=>"attribute_field_to_delete"%> <%= t(:delete_)%>
      +
      + +
      +
      + <%= text_field "#{@field_name}[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%> +
      +
      +
      + <%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][title_translations]"}%> + +
      @@ -21,15 +32,8 @@
      -
      - -
      -
      - <%= text_field "#{@field_name}[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%> -
      -
      -
      - <%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][title_translations]"}%> + +
      @@ -46,7 +50,7 @@
      <%= content_tag :div,:class=>show_type_panel(attribute_field,"typeA") do%>
      - +