From c6894be962a27dec205fcbc12c4a537f7e1d0581 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Tue, 20 Nov 2012 15:56:52 +0800 Subject: [PATCH 01/44] first version of confined sidebar render --- .../object_auths_new_interface_controller.rb | 8 +- .../admin/users_new_interface_controller.rb | 2 +- app/models/user/attribute_value.rb | 2 +- app/views/layouts/_side_bar.html.erb | 3 +- app/views/layouts/_side_bar_content.html.erb | 109 +------------ app/views/layouts/new_admin.html.erb | 1 + config/mongoid.yml | 2 +- lib/orbit_app.rb | 5 +- lib/orbit_app/helper/context_link_renderer.rb | 12 ++ lib/orbit_app/helper/renderer.rb | 62 +++++++ lib/orbit_app/helper/side_bar_renderer.rb | 43 +++++ lib/orbit_app/module/backend_side_bar.rb | 17 -- lib/orbit_app/module/registration.rb | 8 +- lib/orbit_app/module/side_bar.rb | 151 ++++++++++++++++++ lib/orbit_app/plugin/registration.rb | 15 +- lib/orbit_app/summary.rb | 2 +- .../back_end/bulletin_categorys_controller.rb | 7 +- vendor/built_in_modules/announcement/init.rb | 62 ++++--- 18 files changed, 353 insertions(+), 158 deletions(-) create mode 100644 lib/orbit_app/helper/context_link_renderer.rb create mode 100644 lib/orbit_app/helper/renderer.rb create mode 100644 lib/orbit_app/helper/side_bar_renderer.rb delete mode 100644 lib/orbit_app/module/backend_side_bar.rb create mode 100644 lib/orbit_app/module/side_bar.rb diff --git a/app/controllers/admin/object_auths_new_interface_controller.rb b/app/controllers/admin/object_auths_new_interface_controller.rb index 973f4215..7e0763ff 100644 --- a/app/controllers/admin/object_auths_new_interface_controller.rb +++ b/app/controllers/admin/object_auths_new_interface_controller.rb @@ -1,10 +1,13 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController include OrbitCoreLib::PermissionUnility before_filter :force_order - + + def set_module_app + @module_app = ModuleApp.where(:title=>'Announcement').first + end + def setting - @sys_users = User.all(conditions: {admin: false}).includes(:avatar) @ob_auth = ObjectAuth.find params[:object_auth_id] @options_from_collection_for_select_ob_auth = @ob_auth.siblings.collect{|oa| [oa.auth_obj.pp_object,oa.id] } @@ -60,6 +63,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController def force_order authenticate_user! + set_module_app check_if_user_can_do_object_auth end diff --git a/app/controllers/admin/users_new_interface_controller.rb b/app/controllers/admin/users_new_interface_controller.rb index 01f44016..8302e4d7 100644 --- a/app/controllers/admin/users_new_interface_controller.rb +++ b/app/controllers/admin/users_new_interface_controller.rb @@ -26,7 +26,7 @@ class Admin::UsersNewInterfaceController < ApplicationController def show @user = User.find(params[:id]) - @plugins = OrbitApp::Module::Registration.all + @plugins = OrbitApp::Plugin::Registration.all @profile_data = [] @teacher_data = [] diff --git a/app/models/user/attribute_value.rb b/app/models/user/attribute_value.rb index e335451a..f3995796 100644 --- a/app/models/user/attribute_value.rb +++ b/app/models/user/attribute_value.rb @@ -94,7 +94,7 @@ def unset_all_lang_values unless self[:temp_data].nil? case self.attribute_field.markup when "address" - binding.pry + # binding.pry when 'text_field','text_area' if self.attribute_field.add_more self["val"] = self["temp_data"] diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index 32876b9f..c2c1536b 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -13,7 +13,8 @@
diff --git a/app/views/layouts/_side_bar_content.html.erb b/app/views/layouts/_side_bar_content.html.erb index 66e4542d..479d6216 100644 --- a/app/views/layouts/_side_bar_content.html.erb +++ b/app/views/layouts/_side_bar_content.html.erb @@ -1,4 +1,3 @@ - <%#= content_tag :li, :class => active_for_controllers('purchases') do -%> <%#= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %> <%# end -%> @@ -6,113 +5,7 @@ <%= javascript_include_tag "/static/kernel.js" %> <% end %> -<%= content_tag :li, :class => (active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals') || active_for_app_auth('Announcement') || active_for_ob_auths_object("BulletinCategory") ) do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-announcement') + content_tag(:span, t('admin.announcement')), panel_announcement_back_end_bulletins_path %> - <%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory"))) do -%> - <%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %> - <%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletin_categorys_path), :class =>( active_for_action('bulletin_categorys', 'index') || active_for_ob_auths_object("BulletinCategory") )if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index')if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.bulletin.approval_setting') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_approval_setting_path), :class => active_for_action('approvals', 'setting') if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "announcement"}))), :class => active_for_app_auth('Announcement') if (is_admin? rescue nil) %> - - <% end -%> - -<% end -%> - -<%= content_tag :li, :class =>( active_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')|| active_for_app_auth('news') || active_for_ob_auths_object("NewsBulletinCategory")) do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-announcement') + content_tag(:span, t('admin.news')), panel_news_back_end_news_bulletins_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')) do -%> - <%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_news_bulletins_path), :class => active_for_action('news_bulletins', 'index') %> - <%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_news_back_end_news_bulletin_path), :class => active_for_action('news_bulletins', 'new') if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_news_bulletin_categorys_path), :class => active_for_action('news_bulletin_categorys', 'index') || active_for_ob_auths_object("NewsBulletinCategory") if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_tags_path), :class => active_for_action('/panel/news/back_end/tags', 'index') if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t('announcement.bulletin.approval_setting') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_approval_setting_path), :class => active_for_action('news_approvals', 'setting') if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "news"}))), :class => active_for_app_auth('news') if (is_admin? rescue nil) %> - <% end -%> - -<% end -%> - -<%#= content_tag :li, :class => active_for_controllers('users') do -%> - <%#= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %> -<%# end -%> - -<%= content_tag :li, :class => active_for_controllers('page_contexts') || active_for_app_auth('page_content') || active_for_ob_auths_object("PageContext") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-page') + content_tag(:span, t('admin.page')), panel_page_content_back_end_page_contexts_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('page_contexts')) do -%> - <%#= content_tag :li, link_to(t('admin.all_articles'), panel_page_content_back_end_page_contexts_path), :class => active_for_action('page_context', 'index') %> - <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "page_content"}))), :class => active_for_app_auth('page_content') if (is_admin? rescue nil) %> - <% end -%> - -<% end -%> - -<%= content_tag :li, :class => active_for_controllers('ad_banners', 'ad_images') ||active_for_ob_auths_object("AdBanner") ||active_for_app_auth('ad_banner') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.ad_banner')), admin_ad_banners_path %> - - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('ad_banners', 'ad_images') ) do -%> - <%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> - <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> - <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %> - <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "ad_banner"}))), :class => active_for_app_auth('ad_banners') if (is_admin? rescue nil) %> - <% end -%> -<% end %> - - -<%= content_tag :li, :class => active_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys') || active_for_app_auth('web_resource') || active_for_ob_auths_object("WebLinkCategory") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.link')), panel_web_resource_back_end_web_links_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys')) do -%> - <%= content_tag :li, link_to((t('admin.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_links_path), :class => active_for_action('web_links', 'index') %> - <%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_link_categorys_path), :class => (active_for_action('web_link_categorys', 'index') || active_for_ob_auths_object("WebLinkCategory")) if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "web_resource"}))), :class => active_for_app_auth('web_resource') if (is_admin? rescue nil) %> - <% end -%> -<% end -%> - -<%= content_tag :li, :class => active_for_controllers('albums','album_images','gallery_categories','/panel/gallery/back_end/tags') || active_for_app_auth("gallery") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-picture') + content_tag(:span, t('admin.orbit_gallery')), panel_gallery_back_end_albums_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('albums') ) do -%> - <%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> - <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> - <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %> - <%= content_tag :li, link_to((t('gallery.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_gallery_back_end_gallery_categories_path), :class => active_for_action('gallery_categories','index') %> - <%= content_tag :li, link_to((t('gallery.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %> - <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %> - <% end -%> -<% end %> - -<%= content_tag :li, :class => active_for_controllers('archive_files', 'panel/archive/back_end/tags', 'archive_file_categorys') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-asset') + content_tag(:span, t('admin.archive')), panel_archive_back_end_archive_files_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('archive_files', 'tags', 'archive_file_categorys')) do -%> - <%= content_tag :li, link_to((t('admin.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_files_path), :class => active_for_action('archive_file', 'index') %> - <%= content_tag :li, link_to((t('admin.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_archive_back_end_archive_file_path), :class => active_for_action('archive_file', 'new') %> - <%= content_tag :li, link_to((t('admin.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_file_categorys_path), :class => active_for_action('archive_file_categorys', 'index') %> - <%= content_tag :li, link_to((t('admin.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_tags_path), :class => active_for_action('tags', 'index') %> - <% end -%> -<% end -%> - -<%= content_tag :li, :class => active_for_controllers('cals','panel/calendar/back_end/tags') || active_for_app_auth("calendar") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-calendar') + content_tag(:span, t('admin.calendar')), panel_calendar_back_end_cals_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('cals','calendar_categories') ) do -%> - <%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> - <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> - <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %> - <%= content_tag :li, link_to((t('admin.calendars') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_calendar_back_end_cal_path), :class => active_for_action('cals','new') %> - <%= content_tag :li, link_to(t('admin.tags'), panel_calendar_back_end_tags_path), :class => active_for_action('/panel/calendar/back_end/tags', 'index') %> - <%#= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %> - <% end -%> -<% end %> -<%= content_tag :li, :class => active_for_controllers('locations') || active_for_app_auth("gprs") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.gprs')), panel_gprs_back_end_locations_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('locations') ) do -%> - <%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> - <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> - <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %> - <%#= content_tag :li, link_to((t('calendar.calendars') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_calendar_back_end_cal_path), :class => active_for_action('cals','new') %> - <%#= content_tag :li, link_to(t('gallery.tags'), panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %> - <%#= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %> - <% end -%> -<% end %> +<%=OrbitApp::Module::SideBarRegisition.all.first.render(request,params,current_user) %>
<% flash.each do |key, msg| %> diff --git a/app/views/layouts/new_admin.html.erb b/app/views/layouts/new_admin.html.erb index 7659a38f..26f299fb 100644 --- a/app/views/layouts/new_admin.html.erb +++ b/app/views/layouts/new_admin.html.erb @@ -20,6 +20,7 @@ <% else %> <%= render 'layouts/side_bar' %> <% end %> +
<%= yield %>
diff --git a/config/mongoid.yml b/config/mongoid.yml index 9ed585f0..c41c3db6 100644 --- a/config/mongoid.yml +++ b/config/mongoid.yml @@ -3,7 +3,7 @@ defaults: &defaults port: 37017 # slaves: # - host: slave1.local - port: 27017 + # port: 27017 # - host: slave2.local # port: 27019 diff --git a/lib/orbit_app.rb b/lib/orbit_app.rb index b0e5a735..f218c1e4 100644 --- a/lib/orbit_app.rb +++ b/lib/orbit_app.rb @@ -1,6 +1,9 @@ require "orbit_app/summary" require "orbit_app/dsl" -require "orbit_app/module/backend_side_bar" +require "orbit_app/helper/renderer" +require "orbit_app/helper/side_bar_renderer" +require "orbit_app/helper/context_link_renderer" +require "orbit_app/module/side_bar" require "orbit_app/plugin/summary" require "orbit_app/plugin/registration" require "orbit_app/module/summary" diff --git a/lib/orbit_app/helper/context_link_renderer.rb b/lib/orbit_app/helper/context_link_renderer.rb new file mode 100644 index 00000000..9e1af318 --- /dev/null +++ b/lib/orbit_app/helper/context_link_renderer.rb @@ -0,0 +1,12 @@ +module ContextLinkRenderer + include Renderer + + def render(request,params) + @request = request + @params = params + if display? + content_tag :li, link_to((I18n.t(@label_i18n) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, eval(@path)), :class => (active? ? 'active' : nil) + end + end + +end \ No newline at end of file diff --git a/lib/orbit_app/helper/renderer.rb b/lib/orbit_app/helper/renderer.rb new file mode 100644 index 00000000..3eb09b86 --- /dev/null +++ b/lib/orbit_app/helper/renderer.rb @@ -0,0 +1,62 @@ +module Renderer + include Rails.application.routes.url_helpers + include ActionView::Helpers::UrlHelper + include ActionView::Helpers::TagHelper + include ActionView::Helpers::RenderingHelper + include ActionView::Context + include OrbitBasis::RenderAnywhere + +protected + def active_for_app_auth? + @module_app.id.to_s == @params[:module_app_id] ? true : false + end + + def active_for_ob_auths? + if @params.has_key? :object_auth_id + oa = ObjectAuth.find @params[:object_auth_id] + check_controller = @params[:controller] == 'admin/object_auths_new_interface' + check_object_class = @active_for_object_auth.include? oa.obj_authable_type + return (check_controller and check_object_class) + else + return false + end + end + + def current_user + current_or_guest_user + end + + def current_or_guest_user + @current_user + end + + def request + @request + end + + def default_url_options + _routes.default_url_options + end + + def _routes + @request.env["action_dispatch.routes"] + end + + def controller + @params[:controller] + end + + def action + @params[:action] + end + + def check_user_available_for + + end + + protected + def display? + true + end + +end \ No newline at end of file diff --git a/lib/orbit_app/helper/side_bar_renderer.rb b/lib/orbit_app/helper/side_bar_renderer.rb new file mode 100644 index 00000000..5e04f69e --- /dev/null +++ b/lib/orbit_app/helper/side_bar_renderer.rb @@ -0,0 +1,43 @@ +module SideBarRenderer + include Renderer + include AdminHelper + + def render(request,params,user) + @request = request + @params = params + @current_user = user + if display? + content_tag :li, :class => (module_sidebar_active? ? 'active' : nil) do + buf = link_to( content_tag(:i, nil, :class => @icon_class ) + content_tag(:span, I18n.t( @head_label )), eval(@head_link)) + buf << content_tag( :ul, :class => ("nav nav-list active") )do # visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory")) + @context_links.sort_by! {| obj | obj.priority}.collect do |link| + link.render(request,params) + end.join.html_safe + end + end + end + end + + protected + + def display? #控制sidebar 要不要算圖 + if is_manager? || is_admin? #如果是系統管理員 或 是模組管理員 + true + elsif (@module_app.open rescue false) # 如果app 被設定成 開放 + true + elsif is_member? #如果app 是封閉 那至少需要是 member + true + else + false + end + end + + def module_sidebar_active? + active_for_controller? or active_for_app_auth? or active_for_ob_auths? + end + + def active_for_controller? + @active_for_controllers.include? controller + end + +end \ No newline at end of file diff --git a/lib/orbit_app/module/backend_side_bar.rb b/lib/orbit_app/module/backend_side_bar.rb deleted file mode 100644 index de0ef750..00000000 --- a/lib/orbit_app/module/backend_side_bar.rb +++ /dev/null @@ -1,17 +0,0 @@ -module OrbitApp - module Module - class BackendSideBar - attr_reader :name - - def initialize(name, &block) - @name = name - block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? - end - - # def personal_plugin(*args) - # binding.pry - # end - - end - end -end \ No newline at end of file diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index 2f98592d..9a40eda3 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -33,11 +33,15 @@ module OrbitApp def initialize(name, &block) @name = name + @side_bar = nil block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? end - def plugin - + def side_bar(&block) + @side_bar = SideBarRegisition::SideBar.new(&block) + @side_bar.module_app_key = @name + @side_bar.finalize! + OrbitApp::Module::SideBarRegisition.add(@side_bar) end def personal_plugin(params) diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb new file mode 100644 index 00000000..a1ca3e63 --- /dev/null +++ b/lib/orbit_app/module/side_bar.rb @@ -0,0 +1,151 @@ +module OrbitApp + module Module + module SideBarRegisition + Version = "0.1" + + module ClassMethods + @@side_bars = [] + + def add(var) + @@side_bars << var + end + + def find_by_key(key) + @@side_bars.each{|t| + return t if t.name == key + } + return nil + end + + def all + return @@side_bars + end + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + class SideBar + # include ApplicationHelper + # include AdminHelper + include SideBarRenderer + # def is_admin? + # binding.pry + # end + # def is_manager? + # binding.pry + # end + def initialize( &block) + name = '' + @head_label = name + @context_links = [] + @available_for = [] + @active_for_controllers = [] + @active_for_object_auth = [] + @active_for_app_auth = [] + @head_link = "" + @app_base_path = '' + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + + def module_app_key=(var) + @module_app_title = var + @module_app = ModuleApp.where(:title=>var).desc(:create_date).first + @module_app_key = @module_app.key + end + + def head_label_i18n(var,optoins =nil) + @head_label = var + @icon_class = optoins[:icon_class] + end + + def available_for(var) + @available_for = var + end + + def active_for_controllers(var) + @active_for_controllers = var + end + + def active_for_object_auth(var) + @active_for_object_auth = var + end + + def head_link_path(var) + @head_link = var + end + + def context_link(*var) + new_context_link = ContextLink.new(*var) + @context_links << new_context_link + end + + def finalize! + set_controllers_scope + set_default_active_app_auth + @context_links.each do |t| + t.set_module_app = @module_app + t.finalize! + end + end + + protected + def set_default_active_app_auth + @active_for_app_auth = @module_app.title + end + + def set_controllers_scope + var = @active_for_controllers + @active_for_controllers = [] + var[:private].each do |controller| + @active_for_controllers << "panel/#{@module_app_key}/back_end/"+controller + end unless var[:private].nil? + var[:public].each do |controller| + @active_for_controllers << controller + end unless var[:public].nil? + end + end + + class ContextLink + include ContextLinkRenderer + attr_reader :label_i18n,:available_for,:priority,:path,:active_for_action + + def initialize(label_i18n="NoNameLink",options={}) + @label_i18n = label_i18n + @available_for = options[:available_for] + @priority = options[:priority] || 0 + @path = options[:link_path] || "" + @active_for_action = options[:active_for_action] || [] + @active_for_object_auth = options[:active_for_object_auth] || [] + @active_for_app_auth = options[:active_for_app_auth] || [] + end + + def active? + active_for_action? || active_for_app_auth? || active_for_ob_auths? + end + + def active_for_action? + @active_for_action[controller] == action + end + + def set_module_app=(var) + @module_app = var + @module_app_key = var.key + end + + def finalize! + set_active_actions + end + + protected + def set_active_actions + controller_action_hash = @active_for_action + @active_for_action = Hash[controller_action_hash.map{|controller,action| ["panel/#{@module_app_key}/back_end/"+controller.to_s,action.to_s]}] + end + end + end + end +end \ No newline at end of file diff --git a/lib/orbit_app/plugin/registration.rb b/lib/orbit_app/plugin/registration.rb index f996fc6d..1a6f63f3 100644 --- a/lib/orbit_app/plugin/registration.rb +++ b/lib/orbit_app/plugin/registration.rb @@ -10,8 +10,8 @@ module OrbitApp @@registrations << DataSheet.new(name,&block) end - def new_from_module_app(name,base_path,arg) - @@registrations << DataSheet.new(name,arg,:base_path=>base_path) + def new_from_module_app(name,base_path,*args) + @@registrations << DataSheet.new(name,args,:base_path=>base_path) end def find_by_key(key) @@ -35,14 +35,21 @@ module OrbitApp attr_reader :name attr_reader :base_path + def name + if @name.is_a? Proc + @name.call + else + @name + end + end def initialize(name,partial=nil,*args ,&block) @base_path = args[0][:base_path] - @name = name + @name = partial[0][:i18n].nil? ? name : lambda{ I18n.t(partial[0][:i18n]) } @partial_path = '' unless partial.nil? - @partial_path = partial[:path] + @partial_path = partial[0][:path] end block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? diff --git a/lib/orbit_app/summary.rb b/lib/orbit_app/summary.rb index 05c22f89..d936aa87 100644 --- a/lib/orbit_app/summary.rb +++ b/lib/orbit_app/summary.rb @@ -7,7 +7,7 @@ module OrbitApp def new( name ,&block) @@summaries << Item.new(name,&block) - binding.pry + # binding.pry end def all diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb index c0ae8244..92c841e3 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb @@ -1,7 +1,12 @@ class Panel::Announcement::BackEnd::BulletinCategorysController < OrbitBackendController include OrbitControllerLib::DivisionForDisable before_filter :for_app_manager,:except => [:index] - + before_filter :set_module_app + + def set_module_app + @module_app = ModuleApp.where(:title=>'Announcement').first + end + def index @bulletin_categorys = get_categories_for_index("BulletinCategory") #TODO 需要做 manager ,admin 才可以 all. 其他 available就好 diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb index 9a2c0d43..67be8242 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -2,24 +2,50 @@ module Announcement OrbitApp.registration "Announcement",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile" + personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement' + side_bar do + head_label_i18n 'admin.announcement',:icon_class=>"icons-announcement" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']}) + active_for_object_auth ['BulletinCategory'] + head_link_path "panel_announcement_back_end_bulletins_path" + + context_link 'announcement.all_articles', + :link_path=>"panel_announcement_back_end_bulletins_path" , + :priority=>1, + :active_for_action=>{:bulletins=>:index} + + context_link 'announcement.add_new', + :link_path=>"new_panel_announcement_back_end_bulletin_path" , + :priority=>2, + :active_for_action=>{:bulletins=>:new}, + :available_for => [:manager] + + context_link 'announcement.categories', + :link_path=>"panel_announcement_back_end_bulletin_categorys_path" , + :priority=>3, + :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'announcement.tags', + :link_path=>"panel_announcement_back_end_tags_path" , + :priority=>4, + :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'announcement.approval_setting', + :link_path=>"panel_announcement_back_end_approval_setting_path" , + :priority=>5, + :active_for_object_auth => 'BulletinCategory', + :available_for => [:manager] + + context_link 'admin.module.authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Announcement'}))", + :priority=>6, + :active_for_app_auth => 'Announcement', + :available_for => [:manager] + end end - -end - - -# OrbitApp.backend_side_bar 'News' do - -# block :available_for => [:admin,:guest,:manager,:sub_manager], -# :active_for_controllers=> ['news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals'], -# :active_for_ob_auths_object => ['NewsBulletinCategory'], -# :head_link => panel_news_back_end_news_bulletins_path , -# :head_label=> I18n.t('admin.news') - -# context_link :link=>new_panel_news_back_end_news_bulletin_path , -# :priority=>1,:label=>I18n.t('announcement.add_new'), -# :active_for_action=>{:news_bulletins=>:new} - -# end \ No newline at end of file +end \ No newline at end of file From f9bcb27efc42330f295e9ef41008ae2fde89393f Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Thu, 29 Nov 2012 14:21:46 +0800 Subject: [PATCH 02/44] put module app json into init,making orbit app work with module app. --- .../admin/page_parts_controller.rb | 7 +- app/models/item.rb | 5 +- app/models/module_app.rb | 51 ++++++--- .../admin/page_parts/_module_widget.html.erb | 14 +-- .../admin/page_parts/reload_widgets.js.erb | 2 +- config/list.yml | 7 ++ config/locales/zh_tw.yml | 9 +- lib/orbit_app.rb | 2 + lib/orbit_app/module/front_end.rb | 56 +++++++++ lib/orbit_app/module/registration.rb | 79 +++++++++++-- lib/orbit_app/module/side_bar.rb | 41 ++++--- lib/orbit_app/module/summary.rb | 2 +- lib/orbit_app/module/widget.rb | 108 ++++++++++++++++++ .../announcement/config/locales/zh_tw.yml | 3 + vendor/built_in_modules/announcement/init.rb | 29 ++++- 15 files changed, 349 insertions(+), 66 deletions(-) create mode 100644 lib/orbit_app/module/front_end.rb create mode 100644 lib/orbit_app/module/widget.rb diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index f78c6ae3..f4672800 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -31,9 +31,9 @@ class Admin::PagePartsController < ApplicationController @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] - if @module_app.widgets.any?{|b| b.class == Array} - @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? - end + # if @module_app.widgets.any?{|b| b.class == Array} + # @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? + # end case @module_app.key when 'announcement' @@ -119,7 +119,6 @@ class Admin::PagePartsController < ApplicationController def reload_widget_styles @module_app = ModuleApp.find(params[:module_app_id]) - @widget_style = @module_app.widgets[params[:id]] respond_to do |format| diff --git a/app/models/item.rb b/app/models/item.rb index ae086c7d..243a098a 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -4,7 +4,8 @@ class Item include Mongoid::Timestamps include Mongoid::Tree include Mongoid::Tree::Ordering - + LIST = YAML.load(File.read('config/list.yml')) + field :name field :path field :is_published, :type => Boolean, :default => false @@ -15,7 +16,7 @@ class Item validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/ - validates :name, :exclusion => { :in => LIST[:forbidden_item_names] } + # validates :name, :exclusion => { :in => LIST[:forbidden_item_names] } validates_uniqueness_of :name, :scope => :parent_id validates_presence_of :name validates_associated :parent, :children diff --git a/app/models/module_app.rb b/app/models/module_app.rb index 669d82aa..22fb4814 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -5,30 +5,45 @@ class ModuleApp field :key field :title - field :version - field :organization - field :author - field :intro - field :update_info - field :create_date - field :enable_frontend, type: Boolean, :default => true - - field :app_pages ,type: Array - # field :widgets ,type: Array - field :widgets ,type: Hash - field :widget_fields ,type: Array - + has_many :managers,as: :managing_app ,:class_name => "AppManager" ,:dependent => :destroy#,:foreign_key => "managing_app_id",:inverse_of => :managing_app has_many :sub_managers,as: :sub_managing_app ,:class_name => "AppManager", :dependent => :destroy#,:foreign_key => "sub_managing_app_id",:inverse_of => :sub_managing_app - has_many :tags + # has_many :tags has_many :page_parts has_many :pages has_one :app_auth,dependent: :delete - + before_save :set_key - + + def get_registration + OrbitApp::Module::Registration.find_by_key(key) + end + + # %w{label_i18n }.each do |field| + # define_method(field){|var| get_registration.send("get_#{m}") } + # end + + def label_i18n + reg = get_registration + reg.nil? ? 'Init is not defined completely' : get_registration.get_label_i18n + end + + # def method_missing(m, *args, &block) + # # get_registration.send("get_#{m}") + # end + + def using_default_widget? + !get_registration.get_default_widget.blank? + end + + def get_widget_for_select + widgets = get_registration.get_widgets + ary = widgets.collect{|k,v| [I18n.t(v["label"]),k]} + ary << [I18n.t('widget.default_widget'),'default_widget']if using_default_widget? + end + def is_manager?(user) managing_users.include?(user) end @@ -79,6 +94,10 @@ class ModuleApp end end + def label + I18n.t(label_i18n) + end + protected def set_key diff --git a/app/views/admin/page_parts/_module_widget.html.erb b/app/views/admin/page_parts/_module_widget.html.erb index 44358601..e6a6e2a0 100644 --- a/app/views/admin/page_parts/_module_widget.html.erb +++ b/app/views/admin/page_parts/_module_widget.html.erb @@ -10,12 +10,12 @@
- <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %> + <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :label, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %> <%#= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %> - <%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> + <%= f.select :widget_path, @module_app.get_widget_for_select, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> @@ -34,18 +34,10 @@ - <%= render 'widget_fields' %> - - <%#= f.label :widget_field %> - <%# @module_app.widget_fields.each_with_index do |widget_field, i| %> - <%#= i+1 %> - <%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, (@part.widget_field ? @part.widget_field[i] : nil) ), :include_blank => true %>
- <%# end %> - - <%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, @part.widget_field.collect{|widget_field| widget_field}), {:multiple => :multiple, :size => 6} %>
+
<%= f.label :widget_data_count %> <%= f.text_field :widget_data_count %> diff --git a/app/views/admin/page_parts/reload_widgets.js.erb b/app/views/admin/page_parts/reload_widgets.js.erb index c66c44e9..3b7082fc 100644 --- a/app/views/admin/page_parts/reload_widgets.js.erb +++ b/app/views/admin/page_parts/reload_widgets.js.erb @@ -1,4 +1,4 @@ -$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|k,v| k}) %>"); +$('#widget_list select').html("<%= j options_for_select(@module_app.get_widget_for_select) %>"); $('#widget_style_list').html("<%= escape_javascript(select 'page_part', 'widget_style', @module_app.widgets[@widget_path]) if !@widget_path.blank? %>"); $('#widget_field').html("<%= j render 'widget_fields' %>"); $('#widget_category').html("<%= j render 'widget_categories' %>"); diff --git a/config/list.yml b/config/list.yml index bae7a90d..a3b48cfc 100644 --- a/config/list.yml +++ b/config/list.yml @@ -70,3 +70,10 @@ widget_field_type: - tag - viewcount - poster + +default_widget_style: + - style1 + - style2 + - style3 + - style4 + - style5 \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 1573323b..1971ab2a 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -864,7 +864,14 @@ zh_tw: one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" body: "以下欄位發生問題:" - + widget: + default_widget: 系統預設Widget + _default_widget: + style1: 表格列表 + style2: 單行列佐圖(同邊) + style3: 多行列佐圖(同邊) + style4: 多行列佐圖(異邊) + style5: 單行列佐單圖(同邊) # : <<<<<<< HEAD mongoid: models: diff --git a/lib/orbit_app.rb b/lib/orbit_app.rb index f218c1e4..5b20f7a5 100644 --- a/lib/orbit_app.rb +++ b/lib/orbit_app.rb @@ -4,6 +4,8 @@ require "orbit_app/helper/renderer" require "orbit_app/helper/side_bar_renderer" require "orbit_app/helper/context_link_renderer" require "orbit_app/module/side_bar" +require "orbit_app/module/widget" +require "orbit_app/module/front_end" require "orbit_app/plugin/summary" require "orbit_app/plugin/registration" require "orbit_app/module/summary" diff --git a/lib/orbit_app/module/front_end.rb b/lib/orbit_app/module/front_end.rb new file mode 100644 index 00000000..65f79f8e --- /dev/null +++ b/lib/orbit_app/module/front_end.rb @@ -0,0 +1,56 @@ +module OrbitApp + module Module + module FrontendUtility + Version = "0.1" + + module ClassMethods + @@frontend_pages = [] + + def add(var) + @@frontend_pages << var + end + + def all + return @@frontend_pages + end + + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + class AppPageSet + def initialize(&block) + @frontend_pages = [] + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + def app_page(name,options ={}) + @frontend_pages << AppPage.new(name,options) + end + + def to_module_app_format + @frontend_pages.collect{|t| t.name} + end + + end + + class AppPage + attr_reader :name + + def initialize(name,options ={}) + @name = name + end + + def finalize! + + end + + protected + + end# of AppPage + end # of FrontendUtility + end # of Module +end # of OrbitApp diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index 9a40eda3..c7967663 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -12,7 +12,7 @@ module OrbitApp def find_by_key(key) @@registrations.each{|t| - return t if t.name == key + return t if t.key == key } return nil end @@ -28,20 +28,69 @@ module OrbitApp end class DataSheet - attr_reader :name - attr_reader :base_path + attr_reader :name,:key,:base_path,:module_label def initialize(name, &block) @name = name + @key = name.underscore.singularize @side_bar = nil + @front_end_app_pages = nil block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + setup_module_app + end + + def setup_module_app + module_app = ModuleApp.first(conditions: {:key=>@key,:title=>name}) + module_app = ModuleApp.new(:key=>@key,:title=>name) if module_app.nil? + + begin + module_app.save(:validate=>false) + rescue + retry + end + + end + + def get_label_i18n + @module_label + end + + def get_default_widget + if @widget_set.nil? # Init not defining widget + return {} + elsif @widget_set.get_default_widget.nil? # Init had defining widget,but say nothing about default_widget + return {} + else + @widget_set.get_default_widget.to_module_app_format + end + end + + def get_enable_frontend + (@front_end_app_pages.nil? ? false : true) + end + + def get_app_pages + @front_end_app_pages.nil? ? [] : @front_end_app_pages.to_module_app_format + end + + def get_widgets + @widget_set.nil? ? {} : @widget_set.to_module_app_format + end + + def get_categories + eval(@widget_set.categories_query) rescue nil + end + + def get_tags + eval(@widget_set.tags_query) rescue nil + end + + def front_end(&block) + @front_end_app_pages = FrontendUtility::AppPageSet.new(&block) end def side_bar(&block) - @side_bar = SideBarRegisition::SideBar.new(&block) - @side_bar.module_app_key = @name - @side_bar.finalize! - OrbitApp::Module::SideBarRegisition.add(@side_bar) + @side_bar = SideBarRegisition::SideBar.new(@name,@key,&block) end def personal_plugin(params) @@ -49,10 +98,20 @@ module OrbitApp Plugin::Registration.new_from_module_app(@name,@base_path,params) end - def base_url(var) - @base_path = var + def widgets(&block) + # @widgets = WidgetRegisition::WidgetSet.new(&block) + @widget_set = WidgetUtility::WidgetSet.new(&block) + + # @widgets = widget_set.widgets + # @default_widget = widget_set.default_widget end - end + + %w{module_label category base_url version organization author intro update_info}.each do |field| + define_method(field){|var| instance_variable_set( "@" + field, var)} + end + + end # of class DataSheet + end end end \ No newline at end of file diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb index a1ca3e63..d82cac84 100644 --- a/lib/orbit_app/module/side_bar.rb +++ b/lib/orbit_app/module/side_bar.rb @@ -37,8 +37,7 @@ module OrbitApp # def is_manager? # binding.pry # end - def initialize( &block) - name = '' + def initialize(name = '',key,&block) @head_label = name @context_links = [] @available_for = [] @@ -48,18 +47,16 @@ module OrbitApp @head_link = "" @app_base_path = '' block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + # setup_module_app(module_app_key) + @module_app_key = key + finalize! + SideBarRegisition.add(self) end - def module_app_key=(var) - @module_app_title = var - @module_app = ModuleApp.where(:title=>var).desc(:create_date).first - @module_app_key = @module_app.key - end - - def head_label_i18n(var,optoins =nil) + def head_label_i18n(var,options ={}) @head_label = var - @icon_class = optoins[:icon_class] + @icon_class = options[:icon_class] end def available_for(var) @@ -85,17 +82,23 @@ module OrbitApp def finalize! set_controllers_scope - set_default_active_app_auth + # set_default_active_app_auth @context_links.each do |t| - t.set_module_app = @module_app + # t.set_module_app = @module_app t.finalize! end end protected - def set_default_active_app_auth - @active_for_app_auth = @module_app.title - end + # def setup_module_app(var) + # @module_app_title = var + # @module_app = ModuleApp.where(:key=>var).desc(:create_date).first + # @module_app_key = @module_app.key + # end + + # def set_default_active_app_auth + # @active_for_app_auth = @module_app.title + # end def set_controllers_scope var = @active_for_controllers @@ -131,10 +134,10 @@ module OrbitApp @active_for_action[controller] == action end - def set_module_app=(var) - @module_app = var - @module_app_key = var.key - end + # def set_module_app=(var) + # @module_app = var + # @module_app_key = var.key + # end def finalize! set_active_actions diff --git a/lib/orbit_app/module/summary.rb b/lib/orbit_app/module/summary.rb index c3098cb1..16634055 100644 --- a/lib/orbit_app/module/summary.rb +++ b/lib/orbit_app/module/summary.rb @@ -3,7 +3,7 @@ require "orbit_app/summary" module OrbitApp module Module - module Summary + module Summary include OrbitApp::Summary class Item diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb new file mode 100644 index 00000000..708dc28d --- /dev/null +++ b/lib/orbit_app/module/widget.rb @@ -0,0 +1,108 @@ +module OrbitApp + module Module + module WidgetUtility + Version = "0.1" + + module ClassMethods + @@widgets = [] + + def add(var) + @@widgets << var + end + + def all + return @@widgets + end + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + class WidgetSet + attr_reader :widgets,:categories_query,:tags_query + def initialize(&block) + @widgets = [] + @default_widget = nil + @categories_query = '' + @tags_query = '' + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + %w{categories_query tags_query}.each do |field| + define_method(field){|var| instance_variable_set( "@" + field, var)} + end + + def get_categories + @categories_query + end + + def get_tags + @tags_query + end + + def default_widget(&block) + @default_widget = DefaultWidget.new(&block) + end + + def customize_widget(name,label,options ={}) + @widgets << Widget.new(name,label,options) + end + + def to_module_app_format + hash = {} + @widgets.collect{|t| hash[t.name] = t.to_hash} + hash + end + + def get_default_widget + return @default_widget + end + + end + + class DefaultWidget + def initialize(&block) + @query = nil + @image = nil + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + def to_module_app_format + {:query=>@query,:image=>@image} rescue nil + end + + def query(var) + @query = var + end + + def image(var) + @image = var + end + + end + + class Widget + attr_reader :name,:default_template,:fields + + def initialize(name,label,options ={}) + @name = name + @fields = options[:fields] + @label = label + end + + def to_hash + {:name => @name,:fields=>@fields,:label=>@label} + end + + def finalize! + + end + + protected + + end# of widget + end # of WidgetRegisition + end # of Module +end # of OrbitApp 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 4814586b..5fd57d49 100644 --- a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml @@ -15,3 +15,6 @@ zh_tw: search: 搜尋公告 update_bulletin_success: 公告已成功更新 update_bulletin_category_success: 公告類別已成功更新 + widget: + index: 目錄Widget + bulletins_and_web_links: 公告與連結並排Widget \ 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 67be8242..2d8b9ae4 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -1,9 +1,36 @@ module Announcement OrbitApp.registration "Announcement",:type=> 'ModuleApp' do - + module_label 'announcement.announcement' base_url File.expand_path File.dirname(__FILE__) personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement' + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + front_end do + app_page 'bulletins' + end + + category ["BulletinCategory"] + + widgets do + default_widget do + query 'Bulletin.all' + image :image + end + + categories_query 'BulletinCategory.all' + tags_query 'AnnouncementTag.all' + + customize_widget "index","announcement.widget.index",:fields=>["title","category","postdate"] + customize_widget "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" + # item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"] + # item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" + end + side_bar do head_label_i18n 'admin.announcement',:icon_class=>"icons-announcement" available_for [:admin,:guest,:manager,:sub_manager] From 4bc80f2bd349685fd9638ae8e7d5549abdc7bc8a Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Mon, 3 Dec 2012 18:52:36 +0800 Subject: [PATCH 03/44] default widgets and sidebar. --- .../admin/object_auths_controller.rb | 2 +- .../object_auths_new_interface_controller.rb | 2 +- .../admin/page_parts_controller.rb | 45 ++++++++++--------- app/controllers/default_widget_controller.rb | 43 ++++++++++++++++++ app/controllers/orbit_backend_controller.rb | 34 +------------- app/controllers/orbit_frontend_controller.rb | 1 + app/controllers/orbit_widget_controller.rb | 1 + app/helpers/admin_helper.rb | 2 +- app/models/module_app.rb | 30 ++++++++++--- app/models/object_auth.rb | 2 +- .../page_parts/reload_widget_styles.js.erb | 6 ++- app/views/default_widget/typeA.html.erb | 19 ++++++++ app/views/default_widget/typeB.html.erb | 22 +++++++++ app/views/default_widget/typeC.html.erb | 15 +++++++ app/views/layouts/_side_bar_content.html.erb | 3 +- config/locales/zh_tw.yml | 10 ++--- config/routes.rb | 2 +- lib/orbit_app/helper/context_link_renderer.rb | 22 ++++++++- lib/orbit_app/helper/renderer.rb | 7 ++- lib/orbit_app/helper/side_bar_renderer.rb | 5 ++- lib/orbit_app/module/registration.rb | 4 +- lib/orbit_app/module/side_bar.rb | 9 +++- lib/orbit_app/module/widget.rb | 15 +++++-- lib/orbit_core_lib.rb | 36 +++++++++++++-- lib/parsers/parser_common.rb | 8 +++- .../back_end/bulletin_categorys_controller.rb | 4 ++ .../announcement/config/locales/zh_tw.yml | 8 +++- vendor/built_in_modules/announcement/init.rb | 10 +++-- 28 files changed, 275 insertions(+), 92 deletions(-) create mode 100644 app/controllers/default_widget_controller.rb create mode 100644 app/views/default_widget/typeA.html.erb create mode 100644 app/views/default_widget/typeB.html.erb create mode 100644 app/views/default_widget/typeC.html.erb diff --git a/app/controllers/admin/object_auths_controller.rb b/app/controllers/admin/object_auths_controller.rb index dab659b4..d407d3db 100644 --- a/app/controllers/admin/object_auths_controller.rb +++ b/app/controllers/admin/object_auths_controller.rb @@ -1,5 +1,5 @@ class Admin::ObjectAuthsController < ApplicationController - include OrbitCoreLib::PermissionUnility + include OrbitCoreLib::PermissionUtility layout "new_admin" before_filter :force_order # before_filter :is_admin? ,:only => :index diff --git a/app/controllers/admin/object_auths_new_interface_controller.rb b/app/controllers/admin/object_auths_new_interface_controller.rb index 7e0763ff..33c0dfe8 100644 --- a/app/controllers/admin/object_auths_new_interface_controller.rb +++ b/app/controllers/admin/object_auths_new_interface_controller.rb @@ -1,5 +1,5 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController - include OrbitCoreLib::PermissionUnility + include OrbitCoreLib::PermissionUtility before_filter :force_order def set_module_app diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index f4672800..a188ce1b 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -28,27 +28,29 @@ class Admin::PagePartsController < ApplicationController @module_app = @part.module_app ? @part.module_app : @module_apps[0] @r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag @tag_objects = @r_tag.classify.constantize.all rescue nil - - @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] - + @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] + @widget_style = @module_app.get_widget_style[@widget_path][:style] unless @widget_path.nil? + + @categories = @module_app.get_registration.get_categories + @tags = @module_app.get_registration.get_tags # if @module_app.widgets.any?{|b| b.class == Array} # @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? # end - case @module_app.key - when 'announcement' - @categories = BulletinCategory.all - @tags = AnnouncementTag.all - when 'news' - @categories = NewsBulletinCategory.all - @tags = NewsTag.all - when 'web_resource' - @categories = WebLinkCategory.all - @tags = WebResourceTag.all - when 'archive' - @categories = ArchiveFileCategory.all - @tags = ArchiveTag.all - end + # case @module_app.key + # when 'announcement' + # @categories = BulletinCategory.all + # @tags = AnnouncementTag.all + # when 'news' + # @categories = NewsBulletinCategory.all + # @tags = NewsTag.all + # when 'web_resource' + # @categories = WebLinkCategory.all + # @tags = WebResourceTag.all + # when 'archive' + # @categories = ArchiveFileCategory.all + # @tags = ArchiveTag.all + # end end def create @@ -60,7 +62,7 @@ class Admin::PagePartsController < ApplicationController params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field] params[:page_part][:widget_field_type] = nil - + if @part.update_attributes(params[:page_part]) set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu') flash.now[:notice] = t('update.success.content') @@ -95,7 +97,7 @@ class Admin::PagePartsController < ApplicationController @widget_path = @module_app.widgets.keys[0] if ( @module_app.widgets[0].blank? ) - @widget_style = @module_app.widgets[@widget_path] if ( !@widget_path.blank? ) + @widget_style = @module_app.get_widget_style[@widget_path][:style] unless @widget_path.nil? case @module_app.key when 'announcement' @@ -119,8 +121,9 @@ class Admin::PagePartsController < ApplicationController def reload_widget_styles @module_app = ModuleApp.find(params[:module_app_id]) - @widget_style = @module_app.widgets[params[:id]] - + style_ary = @module_app.get_widget_style[params[:id]] + @widget_style = style_ary[:style] unless style_ary.nil? + respond_to do |format| format.js {} end diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb new file mode 100644 index 00000000..6997840b --- /dev/null +++ b/app/controllers/default_widget_controller.rb @@ -0,0 +1,43 @@ +class DefaultWidgetController< OrbitWidgetController + + def front_end_available(var) + @page_part = PagePart.find params[:part_id] + @page_part.module_app.enable_frontend? + end + + def default_widget + @tag_class = nil + + @default_widget = @page_part.module_app.get_default_widget + @widget_image_field = @default_widget[:image] + data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3) + @data = eval(@default_widget[:query]).limit(data_limit).includes(@widget_image_field) + @fields = @page_part.widget_field + + case params[:type] + when "typeA" + @tag_class = 'defulat_widget_typeA' + render "typeA" + when /typeB_/ + @tag_class = "defulat_widget_#{params[:type]}" + render "typeB" + when "typeC" + @tag_class = 'defulat_widget_typeC' + render "typeC" + end + + + + # {"inner"=>"true", + # "category_id"=>"false", + # "tag_id"=>"", + # "page"=>"", + # "search_query"=>"", + # "part_title"=>"", + # "part_id"=>"50ac426f83e75219d20000a7", + # "controller"=>"default_widget", + # "action"=>"default_widget", + # "type"=>"typeA"} + end + +end diff --git a/app/controllers/orbit_backend_controller.rb b/app/controllers/orbit_backend_controller.rb index 530415ba..ce6640a8 100644 --- a/app/controllers/orbit_backend_controller.rb +++ b/app/controllers/orbit_backend_controller.rb @@ -1,41 +1,11 @@ class OrbitBackendController < ApplicationController - #before_filter :setup_vars - #before_filter :set_current_user - - # before_filter {|c| c.front_end_available(@app_title)} - # before_filter :check_user_can_use - include OrbitCoreLib::PermissionUnility + include OrbitCoreLib::AppBackendUtility + include OrbitCoreLib::PermissionUtility include AdminHelper include ApplicationHelper layout 'new_admin' - def setup_vars - @app_title ||= controller_path.split('/')[1].singularize - @module_app ||= ModuleApp.first(conditions: {:key => @app_title} ) - end - - private - - def force_order_for_visitor - setup_vars - set_current_user - end - - - def force_order_for_user - setup_vars - set_current_user - authenticate_user! - check_user_can_use - end - - def check_user_can_use - unless check_permission - #redirect_to polymorphic_path(['panel',@app_title,'back_end','public']) - redirect_to root_url - end - end def get_sorted_and_filtered(object_class, query=nil) objects = get_objects(object_class, query) diff --git a/app/controllers/orbit_frontend_controller.rb b/app/controllers/orbit_frontend_controller.rb index e1be8167..386b8cda 100644 --- a/app/controllers/orbit_frontend_controller.rb +++ b/app/controllers/orbit_frontend_controller.rb @@ -1,3 +1,4 @@ class OrbitFrontendController< OrbitFrontendComponentController + end \ No newline at end of file diff --git a/app/controllers/orbit_widget_controller.rb b/app/controllers/orbit_widget_controller.rb index 47e24fe0..f006cd43 100644 --- a/app/controllers/orbit_widget_controller.rb +++ b/app/controllers/orbit_widget_controller.rb @@ -1,3 +1,4 @@ class OrbitWidgetController< OrbitFrontendComponentController + end \ No newline at end of file diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index 120e1245..7cb28b96 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -16,7 +16,7 @@ module AdminHelper end def is_admin? - current_or_guest_user.admin? + current_or_guest_user.admin? rescue false end def is_member? diff --git a/app/models/module_app.rb b/app/models/module_app.rb index 22fb4814..b64ac908 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -1,7 +1,7 @@ class ModuleApp include Mongoid::Document include Mongoid::Timestamps - include OrbitCoreLib::ObjectTokenUnility + include OrbitCoreLib::ObjectTokenUtility field :key field :title @@ -21,9 +21,17 @@ class ModuleApp OrbitApp::Module::Registration.find_by_key(key) end - # %w{label_i18n }.each do |field| - # define_method(field){|var| get_registration.send("get_#{m}") } - # end + %w{widget_styles }.each do |field| + define_method(field){|var| get_registration.send("get_#{field}") } + end + + def get_default_widget + get_registration.get_default_widget + end + + def enable_frontend? + get_registration.get_enable_frontend + end def label_i18n reg = get_registration @@ -38,10 +46,20 @@ class ModuleApp !get_registration.get_default_widget.blank? end + def get_widget_style + widgets = get_registration.get_widgets + end + def get_widget_for_select widgets = get_registration.get_widgets - ary = widgets.collect{|k,v| [I18n.t(v["label"]),k]} - ary << [I18n.t('widget.default_widget'),'default_widget']if using_default_widget? + ary = widgets.collect do |k,v| + if k == 'default_widget' + [I18n.t('widget.default_widget'),'default_widget'] + else + [I18n.t(v[:label]),k] + end + + end end def is_manager?(user) diff --git a/app/models/object_auth.rb b/app/models/object_auth.rb index 6c7405ca..f2ef5c04 100644 --- a/app/models/object_auth.rb +++ b/app/models/object_auth.rb @@ -1,5 +1,5 @@ class ObjectAuth < PrototypeAuth - include OrbitCoreLib::ObjectTokenUnility + include OrbitCoreLib::ObjectTokenUtility validates_uniqueness_of :title ,:scope => [:obj_authable_type,:obj_authable_id] #{ |c| } belongs_to :obj_authable, polymorphic: true after_save :check_user_has_can_access_app diff --git a/app/views/admin/page_parts/reload_widget_styles.js.erb b/app/views/admin/page_parts/reload_widget_styles.js.erb index 41b2ad9c..051108d6 100644 --- a/app/views/admin/page_parts/reload_widget_styles.js.erb +++ b/app/views/admin/page_parts/reload_widget_styles.js.erb @@ -1 +1,5 @@ -$('#widget_style_list select').html("<%= j options_for_select(@module_app.widgets[params[:id]]) %>") +<% if @widget_style.nil? %> + $('#widget_style_list select').html("") +<% else %> + $('#widget_style_list select').html("<%= j options_for_select(@widget_style) %>") +<% end %> diff --git a/app/views/default_widget/typeA.html.erb b/app/views/default_widget/typeA.html.erb new file mode 100644 index 00000000..22422516 --- /dev/null +++ b/app/views/default_widget/typeA.html.erb @@ -0,0 +1,19 @@ +<%= content_tag :div,:class=>@tag_class do%> +
+ + + + <% @fields.each do |field|%> + + <% end %> + + + <% @data.each do |row_data| %> + + <% @fields.each do |field|%> + + <% end %> + + <% end %> +
<%= content_tag(:span,field[0],:class=>field[1])%>
<%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%>
+ <% end %> diff --git a/app/views/default_widget/typeB.html.erb b/app/views/default_widget/typeB.html.erb new file mode 100644 index 00000000..8c3cc34e --- /dev/null +++ b/app/views/default_widget/typeB.html.erb @@ -0,0 +1,22 @@ +<%= content_tag :div,:class=>@tag_class do%> +
    + + <% @data.each do |row_data| %> + <%= content_tag(:li) do %> +
    + <%= image_tag row_data.send(@widget_image_field)%> + +
    +
    + <% @fields.each do |field|%> + <%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%> + <% end %> +
    + + <% end %> + <% end %> + + +
+
more
+ <% end %> diff --git a/app/views/default_widget/typeC.html.erb b/app/views/default_widget/typeC.html.erb new file mode 100644 index 00000000..4fceefc3 --- /dev/null +++ b/app/views/default_widget/typeC.html.erb @@ -0,0 +1,15 @@ +<%= content_tag :div,:class=>@tag_class do%> +
+ <%= image_tag @data.first.send(@widget_image_field)%> +
+
    + <% @data.each do |row_data| %> + <%= content_tag(:li) do %> + <% @fields.each do |field|%> + <%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%> + <% end %> + <% end %> + <% end %> +
+
more
+ <% end %> diff --git a/app/views/layouts/_side_bar_content.html.erb b/app/views/layouts/_side_bar_content.html.erb index 479d6216..532390fb 100644 --- a/app/views/layouts/_side_bar_content.html.erb +++ b/app/views/layouts/_side_bar_content.html.erb @@ -4,8 +4,7 @@ <% content_for :page_specific_javascript do %> <%= javascript_include_tag "/static/kernel.js" %> <% end %> - -<%=OrbitApp::Module::SideBarRegisition.all.first.render(request,params,current_user) %> +<%=OrbitApp::Module::SideBarRegisition.all.first.render(request,params,current_user,@module_app) %>
<% flash.each do |key, msg| %> diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 1971ab2a..8979f7bf 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -867,11 +867,11 @@ zh_tw: widget: default_widget: 系統預設Widget _default_widget: - style1: 表格列表 - style2: 單行列佐圖(同邊) - style3: 多行列佐圖(同邊) - style4: 多行列佐圖(異邊) - style5: 單行列佐單圖(同邊) + typeA: 表格列表 + typeB_style2: 單行列佐圖(同邊) + typeB_style3: 多行列佐圖(同邊) + typeB_style4: 多行列佐圖(異邊) + typeC: 單行列佐單圖(同邊) # : <<<<<<< HEAD mongoid: models: diff --git a/config/routes.rb b/config/routes.rb index 9b584ebe..01129e1f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -220,7 +220,7 @@ Orbit::Application.routes.draw do # match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal' - + match '/panel/orbit_app/widget/:type' => 'default_widget#default_widget' match '/panel/:app_name/front_end/:app_action/:id(/:controller_action)' => 'pages#show_from_link', :constraints => lambda { |request| !request.query_string.include?("inner=true") diff --git a/lib/orbit_app/helper/context_link_renderer.rb b/lib/orbit_app/helper/context_link_renderer.rb index 9e1af318..a34f6cb4 100644 --- a/lib/orbit_app/helper/context_link_renderer.rb +++ b/lib/orbit_app/helper/context_link_renderer.rb @@ -1,12 +1,32 @@ module ContextLinkRenderer include Renderer - def render(request,params) + def render(request,params,module_app,user) + @module_app = module_app @request = request @params = params + @current_user = user if display? content_tag :li, link_to((I18n.t(@label_i18n) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, eval(@path)), :class => (active? ? 'active' : nil) end end +protected + def display? + @available_for.each do |available_for_in_sym| + result = case available_for_in_sym + when :all + true + when :manager + @module_app.is_manager? @current_user + when :sub_manager + @module_app.is_sub_manager? @current_user + else + (eval(available_for_in_sym).include? @current_user rescue false) + end # of case + return true if result || @current_user.admin? + end # of collect + false + end + end \ No newline at end of file diff --git a/lib/orbit_app/helper/renderer.rb b/lib/orbit_app/helper/renderer.rb index 3eb09b86..ee2ffb23 100644 --- a/lib/orbit_app/helper/renderer.rb +++ b/lib/orbit_app/helper/renderer.rb @@ -8,10 +8,15 @@ module Renderer protected def active_for_app_auth? - @module_app.id.to_s == @params[:module_app_id] ? true : false + if @module_app.nil? + false + else + @module_app.id.to_s == @params[:module_app_id] ? true : false + end end def active_for_ob_auths? + if @params.has_key? :object_auth_id oa = ObjectAuth.find @params[:object_auth_id] check_controller = @params[:controller] == 'admin/object_auths_new_interface' diff --git a/lib/orbit_app/helper/side_bar_renderer.rb b/lib/orbit_app/helper/side_bar_renderer.rb index 5e04f69e..3fd680ef 100644 --- a/lib/orbit_app/helper/side_bar_renderer.rb +++ b/lib/orbit_app/helper/side_bar_renderer.rb @@ -2,7 +2,8 @@ module SideBarRenderer include Renderer include AdminHelper - def render(request,params,user) + def render(request,params,user,module_app) + @module_app = module_app @request = request @params = params @current_user = user @@ -11,7 +12,7 @@ module SideBarRenderer buf = link_to( content_tag(:i, nil, :class => @icon_class ) + content_tag(:span, I18n.t( @head_label )), eval(@head_link)) buf << content_tag( :ul, :class => ("nav nav-list active") )do # visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory")) @context_links.sort_by! {| obj | obj.priority}.collect do |link| - link.render(request,params) + link.render(request,params,@module_app,@current_user) end.join.html_safe end end diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index c7967663..d94de028 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -78,11 +78,11 @@ module OrbitApp end def get_categories - eval(@widget_set.categories_query) rescue nil + @widget_set.get_categories end def get_tags - eval(@widget_set.tags_query) rescue nil + @widget_set.get_tags end def front_end(&block) diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb index d82cac84..7d733bfa 100644 --- a/lib/orbit_app/module/side_bar.rb +++ b/lib/orbit_app/module/side_bar.rb @@ -46,9 +46,9 @@ module OrbitApp @active_for_app_auth = [] @head_link = "" @app_base_path = '' + @module_app_key = key block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? # setup_module_app(module_app_key) - @module_app_key = key finalize! SideBarRegisition.add(self) end @@ -76,6 +76,7 @@ module OrbitApp end def context_link(*var) + var[1].merge!(:module_app_key=>@module_app_key) unless @module_app_key.nil? new_context_link = ContextLink.new(*var) @context_links << new_context_link end @@ -124,10 +125,14 @@ module OrbitApp @active_for_action = options[:active_for_action] || [] @active_for_object_auth = options[:active_for_object_auth] || [] @active_for_app_auth = options[:active_for_app_auth] || [] + @module_app_key = options[:module_app_key] end def active? - active_for_action? || active_for_app_auth? || active_for_ob_auths? + for_action = @active_for_action.blank? ? false : active_for_action? + for_app_auth = @active_for_app_auth.blank? ? false : active_for_app_auth? + for_ob_auth = @active_for_object_auth.blank? ? false : active_for_ob_auths? + for_action || for_app_auth || for_ob_auth end def active_for_action? diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb index 708dc28d..5c6932bd 100644 --- a/lib/orbit_app/module/widget.rb +++ b/lib/orbit_app/module/widget.rb @@ -35,11 +35,11 @@ module OrbitApp end def get_categories - @categories_query + eval(@categories_query) rescue nil end def get_tags - @tags_query + eval(@tags_query) rescue nil end def default_widget(&block) @@ -53,6 +53,7 @@ module OrbitApp def to_module_app_format hash = {} @widgets.collect{|t| hash[t.name] = t.to_hash} + hash["default_widget"]= DefaultWidget.get_interface_args unless @default_widget.blank? hash end @@ -63,12 +64,19 @@ module OrbitApp end class DefaultWidget + STYLE = ["typeA","typeB_style2","typeB_style3","typeB_style4","typeC"] + def initialize(&block) @query = nil @image = nil block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? end + def self.get_interface_args + #will need to work with design + {:name=>"default_widget",:field=>nil,:label=>'label',:style=>STYLE} + end + def to_module_app_format {:query=>@query,:image=>@image} rescue nil end @@ -90,10 +98,11 @@ module OrbitApp @name = name @fields = options[:fields] @label = label + @style= options[:style] end def to_hash - {:name => @name,:fields=>@fields,:label=>@label} + {:name => @name,:fields=>@fields,:label=>@label,:style=>@style} end def finalize! diff --git a/lib/orbit_core_lib.rb b/lib/orbit_core_lib.rb index 3abeeddd..5be4de3b 100644 --- a/lib/orbit_core_lib.rb +++ b/lib/orbit_core_lib.rb @@ -81,7 +81,7 @@ module OrbitCoreLib end query1 = auth_object_space.any_in({sub_role_ids: sub_role_ids_ary}).excludes(blocked_user_ids: user.id) - query2 = auth_object_space.any_of({all: true},{privilege_user_ids: user.id},{role_ids: user.role.id}).excludes(blocked_user_ids: user.id) + query2 = auth_object_space.any_of({all: true},{privilege_user_ids: user.id},{role_ids: user.role_ids}).excludes(blocked_user_ids: user.id) result = (query1 + query2).uniq result.collect{|t| t.obj_authable}.delete_if{|val| val==nil} end @@ -128,7 +128,7 @@ module OrbitCoreLib end end - module ObjectTokenUnility + module ObjectTokenUtility def self.included(base) base.instance_eval("field :s_token") base.instance_eval("after_create :generate_token") @@ -145,7 +145,7 @@ module OrbitCoreLib end end - module PermissionUnility + module PermissionUtility private def check_permission(type = :use) permission_grant = current_or_guest_user.admin?? true : false @@ -168,4 +168,34 @@ module OrbitCoreLib ModuleApp.first(conditions: {s_token: token}) end end + + module AppBackendUtility + def setup_vars + @app_title ||= controller_path.split('/')[1].singularize + @module_app ||= ModuleApp.first(conditions: {:key => @app_title} ) + end + + private + + def force_order_for_visitor + setup_vars + set_current_user + end + + + def force_order_for_user + setup_vars + set_current_user + authenticate_user! + check_user_can_use + end + + def check_user_can_use + unless check_permission + #redirect_to polymorphic_path(['panel',@app_title,'back_end','public']) + redirect_to root_url + end + end + end + end diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 047f72e6..0c18bf0b 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -215,7 +215,13 @@ module ParserCommon when 'text' ret << part.content rescue '' when 'module_widget' - url = "/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" + url = case part.widget_path + when 'default_widget' + "/panel/orbit_app/widget/#{part.widget_style}?inner=true" + else + "/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" + end + options = "&category_id=#{!part[:category].blank? ? part[:category].blank? : 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}&part_id=#{part.id}" ret << "
" when 'public_r_tag' diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb index 7b5abb1f..f1fd138c 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb @@ -3,6 +3,10 @@ class Panel::Announcement::BackEnd::BulletinCategorysController < OrbitBackendCo before_filter :for_app_manager,:except => [:index,:get_categorys_json,:get_bulletins_json] + before_filter :force_order_for_visitor,:only=>[:index,:get_categorys_json,:get_bulletins_json] + before_filter :force_order_for_user,:except => [:index,:get_categorys_json,:get_bulletins_json] + before_filter :for_app_sub_manager,:except => [:index,:get_categorys_json,:get_bulletins_json] + def index @bulletin_categorys = get_categories_for_index("BulletinCategory") #TODO 需要做 manager ,admin 才可以 all. 其他 available就好 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 5fd57d49..ada03b99 100644 --- a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml @@ -17,4 +17,10 @@ zh_tw: update_bulletin_category_success: 公告類別已成功更新 widget: index: 目錄Widget - bulletins_and_web_links: 公告與連結並排Widget \ No newline at end of file + bulletins_and_web_links: 公告與連結並排Widget + #init don't merge + all_articles: 全部公告 + add_new: 新增 + categories: 分類 + approval_setting: 審核權限 + tags: 標籤 \ 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 2d8b9ae4..69da05ce 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -25,7 +25,7 @@ module Announcement categories_query 'BulletinCategory.all' tags_query 'AnnouncementTag.all' - customize_widget "index","announcement.widget.index",:fields=>["title","category","postdate"] + customize_widget "index","announcement.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] customize_widget "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" # item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"] # item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" @@ -42,13 +42,14 @@ module Announcement context_link 'announcement.all_articles', :link_path=>"panel_announcement_back_end_bulletins_path" , :priority=>1, - :active_for_action=>{:bulletins=>:index} + :active_for_action=>{:bulletins=>:index}, + :available_for => [:all] context_link 'announcement.add_new', :link_path=>"new_panel_announcement_back_end_bulletin_path" , :priority=>2, :active_for_action=>{:bulletins=>:new}, - :available_for => [:manager] + :available_for => [:sub_manager] context_link 'announcement.categories', :link_path=>"panel_announcement_back_end_bulletin_categorys_path" , @@ -59,12 +60,13 @@ module Announcement context_link 'announcement.tags', :link_path=>"panel_announcement_back_end_tags_path" , :priority=>4, - :active_for_action=>{:bulletin_categorys=>:index}, + # :active_for_action=>{:bulletin_categorys=>:index}, :available_for => [:manager] context_link 'announcement.approval_setting', :link_path=>"panel_announcement_back_end_approval_setting_path" , :priority=>5, + :active_for_action=>{:approvals=>:setting}, :active_for_object_auth => 'BulletinCategory', :available_for => [:manager] From 99f28a0cba8f1ed52a8b6f5b6bb36972c9663123 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Wed, 5 Dec 2012 18:35:58 +0800 Subject: [PATCH 04/44] sidebar rewrited --- app/views/layouts/_side_bar_content.html.erb | 5 +- lib/orbit_app/helper/context_link_renderer.rb | 11 +-- lib/orbit_app/helper/side_bar_renderer.rb | 9 +-- lib/orbit_app/module/registration.rb | 8 ++- lib/orbit_app/module/side_bar.rb | 17 ++++- vendor/built_in_modules/ad_banner/init.rb | 49 ++++++++++++++ vendor/built_in_modules/announcement/init.rb | 4 +- vendor/built_in_modules/archive/init.rb | 62 +++++++++++++++++ vendor/built_in_modules/calendar/init.rb | 34 ++++++++++ vendor/built_in_modules/gallery/init.rb | 59 ++++++++++++++++ vendor/built_in_modules/gprs/init.rb | 43 ++++++++++++ .../miss_module/config/locales/zh_tw.yml | 10 +++ vendor/built_in_modules/page_content/init.rb | 33 +++++++++ vendor/built_in_modules/web_resource/init.rb | 67 +++++++++++++++++++ 14 files changed, 395 insertions(+), 16 deletions(-) create mode 100644 vendor/built_in_modules/ad_banner/init.rb create mode 100644 vendor/built_in_modules/archive/init.rb create mode 100644 vendor/built_in_modules/calendar/init.rb create mode 100644 vendor/built_in_modules/gallery/init.rb create mode 100644 vendor/built_in_modules/gprs/init.rb create mode 100644 vendor/built_in_modules/miss_module/config/locales/zh_tw.yml create mode 100644 vendor/built_in_modules/page_content/init.rb create mode 100644 vendor/built_in_modules/web_resource/init.rb diff --git a/app/views/layouts/_side_bar_content.html.erb b/app/views/layouts/_side_bar_content.html.erb index 61129656..b05d65f6 100644 --- a/app/views/layouts/_side_bar_content.html.erb +++ b/app/views/layouts/_side_bar_content.html.erb @@ -4,7 +4,10 @@ <% content_for :page_specific_javascript do %> <%= javascript_include_tag "/static/kernel.js" %> <% end %> -<%=OrbitApp::Module::SideBarRegisition.all.first.render(request,params,current_user,@module_app) %> + +<%OrbitApp::Module::SideBarRegisition.all.each do |t| %> + <%= t.render(request,params,current_user,@module_app) %> +<% end %>
<% flash.each do |key, msg| %> diff --git a/lib/orbit_app/helper/context_link_renderer.rb b/lib/orbit_app/helper/context_link_renderer.rb index a34f6cb4..d4014fae 100644 --- a/lib/orbit_app/helper/context_link_renderer.rb +++ b/lib/orbit_app/helper/context_link_renderer.rb @@ -1,11 +1,12 @@ module ContextLinkRenderer include Renderer - def render(request,params,module_app,user) - @module_app = module_app + def render(request,params,current_module_app,current_user,belong_module_app) + @current_module_app = current_module_app + @belong_module_app = belong_module_app @request = request @params = params - @current_user = user + @current_user = current_user if display? content_tag :li, link_to((I18n.t(@label_i18n) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, eval(@path)), :class => (active? ? 'active' : nil) end @@ -18,9 +19,9 @@ protected when :all true when :manager - @module_app.is_manager? @current_user + @belong_module_app.is_manager? @current_user when :sub_manager - @module_app.is_sub_manager? @current_user + @belong_module_app.is_sub_manager? @current_user else (eval(available_for_in_sym).include? @current_user rescue false) end # of case diff --git a/lib/orbit_app/helper/side_bar_renderer.rb b/lib/orbit_app/helper/side_bar_renderer.rb index 3fd680ef..ba6f7c7d 100644 --- a/lib/orbit_app/helper/side_bar_renderer.rb +++ b/lib/orbit_app/helper/side_bar_renderer.rb @@ -2,8 +2,9 @@ module SideBarRenderer include Renderer include AdminHelper - def render(request,params,user,module_app) - @module_app = module_app + def render(request,params,user,current_module_app) + @belong_module_app = get_module_app + @current_module_app = current_module_app @request = request @params = params @current_user = user @@ -12,7 +13,7 @@ module SideBarRenderer buf = link_to( content_tag(:i, nil, :class => @icon_class ) + content_tag(:span, I18n.t( @head_label )), eval(@head_link)) buf << content_tag( :ul, :class => ("nav nav-list active") )do # visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory")) @context_links.sort_by! {| obj | obj.priority}.collect do |link| - link.render(request,params,@module_app,@current_user) + link.render(request,params,@current_module_app,@current_user,@belong_module_app) end.join.html_safe end end @@ -24,7 +25,7 @@ module SideBarRenderer def display? #控制sidebar 要不要算圖 if is_manager? || is_admin? #如果是系統管理員 或 是模組管理員 true - elsif (@module_app.open rescue false) # 如果app 被設定成 開放 + elsif (@current_module_app.open rescue false) # 如果app 被設定成 開放 true elsif is_member? #如果app 是封閉 那至少需要是 member true diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index d94de028..4c64f629 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -39,8 +39,12 @@ module OrbitApp setup_module_app end + def get_module_app + ModuleApp.first(conditions: {:key=>@key,:title=>name}) + end + def setup_module_app - module_app = ModuleApp.first(conditions: {:key=>@key,:title=>name}) + module_app = get_module_app module_app = ModuleApp.new(:key=>@key,:title=>name) if module_app.nil? begin @@ -90,7 +94,7 @@ module OrbitApp end def side_bar(&block) - @side_bar = SideBarRegisition::SideBar.new(@name,@key,&block) + @side_bar = SideBarRegisition::SideBar.new(@name,@key,method(:get_module_app),&block) end def personal_plugin(params) diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb index 7d733bfa..050df87a 100644 --- a/lib/orbit_app/module/side_bar.rb +++ b/lib/orbit_app/module/side_bar.rb @@ -17,6 +17,10 @@ module OrbitApp return nil end + def render_all(request,params,user,current_module_app) + @@side_bars.collect{|t| t.render(request,params,user,current_module_app)}.join.html_safe + end + def all return @@side_bars end @@ -37,7 +41,7 @@ module OrbitApp # def is_manager? # binding.pry # end - def initialize(name = '',key,&block) + def initialize(name = '',key,get_module_app,&block) @head_label = name @context_links = [] @available_for = [] @@ -47,12 +51,16 @@ module OrbitApp @head_link = "" @app_base_path = '' @module_app_key = key + @get_module_app = get_module_app block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? # setup_module_app(module_app_key) finalize! SideBarRegisition.add(self) end + def get_module_app + @get_module_app.call + end def head_label_i18n(var,options ={}) @head_label = var @@ -76,7 +84,7 @@ module OrbitApp end def context_link(*var) - var[1].merge!(:module_app_key=>@module_app_key) unless @module_app_key.nil? + var[1].merge!({:module_app_key=>@module_app_key,:get_module_app=>@get_module_app}) unless @module_app_key.nil? new_context_link = ContextLink.new(*var) @context_links << new_context_link end @@ -126,6 +134,11 @@ module OrbitApp @active_for_object_auth = options[:active_for_object_auth] || [] @active_for_app_auth = options[:active_for_app_auth] || [] @module_app_key = options[:module_app_key] + @get_module_app = options[:get_module_app] + end + + def get_module_app + @get_module_app.call end def active? diff --git a/vendor/built_in_modules/ad_banner/init.rb b/vendor/built_in_modules/ad_banner/init.rb new file mode 100644 index 00000000..6776ee0a --- /dev/null +++ b/vendor/built_in_modules/ad_banner/init.rb @@ -0,0 +1,49 @@ +module AdBanner + OrbitApp.registration "AdBanner",:type=> 'ModuleApp' do + module_label 'ad_banner.ad_banner' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/ad_banner/plugin/profile",:i18n=>'admin.ad_banner' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + # front_end do + # app_page 'bulletins' + # end + + # category ["BulletinCategory"] + + # widgets do + # # default_widget do + # # query 'Bulletin.all' + # # image :image + # # end + + # # categories_query 'BulletinCategory.all' + # # tags_query 'AdBannerTag.all' + + # # customize_widget "index","ad_banner.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] + # # customize_widget "bulletins_and_web_links","ad_banner.widget.bulletins_and_web_links" + + # # item "index","ad_banner.widget.index",:default_template=>true,:fields=>["title","category","postdate"] + # # item "bulletins_and_web_links","ad_banner.widget.bulletins_and_web_links" + # end + + side_bar do + head_label_i18n 'admin.ad_banner',:icon_class=>"icons-landscape" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['ad_banners', 'ad_images']}) + + head_link_path "admin_ad_banners_path" + + context_link 'module_authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'ad_banner'}))", + :priority=>6, + :active_for_app_auth => 'ad_banners', + :available_for => [:admin] + end + end +end diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb index a15242d3..225b9bae 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -32,7 +32,7 @@ module Announcement end side_bar do - head_label_i18n 'admin.announcement',:icon_class=>"icons-announcement" + head_label_i18n 'admin.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'] @@ -74,7 +74,7 @@ module Announcement :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Announcement'}))", :priority=>6, :active_for_app_auth => 'Announcement', - :available_for => [:manager] + :available_for => [:admin] end end end diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb new file mode 100644 index 00000000..565b2cdf --- /dev/null +++ b/vendor/built_in_modules/archive/init.rb @@ -0,0 +1,62 @@ +module Archive + OrbitApp.registration "Archive",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.archive' + base_url File.expand_path File.dirname(__FILE__) + personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'admin.archive' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + front_end do + app_page 'archive_files' + end + + widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + # categories_query 'BulletinCategory.all' + # tags_query 'ArchiveTag.all' + customize_widget "archive_files","archive.widget.archive_files",:style=>[] + end + + side_bar do + head_label_i18n 'miss_module_i18n.archive',:icon_class=>"icons-archive" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['archive_file_categorys'],: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', + :link_path=>"panel_archive_back_end_archive_files_path" , + :priority=>1, + :active_for_action=>{:archive_file=>:index}, + :available_for => [:all] + + context_link 'add', + :link_path=>"new_panel_archive_back_end_archive_file_path" , + :priority=>2, + :active_for_action=>{:archive_file=>:new}, + :available_for => [:admin] + + context_link 'categories', + :link_path=>"panel_archive_back_end_archive_file_categorys_path" , + :priority=>3, + :active_for_action=>{:archive_file_categorys=>:index}, + :available_for => [:manager] + + context_link 'tags', + :link_path=>"panel_archive_back_end_tags_path" , + :priority=>4, + # :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:admin] + + end + end +end diff --git a/vendor/built_in_modules/calendar/init.rb b/vendor/built_in_modules/calendar/init.rb new file mode 100644 index 00000000..fc318e6c --- /dev/null +++ b/vendor/built_in_modules/calendar/init.rb @@ -0,0 +1,34 @@ +module Calendar + OrbitApp.registration "Calendar",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.calendar' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/calendar/plugin/profile",:i18n=>'admin.calendar' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + side_bar do + head_label_i18n 'miss_module_i18n.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', + :link_path=>"new_panel_calendar_back_end_cal_path" , + :priority=>1, + :active_for_action=>{:cals=>:new}, + :available_for => [:manager] + + context_link 'tags', + :link_path=>"panel_calendar_back_end_tags_path" , + :priority=>4, + # :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + end + end +end diff --git a/vendor/built_in_modules/gallery/init.rb b/vendor/built_in_modules/gallery/init.rb new file mode 100644 index 00000000..e7db1e81 --- /dev/null +++ b/vendor/built_in_modules/gallery/init.rb @@ -0,0 +1,59 @@ +module Gallery + OrbitApp.registration "Gallery",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.gallery' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/gallery/plugin/profile",:i18n=>'admin.gallery' + + version "0.1" + organization "Rulingcom" + author "Visual dep" + intro "A simple and amazing gallery" + update_info 'some update_info' + + front_end do + app_page 'albums' + end + + category ["gallery_categories"] + + widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + categories_query 'GalleryCategory.all' + # tags_query 'GalleryTag.all' + + customize_widget "albums","gallery.widget.albums",:fields=>[],:style=>[] + + end + + side_bar do + head_label_i18n 'miss_module_i18n.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'] + + head_link_path "panel_gallery_back_end_albums_path" + + context_link 'gallery.categories', + :link_path=>"panel_gallery_back_end_gallery_categories_path" , + :priority=>3, + :active_for_action=>{:gallery_categories=>:index}, + :available_for => [:manager] + + context_link 'tags', + :link_path=>"panel_gallery_back_end_tags_path" , + :priority=>4, + # :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'module_authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'gallery'}))", + :priority=>6, + :active_for_app_auth => 'gallery', + :available_for => [:admin] + end + end +end diff --git a/vendor/built_in_modules/gprs/init.rb b/vendor/built_in_modules/gprs/init.rb new file mode 100644 index 00000000..99de7772 --- /dev/null +++ b/vendor/built_in_modules/gprs/init.rb @@ -0,0 +1,43 @@ +module Location + OrbitApp.registration "Location",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.location' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' + + # version "0.1" + # organization "Rulingcom" + # author "RD dep" + # intro "I am intro" + # update_info 'some update_info' + + # front_end do + # app_page 'bulletins' + # end + + # category ["BulletinCategory"] + + # widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + # categories_query 'BulletinCategory.all' + # tags_query 'LocationTag.all' + + # customize_widget "index","location.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] + # customize_widget "bulletins_and_web_links","location.widget.bulletins_and_web_links" + # # item "index","location.widget.index",:default_template=>true,:fields=>["title","category","postdate"] + # # item "bulletins_and_web_links","location.widget.bulletins_and_web_links" + # end + + side_bar do + head_label_i18n 'miss_module_i18n.location',:icon_class=>"icons-location" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['locations']}) + + head_link_path "panel_gprs_back_end_locations_path" + + end + end +end 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 new file mode 100644 index 00000000..b91058c4 --- /dev/null +++ b/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml @@ -0,0 +1,10 @@ +zh_tw: + + miss_module_i18n: + archive: 檔案室 + _archive: + all: 全部檔案 + calendar: 日曆模組 + calendars: 日曆 + gallery: 相簿 + location: Location diff --git a/vendor/built_in_modules/page_content/init.rb b/vendor/built_in_modules/page_content/init.rb new file mode 100644 index 00000000..2bf8a2f7 --- /dev/null +++ b/vendor/built_in_modules/page_content/init.rb @@ -0,0 +1,33 @@ +module PageContent + + OrbitApp.registration "PageContent",:type=> 'ModuleApp' do + module_label 'page' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + front_end do + app_page 'page_contexts' + end + + side_bar do + head_label_i18n 'page',:icon_class=>"icons-page" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['page_contexts']}) + active_for_object_auth ['PageContext'] + + head_link_path "panel_page_content_back_end_page_contexts_path" + + context_link 'module_authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'page_content'}))", + :priority=>1, + :active_for_app_auth => 'PageContext', + :available_for => [:admin] + end + end +end diff --git a/vendor/built_in_modules/web_resource/init.rb b/vendor/built_in_modules/web_resource/init.rb new file mode 100644 index 00000000..c581506b --- /dev/null +++ b/vendor/built_in_modules/web_resource/init.rb @@ -0,0 +1,67 @@ +module WebResource + OrbitApp.registration "WebResource",:type=> 'ModuleApp' do + module_label 'link' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/web_resource/plugin/profile",:i18n=>'admin.web_resource' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + category ["WebLinkCategory"] + + widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + categories_query 'BulletinCategory.all' + tags_query 'WebResourceTag.all' + + customize_widget "home_list","web_resource.widget.home_list" + + end + + side_bar do + head_label_i18n 'link',:icon_class=>"icons-link" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['web_links', 'web_link_categorys']}) + active_for_object_auth ['WebLinkCategory'] + + head_link_path "panel_web_resource_back_end_web_links_path" + + context_link 'list_', + :link_path=>"panel_web_resource_back_end_web_links_path" , + :priority=>1, + :active_for_action=>{:bulletins=>:index}, + :available_for => [:all] + + context_link 'link', + :link_path=>"new_panel_web_resource_back_end_web_link_path" , + :priority=>2, + :active_for_action=>{:bulletins=>:new}, + :available_for => [:sub_manager] + + context_link 'categories', + :link_path=>"panel_web_resource_back_end_web_link_categorys_path" , + :priority=>3, + :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'tags', + :link_path=>"panel_web_resource_back_end_tags_path" , + :priority=>4, + # :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'module_authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'web_resource'}))", + :priority=>6, + :active_for_app_auth => 'web_resource', + :available_for => [:admin] + end + end +end From e07fb7d434d3338ac070de9a9d63298bc7e75cb2 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 7 Dec 2012 12:36:25 +0800 Subject: [PATCH 05/44] Remove GPRS --- app/uploaders/gprs_uploader.rb | 61 --------------- vendor/built_in_modules/gprs/.gitignore | 6 -- vendor/built_in_modules/gprs/Gemfile | 17 ---- vendor/built_in_modules/gprs/MIT-LICENSE | 20 ----- vendor/built_in_modules/gprs/README.rdoc | 3 - vendor/built_in_modules/gprs/Rakefile | 39 ---------- .../gprs/app/assets/images/gprs/.gitkeep | 0 .../gprs/app/assets/javascripts/gprs/.gitkeep | 0 .../panel/gprs/back_end/locations.js | 2 - .../gprs/app/assets/stylesheets/gprs/.gitkeep | 0 .../panel/gprs/back_end/locations.css | 4 - .../gprs/app/controllers/.gitkeep | 0 .../gprs/back_end/locations_controller.rb | 77 ------------------- .../gprs/app/helpers/.gitkeep | 0 .../panel/gprs/back_end/locations_helper.rb | 2 - .../gprs/app/mailers/.gitkeep | 0 .../built_in_modules/gprs/app/models/.gitkeep | 0 .../gprs/app/models/location.rb | 11 --- .../built_in_modules/gprs/app/views/.gitkeep | 0 .../gprs/back_end/locations/_form.html.erb | 30 -------- .../gprs/back_end/locations/edit.html.erb | 4 - .../gprs/back_end/locations/index.html.erb | 34 -------- .../gprs/back_end/locations/new.html.erb | 3 - .../gprs/back_end/locations/show.html.erb | 0 vendor/built_in_modules/gprs/config/routes.rb | 12 --- vendor/built_in_modules/gprs/gprs.gemspec | 23 ------ vendor/built_in_modules/gprs/init.rb | 43 ----------- vendor/built_in_modules/gprs/lib/gprs.rb | 4 - .../built_in_modules/gprs/lib/gprs/engine.rb | 4 - .../built_in_modules/gprs/lib/gprs/version.rb | 3 - .../gprs/lib/tasks/gprs_tasks.rake | 4 - vendor/built_in_modules/gprs/script/rails | 6 -- .../built_in_modules/gprs/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 - .../gprs/test/dummy/app/mailers/.gitkeep | 0 .../gprs/test/dummy/app/models/.gitkeep | 0 .../app/views/layouts/application.html.erb | 14 ---- .../gprs/test/dummy/config.ru | 4 - .../gprs/test/dummy/config/application.rb | 45 ----------- .../gprs/test/dummy/config/boot.rb | 10 --- .../gprs/test/dummy/config/database.yml | 25 ------ .../gprs/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 ---- .../gprs/test/dummy/config/locales/en.yml | 5 -- .../gprs/test/dummy/config/routes.rb | 58 -------------- .../gprs/test/dummy/lib/assets/.gitkeep | 0 .../gprs/test/dummy/log/.gitkeep | 0 .../gprs/test/dummy/public/404.html | 26 ------- .../gprs/test/dummy/public/422.html | 26 ------- .../gprs/test/dummy/public/500.html | 26 ------- .../gprs/test/dummy/public/favicon.ico | 0 .../gprs/test/dummy/script/rails | 6 -- .../back_end/locations_controller_test.rb | 14 ---- .../built_in_modules/gprs/test/gprs_test.rb | 7 -- .../gprs/test/integration/navigation_test.rb | 10 --- .../built_in_modules/gprs/test/test_helper.rb | 10 --- .../gprs/back_end/locations_helper_test.rb | 4 - 68 files changed, 915 deletions(-) delete mode 100644 app/uploaders/gprs_uploader.rb delete mode 100644 vendor/built_in_modules/gprs/.gitignore delete mode 100644 vendor/built_in_modules/gprs/Gemfile delete mode 100644 vendor/built_in_modules/gprs/MIT-LICENSE delete mode 100644 vendor/built_in_modules/gprs/README.rdoc delete mode 100644 vendor/built_in_modules/gprs/Rakefile delete mode 100644 vendor/built_in_modules/gprs/app/assets/images/gprs/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/assets/javascripts/gprs/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js delete mode 100644 vendor/built_in_modules/gprs/app/assets/stylesheets/gprs/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css delete mode 100644 vendor/built_in_modules/gprs/app/controllers/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb delete mode 100644 vendor/built_in_modules/gprs/app/helpers/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb delete mode 100644 vendor/built_in_modules/gprs/app/mailers/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/models/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/models/location.rb delete mode 100644 vendor/built_in_modules/gprs/app/views/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/show.html.erb delete mode 100644 vendor/built_in_modules/gprs/config/routes.rb delete mode 100644 vendor/built_in_modules/gprs/gprs.gemspec delete mode 100644 vendor/built_in_modules/gprs/init.rb delete mode 100644 vendor/built_in_modules/gprs/lib/gprs.rb delete mode 100644 vendor/built_in_modules/gprs/lib/gprs/engine.rb delete mode 100644 vendor/built_in_modules/gprs/lib/gprs/version.rb delete mode 100644 vendor/built_in_modules/gprs/lib/tasks/gprs_tasks.rake delete mode 100755 vendor/built_in_modules/gprs/script/rails delete mode 100644 vendor/built_in_modules/gprs/test/dummy/Rakefile delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/assets/javascripts/application.js delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/assets/stylesheets/application.css delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/controllers/application_controller.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/helpers/application_helper.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/mailers/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/models/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/views/layouts/application.html.erb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config.ru delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/application.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/boot.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/database.yml delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/environment.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/environments/development.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/environments/production.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/environments/test.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/backtrace_silencers.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/inflections.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/mime_types.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/secret_token.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/session_store.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/wrap_parameters.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/locales/en.yml delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/routes.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/lib/assets/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/test/dummy/log/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/test/dummy/public/404.html delete mode 100644 vendor/built_in_modules/gprs/test/dummy/public/422.html delete mode 100644 vendor/built_in_modules/gprs/test/dummy/public/500.html delete mode 100644 vendor/built_in_modules/gprs/test/dummy/public/favicon.ico delete mode 100755 vendor/built_in_modules/gprs/test/dummy/script/rails delete mode 100644 vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb delete mode 100644 vendor/built_in_modules/gprs/test/gprs_test.rb delete mode 100644 vendor/built_in_modules/gprs/test/integration/navigation_test.rb delete mode 100644 vendor/built_in_modules/gprs/test/test_helper.rb delete mode 100644 vendor/built_in_modules/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb diff --git a/app/uploaders/gprs_uploader.rb b/app/uploaders/gprs_uploader.rb deleted file mode 100644 index 4ce41321..00000000 --- a/app/uploaders/gprs_uploader.rb +++ /dev/null @@ -1,61 +0,0 @@ -class GprsUploader < CarrierWave::Uploader::Base - - # Include RMagick or ImageScience support: - # include CarrierWave::RMagick - # include CarrierWave::ImageScience - include CarrierWave::MiniMagick - - # Choose what kind of storage to use for this uploader: - # storage :file - # storage :s3 - - # Override the directory where uploaded files will be stored. - # This is a sensible default for uploaders that are meant to be mounted: - def store_dir - "gprs/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" - end - - # Provide a default URL as a default if there hasn't been a file uploaded: - # def default_url - # "/images/fallback/" + [version_name, "default.png"].compact.join('_') - # end - - # Process files as they are uploaded: - # process :scale => [200, 300] - # - # def scale(width, height) - # # do something - # end - - # Create different versions of your uploaded files: - # version :thumb do - # process :scale => [50, 50] - # end - - version :thumb do - process :resize_to_fill => [150, 120] - end - - # Add a white list of extensions which are allowed to be uploaded. - # For images you might use something like this: - # def extension_white_list - # %w(jpg jpeg gif png) - # end - - # Override the filename of the uploaded files: - # def filename - # "something.jpg" if original_filename - # end - -# def manipulate! -# raise current_path.inspect -# image = ::MiniMagick::Image.open(current_path) -# image = yield(image) -# image.write(current_path) -# ::MiniMagick::Image.open(current_path) -# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e -# raise CarrierWave::ProcessingError.new("Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: #{e}") -# end - -end - diff --git a/vendor/built_in_modules/gprs/.gitignore b/vendor/built_in_modules/gprs/.gitignore deleted file mode 100644 index 1463de6d..00000000 --- a/vendor/built_in_modules/gprs/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/log/*.log -test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/gprs/Gemfile b/vendor/built_in_modules/gprs/Gemfile deleted file mode 100644 index cdc455ae..00000000 --- a/vendor/built_in_modules/gprs/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "http://rubygems.org" - -# Declare your gem's dependencies in gprs.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/vendor/built_in_modules/gprs/MIT-LICENSE b/vendor/built_in_modules/gprs/MIT-LICENSE deleted file mode 100644 index 406f17b7..00000000 --- a/vendor/built_in_modules/gprs/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2012 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/gprs/README.rdoc b/vendor/built_in_modules/gprs/README.rdoc deleted file mode 100644 index 6cc30110..00000000 --- a/vendor/built_in_modules/gprs/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Gprs - -This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/gprs/Rakefile b/vendor/built_in_modules/gprs/Rakefile deleted file mode 100644 index e9f3324c..00000000 --- a/vendor/built_in_modules/gprs/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Gprs' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/vendor/built_in_modules/gprs/app/assets/images/gprs/.gitkeep b/vendor/built_in_modules/gprs/app/assets/images/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/assets/javascripts/gprs/.gitkeep b/vendor/built_in_modules/gprs/app/assets/javascripts/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js b/vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js deleted file mode 100644 index dee720fa..00000000 --- a/vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/vendor/built_in_modules/gprs/app/assets/stylesheets/gprs/.gitkeep b/vendor/built_in_modules/gprs/app/assets/stylesheets/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css b/vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css deleted file mode 100644 index afad32db..00000000 --- a/vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/vendor/built_in_modules/gprs/app/controllers/.gitkeep b/vendor/built_in_modules/gprs/app/controllers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb b/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb deleted file mode 100644 index 1ba13703..00000000 --- a/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController - - #before_filter :clean_values, :only => [:create, :update] - - before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete] - before_filter :force_order_for_user,:except => [:get_locations,:index] - #before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations] - - def index - @locations = Location.all - respond_to do |format| - format.html # new.html.erb - format.json { render json: @locations } - end - end - - def new - @location = Location.new - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @location } - end - end - - def edit - @location = Location.find(params[:id]) - end - - def show - @location = Location.find(params[:id]) - respond_to do |format| - format.html - format.json { render json: @location } - end - end - - def create - @location = Location.new(params[:location]) - @location.save! - redirect_to panel_gprs_back_end_locations_url - end - - def update - @location = Location.find(params[:id]) - @location.update_attributes(params[:location]) - redirect_to panel_gprs_back_end_locations_url - end - - def destroy - @location = Location.find(params[:id]) - @location.destroy - redirect_to panel_gprs_back_end_locations_url - - end - - def get_locations - locations = Location.all - @data = Array.new - - locations.each do |location| - picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}" - thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}" - @data << { name: location.name, - pic_url: picurl, - thumb_url: thumburl, - longitude: location.longitude, - latitude: location.latitude, - description: location.description } - end - - #print readable json - render :json => JSON.pretty_generate({location: @data}) - - #render :json => {location: @data}.to_json - end -end diff --git a/vendor/built_in_modules/gprs/app/helpers/.gitkeep b/vendor/built_in_modules/gprs/app/helpers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb b/vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb deleted file mode 100644 index 50985d54..00000000 --- a/vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Panel::Gprs::BackEnd::LocationsHelper -end diff --git a/vendor/built_in_modules/gprs/app/mailers/.gitkeep b/vendor/built_in_modules/gprs/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/models/.gitkeep b/vendor/built_in_modules/gprs/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/models/location.rb b/vendor/built_in_modules/gprs/app/models/location.rb deleted file mode 100644 index f6455920..00000000 --- a/vendor/built_in_modules/gprs/app/models/location.rb +++ /dev/null @@ -1,11 +0,0 @@ -class Location - include Mongoid::Document - include Mongoid::Timestamps - - mount_uploader :file, GprsUploader - - field :name - field :description - field :longitude, type: Float - field :latitude, type: Float -end diff --git a/vendor/built_in_modules/gprs/app/views/.gitkeep b/vendor/built_in_modules/gprs/app/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb deleted file mode 100644 index 62e8b21b..00000000 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -
- -
- <%= f.text_field :name, :class=>"span4", :placeholder => "Area" %> -
-
-
- -
- <%= f.file_field :file %> -
-
-
- -
- <%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %> - <%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %> -
-
-
- -
- <%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %> -
-
-
-
- <%= f.submit "Save", :class=>"btn" %> -
-
diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb deleted file mode 100644 index 82a59afa..00000000 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= form_for @location, :url=> panel_gprs_back_end_location_path(@location), :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> - diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb deleted file mode 100644 index 95b72b73..00000000 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - <%if is_manager? %> - - - <% end %> - - - - <% @locations.each do |location| %> - - - - - - - <%if is_manager? %> - - - <%end%> - - - <% end %> - -
<%= t('location.picture') %><%= t('location.name') %><%= t('location.longitude') %><%= t('location.latitude') %><%= t('location.description') %><%= t('location.edit') %><%= t('location.delete') %>
<%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %><%= location.name%><%= location.longitude%><%= location.latitude%><%= location.description%><%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %><%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %>
-<%if is_manager? %> -<%= link_to 'New', new_panel_gprs_back_end_location_path %> -<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb deleted file mode 100644 index 4f911d83..00000000 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @location, :url=> panel_gprs_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/show.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/show.html.erb deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/config/routes.rb b/vendor/built_in_modules/gprs/config/routes.rb deleted file mode 100644 index 0ba8a27c..00000000 --- a/vendor/built_in_modules/gprs/config/routes.rb +++ /dev/null @@ -1,12 +0,0 @@ -Rails.application.routes.draw do - namespace :panel do - namespace :gprs do - namespace :back_end do - - match "locations/get_locations" => "locations#get_locations" - - resources :locations - end - end - end -end diff --git a/vendor/built_in_modules/gprs/gprs.gemspec b/vendor/built_in_modules/gprs/gprs.gemspec deleted file mode 100644 index a701f924..00000000 --- a/vendor/built_in_modules/gprs/gprs.gemspec +++ /dev/null @@ -1,23 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "gprs/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "gprs" - s.version = Gprs::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of Gprs." - s.description = "TODO: Description of Gprs." - - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", "~> 3.1.8" - # s.add_dependency "jquery-rails" - - s.add_development_dependency "sqlite3" -end diff --git a/vendor/built_in_modules/gprs/init.rb b/vendor/built_in_modules/gprs/init.rb deleted file mode 100644 index 99de7772..00000000 --- a/vendor/built_in_modules/gprs/init.rb +++ /dev/null @@ -1,43 +0,0 @@ -module Location - OrbitApp.registration "Location",:type=> 'ModuleApp' do - module_label 'miss_module_i18n.location' - base_url File.expand_path File.dirname(__FILE__) - # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' - - # version "0.1" - # organization "Rulingcom" - # author "RD dep" - # intro "I am intro" - # update_info 'some update_info' - - # front_end do - # app_page 'bulletins' - # end - - # category ["BulletinCategory"] - - # widgets do - # default_widget do - # query 'Bulletin.all' - # image :image - # end - - # categories_query 'BulletinCategory.all' - # tags_query 'LocationTag.all' - - # customize_widget "index","location.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] - # customize_widget "bulletins_and_web_links","location.widget.bulletins_and_web_links" - # # item "index","location.widget.index",:default_template=>true,:fields=>["title","category","postdate"] - # # item "bulletins_and_web_links","location.widget.bulletins_and_web_links" - # end - - side_bar do - head_label_i18n 'miss_module_i18n.location',:icon_class=>"icons-location" - available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['locations']}) - - head_link_path "panel_gprs_back_end_locations_path" - - end - end -end diff --git a/vendor/built_in_modules/gprs/lib/gprs.rb b/vendor/built_in_modules/gprs/lib/gprs.rb deleted file mode 100644 index 7a4d99e7..00000000 --- a/vendor/built_in_modules/gprs/lib/gprs.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "gprs/engine" - -module Gprs -end diff --git a/vendor/built_in_modules/gprs/lib/gprs/engine.rb b/vendor/built_in_modules/gprs/lib/gprs/engine.rb deleted file mode 100644 index 42da611a..00000000 --- a/vendor/built_in_modules/gprs/lib/gprs/engine.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Gprs - class Engine < Rails::Engine - end -end diff --git a/vendor/built_in_modules/gprs/lib/gprs/version.rb b/vendor/built_in_modules/gprs/lib/gprs/version.rb deleted file mode 100644 index bf13294d..00000000 --- a/vendor/built_in_modules/gprs/lib/gprs/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Gprs - VERSION = "0.0.1" -end diff --git a/vendor/built_in_modules/gprs/lib/tasks/gprs_tasks.rake b/vendor/built_in_modules/gprs/lib/tasks/gprs_tasks.rake deleted file mode 100644 index ba45136c..00000000 --- a/vendor/built_in_modules/gprs/lib/tasks/gprs_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :gprs do -# # Task goes here -# end diff --git a/vendor/built_in_modules/gprs/script/rails b/vendor/built_in_modules/gprs/script/rails deleted file mode 100755 index e323e44b..00000000 --- a/vendor/built_in_modules/gprs/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -ENGINE_PATH = File.expand_path('../..', __FILE__) -load File.expand_path('../../test/dummy/script/rails', __FILE__) diff --git a/vendor/built_in_modules/gprs/test/dummy/Rakefile b/vendor/built_in_modules/gprs/test/dummy/Rakefile deleted file mode 100644 index 36458522..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/gprs/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfcd..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/gprs/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index fc25b572..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/gprs/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/gprs/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/vendor/built_in_modules/gprs/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/gprs/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/gprs/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/gprs/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/gprs/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 9a8a761b..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config.ru b/vendor/built_in_modules/gprs/test/dummy/config.ru deleted file mode 100644 index 1989ed8d..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/application.rb b/vendor/built_in_modules/gprs/test/dummy/config/application.rb deleted file mode 100644 index f03b73e0..00000000 --- a/vendor/built_in_modules/gprs/test/dummy/config/application.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require -require "gprs" - -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/gprs/test/dummy/config/boot.rb b/vendor/built_in_modules/gprs/test/dummy/config/boot.rb deleted file mode 100644 index eba06813..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/database.yml b/vendor/built_in_modules/gprs/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd45..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/environment.rb b/vendor/built_in_modules/gprs/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/environments/development.rb b/vendor/built_in_modules/gprs/test/dummy/config/environments/development.rb deleted file mode 100644 index 95a50b91..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/environments/production.rb b/vendor/built_in_modules/gprs/test/dummy/config/environments/production.rb deleted file mode 100644 index ca2c5888..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/environments/test.rb b/vendor/built_in_modules/gprs/test/dummy/config/environments/test.rb deleted file mode 100644 index 6810c914..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 9e8b0131..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 370a8fa2..00000000 --- a/vendor/built_in_modules/gprs/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 = '181584334acb820e1d0e0e53b71c0985251f4e5bfd188a962d5f9acfeeb0e46dfd6ca68784528cab00d8e6e8da087cce2bf7d060fe2b2c742a814c23689ff6af' diff --git a/vendor/built_in_modules/gprs/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df201..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/locales/en.yml b/vendor/built_in_modules/gprs/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/routes.rb b/vendor/built_in_modules/gprs/test/dummy/config/routes.rb deleted file mode 100644 index bb509f27..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/gprs/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/log/.gitkeep b/vendor/built_in_modules/gprs/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/public/404.html b/vendor/built_in_modules/gprs/test/dummy/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/public/422.html b/vendor/built_in_modules/gprs/test/dummy/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/public/500.html b/vendor/built_in_modules/gprs/test/dummy/public/500.html deleted file mode 100644 index b80307fc..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/public/favicon.ico b/vendor/built_in_modules/gprs/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/script/rails b/vendor/built_in_modules/gprs/test/dummy/script/rails deleted file mode 100755 index f8da2cff..00000000 --- a/vendor/built_in_modules/gprs/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# 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/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb b/vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb deleted file mode 100644 index bb6d0908..00000000 --- a/vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'test_helper' - -class Panel::Gprs::BackEnd::LocationsControllerTest < ActionController::TestCase - test "should get index" do - get :index - assert_response :success - end - - test "should get edit" do - get :edit - assert_response :success - end - -end diff --git a/vendor/built_in_modules/gprs/test/gprs_test.rb b/vendor/built_in_modules/gprs/test/gprs_test.rb deleted file mode 100644 index 1ab42707..00000000 --- a/vendor/built_in_modules/gprs/test/gprs_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class GprsTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, Gprs - end -end diff --git a/vendor/built_in_modules/gprs/test/integration/navigation_test.rb b/vendor/built_in_modules/gprs/test/integration/navigation_test.rb deleted file mode 100644 index 97a94c9b..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/test_helper.rb b/vendor/built_in_modules/gprs/test/test_helper.rb deleted file mode 100644 index dcd3b276..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb b/vendor/built_in_modules/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb deleted file mode 100644 index e1302ea2..00000000 --- a/vendor/built_in_modules/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Panel::Gprs::BackEnd::LocationsHelperTest < ActionView::TestCase -end From bd743a0ca5739e7a91b5e5645fd3da12f55b0411 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 7 Dec 2012 12:40:21 +0800 Subject: [PATCH 06/44] rename of GPRS now it's named location --- app/uploaders/location_uploader.rb | 61 +++++++++++++++ vendor/built_in_modules/location/.gitignore | 6 ++ vendor/built_in_modules/location/Gemfile | 17 ++++ vendor/built_in_modules/location/MIT-LICENSE | 20 +++++ vendor/built_in_modules/location/README.rdoc | 3 + vendor/built_in_modules/location/Rakefile | 39 ++++++++++ .../location/app/assets/images/gprs/.gitkeep | 0 .../app/assets/javascripts/gprs/.gitkeep | 0 .../panel/gprs/back_end/locations.js | 2 + .../app/assets/stylesheets/gprs/.gitkeep | 0 .../panel/gprs/back_end/locations.css | 4 + .../location/app/controllers/.gitkeep | 0 .../back_end/locations_controller.rb | 77 +++++++++++++++++++ .../location/app/helpers/.gitkeep | 0 .../locations/back_end/locations_helper.rb | 2 + .../location/app/mailers/.gitkeep | 0 .../location/app/models/.gitkeep | 0 .../location/app/models/location.rb | 11 +++ .../location/app/views/.gitkeep | 0 .../back_end/locations/_form.html.erb | 30 ++++++++ .../back_end/locations/edit.html.erb | 4 + .../back_end/locations/index.html.erb | 34 ++++++++ .../locations/back_end/locations/new.html.erb | 3 + .../back_end/locations/show.html.erb | 0 .../location/config/routes.rb | 12 +++ vendor/built_in_modules/location/init.rb | 43 +++++++++++ .../built_in_modules/location/lib/location.rb | 4 + .../location/lib/location/engine.rb | 4 + .../location/lib/location/version.rb | 3 + .../location/lib/tasks/location_tasks.rake | 4 + .../location/location.gemspec | 23 ++++++ vendor/built_in_modules/location/script/rails | 6 ++ .../location/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 + .../location/test/dummy/app/mailers/.gitkeep | 0 .../location/test/dummy/app/models/.gitkeep | 0 .../app/views/layouts/application.html.erb | 14 ++++ .../location/test/dummy/config.ru | 4 + .../location/test/dummy/config/application.rb | 45 +++++++++++ .../location/test/dummy/config/boot.rb | 10 +++ .../location/test/dummy/config/database.yml | 25 ++++++ .../location/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 ++++ .../location/test/dummy/config/locales/en.yml | 5 ++ .../location/test/dummy/config/routes.rb | 58 ++++++++++++++ .../location/test/dummy/lib/assets/.gitkeep | 0 .../location/test/dummy/log/.gitkeep | 0 .../location/test/dummy/public/404.html | 26 +++++++ .../location/test/dummy/public/422.html | 26 +++++++ .../location/test/dummy/public/500.html | 26 +++++++ .../location/test/dummy/public/favicon.ico | 0 .../location/test/dummy/script/rails | 6 ++ .../back_end/locations_controller_test.rb | 14 ++++ .../test/integration/navigation_test.rb | 10 +++ .../location/test/location_test.rb | 7 ++ .../location/test/test_helper.rb | 10 +++ .../gprs/back_end/locations_helper_test.rb | 4 + 68 files changed, 915 insertions(+) create mode 100644 app/uploaders/location_uploader.rb create mode 100644 vendor/built_in_modules/location/.gitignore create mode 100644 vendor/built_in_modules/location/Gemfile create mode 100644 vendor/built_in_modules/location/MIT-LICENSE create mode 100644 vendor/built_in_modules/location/README.rdoc create mode 100644 vendor/built_in_modules/location/Rakefile create mode 100644 vendor/built_in_modules/location/app/assets/images/gprs/.gitkeep create mode 100644 vendor/built_in_modules/location/app/assets/javascripts/gprs/.gitkeep create mode 100644 vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js create mode 100644 vendor/built_in_modules/location/app/assets/stylesheets/gprs/.gitkeep create mode 100644 vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css create mode 100644 vendor/built_in_modules/location/app/controllers/.gitkeep create mode 100644 vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb create mode 100644 vendor/built_in_modules/location/app/helpers/.gitkeep create mode 100644 vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb create mode 100644 vendor/built_in_modules/location/app/mailers/.gitkeep create mode 100644 vendor/built_in_modules/location/app/models/.gitkeep create mode 100644 vendor/built_in_modules/location/app/models/location.rb create mode 100644 vendor/built_in_modules/location/app/views/.gitkeep create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/show.html.erb create mode 100644 vendor/built_in_modules/location/config/routes.rb create mode 100644 vendor/built_in_modules/location/init.rb create mode 100644 vendor/built_in_modules/location/lib/location.rb create mode 100644 vendor/built_in_modules/location/lib/location/engine.rb create mode 100644 vendor/built_in_modules/location/lib/location/version.rb create mode 100644 vendor/built_in_modules/location/lib/tasks/location_tasks.rake create mode 100644 vendor/built_in_modules/location/location.gemspec create mode 100755 vendor/built_in_modules/location/script/rails create mode 100644 vendor/built_in_modules/location/test/dummy/Rakefile create mode 100644 vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js create mode 100644 vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css create mode 100644 vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb create mode 100644 vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb create mode 100644 vendor/built_in_modules/location/test/dummy/app/mailers/.gitkeep create mode 100644 vendor/built_in_modules/location/test/dummy/app/models/.gitkeep create mode 100644 vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb create mode 100644 vendor/built_in_modules/location/test/dummy/config.ru create mode 100644 vendor/built_in_modules/location/test/dummy/config/application.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/boot.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/database.yml create mode 100644 vendor/built_in_modules/location/test/dummy/config/environment.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/environments/development.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/environments/production.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/environments/test.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/locales/en.yml create mode 100644 vendor/built_in_modules/location/test/dummy/config/routes.rb create mode 100644 vendor/built_in_modules/location/test/dummy/lib/assets/.gitkeep create mode 100644 vendor/built_in_modules/location/test/dummy/log/.gitkeep create mode 100644 vendor/built_in_modules/location/test/dummy/public/404.html create mode 100644 vendor/built_in_modules/location/test/dummy/public/422.html create mode 100644 vendor/built_in_modules/location/test/dummy/public/500.html create mode 100644 vendor/built_in_modules/location/test/dummy/public/favicon.ico create mode 100755 vendor/built_in_modules/location/test/dummy/script/rails create mode 100644 vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb create mode 100644 vendor/built_in_modules/location/test/integration/navigation_test.rb create mode 100644 vendor/built_in_modules/location/test/location_test.rb create mode 100644 vendor/built_in_modules/location/test/test_helper.rb create mode 100644 vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb diff --git a/app/uploaders/location_uploader.rb b/app/uploaders/location_uploader.rb new file mode 100644 index 00000000..1c2ec99d --- /dev/null +++ b/app/uploaders/location_uploader.rb @@ -0,0 +1,61 @@ +class LocationUploader < CarrierWave::Uploader::Base + + # Include RMagick or ImageScience support: + # include CarrierWave::RMagick + # include CarrierWave::ImageScience + include CarrierWave::MiniMagick + + # Choose what kind of storage to use for this uploader: + # storage :file + # storage :s3 + + # Override the directory where uploaded files will be stored. + # This is a sensible default for uploaders that are meant to be mounted: + def store_dir + "location/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" + end + + # Provide a default URL as a default if there hasn't been a file uploaded: + # def default_url + # "/images/fallback/" + [version_name, "default.png"].compact.join('_') + # end + + # Process files as they are uploaded: + # process :scale => [200, 300] + # + # def scale(width, height) + # # do something + # end + + # Create different versions of your uploaded files: + # version :thumb do + # process :scale => [50, 50] + # end + + version :thumb do + process :resize_to_fill => [150, 120] + end + + # Add a white list of extensions which are allowed to be uploaded. + # For images you might use something like this: + # def extension_white_list + # %w(jpg jpeg gif png) + # end + + # Override the filename of the uploaded files: + # def filename + # "something.jpg" if original_filename + # end + +# def manipulate! +# raise current_path.inspect +# image = ::MiniMagick::Image.open(current_path) +# image = yield(image) +# image.write(current_path) +# ::MiniMagick::Image.open(current_path) +# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e +# raise CarrierWave::ProcessingError.new("Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: #{e}") +# end + +end + diff --git a/vendor/built_in_modules/location/.gitignore b/vendor/built_in_modules/location/.gitignore new file mode 100644 index 00000000..1463de6d --- /dev/null +++ b/vendor/built_in_modules/location/.gitignore @@ -0,0 +1,6 @@ +.bundle/ +log/*.log +pkg/ +test/dummy/db/*.sqlite3 +test/dummy/log/*.log +test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/location/Gemfile b/vendor/built_in_modules/location/Gemfile new file mode 100644 index 00000000..cdc455ae --- /dev/null +++ b/vendor/built_in_modules/location/Gemfile @@ -0,0 +1,17 @@ +source "http://rubygems.org" + +# Declare your gem's dependencies in gprs.gemspec. +# Bundler will treat runtime dependencies like base dependencies, and +# development dependencies will be added by default to the :development group. +gemspec + +# jquery-rails is used by the dummy application +gem "jquery-rails" + +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. + +# To use debugger +# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/vendor/built_in_modules/location/MIT-LICENSE b/vendor/built_in_modules/location/MIT-LICENSE new file mode 100644 index 00000000..406f17b7 --- /dev/null +++ b/vendor/built_in_modules/location/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright 2012 YOURNAME + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/location/README.rdoc b/vendor/built_in_modules/location/README.rdoc new file mode 100644 index 00000000..0e425195 --- /dev/null +++ b/vendor/built_in_modules/location/README.rdoc @@ -0,0 +1,3 @@ += Location + +This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/location/Rakefile b/vendor/built_in_modules/location/Rakefile new file mode 100644 index 00000000..66353374 --- /dev/null +++ b/vendor/built_in_modules/location/Rakefile @@ -0,0 +1,39 @@ +#!/usr/bin/env rake +begin + require 'bundler/setup' +rescue LoadError + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' +end +begin + require 'rdoc/task' +rescue LoadError + require 'rdoc/rdoc' + require 'rake/rdoctask' + RDoc::Task = Rake::RDocTask +end + +RDoc::Task.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'Location' + rdoc.options << '--line-numbers' + rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('lib/**/*.rb') +end + +APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) +load 'rails/tasks/engine.rake' + + +Bundler::GemHelper.install_tasks + +require 'rake/testtask' + +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.libs << 'test' + t.pattern = 'test/**/*_test.rb' + t.verbose = false +end + + +task :default => :test diff --git a/vendor/built_in_modules/location/app/assets/images/gprs/.gitkeep b/vendor/built_in_modules/location/app/assets/images/gprs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/assets/javascripts/gprs/.gitkeep b/vendor/built_in_modules/location/app/assets/javascripts/gprs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js b/vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js new file mode 100644 index 00000000..dee720fa --- /dev/null +++ b/vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/gprs/.gitkeep b/vendor/built_in_modules/location/app/assets/stylesheets/gprs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css b/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css new file mode 100644 index 00000000..afad32db --- /dev/null +++ b/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css @@ -0,0 +1,4 @@ +/* + Place all the styles related to the matching controller here. + They will automatically be included in application.css. +*/ diff --git a/vendor/built_in_modules/location/app/controllers/.gitkeep b/vendor/built_in_modules/location/app/controllers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb new file mode 100644 index 00000000..5ad721e6 --- /dev/null +++ b/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb @@ -0,0 +1,77 @@ +class Panel::Locations::BackEnd::LocationsController < OrbitBackendController + + #before_filter :clean_values, :only => [:create, :update] + + before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete] + before_filter :force_order_for_user,:except => [:get_locations,:index] + #before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations] + + def index + @locations = Location.all + respond_to do |format| + format.html # new.html.erb + format.json { render json: @locations } + end + end + + def new + @location = Location.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @location } + end + end + + def edit + @location = Location.find(params[:id]) + end + + def show + @location = Location.find(params[:id]) + respond_to do |format| + format.html + format.json { render json: @location } + end + end + + def create + @location = Location.new(params[:location]) + @location.save! + redirect_to panel_gprs_back_end_locations_url + end + + def update + @location = Location.find(params[:id]) + @location.update_attributes(params[:location]) + redirect_to panel_gprs_back_end_locations_url + end + + def destroy + @location = Location.find(params[:id]) + @location.destroy + redirect_to panel_gprs_back_end_locations_url + + end + + def get_locations + locations = Location.all + @data = Array.new + + locations.each do |location| + picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}" + thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}" + @data << { name: location.name, + pic_url: picurl, + thumb_url: thumburl, + longitude: location.longitude, + latitude: location.latitude, + description: location.description } + end + + #print readable json + render :json => JSON.pretty_generate({location: @data}) + + #render :json => {location: @data}.to_json + end +end diff --git a/vendor/built_in_modules/location/app/helpers/.gitkeep b/vendor/built_in_modules/location/app/helpers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb b/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb new file mode 100644 index 00000000..c6dcef87 --- /dev/null +++ b/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb @@ -0,0 +1,2 @@ +module Panel::Locations::BackEnd::LocationsHelper +end diff --git a/vendor/built_in_modules/location/app/mailers/.gitkeep b/vendor/built_in_modules/location/app/mailers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/models/.gitkeep b/vendor/built_in_modules/location/app/models/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/models/location.rb b/vendor/built_in_modules/location/app/models/location.rb new file mode 100644 index 00000000..58d032bd --- /dev/null +++ b/vendor/built_in_modules/location/app/models/location.rb @@ -0,0 +1,11 @@ +class Location + include Mongoid::Document + include Mongoid::Timestamps + + mount_uploader :file, LocationUploader + + field :name + field :description + field :longitude, type: Float + field :latitude, type: Float +end diff --git a/vendor/built_in_modules/location/app/views/.gitkeep b/vendor/built_in_modules/location/app/views/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb new file mode 100644 index 00000000..62e8b21b --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb @@ -0,0 +1,30 @@ +
+ +
+ <%= f.text_field :name, :class=>"span4", :placeholder => "Area" %> +
+
+
+ +
+ <%= f.file_field :file %> +
+
+
+ +
+ <%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %> + <%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %> +
+
+
+ +
+ <%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %> +
+
+
+
+ <%= f.submit "Save", :class=>"btn" %> +
+
diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb new file mode 100644 index 00000000..82a59afa --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb @@ -0,0 +1,4 @@ +<%= form_for @location, :url=> panel_gprs_back_end_location_path(@location), :html => { :class=>"form-horizontal"} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> + diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb new file mode 100644 index 00000000..9bbe06e7 --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb @@ -0,0 +1,34 @@ + + + + + + + + + <%if is_manager? %> + + + <% end %> + + + + <% @locations.each do |location| %> + + + + + + + <%if is_manager? %> + + + <%end%> + + + <% end %> + +
<%= t('location.picture') %><%= t('location.name') %><%= t('location.longitude') %><%= t('location.latitude') %><%= t('location.description') %><%= t('location.edit') %><%= t('location.delete') %>
<%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %><%= location.name%><%= location.longitude%><%= location.latitude%><%= location.description%><%= link_to 'Edit', edit_panel_locations_back_end_location_path(location) %><%= link_to 'Destroy', panel_locations_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %>
+<%if is_manager? %> +<%= link_to 'New', new_panel_locations_back_end_location_path %> +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb new file mode 100644 index 00000000..4f911d83 --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb @@ -0,0 +1,3 @@ +<%= form_for @location, :url=> panel_gprs_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/show.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/show.html.erb new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/config/routes.rb b/vendor/built_in_modules/location/config/routes.rb new file mode 100644 index 00000000..1205145e --- /dev/null +++ b/vendor/built_in_modules/location/config/routes.rb @@ -0,0 +1,12 @@ +Rails.application.routes.draw do + namespace :panel do + namespace :locations do + namespace :back_end do + + match "locations/get_locations" => "locations#get_locations" + + resources :locations + end + end + end +end diff --git a/vendor/built_in_modules/location/init.rb b/vendor/built_in_modules/location/init.rb new file mode 100644 index 00000000..f772c780 --- /dev/null +++ b/vendor/built_in_modules/location/init.rb @@ -0,0 +1,43 @@ +module Location + OrbitApp.registration "Location",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.location' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' + + # version "0.1" + # organization "Rulingcom" + # author "RD dep" + # intro "I am intro" + # update_info 'some update_info' + + # front_end do + # app_page 'bulletins' + # end + + # category ["BulletinCategory"] + + # widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + # categories_query 'BulletinCategory.all' + # tags_query 'LocationTag.all' + + # customize_widget "index","location.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] + # customize_widget "bulletins_and_web_links","location.widget.bulletins_and_web_links" + # # item "index","location.widget.index",:default_template=>true,:fields=>["title","category","postdate"] + # # item "bulletins_and_web_links","location.widget.bulletins_and_web_links" + # end + + side_bar do + head_label_i18n 'miss_module_i18n.location',:icon_class=>"icons-location" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['locations']}) + + head_link_path "panel_locations_back_end_locations_path" + + end + end +end diff --git a/vendor/built_in_modules/location/lib/location.rb b/vendor/built_in_modules/location/lib/location.rb new file mode 100644 index 00000000..b13f49bd --- /dev/null +++ b/vendor/built_in_modules/location/lib/location.rb @@ -0,0 +1,4 @@ +require "gprs/engine" + +module Location +end diff --git a/vendor/built_in_modules/location/lib/location/engine.rb b/vendor/built_in_modules/location/lib/location/engine.rb new file mode 100644 index 00000000..161a9bbd --- /dev/null +++ b/vendor/built_in_modules/location/lib/location/engine.rb @@ -0,0 +1,4 @@ +module Location + class Engine < Rails::Engine + end +end diff --git a/vendor/built_in_modules/location/lib/location/version.rb b/vendor/built_in_modules/location/lib/location/version.rb new file mode 100644 index 00000000..95df884b --- /dev/null +++ b/vendor/built_in_modules/location/lib/location/version.rb @@ -0,0 +1,3 @@ +module Location + VERSION = "0.0.1" +end diff --git a/vendor/built_in_modules/location/lib/tasks/location_tasks.rake b/vendor/built_in_modules/location/lib/tasks/location_tasks.rake new file mode 100644 index 00000000..ba45136c --- /dev/null +++ b/vendor/built_in_modules/location/lib/tasks/location_tasks.rake @@ -0,0 +1,4 @@ +# desc "Explaining what the task does" +# task :gprs do +# # Task goes here +# end diff --git a/vendor/built_in_modules/location/location.gemspec b/vendor/built_in_modules/location/location.gemspec new file mode 100644 index 00000000..5d20e869 --- /dev/null +++ b/vendor/built_in_modules/location/location.gemspec @@ -0,0 +1,23 @@ +$:.push File.expand_path("../lib", __FILE__) + +# Maintain your gem's version: +require "gprs/version" + +# Describe your gem and declare its dependencies: +Gem::Specification.new do |s| + s.name = "gprs" + s.version = Location::VERSION + s.authors = ["TODO: Your name"] + s.email = ["TODO: Your email"] + s.homepage = "TODO" + s.summary = "TODO: Summary of Location." + s.description = "TODO: Description of Location." + + s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] + s.test_files = Dir["test/**/*"] + + s.add_dependency "rails", "~> 3.1.8" + # s.add_dependency "jquery-rails" + + s.add_development_dependency "sqlite3" +end diff --git a/vendor/built_in_modules/location/script/rails b/vendor/built_in_modules/location/script/rails new file mode 100755 index 00000000..e323e44b --- /dev/null +++ b/vendor/built_in_modules/location/script/rails @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + +ENGINE_PATH = File.expand_path('../..', __FILE__) +load File.expand_path('../../test/dummy/script/rails', __FILE__) diff --git a/vendor/built_in_modules/location/test/dummy/Rakefile b/vendor/built_in_modules/location/test/dummy/Rakefile new file mode 100644 index 00000000..36458522 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/Rakefile @@ -0,0 +1,7 @@ +#!/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/location/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js new file mode 100644 index 00000000..37c7bfcd --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js @@ -0,0 +1,9 @@ +// 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/location/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css new file mode 100644 index 00000000..fc25b572 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css @@ -0,0 +1,7 @@ +/* + * 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/location/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb new file mode 100644 index 00000000..e8065d95 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb @@ -0,0 +1,3 @@ +class ApplicationController < ActionController::Base + protect_from_forgery +end diff --git a/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb new file mode 100644 index 00000000..de6be794 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/vendor/built_in_modules/location/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/location/test/dummy/app/mailers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/location/test/dummy/app/models/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb new file mode 100644 index 00000000..9a8a761b --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb @@ -0,0 +1,14 @@ + + + + Dummy + <%= stylesheet_link_tag "application" %> + <%= javascript_include_tag "application" %> + <%= csrf_meta_tags %> + + + +<%= yield %> + + + diff --git a/vendor/built_in_modules/location/test/dummy/config.ru b/vendor/built_in_modules/location/test/dummy/config.ru new file mode 100644 index 00000000..1989ed8d --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config.ru @@ -0,0 +1,4 @@ +# 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/location/test/dummy/config/application.rb b/vendor/built_in_modules/location/test/dummy/config/application.rb new file mode 100644 index 00000000..f03b73e0 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/application.rb @@ -0,0 +1,45 @@ +require File.expand_path('../boot', __FILE__) + +require 'rails/all' + +Bundler.require +require "gprs" + +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/location/test/dummy/config/boot.rb b/vendor/built_in_modules/location/test/dummy/config/boot.rb new file mode 100644 index 00000000..eba06813 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/boot.rb @@ -0,0 +1,10 @@ +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/location/test/dummy/config/database.yml b/vendor/built_in_modules/location/test/dummy/config/database.yml new file mode 100644 index 00000000..51a4dd45 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/database.yml @@ -0,0 +1,25 @@ +# 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/location/test/dummy/config/environment.rb b/vendor/built_in_modules/location/test/dummy/config/environment.rb new file mode 100644 index 00000000..3da5eb91 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/environment.rb @@ -0,0 +1,5 @@ +# Load the rails application +require File.expand_path('../application', __FILE__) + +# Initialize the rails application +Dummy::Application.initialize! diff --git a/vendor/built_in_modules/location/test/dummy/config/environments/development.rb b/vendor/built_in_modules/location/test/dummy/config/environments/development.rb new file mode 100644 index 00000000..95a50b91 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/environments/development.rb @@ -0,0 +1,30 @@ +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/location/test/dummy/config/environments/production.rb b/vendor/built_in_modules/location/test/dummy/config/environments/production.rb new file mode 100644 index 00000000..ca2c5888 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/environments/production.rb @@ -0,0 +1,60 @@ +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/location/test/dummy/config/environments/test.rb b/vendor/built_in_modules/location/test/dummy/config/environments/test.rb new file mode 100644 index 00000000..6810c914 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/environments/test.rb @@ -0,0 +1,39 @@ +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/location/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb new file mode 100644 index 00000000..59385cdf --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# 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/location/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb new file mode 100644 index 00000000..9e8b0131 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb @@ -0,0 +1,10 @@ +# 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/location/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb new file mode 100644 index 00000000..72aca7e4 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb @@ -0,0 +1,5 @@ +# 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/location/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb new file mode 100644 index 00000000..370a8fa2 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb @@ -0,0 +1,7 @@ +# 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 = '181584334acb820e1d0e0e53b71c0985251f4e5bfd188a962d5f9acfeeb0e46dfd6ca68784528cab00d8e6e8da087cce2bf7d060fe2b2c742a814c23689ff6af' diff --git a/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb new file mode 100644 index 00000000..952473ff --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb @@ -0,0 +1,8 @@ +# 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/location/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb new file mode 100644 index 00000000..999df201 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# 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/location/test/dummy/config/locales/en.yml b/vendor/built_in_modules/location/test/dummy/config/locales/en.yml new file mode 100644 index 00000000..179c14ca --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/locales/en.yml @@ -0,0 +1,5 @@ +# 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/location/test/dummy/config/routes.rb b/vendor/built_in_modules/location/test/dummy/config/routes.rb new file mode 100644 index 00000000..bb509f27 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/routes.rb @@ -0,0 +1,58 @@ +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/location/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/location/test/dummy/lib/assets/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/log/.gitkeep b/vendor/built_in_modules/location/test/dummy/log/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/public/404.html b/vendor/built_in_modules/location/test/dummy/public/404.html new file mode 100644 index 00000000..9a48320a --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/public/404.html @@ -0,0 +1,26 @@ + + + + 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/location/test/dummy/public/422.html b/vendor/built_in_modules/location/test/dummy/public/422.html new file mode 100644 index 00000000..83660ab1 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/public/422.html @@ -0,0 +1,26 @@ + + + + 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/location/test/dummy/public/500.html b/vendor/built_in_modules/location/test/dummy/public/500.html new file mode 100644 index 00000000..b80307fc --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/public/500.html @@ -0,0 +1,26 @@ + + + + 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/location/test/dummy/public/favicon.ico b/vendor/built_in_modules/location/test/dummy/public/favicon.ico new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/script/rails b/vendor/built_in_modules/location/test/dummy/script/rails new file mode 100755 index 00000000..f8da2cff --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/script/rails @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +# 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/location/test/functional/panel/gprs/back_end/locations_controller_test.rb b/vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb new file mode 100644 index 00000000..0edd65ab --- /dev/null +++ b/vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb @@ -0,0 +1,14 @@ +require 'test_helper' + +class Panel::Location::BackEnd::LocationsControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + end + + test "should get edit" do + get :edit + assert_response :success + end + +end diff --git a/vendor/built_in_modules/location/test/integration/navigation_test.rb b/vendor/built_in_modules/location/test/integration/navigation_test.rb new file mode 100644 index 00000000..97a94c9b --- /dev/null +++ b/vendor/built_in_modules/location/test/integration/navigation_test.rb @@ -0,0 +1,10 @@ +require 'test_helper' + +class NavigationTest < ActionDispatch::IntegrationTest + fixtures :all + + # test "the truth" do + # assert true + # end +end + diff --git a/vendor/built_in_modules/location/test/location_test.rb b/vendor/built_in_modules/location/test/location_test.rb new file mode 100644 index 00000000..b85756bc --- /dev/null +++ b/vendor/built_in_modules/location/test/location_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class LocationTest < ActiveSupport::TestCase + test "truth" do + assert_kind_of Module, Location + end +end diff --git a/vendor/built_in_modules/location/test/test_helper.rb b/vendor/built_in_modules/location/test/test_helper.rb new file mode 100644 index 00000000..dcd3b276 --- /dev/null +++ b/vendor/built_in_modules/location/test/test_helper.rb @@ -0,0 +1,10 @@ +# 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/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb b/vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb new file mode 100644 index 00000000..9e39a511 --- /dev/null +++ b/vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Panel::Location::BackEnd::LocationsHelperTest < ActionView::TestCase +end From 858e942da234fffa3053a995231f2b0d9eee43d1 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 7 Dec 2012 12:40:47 +0800 Subject: [PATCH 07/44] fix serval bugs on sidebar. --- app/models/module_app.rb | 24 +++++++++++++++++-- lib/orbit_app/helper/context_link_renderer.rb | 2 +- lib/orbit_app/helper/renderer.rb | 5 ++-- lib/orbit_app/helper/side_bar_renderer.rb | 2 +- vendor/built_in_modules/ad_banner/init.rb | 4 ++-- vendor/built_in_modules/archive/init.rb | 6 ++--- vendor/built_in_modules/gallery/init.rb | 2 +- vendor/built_in_modules/page_content/init.rb | 2 +- .../_web_link_category.html.erb | 2 +- vendor/built_in_modules/web_resource/init.rb | 8 +++---- 10 files changed, 39 insertions(+), 18 deletions(-) diff --git a/app/models/module_app.rb b/app/models/module_app.rb index b64ac908..98fc719e 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -63,11 +63,31 @@ class ModuleApp end def is_manager?(user) - managing_users.include?(user) + if user.nil? + return false + else + m_users = managing_users + if m_users.blank? + false + else + m_users.include?(user) + end + end end def is_sub_manager?(user) - sub_managing_users.include?(user) || is_manager?(user) + if user.nil? + return false + else # when user is guest + s_m_users = sub_managing_users + result = false + if s_m_users.blank? + result = false + else + result = s_m_users.include?(user) + end + result || is_manager?(user) + end end def managing_users diff --git a/lib/orbit_app/helper/context_link_renderer.rb b/lib/orbit_app/helper/context_link_renderer.rb index d4014fae..530b0946 100644 --- a/lib/orbit_app/helper/context_link_renderer.rb +++ b/lib/orbit_app/helper/context_link_renderer.rb @@ -25,7 +25,7 @@ protected else (eval(available_for_in_sym).include? @current_user rescue false) end # of case - return true if result || @current_user.admin? + return true if result || (@current_user.admin? rescue false) end # of collect false end diff --git a/lib/orbit_app/helper/renderer.rb b/lib/orbit_app/helper/renderer.rb index ee2ffb23..70b0f111 100644 --- a/lib/orbit_app/helper/renderer.rb +++ b/lib/orbit_app/helper/renderer.rb @@ -8,10 +8,11 @@ module Renderer protected def active_for_app_auth? - if @module_app.nil? + module_app = get_module_app + if module_app.nil? false else - @module_app.id.to_s == @params[:module_app_id] ? true : false + module_app.id.to_s == @params[:module_app_id] ? true : false end end diff --git a/lib/orbit_app/helper/side_bar_renderer.rb b/lib/orbit_app/helper/side_bar_renderer.rb index ba6f7c7d..e0e1f994 100644 --- a/lib/orbit_app/helper/side_bar_renderer.rb +++ b/lib/orbit_app/helper/side_bar_renderer.rb @@ -25,7 +25,7 @@ module SideBarRenderer def display? #控制sidebar 要不要算圖 if is_manager? || is_admin? #如果是系統管理員 或 是模組管理員 true - elsif (@current_module_app.open rescue false) # 如果app 被設定成 開放 + elsif (@current_module_app.open rescue true) # 如果app 被設定成 開放 true elsif is_member? #如果app 是封閉 那至少需要是 member true diff --git a/vendor/built_in_modules/ad_banner/init.rb b/vendor/built_in_modules/ad_banner/init.rb index 6776ee0a..e4c7f8cc 100644 --- a/vendor/built_in_modules/ad_banner/init.rb +++ b/vendor/built_in_modules/ad_banner/init.rb @@ -35,12 +35,12 @@ module AdBanner side_bar do head_label_i18n 'admin.ad_banner',:icon_class=>"icons-landscape" available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['ad_banners', 'ad_images']}) + active_for_controllers ({:public=>['admin/ad_banners', 'admin/ad_images']}) head_link_path "admin_ad_banners_path" context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'ad_banner'}))", + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'AdBanner'}))", :priority=>6, :active_for_app_auth => 'ad_banners', :available_for => [:admin] diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb index 565b2cdf..23cc97b7 100644 --- a/vendor/built_in_modules/archive/init.rb +++ b/vendor/built_in_modules/archive/init.rb @@ -28,7 +28,7 @@ module Archive side_bar do head_label_i18n 'miss_module_i18n.archive',:icon_class=>"icons-archive" available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['archive_file_categorys'],:public=>['panel/archive/back_end/tags']}) + active_for_controllers ({:private=>['archive_file_categorys','archive_files'],:public=>['panel/archive/back_end/tags']}) active_for_object_auth ['BulletinCategory'] head_link_path "panel_archive_back_end_archive_files_path" @@ -36,13 +36,13 @@ module Archive context_link 'miss_module_i18n._archive.all', :link_path=>"panel_archive_back_end_archive_files_path" , :priority=>1, - :active_for_action=>{:archive_file=>:index}, + :active_for_action=>{:archive_files=>:index}, :available_for => [:all] context_link 'add', :link_path=>"new_panel_archive_back_end_archive_file_path" , :priority=>2, - :active_for_action=>{:archive_file=>:new}, + :active_for_action=>{:archive_files=>:new}, :available_for => [:admin] context_link 'categories', diff --git a/vendor/built_in_modules/gallery/init.rb b/vendor/built_in_modules/gallery/init.rb index e7db1e81..3e7fa633 100644 --- a/vendor/built_in_modules/gallery/init.rb +++ b/vendor/built_in_modules/gallery/init.rb @@ -50,7 +50,7 @@ module Gallery :available_for => [:manager] context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'gallery'}))", + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Gallery'}))", :priority=>6, :active_for_app_auth => 'gallery', :available_for => [:admin] diff --git a/vendor/built_in_modules/page_content/init.rb b/vendor/built_in_modules/page_content/init.rb index 2bf8a2f7..73199b18 100644 --- a/vendor/built_in_modules/page_content/init.rb +++ b/vendor/built_in_modules/page_content/init.rb @@ -24,7 +24,7 @@ module PageContent head_link_path "panel_page_content_back_end_page_contexts_path" context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'page_content'}))", + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'PageContent'}))", :priority=>1, :active_for_app_auth => 'PageContext', :available_for => [:admin] diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/_web_link_category.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/_web_link_category.html.erb index f78b9878..bb278435 100644 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/_web_link_category.html.erb +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/_web_link_category.html.erb @@ -8,7 +8,7 @@
<% end -%> diff --git a/vendor/built_in_modules/web_resource/init.rb b/vendor/built_in_modules/web_resource/init.rb index c581506b..3362849a 100644 --- a/vendor/built_in_modules/web_resource/init.rb +++ b/vendor/built_in_modules/web_resource/init.rb @@ -36,19 +36,19 @@ module WebResource context_link 'list_', :link_path=>"panel_web_resource_back_end_web_links_path" , :priority=>1, - :active_for_action=>{:bulletins=>:index}, + :active_for_action=>{:web_links=>:index}, :available_for => [:all] context_link 'link', :link_path=>"new_panel_web_resource_back_end_web_link_path" , :priority=>2, - :active_for_action=>{:bulletins=>:new}, + :active_for_action=>{:web_links=>:new}, :available_for => [:sub_manager] context_link 'categories', :link_path=>"panel_web_resource_back_end_web_link_categorys_path" , :priority=>3, - :active_for_action=>{:bulletin_categorys=>:index}, + :active_for_action=>{:web_link_categorys=>:index}, :available_for => [:manager] context_link 'tags', @@ -58,7 +58,7 @@ module WebResource :available_for => [:manager] context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'web_resource'}))", + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'WebResource'}))", :priority=>6, :active_for_app_auth => 'web_resource', :available_for => [:admin] From 36f6a6fdd6c134a2e4cfd27826004fb656f9a08b Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Tue, 20 Nov 2012 15:56:52 +0800 Subject: [PATCH 08/44] first version of confined sidebar render --- .../object_auths_new_interface_controller.rb | 8 +- .../admin/users_new_interface_controller.rb | 2 +- app/views/layouts/_side_bar.html.erb | 3 +- app/views/layouts/_side_bar_content.html.erb | 72 +-------- app/views/layouts/new_admin.html.erb | 1 + config/mongoid.yml | 2 +- lib/orbit_app.rb | 5 +- lib/orbit_app/helper/context_link_renderer.rb | 12 ++ lib/orbit_app/helper/renderer.rb | 62 +++++++ lib/orbit_app/helper/side_bar_renderer.rb | 43 +++++ lib/orbit_app/module/backend_side_bar.rb | 17 -- lib/orbit_app/module/registration.rb | 8 +- lib/orbit_app/module/side_bar.rb | 151 ++++++++++++++++++ lib/orbit_app/plugin/registration.rb | 15 +- lib/orbit_app/summary.rb | 2 +- .../back_end/bulletin_categorys_controller.rb | 7 +- vendor/built_in_modules/announcement/init.rb | 61 +++++-- 17 files changed, 352 insertions(+), 119 deletions(-) create mode 100644 lib/orbit_app/helper/context_link_renderer.rb create mode 100644 lib/orbit_app/helper/renderer.rb create mode 100644 lib/orbit_app/helper/side_bar_renderer.rb delete mode 100644 lib/orbit_app/module/backend_side_bar.rb create mode 100644 lib/orbit_app/module/side_bar.rb diff --git a/app/controllers/admin/object_auths_new_interface_controller.rb b/app/controllers/admin/object_auths_new_interface_controller.rb index 85eddd05..76581b9e 100644 --- a/app/controllers/admin/object_auths_new_interface_controller.rb +++ b/app/controllers/admin/object_auths_new_interface_controller.rb @@ -1,10 +1,13 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController include OrbitCoreLib::PermissionUnility before_filter :force_order - + + def set_module_app + @module_app = ModuleApp.where(:title=>'Announcement').first + end + def setting - @sys_users = User.all(conditions: {admin: false}).includes(:avatar).not_guest_user @ob_auth = ObjectAuth.find params[:object_auth_id] @options_from_collection_for_select_ob_auth = @ob_auth.siblings.collect{|oa| [oa.auth_obj.pp_object,oa.id] } @@ -60,6 +63,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController def force_order authenticate_user! + set_module_app check_if_user_can_do_object_auth end diff --git a/app/controllers/admin/users_new_interface_controller.rb b/app/controllers/admin/users_new_interface_controller.rb index 6e2e0a7b..496357c7 100644 --- a/app/controllers/admin/users_new_interface_controller.rb +++ b/app/controllers/admin/users_new_interface_controller.rb @@ -30,7 +30,7 @@ class Admin::UsersNewInterfaceController < OrbitBackendController def show @user = User.find(params[:id]) - @plugins = OrbitApp::Module::Registration.all + @plugins = OrbitApp::Plugin::Registration.all @profile_data = [] @teacher_data = [] diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index af7a5c79..fa2d332c 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -13,7 +13,8 @@
diff --git a/app/views/layouts/_side_bar_content.html.erb b/app/views/layouts/_side_bar_content.html.erb index f5d54d9b..e867ba21 100644 --- a/app/views/layouts/_side_bar_content.html.erb +++ b/app/views/layouts/_side_bar_content.html.erb @@ -2,78 +2,8 @@ <%= javascript_include_tag "/static/kernel.js" %> <% end %> -<%= content_tag :li, :class => (active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals') || active_for_app_auth('Announcement') || active_for_ob_auths_object("BulletinCategory") ) do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-megaphone') + content_tag(:span, t('announcement.announcement')), panel_announcement_back_end_bulletins_path %> - <%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory"))) do -%> - <%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index')if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletin_categorys_path), :class =>( active_for_action('bulletin_categorys', 'index') || active_for_ob_auths_object("BulletinCategory") )if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index')if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t('announcement.bulletin.approval_setting') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_approval_setting_path), :class => active_for_action('approvals', 'setting') if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t(:module_authorization) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "announcement"}))), :class => active_for_app_auth('Announcement') if (is_admin? rescue nil) %> - <% end -%> - -<% end -%> - -<%= content_tag :li, :class => active_for_controllers('page_contexts') || active_for_app_auth('page_content') || active_for_ob_auths_object("PageContext") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-page') + content_tag(:span, t(:page)), panel_page_content_back_end_page_contexts_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('page_contexts')) do -%> - <%= content_tag :li, link_to((t(:module_authorization) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "page_content"}))), :class => active_for_app_auth('page_content') if (is_admin? rescue nil) %> - <% end -%> - -<% end -%> - -<%= content_tag :li, :class => active_for_controllers('ad_banners', 'ad_images') ||active_for_ob_auths_object("AdBanner") ||active_for_app_auth('ad_banner') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-landscape') + content_tag(:span, t(:ad_banner)), admin_ad_banners_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('ad_banners', 'ad_images') ) do -%> - <%= content_tag :li, link_to((t(:module_authorization) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "ad_banner"}))), :class => active_for_app_auth('ad_banners') if (is_admin? rescue nil) %> - <% end -%> -<% end %> - - -<%= content_tag :li, :class => active_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys') || active_for_app_auth('web_resource') || active_for_ob_auths_object("WebLinkCategory") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t(:link)), panel_web_resource_back_end_web_links_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys')) do -%> - <%= content_tag :li, link_to((t(:list_) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_links_path), :class => active_for_action('web_links', 'index')if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t(:link) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t(:categories) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_link_categorys_path), :class => (active_for_action('web_link_categorys', 'index') || active_for_ob_auths_object("WebLinkCategory")) if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t(:tags) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t(:module_authorization) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "web_resource"}))), :class => active_for_app_auth('web_resource') if (is_admin? rescue nil) %> - <% end -%> -<% end -%> - -<%= content_tag :li, :class => active_for_controllers('albums','album_images','gallery_categories','/panel/gallery/back_end/tags') || active_for_app_auth("gallery") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-pictures') + content_tag(:span, t("gallery.gallery")), panel_gallery_back_end_albums_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('albums') ) do -%> - <%= content_tag(:li, link_to((t('gallery.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_gallery_back_end_gallery_categories_path), :class => active_for_action('gallery_categories','index') )if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t('gallery.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t(:module_authorization) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %> - <% end -%> -<% end %> - -<%= content_tag :li, :class => active_for_controllers('archive_files', 'panel/archive/back_end/tags', 'archive_file_categorys') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-archive') + content_tag(:span, t(:archive)), panel_archive_back_end_archive_files_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('archive_files', 'tags', 'archive_file_categorys')) do -%> - <%= content_tag :li, link_to((t(:all) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_files_path), :class => active_for_action('archive_file', 'index')if (is_manager? rescue nil) %> - <%= content_tag :li, link_to((t(:add) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_archive_back_end_archive_file_path), :class => active_for_action('archive_file', 'new') if (is_admin? rescue nil)%> - <%= content_tag(:li, link_to((t(:categories) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_file_categorys_path), :class => active_for_action('archive_file_categorys', 'index'))if (is_manager? rescue nil)%> - <%= content_tag :li, link_to((t(:tags) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_tags_path), :class => active_for_action('tags', 'index') if (is_manager? rescue nil)%> - <% end -%> -<% end -%> - -<%= content_tag :li, :class => active_for_controllers('cals','panel/calendar/back_end/tags') || active_for_app_auth("calendar") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-calendar') + content_tag(:span, t("calendar.calendar")), panel_calendar_back_end_cals_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('cals','calendar_categories') ) do -%> - <%= content_tag :li, link_to((t('calendar.calendars') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_calendar_back_end_cal_path), :class => active_for_action('cals','new') if (is_manager? rescue nil)%> - <%= content_tag :li, link_to(t(:tags), panel_calendar_back_end_tags_path), :class => active_for_action('/panel/calendar/back_end/tags', 'index')if (is_manager? rescue nil) %> - <% end -%> -<% end %> -<%= content_tag :li, :class => active_for_controllers('locations') || active_for_app_auth("gprs") do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-location') + content_tag(:span, t(:location)), panel_gprs_back_end_locations_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('locations') ) do -%> - <% end -%> -<% end %> +<%=OrbitApp::Module::SideBarRegisition.all.first.render(request,params,current_user) %>
<% flash.each do |key, msg| %> diff --git a/app/views/layouts/new_admin.html.erb b/app/views/layouts/new_admin.html.erb index 7659a38f..26f299fb 100644 --- a/app/views/layouts/new_admin.html.erb +++ b/app/views/layouts/new_admin.html.erb @@ -20,6 +20,7 @@ <% else %> <%= render 'layouts/side_bar' %> <% end %> +
<%= yield %>
diff --git a/config/mongoid.yml b/config/mongoid.yml index a809bc06..cbc1ffbc 100644 --- a/config/mongoid.yml +++ b/config/mongoid.yml @@ -2,7 +2,7 @@ defaults: &defaults host: localhost # slaves: # - host: slave1.local - port: 27017 + # port: 27017 # - host: slave2.local # port: 27019 diff --git a/lib/orbit_app.rb b/lib/orbit_app.rb index b0e5a735..f218c1e4 100644 --- a/lib/orbit_app.rb +++ b/lib/orbit_app.rb @@ -1,6 +1,9 @@ require "orbit_app/summary" require "orbit_app/dsl" -require "orbit_app/module/backend_side_bar" +require "orbit_app/helper/renderer" +require "orbit_app/helper/side_bar_renderer" +require "orbit_app/helper/context_link_renderer" +require "orbit_app/module/side_bar" require "orbit_app/plugin/summary" require "orbit_app/plugin/registration" require "orbit_app/module/summary" diff --git a/lib/orbit_app/helper/context_link_renderer.rb b/lib/orbit_app/helper/context_link_renderer.rb new file mode 100644 index 00000000..9e1af318 --- /dev/null +++ b/lib/orbit_app/helper/context_link_renderer.rb @@ -0,0 +1,12 @@ +module ContextLinkRenderer + include Renderer + + def render(request,params) + @request = request + @params = params + if display? + content_tag :li, link_to((I18n.t(@label_i18n) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, eval(@path)), :class => (active? ? 'active' : nil) + end + end + +end \ No newline at end of file diff --git a/lib/orbit_app/helper/renderer.rb b/lib/orbit_app/helper/renderer.rb new file mode 100644 index 00000000..3eb09b86 --- /dev/null +++ b/lib/orbit_app/helper/renderer.rb @@ -0,0 +1,62 @@ +module Renderer + include Rails.application.routes.url_helpers + include ActionView::Helpers::UrlHelper + include ActionView::Helpers::TagHelper + include ActionView::Helpers::RenderingHelper + include ActionView::Context + include OrbitBasis::RenderAnywhere + +protected + def active_for_app_auth? + @module_app.id.to_s == @params[:module_app_id] ? true : false + end + + def active_for_ob_auths? + if @params.has_key? :object_auth_id + oa = ObjectAuth.find @params[:object_auth_id] + check_controller = @params[:controller] == 'admin/object_auths_new_interface' + check_object_class = @active_for_object_auth.include? oa.obj_authable_type + return (check_controller and check_object_class) + else + return false + end + end + + def current_user + current_or_guest_user + end + + def current_or_guest_user + @current_user + end + + def request + @request + end + + def default_url_options + _routes.default_url_options + end + + def _routes + @request.env["action_dispatch.routes"] + end + + def controller + @params[:controller] + end + + def action + @params[:action] + end + + def check_user_available_for + + end + + protected + def display? + true + end + +end \ No newline at end of file diff --git a/lib/orbit_app/helper/side_bar_renderer.rb b/lib/orbit_app/helper/side_bar_renderer.rb new file mode 100644 index 00000000..5e04f69e --- /dev/null +++ b/lib/orbit_app/helper/side_bar_renderer.rb @@ -0,0 +1,43 @@ +module SideBarRenderer + include Renderer + include AdminHelper + + def render(request,params,user) + @request = request + @params = params + @current_user = user + if display? + content_tag :li, :class => (module_sidebar_active? ? 'active' : nil) do + buf = link_to( content_tag(:i, nil, :class => @icon_class ) + content_tag(:span, I18n.t( @head_label )), eval(@head_link)) + buf << content_tag( :ul, :class => ("nav nav-list active") )do # visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory")) + @context_links.sort_by! {| obj | obj.priority}.collect do |link| + link.render(request,params) + end.join.html_safe + end + end + end + end + + protected + + def display? #控制sidebar 要不要算圖 + if is_manager? || is_admin? #如果是系統管理員 或 是模組管理員 + true + elsif (@module_app.open rescue false) # 如果app 被設定成 開放 + true + elsif is_member? #如果app 是封閉 那至少需要是 member + true + else + false + end + end + + def module_sidebar_active? + active_for_controller? or active_for_app_auth? or active_for_ob_auths? + end + + def active_for_controller? + @active_for_controllers.include? controller + end + +end \ No newline at end of file diff --git a/lib/orbit_app/module/backend_side_bar.rb b/lib/orbit_app/module/backend_side_bar.rb deleted file mode 100644 index de0ef750..00000000 --- a/lib/orbit_app/module/backend_side_bar.rb +++ /dev/null @@ -1,17 +0,0 @@ -module OrbitApp - module Module - class BackendSideBar - attr_reader :name - - def initialize(name, &block) - @name = name - block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? - end - - # def personal_plugin(*args) - # binding.pry - # end - - end - end -end \ No newline at end of file diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index 2f98592d..9a40eda3 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -33,11 +33,15 @@ module OrbitApp def initialize(name, &block) @name = name + @side_bar = nil block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? end - def plugin - + def side_bar(&block) + @side_bar = SideBarRegisition::SideBar.new(&block) + @side_bar.module_app_key = @name + @side_bar.finalize! + OrbitApp::Module::SideBarRegisition.add(@side_bar) end def personal_plugin(params) diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb new file mode 100644 index 00000000..a1ca3e63 --- /dev/null +++ b/lib/orbit_app/module/side_bar.rb @@ -0,0 +1,151 @@ +module OrbitApp + module Module + module SideBarRegisition + Version = "0.1" + + module ClassMethods + @@side_bars = [] + + def add(var) + @@side_bars << var + end + + def find_by_key(key) + @@side_bars.each{|t| + return t if t.name == key + } + return nil + end + + def all + return @@side_bars + end + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + class SideBar + # include ApplicationHelper + # include AdminHelper + include SideBarRenderer + # def is_admin? + # binding.pry + # end + # def is_manager? + # binding.pry + # end + def initialize( &block) + name = '' + @head_label = name + @context_links = [] + @available_for = [] + @active_for_controllers = [] + @active_for_object_auth = [] + @active_for_app_auth = [] + @head_link = "" + @app_base_path = '' + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + + def module_app_key=(var) + @module_app_title = var + @module_app = ModuleApp.where(:title=>var).desc(:create_date).first + @module_app_key = @module_app.key + end + + def head_label_i18n(var,optoins =nil) + @head_label = var + @icon_class = optoins[:icon_class] + end + + def available_for(var) + @available_for = var + end + + def active_for_controllers(var) + @active_for_controllers = var + end + + def active_for_object_auth(var) + @active_for_object_auth = var + end + + def head_link_path(var) + @head_link = var + end + + def context_link(*var) + new_context_link = ContextLink.new(*var) + @context_links << new_context_link + end + + def finalize! + set_controllers_scope + set_default_active_app_auth + @context_links.each do |t| + t.set_module_app = @module_app + t.finalize! + end + end + + protected + def set_default_active_app_auth + @active_for_app_auth = @module_app.title + end + + def set_controllers_scope + var = @active_for_controllers + @active_for_controllers = [] + var[:private].each do |controller| + @active_for_controllers << "panel/#{@module_app_key}/back_end/"+controller + end unless var[:private].nil? + var[:public].each do |controller| + @active_for_controllers << controller + end unless var[:public].nil? + end + end + + class ContextLink + include ContextLinkRenderer + attr_reader :label_i18n,:available_for,:priority,:path,:active_for_action + + def initialize(label_i18n="NoNameLink",options={}) + @label_i18n = label_i18n + @available_for = options[:available_for] + @priority = options[:priority] || 0 + @path = options[:link_path] || "" + @active_for_action = options[:active_for_action] || [] + @active_for_object_auth = options[:active_for_object_auth] || [] + @active_for_app_auth = options[:active_for_app_auth] || [] + end + + def active? + active_for_action? || active_for_app_auth? || active_for_ob_auths? + end + + def active_for_action? + @active_for_action[controller] == action + end + + def set_module_app=(var) + @module_app = var + @module_app_key = var.key + end + + def finalize! + set_active_actions + end + + protected + def set_active_actions + controller_action_hash = @active_for_action + @active_for_action = Hash[controller_action_hash.map{|controller,action| ["panel/#{@module_app_key}/back_end/"+controller.to_s,action.to_s]}] + end + end + end + end +end \ No newline at end of file diff --git a/lib/orbit_app/plugin/registration.rb b/lib/orbit_app/plugin/registration.rb index f996fc6d..1a6f63f3 100644 --- a/lib/orbit_app/plugin/registration.rb +++ b/lib/orbit_app/plugin/registration.rb @@ -10,8 +10,8 @@ module OrbitApp @@registrations << DataSheet.new(name,&block) end - def new_from_module_app(name,base_path,arg) - @@registrations << DataSheet.new(name,arg,:base_path=>base_path) + def new_from_module_app(name,base_path,*args) + @@registrations << DataSheet.new(name,args,:base_path=>base_path) end def find_by_key(key) @@ -35,14 +35,21 @@ module OrbitApp attr_reader :name attr_reader :base_path + def name + if @name.is_a? Proc + @name.call + else + @name + end + end def initialize(name,partial=nil,*args ,&block) @base_path = args[0][:base_path] - @name = name + @name = partial[0][:i18n].nil? ? name : lambda{ I18n.t(partial[0][:i18n]) } @partial_path = '' unless partial.nil? - @partial_path = partial[:path] + @partial_path = partial[0][:path] end block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? diff --git a/lib/orbit_app/summary.rb b/lib/orbit_app/summary.rb index 05c22f89..d936aa87 100644 --- a/lib/orbit_app/summary.rb +++ b/lib/orbit_app/summary.rb @@ -7,7 +7,7 @@ module OrbitApp def new( name ,&block) @@summaries << Item.new(name,&block) - binding.pry + # binding.pry end def all diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb index 1802db62..18638868 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb @@ -1,7 +1,12 @@ class Panel::Announcement::BackEnd::BulletinCategorysController < OrbitBackendController include OrbitControllerLib::DivisionForDisable - # if someone want to use json format replace with rss, please add :get_bulletins_json to below + before_filter :for_app_manager,:except => [:index,:get_categorys_json] + before_filter :set_module_app + + def set_module_app + @module_app = ModuleApp.where(:title=>'Announcement').first + end def index @bulletin_categorys = get_categories_for_index("BulletinCategory") diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb index 79aba936..8eb89423 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -2,24 +2,51 @@ module Announcement OrbitApp.registration "Announcement",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile" + personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement' + side_bar do + head_label_i18n 'admin.announcement',:icon_class=>"icons-announcement" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']}) + active_for_object_auth ['BulletinCategory'] + head_link_path "panel_announcement_back_end_bulletins_path" + + context_link 'announcement.all_articles', + :link_path=>"panel_announcement_back_end_bulletins_path" , + :priority=>1, + :active_for_action=>{:bulletins=>:index} + + context_link 'announcement.add_new', + :link_path=>"new_panel_announcement_back_end_bulletin_path" , + :priority=>2, + :active_for_action=>{:bulletins=>:new}, + :available_for => [:manager] + + context_link 'announcement.categories', + :link_path=>"panel_announcement_back_end_bulletin_categorys_path" , + :priority=>3, + :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + + context_link 'announcement.tags', + :link_path=>"panel_announcement_back_end_tags_path" , + :priority=>4, + :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'announcement.approval_setting', + :link_path=>"panel_announcement_back_end_approval_setting_path" , + :priority=>5, + :active_for_object_auth => 'BulletinCategory', + :available_for => [:manager] + + context_link 'admin.module.authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Announcement'}))", + :priority=>6, + :active_for_app_auth => 'Announcement', + :available_for => [:manager] + end end - end - - -# OrbitApp.backend_side_bar 'News' do - -# block :available_for => [:admin,:guest,:manager,:sub_manager], -# :active_for_controllers=> ['news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals'], -# :active_for_ob_auths_object => ['NewsBulletinCategory'], -# :head_link => panel_news_back_end_news_bulletins_path , -# :head_label=> I18n.t(:news) - -# context_link :link=>new_panel_news_back_end_news_bulletin_path , -# :priority=>1,:label=>I18n.t('announcement.add_new'), -# :active_for_action=>{:news_bulletins=>:new} - -# end \ No newline at end of file From 6995bb16227e900aaa4357afb279a109e6b916f4 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Thu, 29 Nov 2012 14:21:46 +0800 Subject: [PATCH 09/44] put module app json into init,making orbit app work with module app. --- .../admin/page_parts_controller.rb | 7 +- app/models/item.rb | 5 +- app/models/module_app.rb | 51 +- .../admin/page_parts/_module_widget.html.erb | 14 +- .../admin/page_parts/reload_widgets.js.erb | 2 +- config/list.yml | 7 + config/locales/zh_tw.yml | 1378 ++++++++++++----- lib/orbit_app.rb | 2 + lib/orbit_app/module/front_end.rb | 56 + lib/orbit_app/module/registration.rb | 79 +- lib/orbit_app/module/side_bar.rb | 41 +- lib/orbit_app/module/summary.rb | 2 +- lib/orbit_app/module/widget.rb | 108 ++ .../announcement/config/locales/zh_tw.yml | 3 + vendor/built_in_modules/announcement/init.rb | 29 +- 15 files changed, 1317 insertions(+), 467 deletions(-) create mode 100644 lib/orbit_app/module/front_end.rb create mode 100644 lib/orbit_app/module/widget.rb diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index f78c6ae3..f4672800 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -31,9 +31,9 @@ class Admin::PagePartsController < ApplicationController @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] - if @module_app.widgets.any?{|b| b.class == Array} - @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? - end + # if @module_app.widgets.any?{|b| b.class == Array} + # @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? + # end case @module_app.key when 'announcement' @@ -119,7 +119,6 @@ class Admin::PagePartsController < ApplicationController def reload_widget_styles @module_app = ModuleApp.find(params[:module_app_id]) - @widget_style = @module_app.widgets[params[:id]] respond_to do |format| diff --git a/app/models/item.rb b/app/models/item.rb index 81366a21..c12620fa 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -4,7 +4,8 @@ class Item include Mongoid::Timestamps include Mongoid::Tree include Mongoid::Tree::Ordering - + LIST = YAML.load(File.read('config/list.yml')) + field :name field :path field :is_published, :type => Boolean, :default => false @@ -15,7 +16,7 @@ class Item validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/ - validates :name, :exclusion => { :in => LIST[:forbidden_item_names] } + # validates :name, :exclusion => { :in => LIST[:forbidden_item_names] } validates_uniqueness_of :name, :scope => :parent_id validates_presence_of :name validates_associated :parent, :children diff --git a/app/models/module_app.rb b/app/models/module_app.rb index 669d82aa..22fb4814 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -5,30 +5,45 @@ class ModuleApp field :key field :title - field :version - field :organization - field :author - field :intro - field :update_info - field :create_date - field :enable_frontend, type: Boolean, :default => true - - field :app_pages ,type: Array - # field :widgets ,type: Array - field :widgets ,type: Hash - field :widget_fields ,type: Array - + has_many :managers,as: :managing_app ,:class_name => "AppManager" ,:dependent => :destroy#,:foreign_key => "managing_app_id",:inverse_of => :managing_app has_many :sub_managers,as: :sub_managing_app ,:class_name => "AppManager", :dependent => :destroy#,:foreign_key => "sub_managing_app_id",:inverse_of => :sub_managing_app - has_many :tags + # has_many :tags has_many :page_parts has_many :pages has_one :app_auth,dependent: :delete - + before_save :set_key - + + def get_registration + OrbitApp::Module::Registration.find_by_key(key) + end + + # %w{label_i18n }.each do |field| + # define_method(field){|var| get_registration.send("get_#{m}") } + # end + + def label_i18n + reg = get_registration + reg.nil? ? 'Init is not defined completely' : get_registration.get_label_i18n + end + + # def method_missing(m, *args, &block) + # # get_registration.send("get_#{m}") + # end + + def using_default_widget? + !get_registration.get_default_widget.blank? + end + + def get_widget_for_select + widgets = get_registration.get_widgets + ary = widgets.collect{|k,v| [I18n.t(v["label"]),k]} + ary << [I18n.t('widget.default_widget'),'default_widget']if using_default_widget? + end + def is_manager?(user) managing_users.include?(user) end @@ -79,6 +94,10 @@ class ModuleApp end end + def label + I18n.t(label_i18n) + end + protected def set_key diff --git a/app/views/admin/page_parts/_module_widget.html.erb b/app/views/admin/page_parts/_module_widget.html.erb index 44358601..e6a6e2a0 100644 --- a/app/views/admin/page_parts/_module_widget.html.erb +++ b/app/views/admin/page_parts/_module_widget.html.erb @@ -10,12 +10,12 @@
- <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %> + <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :label, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %> <%#= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %> - <%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> + <%= f.select :widget_path, @module_app.get_widget_for_select, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> @@ -34,18 +34,10 @@ - <%= render 'widget_fields' %> - - <%#= f.label :widget_field %> - <%# @module_app.widget_fields.each_with_index do |widget_field, i| %> - <%#= i+1 %> - <%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, (@part.widget_field ? @part.widget_field[i] : nil) ), :include_blank => true %>
- <%# end %> - - <%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, @part.widget_field.collect{|widget_field| widget_field}), {:multiple => :multiple, :size => 6} %>
+
<%= f.label :widget_data_count %> <%= f.text_field :widget_data_count %> diff --git a/app/views/admin/page_parts/reload_widgets.js.erb b/app/views/admin/page_parts/reload_widgets.js.erb index c66c44e9..3b7082fc 100644 --- a/app/views/admin/page_parts/reload_widgets.js.erb +++ b/app/views/admin/page_parts/reload_widgets.js.erb @@ -1,4 +1,4 @@ -$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|k,v| k}) %>"); +$('#widget_list select').html("<%= j options_for_select(@module_app.get_widget_for_select) %>"); $('#widget_style_list').html("<%= escape_javascript(select 'page_part', 'widget_style', @module_app.widgets[@widget_path]) if !@widget_path.blank? %>"); $('#widget_field').html("<%= j render 'widget_fields' %>"); $('#widget_category').html("<%= j render 'widget_categories' %>"); diff --git a/config/list.yml b/config/list.yml index bae7a90d..a3b48cfc 100644 --- a/config/list.yml +++ b/config/list.yml @@ -70,3 +70,10 @@ widget_field_type: - tag - viewcount - poster + +default_widget_style: + - style1 + - style2 + - style3 + - style4 + - style5 \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index c8075b24..441048af 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -1,404 +1,978 @@ -zh_tw: +# zh_tw: - _locale: 中文 +# _locale: 中文 - access: - denied: - app: - not_sub_manager: 拒絕存取,因你不是此應用程式次管理員 - not_manager: 拒絕存取,因你不是此應用程式管理員 - not_authed_user: 拒絕存取,因你不是此應用程式授權使用者 - object: 拒絕存取,因你沒有權限 - not_admin: 拒絕存取,因你不是此應用程式管理員 - account_settings: 帳號設定 - action: 操作 - ad: - chinese_1: 在套圖中出現次數 1次請輸入1 - chinese_2: 輸入連結 - chinese_3: 輸入標題 - ab_fx: 轉場效果 - add_link: Add a reference link - banner_best_size: 輪播圖片尺寸 - best_size: 最佳尺寸 - best_size_example: "Ex: 500px x 300px" - new_image: 新增輪播圖片 - not_showing: 沒有顯示 - picture_list: 圖片列表 - sec_place_holder: 每張輪播圖片顯示秒數(3秒就請輸入3) - select_fx: Select the effect type - set_dates: Set the image to start and end dates - set_range: Set the range time - showing: 顯示中 - success_destroy_ad_image: 刪除圖片成功 - trans_unit_sec: 秒 - transition_sec: 轉場單位時間 - update_banner: 更新輪播 - upload_pictures: Upload pictures - widget_info_for_ad_image_size: "此區塊圖片尺寸使用: %{best_size}" - ad_banner: 廣告輪播 - add: 新增 - add_attribute_field: Add attribute field - add_image: Add image - add_item: 新增項目 - add_member: Add member - add_more: Add more - address_modal: - default_title: 地址 - street_address: 街道地址 - city: 城市 - county: 縣市 - zip: 郵遞區號 - country: 國家/地區 - addthis_tools: - add_to_bookmark: 加入書籤 - admin: 管理員 - all: All - all_content: 所有內容 - all_file: 所有檔案 - all_member: 所有會員 - all_plugin_summary: All plugin summary - all_plugins: All plugins - always_display_title: 永遠顯示標題 - app_auth: - list_setting_result: 授權列表 - assigning_manager: - add_manager_fail: 新增管理員失敗 - add_manager_ok: 新增管理員成功 - assigning_sub_manager: - add_sub_manager_fail: 新增次管理員失敗 - add_sub_manager_ok: 新增次管理員成功 - can_not_add_this_user: 不能新增這個使用員 - delete_manager: - fail: 刪除管理員失敗 - success: 刪除管理員成功 - delete_sub_manager: - fail: 刪除次管理員失敗 - success: 刪除次管理員成功 - failed_no_user: 失敗,不是使用者 - operation_not_permitted: Operation not permitted - approval: - not_pass: 拒絕 - not_pass_reason: 拒絕原因 - pass: 已認可 - setting: 審核設定 - stat: 審核狀態 - user_list: 使用者列表 - approval_: 審核 - archive: Archive - asset: 資產 - attributes: 屬性 - auth: - add_manager: 新增管理員 - add_sub_manager: 新增次管理員 - add_to_block_list: 增加到封鎖名單 - add_to_privilege_list: 增加到特許名單 - all_member: 所有會員 - auth_by: -由%{user_display_name}授權 - by_role: 用戶狀態 - by_sub_role: 次用戶狀態 - author: 作者 - back: 回上一步 - basic: 基本 - browse: 瀏覽 - built_in: Built-in - calendar: Calendar - cancel: 取消 - cant_delete_self: 不可以刪除自己 - cant_empty_star: 不能為空白 (*) - cant_revoke_self_admin: 不可以撤銷自己的管理狀態 - categories: 類別 - category: 類別 - category_auth: 類別授權 - clear: 清除 - close: Close - content: 內容 - courses: 開課數 - create: - error: - link: 建立連結時出錯 - page: 建立頁面時出錯 - fail: 建立失敗 - success: - asset_category: 資產類別已成功建立 - co_author: Co-author was successfully created. - link: Link was successfully created. - link: 連結已成功建立 - page: 頁面已成功建立 - user: 使用者已成功建立 - create_: 建立 - cross_lang: 跨語言輸入 - data: 資料 - date: - calendar: 紀年法 - range: 本欄為時間區段 - format: 格式 - tw_calendar: 民國 - minguo_calendar: - after: 民國 - before: 民前 - first_year: 民國元年 - year: 年 - month: 月 - west_calendar: 西元 - date_: Date - dashboard: - bulletin: 公告 - news_bulletin: 新聞 - page_context: 頁面 - web_link: 鏈接 - dashboard_: 儀表版 - deadline: 最後期限 - default: Default - default_css: 預設樣式表 - delete: - file: 刪除檔案 - success: - paper: Paper was successfully deleted. - delete_: 刪除 - description: 描述 - desktop: 桌面 - disable: 關閉 - disabled: Disabled - dots: ●●●●●● - download: 下載 - downloaded: 已下載 - edit: 編輯 - editing: - asset: 編輯資產 - design: 編輯設計 - link: 編輯連結 - page: 編輯頁面 - email: 電子郵件 - enable: 開啟 - enabled_for: 啟用 - end: 結束 - end_date: 結束日期 - errors: - at_least_one: 至少擁有一個值 - file: - size: 檔案大小 - type: 檔案類型 - upload: 上傳檔案 - file_: 檔案 - file_type: 檔案類型 - followers: Followers - forgot_password: 忘記密碼? - frequency: 頻率 - frontend_data_count: Frontend data count - gallery: Gallery - help: 幫助 - hidden: 隱藏的 - hide: 隱藏 - hits: 點擊次數 - homepage: 首頁 - horizontal: 水平的 - hot: 熱門 - image: 圖片 - images: Images - info: 信息 - initial: 起始值 - intro: 簡介 - is_published: 已發佈 - item: 項目 - item_name: Item name - javascripts: Javascripts - key: 索引 - last_modified: 最後修改者 - layout: 範本 - link: 連結 - list: - ad_banner: 廣告輪播列表 - asset: 資產列表 - info: 使用者資訊列表 - link: 連結列表 - purchase: 已購買項目列表 - role: 使用者角色列表 - user: 使用者列表 - list_: 列表 - list_lower: 列表 - lists: - markups: - text_field: 文字輸入框 - select: 下拉選單 - date: 日期 - text_area: 文字輸入方塊 - radio_button: 單選 - checkbox: 多選 - locale: Locale - location: Location - login: 登入 - logout: 登出 - mail: - address: 電子郵件地址 - authentication: 電子郵件認證 - domain: 電子郵件網域名稱 - enable_starttls_auto: 啟用安全通訊 - password: 密碼 - port: 電子郵件傳輸埠 - setting: 電子郵件設定 - tls: 電子郵件TLS - user_name: 電子郵件帳號 - manager: 管理者 - manager: 管理者 - markup: 輸入模式 - markup_options: Markup options - markup_value: Markup value - me: Me - member: 會員 - menu_enabled_for: 選單啟用 - module: Module - module_authorization: 模組授權 - more_plus: 更多+ - most_visited_page: 最多瀏覽頁面 - multilingual: 多語系 - name: 名稱 - need_home: You need a home page - neutral_title: Neutral title - neutral_for: Neutral for - new: - asset: 新增資產 - banner: 新增橫幅 - design: 新增設計 - link: 新增連結 - page: 新增頁面 - user: 新增使用者 - info: 新增使用者資訊 - role: 新增使用者角色 - new_: New - news: 新聞 - no_: "不是" - no_deadline: 沒有期限 - object_auth: - a_object_must_have_only_one_object_auth_profile_for_each_action: '' - list_title_of_users: 授權列表 - new_object_auth: 新增授權 - off_upcase: "開啟" - on_upcase: "關閉" - options: 選項 - or_lower: 或 - organization: 組織 - page: 頁面 - page_part_kinds: - module_widget: 外掛模塊 - public_r_tag: 系統模塊 - text: 文字區域 - passed: 通過審核 - password: 密碼 - password_confirmation: 確認密碼 - pending: 待審核 - picture: 圖片 - placeholder: Placeholder - plugins: Plugins - postdate: 張貼日期 - posted_by: 張貼人 - preview: 預覽 - profile: Profile - publications: Publications - purchase: 購買 - quantity: 數量 - quick_edit: 快速編輯 - recent_update: 近期更新 - referral_in_links: 參考連結 - register: 註冊 - registered: 已註冊 - rejected: 拒絕 - rejected_reason: '拒絕原因:' - rejected_reason_empty: "拒絕核准, 沒有參考資訊" - related_links: 相關連結 - role: 身份 - roles: 身份 - ruling_site: 銳綸網站 - search: - domains: Google Search Domains - not_found: "沒有搜尋結果" - result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" - sitesearch: 全站搜尋 - too_many: "搜尋有關 ' %{search_word} '尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋?" - unit_get: "列出由 :%{unit_name}發佈的資料,共有%{item_num}筆" - search_: Search - search_google: 搜尋Google - setup_member: 會員設定 - show: 顯示 - show_mode: - index: 清單 - summary: 摘要 - thumbnail: 縮圖 - site: - description: 網站描述 - description_help: '' - footer: 網站頁尾 - footer_help: '' - info: 網站資訊 - keywords: 搜尋關鍵字 - keywords_help: '' - language: 網站語言 - search: 網站搜尋 - search_help: 請輸入送交Google搜尋的參數 - settings: 基本設定 - sub_menu: 次選單 - title: 網站標題 - title_help: '' - site_: 網站 - site_info: 網站資訊 - sitemap: 網站地圖 - site_name: 網站名稱 - size: Size - start: 開始 - start_date: 開始日期 - statistics: 統計資訊 - status: 狀態 - structure: 結構 - sub_manager: 次管理員 - subtitle: 副標題 - submit: 送出 - submit_approval: 送出已核准 - submit_user_list: 送出使用者列表 - sure?: "您確定嗎?" - sys: - can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示" - limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}" - module_page_lang_not_support: "很抱歉,此頁面沒有開放中文版本" - not_previewable: "不支援預覽" - preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp等圖片格式" - sys_basic_form: 系統基本資料表 - system_info: 系統資訊 - tag_cloud: 標籤雲 - tags: 標籤 - template: 樣版 - template_name: 樣版名稱 - text: 內文 - theme: 主題 - themes: 主題 - title: 標題 - top: 置頂 - total_visitors: 總計造訪人次 - traffic: 流量 - type: 類型 - unit_name: 單位名稱 - unzip_success: "App unzip procress is finished, please restart the server to apply effect" - up_to_date: 最新版本 - update: - error: - link: 更新連接時出錯 - fail: 更新消息 - success: - co_author: Co-author was successfully updated. - content: 內容已更新成功 - link: 連結已更新成功 - page: 頁面已更新成功 - paper: Paper was successfully updated. - user: User was successfully updated. - success_: S使用者已更新成功 - update_at: 最後更新時間 - url: 網址 - use_status: '' - user: 使用者 - version: 版本 - vertical: 垂直的 - view: 檢視 - view_count: 查看次數 - visitors_this_month: 本月造訪人次 - visitors_this_week: 本星期造訪人次 - visitors_this_year: 今年造訪人次 - visitors_today: 今日造訪人次 - yes_: "是" +# access: +# denied: +# app: +# not_sub_manager: 拒絕存取,因你不是此應用程式次管理員 +# not_manager: 拒絕存取,因你不是此應用程式管理員 +# not_authed_user: 拒絕存取,因你不是此應用程式授權使用者 +# object: 拒絕存取,因你沒有權限 +# not_admin: 拒絕存取,因你不是此應用程式管理員 +# account_settings: 帳號設定 +# action: 操作 +# ad: +# chinese_1: 在套圖中出現次數 1次請輸入1 +# chinese_2: 輸入連結 +# chinese_3: 輸入標題 +# ab_fx: 轉場效果 +# add_link: Add a reference link +# banner_best_size: 輪播圖片尺寸 +# best_size: 最佳尺寸 +# best_size_example: "Ex: 500px x 300px" +# new_image: 新增輪播圖片 +# not_showing: 沒有顯示 +# picture_list: 圖片列表 +# sec_place_holder: 每張輪播圖片顯示秒數(3秒就請輸入3) +# select_fx: Select the effect type +# set_dates: Set the image to start and end dates +# set_range: Set the range time +# showing: 顯示中 +# success_destroy_ad_image: 刪除圖片成功 +# trans_unit_sec: 秒 +# transition_sec: 轉場單位時間 +# update_banner: 更新輪播 +# upload_pictures: Upload pictures +# widget_info_for_ad_image_size: "此區塊圖片尺寸使用: %{best_size}" +# ad_banner: 廣告輪播 +# add: 新增 +# add_attribute_field: Add attribute field +# add_image: Add image +# add_item: 新增項目 +# add_member: Add member +# add_more: Add more +# address_modal: +# default_title: 地址 +# street_address: 街道地址 +# city: 城市 +# county: 縣市 +# zip: 郵遞區號 +# country: 國家/地區 +# addthis_tools: +# add_to_bookmark: 加入書籤 +# admin: 管理員 +# all: All +# all_content: 所有內容 +# all_file: 所有檔案 +# all_member: 所有會員 +# all_plugin_summary: All plugin summary +# all_plugins: All plugins +# always_display_title: 永遠顯示標題 +# app_auth: +# list_setting_result: 授權列表 +# assigning_manager: +# add_manager_fail: 新增管理員失敗 +# add_manager_ok: 新增管理員成功 +# assigning_sub_manager: +# add_sub_manager_fail: 新增次管理員失敗 +# add_sub_manager_ok: 新增次管理員成功 +# can_not_add_this_user: 不能新增這個使用員 +# delete_manager: +# fail: 刪除管理員失敗 +# success: 刪除管理員成功 +# delete_sub_manager: +# fail: 刪除次管理員失敗 +# success: 刪除次管理員成功 +# failed_no_user: 失敗,不是使用者 +# operation_not_permitted: Operation not permitted +# approval: +# not_pass: 拒絕 +# not_pass_reason: 拒絕原因 +# pass: 已認可 +# setting: 審核設定 +# stat: 審核狀態 +# user_list: 使用者列表 +# approval_: 審核 +# archive: Archive +# asset: 資產 +# attributes: 屬性 +# auth: +# add_manager: 新增管理員 +# add_sub_manager: 新增次管理員 +# add_to_block_list: 增加到封鎖名單 +# add_to_privilege_list: 增加到特許名單 +# all_member: 所有會員 +# auth_by: -由%{user_display_name}授權 +# by_role: 用戶狀態 +# by_sub_role: 次用戶狀態 +# author: 作者 +# back: 回上一步 +# basic: 基本 +# browse: 瀏覽 +# built_in: Built-in +# calendar: Calendar +# cancel: 取消 +# cant_delete_self: 不可以刪除自己 +# cant_empty_star: 不能為空白 (*) +# cant_revoke_self_admin: 不可以撤銷自己的管理狀態 +# categories: 類別 +# category: 類別 +# category_auth: 類別授權 +# clear: 清除 +# close: Close +# content: 內容 +# courses: 開課數 +# create: +# error: +# link: 建立連結時出錯 +# page: 建立頁面時出錯 +# fail: 建立失敗 +# success: +# asset_category: 資產類別已成功建立 +# co_author: Co-author was successfully created. +# link: Link was successfully created. +# link: 連結已成功建立 +# page: 頁面已成功建立 +# user: 使用者已成功建立 +# create_: 建立 +# cross_lang: 跨語言輸入 +# data: 資料 +# date: +# calendar: 紀年法 +# range: 本欄為時間區段 +# format: 格式 +# tw_calendar: 民國 +# minguo_calendar: +# after: 民國 +# before: 民前 +# first_year: 民國元年 +# year: 年 +# month: 月 +# west_calendar: 西元 +# date_: Date +# dashboard: +# bulletin: 公告 +# news_bulletin: 新聞 +# page_context: 頁面 +# web_link: 鏈接 +# dashboard_: 儀表版 +# deadline: 最後期限 +# default: Default +# default_css: 預設樣式表 +# delete: +# file: 刪除檔案 +# success: +# paper: Paper was successfully deleted. +# delete_: 刪除 +# description: 描述 +# desktop: 桌面 +# disable: 關閉 +# disabled: Disabled +# dots: ●●●●●● +# download: 下載 +# downloaded: 已下載 +# edit: 編輯 +# editing: +# asset: 編輯資產 +# design: 編輯設計 +# link: 編輯連結 +# page: 編輯頁面 +# email: 電子郵件 +# enable: 開啟 +# enabled_for: 啟用 +# end: 結束 +# end_date: 結束日期 +# errors: +# at_least_one: 至少擁有一個值 +# file: +# size: 檔案大小 +# type: 檔案類型 +# upload: 上傳檔案 +# file_: 檔案 +# file_type: 檔案類型 +# followers: Followers +# forgot_password: 忘記密碼? +# frequency: 頻率 +# frontend_data_count: Frontend data count +# gallery: Gallery +# help: 幫助 +# hidden: 隱藏的 +# hide: 隱藏 +# hits: 點擊次數 +# homepage: 首頁 +# horizontal: 水平的 +# hot: 熱門 +# image: 圖片 +# images: Images +# info: 信息 +# initial: 起始值 +# intro: 簡介 +# is_published: 已發佈 +# item: 項目 +# item_name: Item name +# javascripts: Javascripts +# key: 索引 +# last_modified: 最後修改者 +# layout: 範本 +# link: 連結 +# list: +# ad_banner: 廣告輪播列表 +# asset: 資產列表 +# info: 使用者資訊列表 +# link: 連結列表 +# purchase: 已購買項目列表 +# role: 使用者角色列表 +# user: 使用者列表 +# list_: 列表 +# list_lower: 列表 +# lists: +# markups: +# text_field: 文字輸入框 +# select: 下拉選單 +# date: 日期 +# text_area: 文字輸入方塊 +# radio_button: 單選 +# checkbox: 多選 +# locale: Locale +# location: Location +# login: 登入 +# logout: 登出 +# mail: +# address: 電子郵件地址 +# authentication: 電子郵件認證 +# domain: 電子郵件網域名稱 +# enable_starttls_auto: 啟用安全通訊 +# password: 密碼 +# port: 電子郵件傳輸埠 +# setting: 電子郵件設定 +# tls: 電子郵件TLS +# user_name: 電子郵件帳號 +# manager: 管理者 +# manager: 管理者 +# markup: 輸入模式 +# markup_options: Markup options +# markup_value: Markup value +# me: Me +# member: 會員 +# menu_enabled_for: 選單啟用 +# module: Module +# module_authorization: 模組授權 +# more_plus: 更多+ +# most_visited_page: 最多瀏覽頁面 +# multilingual: 多語系 +# name: 名稱 +# need_home: You need a home page +# neutral_title: Neutral title +# neutral_for: Neutral for +# new: +# asset: 新增資產 +# banner: 新增橫幅 +# design: 新增設計 +# link: 新增連結 +# page: 新增頁面 +# user: 新增使用者 +# info: 新增使用者資訊 +# role: 新增使用者角色 +# new_: New +# news: 新聞 +# no_: "不是" +# no_deadline: 沒有期限 +# object_auth: +# a_object_must_have_only_one_object_auth_profile_for_each_action: '' +# list_title_of_users: 授權列表 +# new_object_auth: 新增授權 +# off_upcase: "開啟" +# on_upcase: "關閉" +# options: 選項 +# or_lower: 或 +# organization: 組織 +# page: 頁面 +# page_part_kinds: +# module_widget: 外掛模塊 +# public_r_tag: 系統模塊 +# text: 文字區域 +# passed: 通過審核 +# password: 密碼 +# password_confirmation: 確認密碼 +# pending: 待審核 +# picture: 圖片 +# placeholder: Placeholder +# plugins: Plugins +# postdate: 張貼日期 +# posted_by: 張貼人 +# preview: 預覽 +# profile: Profile +# publications: Publications +# purchase: 購買 +# quantity: 數量 +# quick_edit: 快速編輯 +# recent_update: 近期更新 +# referral_in_links: 參考連結 +# register: 註冊 +# registered: 已註冊 +# rejected: 拒絕 +# rejected_reason: '拒絕原因:' +# rejected_reason_empty: "拒絕核准, 沒有參考資訊" +# related_links: 相關連結 +# role: 身份 +# roles: 身份 +# ruling_site: 銳綸網站 +# search: +# domains: Google Search Domains +# not_found: "沒有搜尋結果" +# result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" +# sitesearch: 全站搜尋 +# too_many: "搜尋有關 ' %{search_word} '尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋?" +# unit_get: "列出由 :%{unit_name}發佈的資料,共有%{item_num}筆" +# search_: Search +# search_google: 搜尋Google +# setup_member: 會員設定 +# show: 顯示 +# show_mode: +# index: 清單 +# summary: 摘要 +# thumbnail: 縮圖 +# site: +# description: 網站描述 +# description_help: '' +# footer: 網站頁尾 +# footer_help: '' +# info: 網站資訊 +# keywords: 搜尋關鍵字 +# keywords_help: '' +# language: 網站語言 +# search: 網站搜尋 +# search_help: 請輸入送交Google搜尋的參數 +# settings: 基本設定 +# sub_menu: 次選單 +# title: 網站標題 +# title_help: '' +# site_: 網站 +# site_info: 網站資訊 +# sitemap: 網站地圖 +# site_name: 網站名稱 +# size: Size +# start: 開始 +# start_date: 開始日期 +# statistics: 統計資訊 +# status: 狀態 +# structure: 結構 +# sub_manager: 次管理員 +# subtitle: 副標題 +# submit: 送出 +# submit_approval: 送出已核准 +# submit_user_list: 送出使用者列表 +# sure?: "您確定嗎?" +# sys: +# can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示" +# limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}" +# module_page_lang_not_support: "很抱歉,此頁面沒有開放中文版本" +# not_previewable: "不支援預覽" +# preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp等圖片格式" +# sys_basic_form: 系統基本資料表 +# system_info: 系統資訊 +# tag_cloud: 標籤雲 +# tags: 標籤 +# template: 樣版 +# template_name: 樣版名稱 +# text: 內文 +# theme: 主題 +# themes: 主題 +# title: 標題 +# top: 置頂 +# total_visitors: 總計造訪人次 +# traffic: 流量 +# type: 類型 +# unit_name: 單位名稱 +# unzip_success: "App unzip procress is finished, please restart the server to apply effect" +# up_to_date: 最新版本 +# update: +# error: +# link: 更新連接時出錯 +# fail: 更新消息 +# success: +# co_author: Co-author was successfully updated. +# content: 內容已更新成功 +# link: 連結已更新成功 +# page: 頁面已更新成功 +# paper: Paper was successfully updated. +# user: User was successfully updated. +# success_: S使用者已更新成功 +# update_at: 最後更新時間 +# url: 網址 +# use_status: '' +# user: 使用者 +# version: 版本 +# vertical: 垂直的 +# view: 檢視 +# view_count: 查看次數 +# visitors_this_month: 本月造訪人次 +# visitors_this_week: 本星期造訪人次 +# visitors_this_year: 今年造訪人次 +# visitors_today: 今日造訪人次 +# yes_: "是" +# <<<<<<< HEAD +# ======= + +# nccu: +# date: 起迄日期 +# file: 附加檔案 +# file_description: 檔案描述 +# file_name: 檔案名稱 +# link_name: 連結名稱 +# picture: 刊頭圖片 +# selected_file: 選擇檔案 +# tags: 頁籤 +# url: 連結位置 + + + + + + +# # : <<<<<<< HEAD +# # : ======= +# errors: +# at_least_one: 必須至少有一個值 +# admin: +# infos: +# add_attribute_field: 新增 +# save: 儲存 +# initial: 起始值 +# markup: 輸入模式 +# item_name: 資料表名稱 +# name: 名稱 +# options: 選項 +# :cross_lang: 跨語言輸入 +# add_more: 使用者可自行延伸欄位 +# add: 新增 +# placeholder: 輸入協助 +# type: 類型 +# placeholder: 提示內容 +# list: 自定選單 +# is_range: 是 +# not_range: 否 +# date: +# claendar: 紀年法 +# range: 本欄為時間區段 +# format: 格式 +# tw_claendar: 民國 +# minguo_calendar: +# after: 民國 +# before: 民前 +# first_year: 民國元年 +# year: 年 +# month: 月 +# west_claendar: 西元 +# access: +# denied: +# app: +# not_sub_manager: 拒絕存取因你不是此應用程式次管理員 +# not_manager: 拒絕存取因你不是此應用程式管理員 +# not_authed_user: 拒絕存取因你不是此應用程式授權使用者 +# not_admin: 拒絕存取因你不是此應用程式次管理員 +# object: 拒絕存取因你不是網站管理者 +# action: 操作 +# ad_banner: 廣告輪播 +# orbit_gallery: 活動花絮 +# ad: +# sec_place_holder: 3秒請輸入3 +# ab_fx: 轉場特效 +# all_banners: 輪播清單 +# banner_best_size: Banner 尺寸 +# best_size: 最佳尺寸 +# cate_auth: 分類授權 +# delete_banner: 刪除整組輪播 +# new_banner: 新增輪播 +# new_image: 新增橫幅 +# showing: 顯示中 +# not_showing: 沒有顯示 +# picture_list: 圖片列表 +# title: 標題 +# transition_sec: 轉場單位時間 +# trans_unit_sec: 秒 +# update_banner: 更新輪播 +# widget_info_for_ad_image_size: "此區塊圖片尺寸請使用 %{best_size}" +# add: 新增 +# add_item: 新增項目 +# add_language: 新增語言 +# add_drop_down_item: +增加Orbit選單 +# admin: 網站管理者 +# all_articles: 列表 +# always_display_title: 永遠顯示於標題列 +# announcement: 公告管理 +# asset: 資產 +# assets: +# file: 檔案 +# album: 相簿 +# video: 影片 +# book: 書籍 +# attributes: 屬性 +# author: 作者 +# calendar: 行事曆 +# cant_delete_self: 您不可以刪除自己。 +# cant_revoke_self_admin: 您不可以撤銷自己的管理身份。 +# category: 類別 +# choose_file: 請選擇一個文件... +# class: 階級 +# content: 內容 +# contenteditable: +# update_done: 更新完成 +# update_failed: 更新失敗 +# create_error_link: 新增連接時出錯。 +# create_error_page: 新增頁面時出錯。 +# create_success_home: 首頁已成功新增。 +# create_success_layout: 樣板已成功新增。 +# create_success_link: 連結已成功新增。 +# create_success_page: 頁面已成功新增。 +# create_success_home: 首頁已成功新增。 +# create_success_layout: 佈局已成功新增。 +# create_success_link: 連結已成功新增。 +# create_success_page: 頁面已成功新增。 +# create_success_snippet: 片段已成功新增。 +# create_success_user: 用戶已成功新增。。 +# dashboard: 儀表板 +# data: 選擇檔案 +# delete_language: 刪除語言 +# description: 描述 +# design: 版型管理 +# disable_language: 禁用語言 +# edit: 編輯 +# editing_home: 編輯首頁 +# editing_layout: 編輯樣板 +# editing_link: 編輯連結 +# editing_page: 編輯頁面 +# editing_snippet: 編輯片段 +# editing_info: 編輯用戶資料 +# editing_role: 編輯用戶身份 +# email: Email +# enable_language: 啟用語言 +# enabled_for: 啟用 +# file_name: 檔名 +# file_size: 檔案大小 +# file_upload: 文件上載 +# format: 格式 +# home: 首頁 +# id: ID +# info: 資料 +# intro: 簡介 +# is_published: 被出版 +# item: 網站架構 +# key: 關鍵 +# keywords: 關鍵字 +# language: 語言 +# layout: 佈局 +# layout_name: 佈局名字 +# link: 連結管理 +# links: 網路資源 +# list_assets: 資產列表 +# list_designs: 設計列表 +# list_items: 項目列表 +# list_puchases: 購買清單 +# list_snippets: 斷片列表 +# list_users: 使用列表 +# list_infos: 用戶資料列表 +# list_roles: 用戶身份列表 +# mail_address: 郵件地址 +# mail_port: 傳輸埠 +# mail_domain: 網域名稱 +# mail_authentication: 認證 +# mail_user_name: 帳號 +# mail_password: 密碼 +# mail_tls: TLS +# mail_enable_starttls_auto: Enable Start TLS Auto +# member: 會員 +# menu_enabled_for: 選單啟用 +# module: +# authorization: 模組授權 +# move_down: 往下移 +# move_up: 往上移 +# multilingual: 多種語言 +# my_avatar: 我的頭像 +# no_home_page: 您沒有首頁 +# no_layout: 您沒有佈局 +# name: 名稱 +# new_admin: +# side_bar: +# all_user: 所有使用者 +# add_user: 新增使用者 +# user_roles: 角色 +# user_info: 使用者資訊 +# user: 會員 +# users: +# all_plugin_summary: 全部 +# profile: 基本資料 +# roles: +# staff: 職員資料 +# student: 學生資料 +# teacher: 教師資料 +# action: +# add: 新增 +# edit: 編輯 +# delete: 刪除 +# quick_edit: 快速編輯 +# next: 下一頁 +# prev: 上一頁 +# attributes: +# roles: 角色 +# name: 名稱 +# publications: 出版數 +# courses: 開課數 +# followers: 被關注數 +# show_mode: +# index: 清單 +# summary: 摘要 +# thumbnail: 縮圖 +# table_header: +# status: 狀態 +# category: 分類 +# tags: 標籤 +# clear_filter: 重置 +# new_asset: 新增資產 +# new_component: 新增元件 +# new_design: 新設計 +# new_home: 新增首頁 +# new_layout: 新增樣板 +# new_link: 新增連結 +# new_page: 新增頁面 +# new_snippet: 新增片段 +# new_user: 新增使用 +# new_info: 新增用戶資料 +# new_role: 新增用戶身份 +# news: 新聞 +# non_multilingual: +# object_auth: +# list_title_of_users: 授權清單-%{auth_title} +# update_done: 更新完成,結果顯示於清單 +# update_failed: 更新失敗 +# options: 選項 +# orig_upload_file: 原上傳檔名 +# page: 頁面管理 +# page_context: +# edit: 編輯 +# ob_auth: +# edit: 分類授權 +# page_part_kinds: +# text: 文字區塊 +# public_r_tag: 系統模塊 +# module_widget: 外掛模塊 +# position: 位置 +# published?: 發布? +# purchase: 購買 +# role: 身份 +# roles: 身份 +# site_description: 網站描述 +# site_footer: 網站頁尾 +# site_settings: 基本設定 +# site_sub_menu: 網站次選單 +# site_title: 網站標題 +# setup_member: 成員設置 +# setup_translations: 語系設定 +# setup_designs: 版型設定 +# site: 網站 +# site_setting: 網站設定 +# super_pages: 可編頁面 +# structure: 網站結構 +# tags: 標籤 +# title: 標題 +# translation: 翻譯 +# type: 類型 +# up_to_date: 最新版本 +# update_error_link: 更新鏈接時出現錯誤。 +# update_error_page: 更新頁面時出現錯誤。 +# update_success_content: 內容已成功更新。 +# update_success_home: 首頁已成功更新。 +# update_success_layout: 樣板已成功更新。 +# update_success_link: 連結已成功更新。 +# update_success_page: 頁面已成功更新。 +# update_success_snippet: 片段已成功更新。 +# update_success_user: 用戶已成功更新 +# upload_design: 上傳設計 +# url: URL +# user: 用戶 +# user_new_interface: +# sys_basic_form: 系統基本資料表 +# password: 密碼 +# password_confirmation: 確認密碼 +# email: 使用者帳號信箱 +# user_role: +# auth: +# all_member: 所有會員 +# manager: 管理員 +# sub_manager: 次管理員 +# by_role: 根據身份 +# by_sub_role: 根據次身份 +# block_list: 封鎖名單 +# add_manager: 增加到管理員 +# add_sub_manager: 增加到次管理員 +# add_to_block_list: 封鎖名單 +# add_to_privilege_list: 特許名單 +# auth_by: -由%{user_display_name}授權 +# user: 使用會員 +# info: 用戶資料 +# panel: 用戶面板 +# role: 用戶身份 + +# dashboard: +# bulletin: 公告 +# news_bulletin: 新聞 +# page_context: 頁面 +# web_link: 鏈接 + +# panel: + + + +# # : >>>>>>> various_bugs +# # Chinese (Taiwan) translations for Ruby on Rails +# # by tsechingho (http://github.com/tsechingho) +# date: +# formats: +# default: "%Y-%m-%d" +# short: "%b%d日" +# long: "%Y年%b%d日" +# day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六] +# abbr_day_names: [日, 一, 二, 三, 四, 五, 六] +# month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月] +# abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月] +# order: [ :year, :month, :day ] + +# time: +# formats: +# default: "%Y年%b%d日 %A %H:%M:%S %Z" +# short: "%b%d日 %H:%M" +# long: "%Y年%b%d日 %H:%M" +# am: "上午" +# pm: "下午" + +# datetime: +# distance_in_words: +# half_a_minute: "半分鐘" +# less_than_x_seconds: +# one: "不到一秒" +# other: "不到 %{count} 秒" +# x_seconds: +# one: "一秒" +# other: "%{count} 秒" +# less_than_x_minutes: +# one: "不到一分鐘" +# other: "不到 %{count} 分鐘" +# x_minutes: +# one: "一分鐘" +# other: "%{count} 分鐘" +# about_x_hours: +# one: "大約一小時" +# other: "大約 %{count} 小時" +# x_days: +# one: "一天" +# other: "%{count} 天" +# about_x_months: +# one: "大約一個月" +# other: "大約 %{count} 個月" +# x_months: +# one: "一個月" +# other: "%{count} 個月" +# about_x_years: +# one: "大約一年" +# other: "大約 %{count} 年" +# over_x_years: +# one: "一年多" +# other: "%{count} 年多" +# almost_x_years: +# one: "接近一年" +# other: "接近 %{count} 年" +# prompts: +# year: "年" +# month: "月" +# day: "日" +# hour: "時" +# minute: "分" +# second: "秒" + +# number: +# format: +# separator: "." +# delimiter: "," +# precision: 3 +# significant: false +# strip_insignificant_zeros: false +# currency: +# format: +# format: "%u %n" +# unit: "NT$" +# separator: "." +# delimiter: "," +# precision: 2 +# significant: false +# strip_insignificant_zeros: false +# percentage: +# format: +# delimiter: "" +# precision: +# format: +# delimiter: "" +# human: +# format: +# delimiter: "" +# precision: 1 +# significant: false +# strip_insignificant_zeros: false +# storage_units: +# format: "%n %u" +# units: +# byte: +# one: "Byte" +# other: "Bytes" +# kb: "KB" +# mb: "MB" +# gb: "GB" +# tb: "TB" +# decimal_units: +# format: "%n %u" +# units: +# # 10^-21 zepto, 10^-24 yocto +# atto: "渺" # 10^-18 +# femto: "飛" # 10^-15 毫微微 +# pico: "漠" # 10^-12 微微 +# nano: "奈" # 10^-9 毫微 +# micro: "微" # 10^-6 +# mili: "毫" # 10^-3 milli +# centi: "厘" # 10^-2 +# deci: "分" # 10^-1 +# unit: "" +# ten: +# one: "十" +# other: "十" # 10^1 +# hundred: "百" # 10^2 +# thousand: "千" # 10^3 kilo +# million: "百萬" # 10^6 mega +# billion: "十億" # 10^9 giga +# trillion: "兆" # 10^12 tera +# quadrillion: "千兆" # 10^15 peta +# # 10^18 exa, 10^21 zetta, 10^24 yotta + +# support: +# array: +# words_connector: ", " +# two_words_connector: " 和 " +# last_word_connector: ", 和 " +# select: +# prompt: "請選擇" + +# search: +# not_found: "沒有搜尋結果" +# domains: Google Search Domains +# site_search: "全站搜尋" +# sitesearch: Google Site Search +# site_setting_help: 請輸入送交Google搜尋的參數 +# result_get: "搜尋有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" +# too_many: "搜尋有關 ' %{search_word} ' 尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋" + +# result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" +# unit_get: "列出由:%{unit_name}發佈的資料,共有%{item_num}筆" +# activerecord: +# errors: +# template: # ~ 2.3.5 backward compatible +# header: +# one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" +# other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" +# body: "以下欄位發生問題:" +# full_messages: +# format: "%{attribute} %{message}" +# messages: +# inclusion: "沒有包含在列表中" +# exclusion: "是被保留的關鍵字" +# invalid: "是無效的" +# confirmation: "不符合確認值" +# accepted: "必須是可被接受的" +# empty: "不能留空" +# blank: "不能是空白字元" +# too_long: "過長(最長是 %{count} 個字)" +# too_short: "過短(最短是 %{count} 個字)" +# wrong_length: "字數錯誤(必須是 %{count} 個字)" +# not_a_number: "不是數字" +# not_an_integer: "必須是整數" +# greater_than: "必須大於 %{count}" +# greater_than_or_equal_to: "必須大於或等於 %{count}" +# equal_to: "必須等於 %{count}" +# less_than: "必須小於 %{count}" +# less_than_or_equal_to: "必須小於或等於 %{count}" +# odd: "必須是奇數" +# even: "必須是偶數" +# taken: "已經被使用" +# record_invalid: "校驗失敗: %{errors}" + +# activemodel: +# errors: +# template: +# header: +# one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" +# other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" +# body: "以下欄位發生問題:" + +# errors: +# format: "%{attribute} %{message}" +# messages: +# inclusion: "沒有包含在列表中" +# exclusion: "是被保留的關鍵字" +# invalid: "是無效的" +# confirmation: "不符合確認值" +# accepted: "必須是可被接受的" +# empty: "不能留空" +# blank: "不能是空白字元" +# too_long: "過長(最長是 %{count} 個字)" +# too_short: "過短(最短是 %{count} 個字)" +# wrong_length: "字數錯誤(必須是 %{count} 個字)" +# not_a_number: "不是數字" +# not_an_integer: "必須是整數" +# greater_than: "必須大於 %{count}" +# greater_than_or_equal_to: "必須大於或等於 %{count}" +# equal_to: "必須等於 %{count}" +# less_than: "必須小於 %{count}" +# less_than_or_equal_to: "必須小於或等於 %{count}" +# odd: "必須是奇數" +# even: "必須是偶數" +# template: +# header: +# one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" +# other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" +# body: "以下欄位發生問題:" +# widget: +# default_widget: 系統預設Widget +# _default_widget: +# style1: 表格列表 +# style2: 單行列佐圖(同邊) +# style3: 多行列佐圖(同邊) +# style4: 多行列佐圖(異邊) +# style5: 單行列佐單圖(同邊) +# # : <<<<<<< HEAD +# mongoid: +# models: +# news_bulletin: 新聞 +# bulletin: 公告 +# ad_banner: 廣告輪播 +# web_link: 連結管理 +# attributes: +# news_bulletin: +# title: 新聞標題 +# bulletin: +# title: 公告標題 +# ad_banner: +# title: 標題 +# web_link: +# title: 名稱 +# url: 路徑 +# # : ======= +# helpers: +# select: +# prompt: "請選擇" +# submit: +# create: "新增%{model}" +# update: "更新%{model}" +# submit: "儲存%{model}" +# modal: +# save_and_close: "儲存並關閉" +# close: "關閉" +# preview: "預覽" +# sys: +# not_previewable: "不支援預覽" +# limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}" +# preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp...等圖片格式" +# can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示" +# module_page_lang_not_support: "很抱歉,本頁沒有開放中文版本" +# object_disable: +# change_to_true: "設為停用" +# change_to_false: "重新啓用" +# # : >>>>>>> various_bugs +# >>>>>>> put module app json into init,making orbit app work with module app. diff --git a/lib/orbit_app.rb b/lib/orbit_app.rb index f218c1e4..5b20f7a5 100644 --- a/lib/orbit_app.rb +++ b/lib/orbit_app.rb @@ -4,6 +4,8 @@ require "orbit_app/helper/renderer" require "orbit_app/helper/side_bar_renderer" require "orbit_app/helper/context_link_renderer" require "orbit_app/module/side_bar" +require "orbit_app/module/widget" +require "orbit_app/module/front_end" require "orbit_app/plugin/summary" require "orbit_app/plugin/registration" require "orbit_app/module/summary" diff --git a/lib/orbit_app/module/front_end.rb b/lib/orbit_app/module/front_end.rb new file mode 100644 index 00000000..65f79f8e --- /dev/null +++ b/lib/orbit_app/module/front_end.rb @@ -0,0 +1,56 @@ +module OrbitApp + module Module + module FrontendUtility + Version = "0.1" + + module ClassMethods + @@frontend_pages = [] + + def add(var) + @@frontend_pages << var + end + + def all + return @@frontend_pages + end + + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + class AppPageSet + def initialize(&block) + @frontend_pages = [] + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + def app_page(name,options ={}) + @frontend_pages << AppPage.new(name,options) + end + + def to_module_app_format + @frontend_pages.collect{|t| t.name} + end + + end + + class AppPage + attr_reader :name + + def initialize(name,options ={}) + @name = name + end + + def finalize! + + end + + protected + + end# of AppPage + end # of FrontendUtility + end # of Module +end # of OrbitApp diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index 9a40eda3..c7967663 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -12,7 +12,7 @@ module OrbitApp def find_by_key(key) @@registrations.each{|t| - return t if t.name == key + return t if t.key == key } return nil end @@ -28,20 +28,69 @@ module OrbitApp end class DataSheet - attr_reader :name - attr_reader :base_path + attr_reader :name,:key,:base_path,:module_label def initialize(name, &block) @name = name + @key = name.underscore.singularize @side_bar = nil + @front_end_app_pages = nil block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + setup_module_app + end + + def setup_module_app + module_app = ModuleApp.first(conditions: {:key=>@key,:title=>name}) + module_app = ModuleApp.new(:key=>@key,:title=>name) if module_app.nil? + + begin + module_app.save(:validate=>false) + rescue + retry + end + + end + + def get_label_i18n + @module_label + end + + def get_default_widget + if @widget_set.nil? # Init not defining widget + return {} + elsif @widget_set.get_default_widget.nil? # Init had defining widget,but say nothing about default_widget + return {} + else + @widget_set.get_default_widget.to_module_app_format + end + end + + def get_enable_frontend + (@front_end_app_pages.nil? ? false : true) + end + + def get_app_pages + @front_end_app_pages.nil? ? [] : @front_end_app_pages.to_module_app_format + end + + def get_widgets + @widget_set.nil? ? {} : @widget_set.to_module_app_format + end + + def get_categories + eval(@widget_set.categories_query) rescue nil + end + + def get_tags + eval(@widget_set.tags_query) rescue nil + end + + def front_end(&block) + @front_end_app_pages = FrontendUtility::AppPageSet.new(&block) end def side_bar(&block) - @side_bar = SideBarRegisition::SideBar.new(&block) - @side_bar.module_app_key = @name - @side_bar.finalize! - OrbitApp::Module::SideBarRegisition.add(@side_bar) + @side_bar = SideBarRegisition::SideBar.new(@name,@key,&block) end def personal_plugin(params) @@ -49,10 +98,20 @@ module OrbitApp Plugin::Registration.new_from_module_app(@name,@base_path,params) end - def base_url(var) - @base_path = var + def widgets(&block) + # @widgets = WidgetRegisition::WidgetSet.new(&block) + @widget_set = WidgetUtility::WidgetSet.new(&block) + + # @widgets = widget_set.widgets + # @default_widget = widget_set.default_widget end - end + + %w{module_label category base_url version organization author intro update_info}.each do |field| + define_method(field){|var| instance_variable_set( "@" + field, var)} + end + + end # of class DataSheet + end end end \ No newline at end of file diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb index a1ca3e63..d82cac84 100644 --- a/lib/orbit_app/module/side_bar.rb +++ b/lib/orbit_app/module/side_bar.rb @@ -37,8 +37,7 @@ module OrbitApp # def is_manager? # binding.pry # end - def initialize( &block) - name = '' + def initialize(name = '',key,&block) @head_label = name @context_links = [] @available_for = [] @@ -48,18 +47,16 @@ module OrbitApp @head_link = "" @app_base_path = '' block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + # setup_module_app(module_app_key) + @module_app_key = key + finalize! + SideBarRegisition.add(self) end - def module_app_key=(var) - @module_app_title = var - @module_app = ModuleApp.where(:title=>var).desc(:create_date).first - @module_app_key = @module_app.key - end - - def head_label_i18n(var,optoins =nil) + def head_label_i18n(var,options ={}) @head_label = var - @icon_class = optoins[:icon_class] + @icon_class = options[:icon_class] end def available_for(var) @@ -85,17 +82,23 @@ module OrbitApp def finalize! set_controllers_scope - set_default_active_app_auth + # set_default_active_app_auth @context_links.each do |t| - t.set_module_app = @module_app + # t.set_module_app = @module_app t.finalize! end end protected - def set_default_active_app_auth - @active_for_app_auth = @module_app.title - end + # def setup_module_app(var) + # @module_app_title = var + # @module_app = ModuleApp.where(:key=>var).desc(:create_date).first + # @module_app_key = @module_app.key + # end + + # def set_default_active_app_auth + # @active_for_app_auth = @module_app.title + # end def set_controllers_scope var = @active_for_controllers @@ -131,10 +134,10 @@ module OrbitApp @active_for_action[controller] == action end - def set_module_app=(var) - @module_app = var - @module_app_key = var.key - end + # def set_module_app=(var) + # @module_app = var + # @module_app_key = var.key + # end def finalize! set_active_actions diff --git a/lib/orbit_app/module/summary.rb b/lib/orbit_app/module/summary.rb index c3098cb1..16634055 100644 --- a/lib/orbit_app/module/summary.rb +++ b/lib/orbit_app/module/summary.rb @@ -3,7 +3,7 @@ require "orbit_app/summary" module OrbitApp module Module - module Summary + module Summary include OrbitApp::Summary class Item diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb new file mode 100644 index 00000000..708dc28d --- /dev/null +++ b/lib/orbit_app/module/widget.rb @@ -0,0 +1,108 @@ +module OrbitApp + module Module + module WidgetUtility + Version = "0.1" + + module ClassMethods + @@widgets = [] + + def add(var) + @@widgets << var + end + + def all + return @@widgets + end + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + class WidgetSet + attr_reader :widgets,:categories_query,:tags_query + def initialize(&block) + @widgets = [] + @default_widget = nil + @categories_query = '' + @tags_query = '' + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + %w{categories_query tags_query}.each do |field| + define_method(field){|var| instance_variable_set( "@" + field, var)} + end + + def get_categories + @categories_query + end + + def get_tags + @tags_query + end + + def default_widget(&block) + @default_widget = DefaultWidget.new(&block) + end + + def customize_widget(name,label,options ={}) + @widgets << Widget.new(name,label,options) + end + + def to_module_app_format + hash = {} + @widgets.collect{|t| hash[t.name] = t.to_hash} + hash + end + + def get_default_widget + return @default_widget + end + + end + + class DefaultWidget + def initialize(&block) + @query = nil + @image = nil + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + def to_module_app_format + {:query=>@query,:image=>@image} rescue nil + end + + def query(var) + @query = var + end + + def image(var) + @image = var + end + + end + + class Widget + attr_reader :name,:default_template,:fields + + def initialize(name,label,options ={}) + @name = name + @fields = options[:fields] + @label = label + end + + def to_hash + {:name => @name,:fields=>@fields,:label=>@label} + end + + def finalize! + + end + + protected + + end# of widget + end # of WidgetRegisition + end # of Module +end # of OrbitApp 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 4814586b..5fd57d49 100644 --- a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml @@ -15,3 +15,6 @@ zh_tw: search: 搜尋公告 update_bulletin_success: 公告已成功更新 update_bulletin_category_success: 公告類別已成功更新 + widget: + index: 目錄Widget + bulletins_and_web_links: 公告與連結並排Widget \ 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 8eb89423..c9f0771d 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -1,9 +1,36 @@ module Announcement OrbitApp.registration "Announcement",:type=> 'ModuleApp' do - + module_label 'announcement.announcement' base_url File.expand_path File.dirname(__FILE__) personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement' + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + front_end do + app_page 'bulletins' + end + + category ["BulletinCategory"] + + widgets do + default_widget do + query 'Bulletin.all' + image :image + end + + categories_query 'BulletinCategory.all' + tags_query 'AnnouncementTag.all' + + customize_widget "index","announcement.widget.index",:fields=>["title","category","postdate"] + customize_widget "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" + # item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"] + # item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" + end + side_bar do head_label_i18n 'admin.announcement',:icon_class=>"icons-announcement" available_for [:admin,:guest,:manager,:sub_manager] From 5f712622ad11eb92b018a972995288d58f49ce6a Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Mon, 3 Dec 2012 18:52:36 +0800 Subject: [PATCH 10/44] default widgets and sidebar. --- .../admin/object_auths_controller.rb | 2 +- .../object_auths_new_interface_controller.rb | 2 +- .../admin/page_parts_controller.rb | 45 +++--- app/controllers/default_widget_controller.rb | 43 ++++++ app/controllers/orbit_backend_controller.rb | 34 +--- app/controllers/orbit_frontend_controller.rb | 1 + app/controllers/orbit_widget_controller.rb | 1 + app/helpers/admin_helper.rb | 2 +- app/models/module_app.rb | 30 +++- app/models/object_auth.rb | 2 +- .../page_parts/reload_widget_styles.js.erb | 6 +- app/views/default_widget/typeA.html.erb | 19 +++ app/views/default_widget/typeB.html.erb | 22 +++ app/views/default_widget/typeC.html.erb | 15 ++ app/views/layouts/_side_bar_content.html.erb | 3 +- config/locales/zh_tw.yml | 146 +++++++++--------- config/routes.rb | 3 + lib/orbit_app/helper/context_link_renderer.rb | 22 ++- lib/orbit_app/helper/renderer.rb | 7 +- lib/orbit_app/helper/side_bar_renderer.rb | 5 +- lib/orbit_app/module/registration.rb | 4 +- lib/orbit_app/module/side_bar.rb | 9 +- lib/orbit_app/module/widget.rb | 15 +- lib/orbit_core_lib.rb | 36 ++++- lib/parsers/parser_common.rb | 10 +- .../back_end/bulletin_categorys_controller.rb | 4 + .../announcement/config/locales/zh_tw.yml | 8 +- vendor/built_in_modules/announcement/init.rb | 10 +- 28 files changed, 344 insertions(+), 162 deletions(-) create mode 100644 app/controllers/default_widget_controller.rb create mode 100644 app/views/default_widget/typeA.html.erb create mode 100644 app/views/default_widget/typeB.html.erb create mode 100644 app/views/default_widget/typeC.html.erb diff --git a/app/controllers/admin/object_auths_controller.rb b/app/controllers/admin/object_auths_controller.rb index dab659b4..d407d3db 100644 --- a/app/controllers/admin/object_auths_controller.rb +++ b/app/controllers/admin/object_auths_controller.rb @@ -1,5 +1,5 @@ class Admin::ObjectAuthsController < ApplicationController - include OrbitCoreLib::PermissionUnility + include OrbitCoreLib::PermissionUtility layout "new_admin" before_filter :force_order # before_filter :is_admin? ,:only => :index diff --git a/app/controllers/admin/object_auths_new_interface_controller.rb b/app/controllers/admin/object_auths_new_interface_controller.rb index 76581b9e..7d5132ee 100644 --- a/app/controllers/admin/object_auths_new_interface_controller.rb +++ b/app/controllers/admin/object_auths_new_interface_controller.rb @@ -1,5 +1,5 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController - include OrbitCoreLib::PermissionUnility + include OrbitCoreLib::PermissionUtility before_filter :force_order def set_module_app diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index f4672800..a188ce1b 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -28,27 +28,29 @@ class Admin::PagePartsController < ApplicationController @module_app = @part.module_app ? @part.module_app : @module_apps[0] @r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag @tag_objects = @r_tag.classify.constantize.all rescue nil - - @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] - + @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] + @widget_style = @module_app.get_widget_style[@widget_path][:style] unless @widget_path.nil? + + @categories = @module_app.get_registration.get_categories + @tags = @module_app.get_registration.get_tags # if @module_app.widgets.any?{|b| b.class == Array} # @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? # end - case @module_app.key - when 'announcement' - @categories = BulletinCategory.all - @tags = AnnouncementTag.all - when 'news' - @categories = NewsBulletinCategory.all - @tags = NewsTag.all - when 'web_resource' - @categories = WebLinkCategory.all - @tags = WebResourceTag.all - when 'archive' - @categories = ArchiveFileCategory.all - @tags = ArchiveTag.all - end + # case @module_app.key + # when 'announcement' + # @categories = BulletinCategory.all + # @tags = AnnouncementTag.all + # when 'news' + # @categories = NewsBulletinCategory.all + # @tags = NewsTag.all + # when 'web_resource' + # @categories = WebLinkCategory.all + # @tags = WebResourceTag.all + # when 'archive' + # @categories = ArchiveFileCategory.all + # @tags = ArchiveTag.all + # end end def create @@ -60,7 +62,7 @@ class Admin::PagePartsController < ApplicationController params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field] params[:page_part][:widget_field_type] = nil - + if @part.update_attributes(params[:page_part]) set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu') flash.now[:notice] = t('update.success.content') @@ -95,7 +97,7 @@ class Admin::PagePartsController < ApplicationController @widget_path = @module_app.widgets.keys[0] if ( @module_app.widgets[0].blank? ) - @widget_style = @module_app.widgets[@widget_path] if ( !@widget_path.blank? ) + @widget_style = @module_app.get_widget_style[@widget_path][:style] unless @widget_path.nil? case @module_app.key when 'announcement' @@ -119,8 +121,9 @@ class Admin::PagePartsController < ApplicationController def reload_widget_styles @module_app = ModuleApp.find(params[:module_app_id]) - @widget_style = @module_app.widgets[params[:id]] - + style_ary = @module_app.get_widget_style[params[:id]] + @widget_style = style_ary[:style] unless style_ary.nil? + respond_to do |format| format.js {} end diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb new file mode 100644 index 00000000..6997840b --- /dev/null +++ b/app/controllers/default_widget_controller.rb @@ -0,0 +1,43 @@ +class DefaultWidgetController< OrbitWidgetController + + def front_end_available(var) + @page_part = PagePart.find params[:part_id] + @page_part.module_app.enable_frontend? + end + + def default_widget + @tag_class = nil + + @default_widget = @page_part.module_app.get_default_widget + @widget_image_field = @default_widget[:image] + data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3) + @data = eval(@default_widget[:query]).limit(data_limit).includes(@widget_image_field) + @fields = @page_part.widget_field + + case params[:type] + when "typeA" + @tag_class = 'defulat_widget_typeA' + render "typeA" + when /typeB_/ + @tag_class = "defulat_widget_#{params[:type]}" + render "typeB" + when "typeC" + @tag_class = 'defulat_widget_typeC' + render "typeC" + end + + + + # {"inner"=>"true", + # "category_id"=>"false", + # "tag_id"=>"", + # "page"=>"", + # "search_query"=>"", + # "part_title"=>"", + # "part_id"=>"50ac426f83e75219d20000a7", + # "controller"=>"default_widget", + # "action"=>"default_widget", + # "type"=>"typeA"} + end + +end diff --git a/app/controllers/orbit_backend_controller.rb b/app/controllers/orbit_backend_controller.rb index 530415ba..ce6640a8 100644 --- a/app/controllers/orbit_backend_controller.rb +++ b/app/controllers/orbit_backend_controller.rb @@ -1,41 +1,11 @@ class OrbitBackendController < ApplicationController - #before_filter :setup_vars - #before_filter :set_current_user - - # before_filter {|c| c.front_end_available(@app_title)} - # before_filter :check_user_can_use - include OrbitCoreLib::PermissionUnility + include OrbitCoreLib::AppBackendUtility + include OrbitCoreLib::PermissionUtility include AdminHelper include ApplicationHelper layout 'new_admin' - def setup_vars - @app_title ||= controller_path.split('/')[1].singularize - @module_app ||= ModuleApp.first(conditions: {:key => @app_title} ) - end - - private - - def force_order_for_visitor - setup_vars - set_current_user - end - - - def force_order_for_user - setup_vars - set_current_user - authenticate_user! - check_user_can_use - end - - def check_user_can_use - unless check_permission - #redirect_to polymorphic_path(['panel',@app_title,'back_end','public']) - redirect_to root_url - end - end def get_sorted_and_filtered(object_class, query=nil) objects = get_objects(object_class, query) diff --git a/app/controllers/orbit_frontend_controller.rb b/app/controllers/orbit_frontend_controller.rb index e1be8167..386b8cda 100644 --- a/app/controllers/orbit_frontend_controller.rb +++ b/app/controllers/orbit_frontend_controller.rb @@ -1,3 +1,4 @@ class OrbitFrontendController< OrbitFrontendComponentController + end \ No newline at end of file diff --git a/app/controllers/orbit_widget_controller.rb b/app/controllers/orbit_widget_controller.rb index 47e24fe0..f006cd43 100644 --- a/app/controllers/orbit_widget_controller.rb +++ b/app/controllers/orbit_widget_controller.rb @@ -1,3 +1,4 @@ class OrbitWidgetController< OrbitFrontendComponentController + end \ No newline at end of file diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index 120e1245..7cb28b96 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -16,7 +16,7 @@ module AdminHelper end def is_admin? - current_or_guest_user.admin? + current_or_guest_user.admin? rescue false end def is_member? diff --git a/app/models/module_app.rb b/app/models/module_app.rb index 22fb4814..b64ac908 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -1,7 +1,7 @@ class ModuleApp include Mongoid::Document include Mongoid::Timestamps - include OrbitCoreLib::ObjectTokenUnility + include OrbitCoreLib::ObjectTokenUtility field :key field :title @@ -21,9 +21,17 @@ class ModuleApp OrbitApp::Module::Registration.find_by_key(key) end - # %w{label_i18n }.each do |field| - # define_method(field){|var| get_registration.send("get_#{m}") } - # end + %w{widget_styles }.each do |field| + define_method(field){|var| get_registration.send("get_#{field}") } + end + + def get_default_widget + get_registration.get_default_widget + end + + def enable_frontend? + get_registration.get_enable_frontend + end def label_i18n reg = get_registration @@ -38,10 +46,20 @@ class ModuleApp !get_registration.get_default_widget.blank? end + def get_widget_style + widgets = get_registration.get_widgets + end + def get_widget_for_select widgets = get_registration.get_widgets - ary = widgets.collect{|k,v| [I18n.t(v["label"]),k]} - ary << [I18n.t('widget.default_widget'),'default_widget']if using_default_widget? + ary = widgets.collect do |k,v| + if k == 'default_widget' + [I18n.t('widget.default_widget'),'default_widget'] + else + [I18n.t(v[:label]),k] + end + + end end def is_manager?(user) diff --git a/app/models/object_auth.rb b/app/models/object_auth.rb index 6c7405ca..f2ef5c04 100644 --- a/app/models/object_auth.rb +++ b/app/models/object_auth.rb @@ -1,5 +1,5 @@ class ObjectAuth < PrototypeAuth - include OrbitCoreLib::ObjectTokenUnility + include OrbitCoreLib::ObjectTokenUtility validates_uniqueness_of :title ,:scope => [:obj_authable_type,:obj_authable_id] #{ |c| } belongs_to :obj_authable, polymorphic: true after_save :check_user_has_can_access_app diff --git a/app/views/admin/page_parts/reload_widget_styles.js.erb b/app/views/admin/page_parts/reload_widget_styles.js.erb index 41b2ad9c..051108d6 100644 --- a/app/views/admin/page_parts/reload_widget_styles.js.erb +++ b/app/views/admin/page_parts/reload_widget_styles.js.erb @@ -1 +1,5 @@ -$('#widget_style_list select').html("<%= j options_for_select(@module_app.widgets[params[:id]]) %>") +<% if @widget_style.nil? %> + $('#widget_style_list select').html("") +<% else %> + $('#widget_style_list select').html("<%= j options_for_select(@widget_style) %>") +<% end %> diff --git a/app/views/default_widget/typeA.html.erb b/app/views/default_widget/typeA.html.erb new file mode 100644 index 00000000..22422516 --- /dev/null +++ b/app/views/default_widget/typeA.html.erb @@ -0,0 +1,19 @@ +<%= content_tag :div,:class=>@tag_class do%> +
+ + + + <% @fields.each do |field|%> + + <% end %> + + + <% @data.each do |row_data| %> + + <% @fields.each do |field|%> + + <% end %> + + <% end %> +
<%= content_tag(:span,field[0],:class=>field[1])%>
<%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%>
+ <% end %> diff --git a/app/views/default_widget/typeB.html.erb b/app/views/default_widget/typeB.html.erb new file mode 100644 index 00000000..8c3cc34e --- /dev/null +++ b/app/views/default_widget/typeB.html.erb @@ -0,0 +1,22 @@ +<%= content_tag :div,:class=>@tag_class do%> +
    + + <% @data.each do |row_data| %> + <%= content_tag(:li) do %> +
    + <%= image_tag row_data.send(@widget_image_field)%> + +
    +
    + <% @fields.each do |field|%> + <%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%> + <% end %> +
    + + <% end %> + <% end %> + + +
+
more
+ <% end %> diff --git a/app/views/default_widget/typeC.html.erb b/app/views/default_widget/typeC.html.erb new file mode 100644 index 00000000..4fceefc3 --- /dev/null +++ b/app/views/default_widget/typeC.html.erb @@ -0,0 +1,15 @@ +<%= content_tag :div,:class=>@tag_class do%> +
+ <%= image_tag @data.first.send(@widget_image_field)%> +
+
    + <% @data.each do |row_data| %> + <%= content_tag(:li) do %> + <% @fields.each do |field|%> + <%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%> + <% end %> + <% end %> + <% end %> +
+
more
+ <% end %> diff --git a/app/views/layouts/_side_bar_content.html.erb b/app/views/layouts/_side_bar_content.html.erb index e867ba21..7b3a2974 100644 --- a/app/views/layouts/_side_bar_content.html.erb +++ b/app/views/layouts/_side_bar_content.html.erb @@ -2,8 +2,7 @@ <%= javascript_include_tag "/static/kernel.js" %> <% end %> - -<%=OrbitApp::Module::SideBarRegisition.all.first.render(request,params,current_user) %> +<%=OrbitApp::Module::SideBarRegisition.all.first.render(request,params,current_user,@module_app) %>
<% flash.each do |key, msg| %> diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 441048af..083d77cf 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -901,78 +901,74 @@ # other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" # body: "以下欄位發生問題:" -# errors: -# format: "%{attribute} %{message}" -# messages: -# inclusion: "沒有包含在列表中" -# exclusion: "是被保留的關鍵字" -# invalid: "是無效的" -# confirmation: "不符合確認值" -# accepted: "必須是可被接受的" -# empty: "不能留空" -# blank: "不能是空白字元" -# too_long: "過長(最長是 %{count} 個字)" -# too_short: "過短(最短是 %{count} 個字)" -# wrong_length: "字數錯誤(必須是 %{count} 個字)" -# not_a_number: "不是數字" -# not_an_integer: "必須是整數" -# greater_than: "必須大於 %{count}" -# greater_than_or_equal_to: "必須大於或等於 %{count}" -# equal_to: "必須等於 %{count}" -# less_than: "必須小於 %{count}" -# less_than_or_equal_to: "必須小於或等於 %{count}" -# odd: "必須是奇數" -# even: "必須是偶數" -# template: -# header: -# one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" -# other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" -# body: "以下欄位發生問題:" -# widget: -# default_widget: 系統預設Widget -# _default_widget: -# style1: 表格列表 -# style2: 單行列佐圖(同邊) -# style3: 多行列佐圖(同邊) -# style4: 多行列佐圖(異邊) -# style5: 單行列佐單圖(同邊) -# # : <<<<<<< HEAD -# mongoid: -# models: -# news_bulletin: 新聞 -# bulletin: 公告 -# ad_banner: 廣告輪播 -# web_link: 連結管理 -# attributes: -# news_bulletin: -# title: 新聞標題 -# bulletin: -# title: 公告標題 -# ad_banner: -# title: 標題 -# web_link: -# title: 名稱 -# url: 路徑 -# # : ======= -# helpers: -# select: -# prompt: "請選擇" -# submit: -# create: "新增%{model}" -# update: "更新%{model}" -# submit: "儲存%{model}" -# modal: -# save_and_close: "儲存並關閉" -# close: "關閉" -# preview: "預覽" -# sys: -# not_previewable: "不支援預覽" -# limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}" -# preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp...等圖片格式" -# can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示" -# module_page_lang_not_support: "很抱歉,本頁沒有開放中文版本" -# object_disable: -# change_to_true: "設為停用" -# change_to_false: "重新啓用" -# # : >>>>>>> various_bugs -# >>>>>>> put module app json into init,making orbit app work with module app. + errors: + format: "%{attribute} %{message}" + messages: + inclusion: "沒有包含在列表中" + exclusion: "是被保留的關鍵字" + invalid: "是無效的" + confirmation: "不符合確認值" + accepted: "必須是可被接受的" + empty: "不能留空" + blank: "不能是空白字元" + too_long: "過長(最長是 %{count} 個字)" + too_short: "過短(最短是 %{count} 個字)" + wrong_length: "字數錯誤(必須是 %{count} 個字)" + not_a_number: "不是數字" + not_an_integer: "必須是整數" + greater_than: "必須大於 %{count}" + greater_than_or_equal_to: "必須大於或等於 %{count}" + equal_to: "必須等於 %{count}" + less_than: "必須小於 %{count}" + less_than_or_equal_to: "必須小於或等於 %{count}" + odd: "必須是奇數" + even: "必須是偶數" + template: + header: + one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" + other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" + body: "以下欄位發生問題:" + widget: + default_widget: 系統預設Widget + _default_widget: + style1: 表格列表 + style2: 單行列佐圖(同邊) + style3: 多行列佐圖(同邊) + style4: 多行列佐圖(異邊) + style5: 單行列佐單圖(同邊) + mongoid: + models: + news_bulletin: 新聞 + bulletin: 公告 + ad_banner: 廣告輪播 + web_link: 連結管理 + attributes: + news_bulletin: + title: 新聞標題 + bulletin: + title: 公告標題 + ad_banner: + title: 標題 + web_link: + title: 名稱 + url: 路徑 + helpers: + select: + prompt: "請選擇" + submit: + create: "新增%{model}" + update: "更新%{model}" + submit: "儲存%{model}" + modal: + save_and_close: "儲存並關閉" + close: "關閉" + preview: "預覽" + sys: + not_previewable: "不支援預覽" + limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}" + preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp...等圖片格式" + can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示" + module_page_lang_not_support: "很抱歉,本頁沒有開放中文版本" + object_disable: + change_to_true: "設為停用" + change_to_false: "重新啓用" \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 2c52f6ec..2523bb3a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -232,6 +232,7 @@ Orbit::Application.routes.draw do # match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal' + scope '/front' do match 'show_banner/:id' => 'front#show_banner', :as => :front_show_banner match 'show_footer' => 'front#show_footer', :as => :front_show_footer @@ -242,6 +243,8 @@ Orbit::Application.routes.draw do end + match '/panel/orbit_app/widget/:type' => 'default_widget#default_widget' + match '/panel/:app_name/front_end/:app_action/:id(/:controller_action)' => 'pages#show_from_link', :constraints => lambda { |request| !request.query_string.include?("inner=true") } diff --git a/lib/orbit_app/helper/context_link_renderer.rb b/lib/orbit_app/helper/context_link_renderer.rb index 9e1af318..a34f6cb4 100644 --- a/lib/orbit_app/helper/context_link_renderer.rb +++ b/lib/orbit_app/helper/context_link_renderer.rb @@ -1,12 +1,32 @@ module ContextLinkRenderer include Renderer - def render(request,params) + def render(request,params,module_app,user) + @module_app = module_app @request = request @params = params + @current_user = user if display? content_tag :li, link_to((I18n.t(@label_i18n) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, eval(@path)), :class => (active? ? 'active' : nil) end end +protected + def display? + @available_for.each do |available_for_in_sym| + result = case available_for_in_sym + when :all + true + when :manager + @module_app.is_manager? @current_user + when :sub_manager + @module_app.is_sub_manager? @current_user + else + (eval(available_for_in_sym).include? @current_user rescue false) + end # of case + return true if result || @current_user.admin? + end # of collect + false + end + end \ No newline at end of file diff --git a/lib/orbit_app/helper/renderer.rb b/lib/orbit_app/helper/renderer.rb index 3eb09b86..ee2ffb23 100644 --- a/lib/orbit_app/helper/renderer.rb +++ b/lib/orbit_app/helper/renderer.rb @@ -8,10 +8,15 @@ module Renderer protected def active_for_app_auth? - @module_app.id.to_s == @params[:module_app_id] ? true : false + if @module_app.nil? + false + else + @module_app.id.to_s == @params[:module_app_id] ? true : false + end end def active_for_ob_auths? + if @params.has_key? :object_auth_id oa = ObjectAuth.find @params[:object_auth_id] check_controller = @params[:controller] == 'admin/object_auths_new_interface' diff --git a/lib/orbit_app/helper/side_bar_renderer.rb b/lib/orbit_app/helper/side_bar_renderer.rb index 5e04f69e..3fd680ef 100644 --- a/lib/orbit_app/helper/side_bar_renderer.rb +++ b/lib/orbit_app/helper/side_bar_renderer.rb @@ -2,7 +2,8 @@ module SideBarRenderer include Renderer include AdminHelper - def render(request,params,user) + def render(request,params,user,module_app) + @module_app = module_app @request = request @params = params @current_user = user @@ -11,7 +12,7 @@ module SideBarRenderer buf = link_to( content_tag(:i, nil, :class => @icon_class ) + content_tag(:span, I18n.t( @head_label )), eval(@head_link)) buf << content_tag( :ul, :class => ("nav nav-list active") )do # visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory")) @context_links.sort_by! {| obj | obj.priority}.collect do |link| - link.render(request,params) + link.render(request,params,@module_app,@current_user) end.join.html_safe end end diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index c7967663..d94de028 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -78,11 +78,11 @@ module OrbitApp end def get_categories - eval(@widget_set.categories_query) rescue nil + @widget_set.get_categories end def get_tags - eval(@widget_set.tags_query) rescue nil + @widget_set.get_tags end def front_end(&block) diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb index d82cac84..7d733bfa 100644 --- a/lib/orbit_app/module/side_bar.rb +++ b/lib/orbit_app/module/side_bar.rb @@ -46,9 +46,9 @@ module OrbitApp @active_for_app_auth = [] @head_link = "" @app_base_path = '' + @module_app_key = key block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? # setup_module_app(module_app_key) - @module_app_key = key finalize! SideBarRegisition.add(self) end @@ -76,6 +76,7 @@ module OrbitApp end def context_link(*var) + var[1].merge!(:module_app_key=>@module_app_key) unless @module_app_key.nil? new_context_link = ContextLink.new(*var) @context_links << new_context_link end @@ -124,10 +125,14 @@ module OrbitApp @active_for_action = options[:active_for_action] || [] @active_for_object_auth = options[:active_for_object_auth] || [] @active_for_app_auth = options[:active_for_app_auth] || [] + @module_app_key = options[:module_app_key] end def active? - active_for_action? || active_for_app_auth? || active_for_ob_auths? + for_action = @active_for_action.blank? ? false : active_for_action? + for_app_auth = @active_for_app_auth.blank? ? false : active_for_app_auth? + for_ob_auth = @active_for_object_auth.blank? ? false : active_for_ob_auths? + for_action || for_app_auth || for_ob_auth end def active_for_action? diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb index 708dc28d..5c6932bd 100644 --- a/lib/orbit_app/module/widget.rb +++ b/lib/orbit_app/module/widget.rb @@ -35,11 +35,11 @@ module OrbitApp end def get_categories - @categories_query + eval(@categories_query) rescue nil end def get_tags - @tags_query + eval(@tags_query) rescue nil end def default_widget(&block) @@ -53,6 +53,7 @@ module OrbitApp def to_module_app_format hash = {} @widgets.collect{|t| hash[t.name] = t.to_hash} + hash["default_widget"]= DefaultWidget.get_interface_args unless @default_widget.blank? hash end @@ -63,12 +64,19 @@ module OrbitApp end class DefaultWidget + STYLE = ["typeA","typeB_style2","typeB_style3","typeB_style4","typeC"] + def initialize(&block) @query = nil @image = nil block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? end + def self.get_interface_args + #will need to work with design + {:name=>"default_widget",:field=>nil,:label=>'label',:style=>STYLE} + end + def to_module_app_format {:query=>@query,:image=>@image} rescue nil end @@ -90,10 +98,11 @@ module OrbitApp @name = name @fields = options[:fields] @label = label + @style= options[:style] end def to_hash - {:name => @name,:fields=>@fields,:label=>@label} + {:name => @name,:fields=>@fields,:label=>@label,:style=>@style} end def finalize! diff --git a/lib/orbit_core_lib.rb b/lib/orbit_core_lib.rb index 3abeeddd..5be4de3b 100644 --- a/lib/orbit_core_lib.rb +++ b/lib/orbit_core_lib.rb @@ -81,7 +81,7 @@ module OrbitCoreLib end query1 = auth_object_space.any_in({sub_role_ids: sub_role_ids_ary}).excludes(blocked_user_ids: user.id) - query2 = auth_object_space.any_of({all: true},{privilege_user_ids: user.id},{role_ids: user.role.id}).excludes(blocked_user_ids: user.id) + query2 = auth_object_space.any_of({all: true},{privilege_user_ids: user.id},{role_ids: user.role_ids}).excludes(blocked_user_ids: user.id) result = (query1 + query2).uniq result.collect{|t| t.obj_authable}.delete_if{|val| val==nil} end @@ -128,7 +128,7 @@ module OrbitCoreLib end end - module ObjectTokenUnility + module ObjectTokenUtility def self.included(base) base.instance_eval("field :s_token") base.instance_eval("after_create :generate_token") @@ -145,7 +145,7 @@ module OrbitCoreLib end end - module PermissionUnility + module PermissionUtility private def check_permission(type = :use) permission_grant = current_or_guest_user.admin?? true : false @@ -168,4 +168,34 @@ module OrbitCoreLib ModuleApp.first(conditions: {s_token: token}) end end + + module AppBackendUtility + def setup_vars + @app_title ||= controller_path.split('/')[1].singularize + @module_app ||= ModuleApp.first(conditions: {:key => @app_title} ) + end + + private + + def force_order_for_visitor + setup_vars + set_current_user + end + + + def force_order_for_user + setup_vars + set_current_user + authenticate_user! + check_user_can_use + end + + def check_user_can_use + unless check_permission + #redirect_to polymorphic_path(['panel',@app_title,'back_end','public']) + redirect_to root_url + end + end + end + end diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 6dbec1e2..f7fb5598 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -206,8 +206,14 @@ module ParserCommon when 'text' ret << part.content rescue '' when 'module_widget' - url = "/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" - options = "&category_id=#{!part[:category].blank? ? part[:category].blank? : 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}" + url = case part.widget_path + when 'default_widget' + "/panel/orbit_app/widget/#{part.widget_style}?inner=true" + else + "/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" + end + + options = "&category_id=#{!part[:category].blank? ? part[:category].blank? : 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}&part_id=#{part.id}" ret << "
" when 'public_r_tag' ret << "" diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb index 18638868..8e3452f2 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb @@ -8,6 +8,10 @@ class Panel::Announcement::BackEnd::BulletinCategorysController < OrbitBackendCo @module_app = ModuleApp.where(:title=>'Announcement').first end + before_filter :force_order_for_visitor,:only=>[:index,:get_categorys_json,:get_bulletins_json] + before_filter :force_order_for_user,:except => [:index,:get_categorys_json,:get_bulletins_json] + before_filter :for_app_sub_manager,:except => [:index,:get_categorys_json,:get_bulletins_json] + def index @bulletin_categorys = get_categories_for_index("BulletinCategory") #TODO 需要做 manager ,admin 才可以 all. 其他 available就好 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 5fd57d49..ada03b99 100644 --- a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml @@ -17,4 +17,10 @@ zh_tw: update_bulletin_category_success: 公告類別已成功更新 widget: index: 目錄Widget - bulletins_and_web_links: 公告與連結並排Widget \ No newline at end of file + bulletins_and_web_links: 公告與連結並排Widget + #init don't merge + all_articles: 全部公告 + add_new: 新增 + categories: 分類 + approval_setting: 審核權限 + tags: 標籤 \ 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 c9f0771d..a92ab14f 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -25,7 +25,7 @@ module Announcement categories_query 'BulletinCategory.all' tags_query 'AnnouncementTag.all' - customize_widget "index","announcement.widget.index",:fields=>["title","category","postdate"] + customize_widget "index","announcement.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] customize_widget "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" # item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"] # item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" @@ -42,13 +42,14 @@ module Announcement context_link 'announcement.all_articles', :link_path=>"panel_announcement_back_end_bulletins_path" , :priority=>1, - :active_for_action=>{:bulletins=>:index} + :active_for_action=>{:bulletins=>:index}, + :available_for => [:all] context_link 'announcement.add_new', :link_path=>"new_panel_announcement_back_end_bulletin_path" , :priority=>2, :active_for_action=>{:bulletins=>:new}, - :available_for => [:manager] + :available_for => [:sub_manager] context_link 'announcement.categories', :link_path=>"panel_announcement_back_end_bulletin_categorys_path" , @@ -60,12 +61,13 @@ module Announcement context_link 'announcement.tags', :link_path=>"panel_announcement_back_end_tags_path" , :priority=>4, - :active_for_action=>{:bulletin_categorys=>:index}, + # :active_for_action=>{:bulletin_categorys=>:index}, :available_for => [:manager] context_link 'announcement.approval_setting', :link_path=>"panel_announcement_back_end_approval_setting_path" , :priority=>5, + :active_for_action=>{:approvals=>:setting}, :active_for_object_auth => 'BulletinCategory', :available_for => [:manager] From 53afb6ea0cce718222a644b0dfcce645ed255409 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Wed, 5 Dec 2012 18:35:58 +0800 Subject: [PATCH 11/44] sidebar rewrited --- app/views/layouts/_side_bar_content.html.erb | 5 +- lib/orbit_app/helper/context_link_renderer.rb | 11 +-- lib/orbit_app/helper/side_bar_renderer.rb | 9 +-- lib/orbit_app/module/registration.rb | 8 ++- lib/orbit_app/module/side_bar.rb | 17 ++++- vendor/built_in_modules/ad_banner/init.rb | 49 ++++++++++++++ vendor/built_in_modules/announcement/init.rb | 4 +- vendor/built_in_modules/archive/init.rb | 62 +++++++++++++++++ vendor/built_in_modules/calendar/init.rb | 34 ++++++++++ vendor/built_in_modules/gallery/init.rb | 59 ++++++++++++++++ vendor/built_in_modules/gprs/init.rb | 43 ++++++++++++ .../miss_module/config/locales/zh_tw.yml | 10 +++ vendor/built_in_modules/page_content/init.rb | 33 +++++++++ vendor/built_in_modules/web_resource/init.rb | 67 +++++++++++++++++++ 14 files changed, 395 insertions(+), 16 deletions(-) create mode 100644 vendor/built_in_modules/ad_banner/init.rb create mode 100644 vendor/built_in_modules/archive/init.rb create mode 100644 vendor/built_in_modules/calendar/init.rb create mode 100644 vendor/built_in_modules/gallery/init.rb create mode 100644 vendor/built_in_modules/gprs/init.rb create mode 100644 vendor/built_in_modules/miss_module/config/locales/zh_tw.yml create mode 100644 vendor/built_in_modules/page_content/init.rb create mode 100644 vendor/built_in_modules/web_resource/init.rb diff --git a/app/views/layouts/_side_bar_content.html.erb b/app/views/layouts/_side_bar_content.html.erb index 7b3a2974..76fced3a 100644 --- a/app/views/layouts/_side_bar_content.html.erb +++ b/app/views/layouts/_side_bar_content.html.erb @@ -2,7 +2,10 @@ <%= javascript_include_tag "/static/kernel.js" %> <% end %> -<%=OrbitApp::Module::SideBarRegisition.all.first.render(request,params,current_user,@module_app) %> + +<%OrbitApp::Module::SideBarRegisition.all.each do |t| %> + <%= t.render(request,params,current_user,@module_app) %> +<% end %>
<% flash.each do |key, msg| %> diff --git a/lib/orbit_app/helper/context_link_renderer.rb b/lib/orbit_app/helper/context_link_renderer.rb index a34f6cb4..d4014fae 100644 --- a/lib/orbit_app/helper/context_link_renderer.rb +++ b/lib/orbit_app/helper/context_link_renderer.rb @@ -1,11 +1,12 @@ module ContextLinkRenderer include Renderer - def render(request,params,module_app,user) - @module_app = module_app + def render(request,params,current_module_app,current_user,belong_module_app) + @current_module_app = current_module_app + @belong_module_app = belong_module_app @request = request @params = params - @current_user = user + @current_user = current_user if display? content_tag :li, link_to((I18n.t(@label_i18n) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, eval(@path)), :class => (active? ? 'active' : nil) end @@ -18,9 +19,9 @@ protected when :all true when :manager - @module_app.is_manager? @current_user + @belong_module_app.is_manager? @current_user when :sub_manager - @module_app.is_sub_manager? @current_user + @belong_module_app.is_sub_manager? @current_user else (eval(available_for_in_sym).include? @current_user rescue false) end # of case diff --git a/lib/orbit_app/helper/side_bar_renderer.rb b/lib/orbit_app/helper/side_bar_renderer.rb index 3fd680ef..ba6f7c7d 100644 --- a/lib/orbit_app/helper/side_bar_renderer.rb +++ b/lib/orbit_app/helper/side_bar_renderer.rb @@ -2,8 +2,9 @@ module SideBarRenderer include Renderer include AdminHelper - def render(request,params,user,module_app) - @module_app = module_app + def render(request,params,user,current_module_app) + @belong_module_app = get_module_app + @current_module_app = current_module_app @request = request @params = params @current_user = user @@ -12,7 +13,7 @@ module SideBarRenderer buf = link_to( content_tag(:i, nil, :class => @icon_class ) + content_tag(:span, I18n.t( @head_label )), eval(@head_link)) buf << content_tag( :ul, :class => ("nav nav-list active") )do # visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory")) @context_links.sort_by! {| obj | obj.priority}.collect do |link| - link.render(request,params,@module_app,@current_user) + link.render(request,params,@current_module_app,@current_user,@belong_module_app) end.join.html_safe end end @@ -24,7 +25,7 @@ module SideBarRenderer def display? #控制sidebar 要不要算圖 if is_manager? || is_admin? #如果是系統管理員 或 是模組管理員 true - elsif (@module_app.open rescue false) # 如果app 被設定成 開放 + elsif (@current_module_app.open rescue false) # 如果app 被設定成 開放 true elsif is_member? #如果app 是封閉 那至少需要是 member true diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index d94de028..4c64f629 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -39,8 +39,12 @@ module OrbitApp setup_module_app end + def get_module_app + ModuleApp.first(conditions: {:key=>@key,:title=>name}) + end + def setup_module_app - module_app = ModuleApp.first(conditions: {:key=>@key,:title=>name}) + module_app = get_module_app module_app = ModuleApp.new(:key=>@key,:title=>name) if module_app.nil? begin @@ -90,7 +94,7 @@ module OrbitApp end def side_bar(&block) - @side_bar = SideBarRegisition::SideBar.new(@name,@key,&block) + @side_bar = SideBarRegisition::SideBar.new(@name,@key,method(:get_module_app),&block) end def personal_plugin(params) diff --git a/lib/orbit_app/module/side_bar.rb b/lib/orbit_app/module/side_bar.rb index 7d733bfa..050df87a 100644 --- a/lib/orbit_app/module/side_bar.rb +++ b/lib/orbit_app/module/side_bar.rb @@ -17,6 +17,10 @@ module OrbitApp return nil end + def render_all(request,params,user,current_module_app) + @@side_bars.collect{|t| t.render(request,params,user,current_module_app)}.join.html_safe + end + def all return @@side_bars end @@ -37,7 +41,7 @@ module OrbitApp # def is_manager? # binding.pry # end - def initialize(name = '',key,&block) + def initialize(name = '',key,get_module_app,&block) @head_label = name @context_links = [] @available_for = [] @@ -47,12 +51,16 @@ module OrbitApp @head_link = "" @app_base_path = '' @module_app_key = key + @get_module_app = get_module_app block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? # setup_module_app(module_app_key) finalize! SideBarRegisition.add(self) end + def get_module_app + @get_module_app.call + end def head_label_i18n(var,options ={}) @head_label = var @@ -76,7 +84,7 @@ module OrbitApp end def context_link(*var) - var[1].merge!(:module_app_key=>@module_app_key) unless @module_app_key.nil? + var[1].merge!({:module_app_key=>@module_app_key,:get_module_app=>@get_module_app}) unless @module_app_key.nil? new_context_link = ContextLink.new(*var) @context_links << new_context_link end @@ -126,6 +134,11 @@ module OrbitApp @active_for_object_auth = options[:active_for_object_auth] || [] @active_for_app_auth = options[:active_for_app_auth] || [] @module_app_key = options[:module_app_key] + @get_module_app = options[:get_module_app] + end + + def get_module_app + @get_module_app.call end def active? diff --git a/vendor/built_in_modules/ad_banner/init.rb b/vendor/built_in_modules/ad_banner/init.rb new file mode 100644 index 00000000..6776ee0a --- /dev/null +++ b/vendor/built_in_modules/ad_banner/init.rb @@ -0,0 +1,49 @@ +module AdBanner + OrbitApp.registration "AdBanner",:type=> 'ModuleApp' do + module_label 'ad_banner.ad_banner' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/ad_banner/plugin/profile",:i18n=>'admin.ad_banner' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + # front_end do + # app_page 'bulletins' + # end + + # category ["BulletinCategory"] + + # widgets do + # # default_widget do + # # query 'Bulletin.all' + # # image :image + # # end + + # # categories_query 'BulletinCategory.all' + # # tags_query 'AdBannerTag.all' + + # # customize_widget "index","ad_banner.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] + # # customize_widget "bulletins_and_web_links","ad_banner.widget.bulletins_and_web_links" + + # # item "index","ad_banner.widget.index",:default_template=>true,:fields=>["title","category","postdate"] + # # item "bulletins_and_web_links","ad_banner.widget.bulletins_and_web_links" + # end + + side_bar do + head_label_i18n 'admin.ad_banner',:icon_class=>"icons-landscape" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['ad_banners', 'ad_images']}) + + head_link_path "admin_ad_banners_path" + + context_link 'module_authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'ad_banner'}))", + :priority=>6, + :active_for_app_auth => 'ad_banners', + :available_for => [:admin] + end + end +end diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb index a92ab14f..e2d81f81 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -32,7 +32,7 @@ module Announcement end side_bar do - head_label_i18n 'admin.announcement',:icon_class=>"icons-announcement" + head_label_i18n 'admin.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'] @@ -75,7 +75,7 @@ module Announcement :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Announcement'}))", :priority=>6, :active_for_app_auth => 'Announcement', - :available_for => [:manager] + :available_for => [:admin] end end end diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb new file mode 100644 index 00000000..565b2cdf --- /dev/null +++ b/vendor/built_in_modules/archive/init.rb @@ -0,0 +1,62 @@ +module Archive + OrbitApp.registration "Archive",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.archive' + base_url File.expand_path File.dirname(__FILE__) + personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'admin.archive' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + front_end do + app_page 'archive_files' + end + + widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + # categories_query 'BulletinCategory.all' + # tags_query 'ArchiveTag.all' + customize_widget "archive_files","archive.widget.archive_files",:style=>[] + end + + side_bar do + head_label_i18n 'miss_module_i18n.archive',:icon_class=>"icons-archive" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['archive_file_categorys'],: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', + :link_path=>"panel_archive_back_end_archive_files_path" , + :priority=>1, + :active_for_action=>{:archive_file=>:index}, + :available_for => [:all] + + context_link 'add', + :link_path=>"new_panel_archive_back_end_archive_file_path" , + :priority=>2, + :active_for_action=>{:archive_file=>:new}, + :available_for => [:admin] + + context_link 'categories', + :link_path=>"panel_archive_back_end_archive_file_categorys_path" , + :priority=>3, + :active_for_action=>{:archive_file_categorys=>:index}, + :available_for => [:manager] + + context_link 'tags', + :link_path=>"panel_archive_back_end_tags_path" , + :priority=>4, + # :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:admin] + + end + end +end diff --git a/vendor/built_in_modules/calendar/init.rb b/vendor/built_in_modules/calendar/init.rb new file mode 100644 index 00000000..fc318e6c --- /dev/null +++ b/vendor/built_in_modules/calendar/init.rb @@ -0,0 +1,34 @@ +module Calendar + OrbitApp.registration "Calendar",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.calendar' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/calendar/plugin/profile",:i18n=>'admin.calendar' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + side_bar do + head_label_i18n 'miss_module_i18n.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', + :link_path=>"new_panel_calendar_back_end_cal_path" , + :priority=>1, + :active_for_action=>{:cals=>:new}, + :available_for => [:manager] + + context_link 'tags', + :link_path=>"panel_calendar_back_end_tags_path" , + :priority=>4, + # :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + end + end +end diff --git a/vendor/built_in_modules/gallery/init.rb b/vendor/built_in_modules/gallery/init.rb new file mode 100644 index 00000000..e7db1e81 --- /dev/null +++ b/vendor/built_in_modules/gallery/init.rb @@ -0,0 +1,59 @@ +module Gallery + OrbitApp.registration "Gallery",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.gallery' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/gallery/plugin/profile",:i18n=>'admin.gallery' + + version "0.1" + organization "Rulingcom" + author "Visual dep" + intro "A simple and amazing gallery" + update_info 'some update_info' + + front_end do + app_page 'albums' + end + + category ["gallery_categories"] + + widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + categories_query 'GalleryCategory.all' + # tags_query 'GalleryTag.all' + + customize_widget "albums","gallery.widget.albums",:fields=>[],:style=>[] + + end + + side_bar do + head_label_i18n 'miss_module_i18n.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'] + + head_link_path "panel_gallery_back_end_albums_path" + + context_link 'gallery.categories', + :link_path=>"panel_gallery_back_end_gallery_categories_path" , + :priority=>3, + :active_for_action=>{:gallery_categories=>:index}, + :available_for => [:manager] + + context_link 'tags', + :link_path=>"panel_gallery_back_end_tags_path" , + :priority=>4, + # :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'module_authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'gallery'}))", + :priority=>6, + :active_for_app_auth => 'gallery', + :available_for => [:admin] + end + end +end diff --git a/vendor/built_in_modules/gprs/init.rb b/vendor/built_in_modules/gprs/init.rb new file mode 100644 index 00000000..99de7772 --- /dev/null +++ b/vendor/built_in_modules/gprs/init.rb @@ -0,0 +1,43 @@ +module Location + OrbitApp.registration "Location",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.location' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' + + # version "0.1" + # organization "Rulingcom" + # author "RD dep" + # intro "I am intro" + # update_info 'some update_info' + + # front_end do + # app_page 'bulletins' + # end + + # category ["BulletinCategory"] + + # widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + # categories_query 'BulletinCategory.all' + # tags_query 'LocationTag.all' + + # customize_widget "index","location.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] + # customize_widget "bulletins_and_web_links","location.widget.bulletins_and_web_links" + # # item "index","location.widget.index",:default_template=>true,:fields=>["title","category","postdate"] + # # item "bulletins_and_web_links","location.widget.bulletins_and_web_links" + # end + + side_bar do + head_label_i18n 'miss_module_i18n.location',:icon_class=>"icons-location" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['locations']}) + + head_link_path "panel_gprs_back_end_locations_path" + + end + end +end 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 new file mode 100644 index 00000000..b91058c4 --- /dev/null +++ b/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml @@ -0,0 +1,10 @@ +zh_tw: + + miss_module_i18n: + archive: 檔案室 + _archive: + all: 全部檔案 + calendar: 日曆模組 + calendars: 日曆 + gallery: 相簿 + location: Location diff --git a/vendor/built_in_modules/page_content/init.rb b/vendor/built_in_modules/page_content/init.rb new file mode 100644 index 00000000..2bf8a2f7 --- /dev/null +++ b/vendor/built_in_modules/page_content/init.rb @@ -0,0 +1,33 @@ +module PageContent + + OrbitApp.registration "PageContent",:type=> 'ModuleApp' do + module_label 'page' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + front_end do + app_page 'page_contexts' + end + + side_bar do + head_label_i18n 'page',:icon_class=>"icons-page" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['page_contexts']}) + active_for_object_auth ['PageContext'] + + head_link_path "panel_page_content_back_end_page_contexts_path" + + context_link 'module_authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'page_content'}))", + :priority=>1, + :active_for_app_auth => 'PageContext', + :available_for => [:admin] + end + end +end diff --git a/vendor/built_in_modules/web_resource/init.rb b/vendor/built_in_modules/web_resource/init.rb new file mode 100644 index 00000000..c581506b --- /dev/null +++ b/vendor/built_in_modules/web_resource/init.rb @@ -0,0 +1,67 @@ +module WebResource + OrbitApp.registration "WebResource",:type=> 'ModuleApp' do + module_label 'link' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/web_resource/plugin/profile",:i18n=>'admin.web_resource' + + version "0.1" + organization "Rulingcom" + author "RD dep" + intro "I am intro" + update_info 'some update_info' + + category ["WebLinkCategory"] + + widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + categories_query 'BulletinCategory.all' + tags_query 'WebResourceTag.all' + + customize_widget "home_list","web_resource.widget.home_list" + + end + + side_bar do + head_label_i18n 'link',:icon_class=>"icons-link" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['web_links', 'web_link_categorys']}) + active_for_object_auth ['WebLinkCategory'] + + head_link_path "panel_web_resource_back_end_web_links_path" + + context_link 'list_', + :link_path=>"panel_web_resource_back_end_web_links_path" , + :priority=>1, + :active_for_action=>{:bulletins=>:index}, + :available_for => [:all] + + context_link 'link', + :link_path=>"new_panel_web_resource_back_end_web_link_path" , + :priority=>2, + :active_for_action=>{:bulletins=>:new}, + :available_for => [:sub_manager] + + context_link 'categories', + :link_path=>"panel_web_resource_back_end_web_link_categorys_path" , + :priority=>3, + :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'tags', + :link_path=>"panel_web_resource_back_end_tags_path" , + :priority=>4, + # :active_for_action=>{:bulletin_categorys=>:index}, + :available_for => [:manager] + + context_link 'module_authorization', + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'web_resource'}))", + :priority=>6, + :active_for_app_auth => 'web_resource', + :available_for => [:admin] + end + end +end From 397729d3a174789af5028ef8dd8af771c9e71c93 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 7 Dec 2012 12:36:25 +0800 Subject: [PATCH 12/44] Remove GPRS --- app/uploaders/gprs_uploader.rb | 61 --------------- vendor/built_in_modules/gprs/.gitignore | 6 -- vendor/built_in_modules/gprs/Gemfile | 17 ---- vendor/built_in_modules/gprs/MIT-LICENSE | 20 ----- vendor/built_in_modules/gprs/README.rdoc | 3 - vendor/built_in_modules/gprs/Rakefile | 39 ---------- .../gprs/app/assets/images/gprs/.gitkeep | 0 .../gprs/app/assets/javascripts/gprs/.gitkeep | 0 .../panel/gprs/back_end/locations.js | 2 - .../gprs/app/assets/stylesheets/gprs/.gitkeep | 0 .../panel/gprs/back_end/locations.css | 4 - .../gprs/app/controllers/.gitkeep | 0 .../gprs/back_end/locations_controller.rb | 77 ------------------- .../gprs/app/helpers/.gitkeep | 0 .../panel/gprs/back_end/locations_helper.rb | 2 - .../gprs/app/mailers/.gitkeep | 0 .../built_in_modules/gprs/app/models/.gitkeep | 0 .../gprs/app/models/location.rb | 11 --- .../built_in_modules/gprs/app/views/.gitkeep | 0 .../gprs/back_end/locations/_form.html.erb | 30 -------- .../gprs/back_end/locations/edit.html.erb | 4 - .../gprs/back_end/locations/index.html.erb | 34 -------- .../gprs/back_end/locations/new.html.erb | 3 - .../gprs/back_end/locations/show.html.erb | 0 vendor/built_in_modules/gprs/config/routes.rb | 12 --- vendor/built_in_modules/gprs/gprs.gemspec | 23 ------ vendor/built_in_modules/gprs/init.rb | 43 ----------- vendor/built_in_modules/gprs/lib/gprs.rb | 4 - .../built_in_modules/gprs/lib/gprs/engine.rb | 4 - .../built_in_modules/gprs/lib/gprs/version.rb | 3 - .../gprs/lib/tasks/gprs_tasks.rake | 4 - vendor/built_in_modules/gprs/script/rails | 6 -- .../built_in_modules/gprs/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 - .../gprs/test/dummy/app/mailers/.gitkeep | 0 .../gprs/test/dummy/app/models/.gitkeep | 0 .../app/views/layouts/application.html.erb | 14 ---- .../gprs/test/dummy/config.ru | 4 - .../gprs/test/dummy/config/application.rb | 45 ----------- .../gprs/test/dummy/config/boot.rb | 10 --- .../gprs/test/dummy/config/database.yml | 25 ------ .../gprs/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 ---- .../gprs/test/dummy/config/locales/en.yml | 5 -- .../gprs/test/dummy/config/routes.rb | 58 -------------- .../gprs/test/dummy/lib/assets/.gitkeep | 0 .../gprs/test/dummy/log/.gitkeep | 0 .../gprs/test/dummy/public/404.html | 26 ------- .../gprs/test/dummy/public/422.html | 26 ------- .../gprs/test/dummy/public/500.html | 26 ------- .../gprs/test/dummy/public/favicon.ico | 0 .../gprs/test/dummy/script/rails | 6 -- .../back_end/locations_controller_test.rb | 14 ---- .../built_in_modules/gprs/test/gprs_test.rb | 7 -- .../gprs/test/integration/navigation_test.rb | 10 --- .../built_in_modules/gprs/test/test_helper.rb | 10 --- .../gprs/back_end/locations_helper_test.rb | 4 - 68 files changed, 915 deletions(-) delete mode 100644 app/uploaders/gprs_uploader.rb delete mode 100644 vendor/built_in_modules/gprs/.gitignore delete mode 100644 vendor/built_in_modules/gprs/Gemfile delete mode 100644 vendor/built_in_modules/gprs/MIT-LICENSE delete mode 100644 vendor/built_in_modules/gprs/README.rdoc delete mode 100644 vendor/built_in_modules/gprs/Rakefile delete mode 100644 vendor/built_in_modules/gprs/app/assets/images/gprs/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/assets/javascripts/gprs/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js delete mode 100644 vendor/built_in_modules/gprs/app/assets/stylesheets/gprs/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css delete mode 100644 vendor/built_in_modules/gprs/app/controllers/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb delete mode 100644 vendor/built_in_modules/gprs/app/helpers/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb delete mode 100644 vendor/built_in_modules/gprs/app/mailers/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/models/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/models/location.rb delete mode 100644 vendor/built_in_modules/gprs/app/views/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb delete mode 100644 vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/show.html.erb delete mode 100644 vendor/built_in_modules/gprs/config/routes.rb delete mode 100644 vendor/built_in_modules/gprs/gprs.gemspec delete mode 100644 vendor/built_in_modules/gprs/init.rb delete mode 100644 vendor/built_in_modules/gprs/lib/gprs.rb delete mode 100644 vendor/built_in_modules/gprs/lib/gprs/engine.rb delete mode 100644 vendor/built_in_modules/gprs/lib/gprs/version.rb delete mode 100644 vendor/built_in_modules/gprs/lib/tasks/gprs_tasks.rake delete mode 100755 vendor/built_in_modules/gprs/script/rails delete mode 100644 vendor/built_in_modules/gprs/test/dummy/Rakefile delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/assets/javascripts/application.js delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/assets/stylesheets/application.css delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/controllers/application_controller.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/helpers/application_helper.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/mailers/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/models/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/test/dummy/app/views/layouts/application.html.erb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config.ru delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/application.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/boot.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/database.yml delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/environment.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/environments/development.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/environments/production.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/environments/test.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/backtrace_silencers.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/inflections.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/mime_types.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/secret_token.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/session_store.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/initializers/wrap_parameters.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/locales/en.yml delete mode 100644 vendor/built_in_modules/gprs/test/dummy/config/routes.rb delete mode 100644 vendor/built_in_modules/gprs/test/dummy/lib/assets/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/test/dummy/log/.gitkeep delete mode 100644 vendor/built_in_modules/gprs/test/dummy/public/404.html delete mode 100644 vendor/built_in_modules/gprs/test/dummy/public/422.html delete mode 100644 vendor/built_in_modules/gprs/test/dummy/public/500.html delete mode 100644 vendor/built_in_modules/gprs/test/dummy/public/favicon.ico delete mode 100755 vendor/built_in_modules/gprs/test/dummy/script/rails delete mode 100644 vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb delete mode 100644 vendor/built_in_modules/gprs/test/gprs_test.rb delete mode 100644 vendor/built_in_modules/gprs/test/integration/navigation_test.rb delete mode 100644 vendor/built_in_modules/gprs/test/test_helper.rb delete mode 100644 vendor/built_in_modules/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb diff --git a/app/uploaders/gprs_uploader.rb b/app/uploaders/gprs_uploader.rb deleted file mode 100644 index 4ce41321..00000000 --- a/app/uploaders/gprs_uploader.rb +++ /dev/null @@ -1,61 +0,0 @@ -class GprsUploader < CarrierWave::Uploader::Base - - # Include RMagick or ImageScience support: - # include CarrierWave::RMagick - # include CarrierWave::ImageScience - include CarrierWave::MiniMagick - - # Choose what kind of storage to use for this uploader: - # storage :file - # storage :s3 - - # Override the directory where uploaded files will be stored. - # This is a sensible default for uploaders that are meant to be mounted: - def store_dir - "gprs/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" - end - - # Provide a default URL as a default if there hasn't been a file uploaded: - # def default_url - # "/images/fallback/" + [version_name, "default.png"].compact.join('_') - # end - - # Process files as they are uploaded: - # process :scale => [200, 300] - # - # def scale(width, height) - # # do something - # end - - # Create different versions of your uploaded files: - # version :thumb do - # process :scale => [50, 50] - # end - - version :thumb do - process :resize_to_fill => [150, 120] - end - - # Add a white list of extensions which are allowed to be uploaded. - # For images you might use something like this: - # def extension_white_list - # %w(jpg jpeg gif png) - # end - - # Override the filename of the uploaded files: - # def filename - # "something.jpg" if original_filename - # end - -# def manipulate! -# raise current_path.inspect -# image = ::MiniMagick::Image.open(current_path) -# image = yield(image) -# image.write(current_path) -# ::MiniMagick::Image.open(current_path) -# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e -# raise CarrierWave::ProcessingError.new("Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: #{e}") -# end - -end - diff --git a/vendor/built_in_modules/gprs/.gitignore b/vendor/built_in_modules/gprs/.gitignore deleted file mode 100644 index 1463de6d..00000000 --- a/vendor/built_in_modules/gprs/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/log/*.log -test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/gprs/Gemfile b/vendor/built_in_modules/gprs/Gemfile deleted file mode 100644 index cdc455ae..00000000 --- a/vendor/built_in_modules/gprs/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "http://rubygems.org" - -# Declare your gem's dependencies in gprs.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/vendor/built_in_modules/gprs/MIT-LICENSE b/vendor/built_in_modules/gprs/MIT-LICENSE deleted file mode 100644 index 406f17b7..00000000 --- a/vendor/built_in_modules/gprs/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2012 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/gprs/README.rdoc b/vendor/built_in_modules/gprs/README.rdoc deleted file mode 100644 index 6cc30110..00000000 --- a/vendor/built_in_modules/gprs/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Gprs - -This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/gprs/Rakefile b/vendor/built_in_modules/gprs/Rakefile deleted file mode 100644 index e9f3324c..00000000 --- a/vendor/built_in_modules/gprs/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Gprs' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/vendor/built_in_modules/gprs/app/assets/images/gprs/.gitkeep b/vendor/built_in_modules/gprs/app/assets/images/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/assets/javascripts/gprs/.gitkeep b/vendor/built_in_modules/gprs/app/assets/javascripts/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js b/vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js deleted file mode 100644 index dee720fa..00000000 --- a/vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/vendor/built_in_modules/gprs/app/assets/stylesheets/gprs/.gitkeep b/vendor/built_in_modules/gprs/app/assets/stylesheets/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css b/vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css deleted file mode 100644 index afad32db..00000000 --- a/vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/vendor/built_in_modules/gprs/app/controllers/.gitkeep b/vendor/built_in_modules/gprs/app/controllers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb b/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb deleted file mode 100644 index 1ba13703..00000000 --- a/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController - - #before_filter :clean_values, :only => [:create, :update] - - before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete] - before_filter :force_order_for_user,:except => [:get_locations,:index] - #before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations] - - def index - @locations = Location.all - respond_to do |format| - format.html # new.html.erb - format.json { render json: @locations } - end - end - - def new - @location = Location.new - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @location } - end - end - - def edit - @location = Location.find(params[:id]) - end - - def show - @location = Location.find(params[:id]) - respond_to do |format| - format.html - format.json { render json: @location } - end - end - - def create - @location = Location.new(params[:location]) - @location.save! - redirect_to panel_gprs_back_end_locations_url - end - - def update - @location = Location.find(params[:id]) - @location.update_attributes(params[:location]) - redirect_to panel_gprs_back_end_locations_url - end - - def destroy - @location = Location.find(params[:id]) - @location.destroy - redirect_to panel_gprs_back_end_locations_url - - end - - def get_locations - locations = Location.all - @data = Array.new - - locations.each do |location| - picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}" - thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}" - @data << { name: location.name, - pic_url: picurl, - thumb_url: thumburl, - longitude: location.longitude, - latitude: location.latitude, - description: location.description } - end - - #print readable json - render :json => JSON.pretty_generate({location: @data}) - - #render :json => {location: @data}.to_json - end -end diff --git a/vendor/built_in_modules/gprs/app/helpers/.gitkeep b/vendor/built_in_modules/gprs/app/helpers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb b/vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb deleted file mode 100644 index 50985d54..00000000 --- a/vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Panel::Gprs::BackEnd::LocationsHelper -end diff --git a/vendor/built_in_modules/gprs/app/mailers/.gitkeep b/vendor/built_in_modules/gprs/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/models/.gitkeep b/vendor/built_in_modules/gprs/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/models/location.rb b/vendor/built_in_modules/gprs/app/models/location.rb deleted file mode 100644 index f6455920..00000000 --- a/vendor/built_in_modules/gprs/app/models/location.rb +++ /dev/null @@ -1,11 +0,0 @@ -class Location - include Mongoid::Document - include Mongoid::Timestamps - - mount_uploader :file, GprsUploader - - field :name - field :description - field :longitude, type: Float - field :latitude, type: Float -end diff --git a/vendor/built_in_modules/gprs/app/views/.gitkeep b/vendor/built_in_modules/gprs/app/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb deleted file mode 100644 index 62e8b21b..00000000 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -
- -
- <%= f.text_field :name, :class=>"span4", :placeholder => "Area" %> -
-
-
- -
- <%= f.file_field :file %> -
-
-
- -
- <%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %> - <%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %> -
-
-
- -
- <%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %> -
-
-
-
- <%= f.submit "Save", :class=>"btn" %> -
-
diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb deleted file mode 100644 index 82a59afa..00000000 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= form_for @location, :url=> panel_gprs_back_end_location_path(@location), :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> - diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb deleted file mode 100644 index 95b72b73..00000000 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - <%if is_manager? %> - - - <% end %> - - - - <% @locations.each do |location| %> - - - - - - - <%if is_manager? %> - - - <%end%> - - - <% end %> - -
<%= t('location.picture') %><%= t('location.name') %><%= t('location.longitude') %><%= t('location.latitude') %><%= t('location.description') %><%= t('location.edit') %><%= t('location.delete') %>
<%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %><%= location.name%><%= location.longitude%><%= location.latitude%><%= location.description%><%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %><%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %>
-<%if is_manager? %> -<%= link_to 'New', new_panel_gprs_back_end_location_path %> -<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb deleted file mode 100644 index 4f911d83..00000000 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @location, :url=> panel_gprs_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/show.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/show.html.erb deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/config/routes.rb b/vendor/built_in_modules/gprs/config/routes.rb deleted file mode 100644 index 0ba8a27c..00000000 --- a/vendor/built_in_modules/gprs/config/routes.rb +++ /dev/null @@ -1,12 +0,0 @@ -Rails.application.routes.draw do - namespace :panel do - namespace :gprs do - namespace :back_end do - - match "locations/get_locations" => "locations#get_locations" - - resources :locations - end - end - end -end diff --git a/vendor/built_in_modules/gprs/gprs.gemspec b/vendor/built_in_modules/gprs/gprs.gemspec deleted file mode 100644 index a701f924..00000000 --- a/vendor/built_in_modules/gprs/gprs.gemspec +++ /dev/null @@ -1,23 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "gprs/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "gprs" - s.version = Gprs::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of Gprs." - s.description = "TODO: Description of Gprs." - - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", "~> 3.1.8" - # s.add_dependency "jquery-rails" - - s.add_development_dependency "sqlite3" -end diff --git a/vendor/built_in_modules/gprs/init.rb b/vendor/built_in_modules/gprs/init.rb deleted file mode 100644 index 99de7772..00000000 --- a/vendor/built_in_modules/gprs/init.rb +++ /dev/null @@ -1,43 +0,0 @@ -module Location - OrbitApp.registration "Location",:type=> 'ModuleApp' do - module_label 'miss_module_i18n.location' - base_url File.expand_path File.dirname(__FILE__) - # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' - - # version "0.1" - # organization "Rulingcom" - # author "RD dep" - # intro "I am intro" - # update_info 'some update_info' - - # front_end do - # app_page 'bulletins' - # end - - # category ["BulletinCategory"] - - # widgets do - # default_widget do - # query 'Bulletin.all' - # image :image - # end - - # categories_query 'BulletinCategory.all' - # tags_query 'LocationTag.all' - - # customize_widget "index","location.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] - # customize_widget "bulletins_and_web_links","location.widget.bulletins_and_web_links" - # # item "index","location.widget.index",:default_template=>true,:fields=>["title","category","postdate"] - # # item "bulletins_and_web_links","location.widget.bulletins_and_web_links" - # end - - side_bar do - head_label_i18n 'miss_module_i18n.location',:icon_class=>"icons-location" - available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['locations']}) - - head_link_path "panel_gprs_back_end_locations_path" - - end - end -end diff --git a/vendor/built_in_modules/gprs/lib/gprs.rb b/vendor/built_in_modules/gprs/lib/gprs.rb deleted file mode 100644 index 7a4d99e7..00000000 --- a/vendor/built_in_modules/gprs/lib/gprs.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "gprs/engine" - -module Gprs -end diff --git a/vendor/built_in_modules/gprs/lib/gprs/engine.rb b/vendor/built_in_modules/gprs/lib/gprs/engine.rb deleted file mode 100644 index 42da611a..00000000 --- a/vendor/built_in_modules/gprs/lib/gprs/engine.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Gprs - class Engine < Rails::Engine - end -end diff --git a/vendor/built_in_modules/gprs/lib/gprs/version.rb b/vendor/built_in_modules/gprs/lib/gprs/version.rb deleted file mode 100644 index bf13294d..00000000 --- a/vendor/built_in_modules/gprs/lib/gprs/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Gprs - VERSION = "0.0.1" -end diff --git a/vendor/built_in_modules/gprs/lib/tasks/gprs_tasks.rake b/vendor/built_in_modules/gprs/lib/tasks/gprs_tasks.rake deleted file mode 100644 index ba45136c..00000000 --- a/vendor/built_in_modules/gprs/lib/tasks/gprs_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :gprs do -# # Task goes here -# end diff --git a/vendor/built_in_modules/gprs/script/rails b/vendor/built_in_modules/gprs/script/rails deleted file mode 100755 index e323e44b..00000000 --- a/vendor/built_in_modules/gprs/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -ENGINE_PATH = File.expand_path('../..', __FILE__) -load File.expand_path('../../test/dummy/script/rails', __FILE__) diff --git a/vendor/built_in_modules/gprs/test/dummy/Rakefile b/vendor/built_in_modules/gprs/test/dummy/Rakefile deleted file mode 100644 index 36458522..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/gprs/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfcd..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/gprs/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index fc25b572..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/gprs/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/gprs/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/vendor/built_in_modules/gprs/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/gprs/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/gprs/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/gprs/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/gprs/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 9a8a761b..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config.ru b/vendor/built_in_modules/gprs/test/dummy/config.ru deleted file mode 100644 index 1989ed8d..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/application.rb b/vendor/built_in_modules/gprs/test/dummy/config/application.rb deleted file mode 100644 index f03b73e0..00000000 --- a/vendor/built_in_modules/gprs/test/dummy/config/application.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require -require "gprs" - -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/gprs/test/dummy/config/boot.rb b/vendor/built_in_modules/gprs/test/dummy/config/boot.rb deleted file mode 100644 index eba06813..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/database.yml b/vendor/built_in_modules/gprs/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd45..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/environment.rb b/vendor/built_in_modules/gprs/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/environments/development.rb b/vendor/built_in_modules/gprs/test/dummy/config/environments/development.rb deleted file mode 100644 index 95a50b91..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/environments/production.rb b/vendor/built_in_modules/gprs/test/dummy/config/environments/production.rb deleted file mode 100644 index ca2c5888..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/environments/test.rb b/vendor/built_in_modules/gprs/test/dummy/config/environments/test.rb deleted file mode 100644 index 6810c914..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 9e8b0131..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 370a8fa2..00000000 --- a/vendor/built_in_modules/gprs/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 = '181584334acb820e1d0e0e53b71c0985251f4e5bfd188a962d5f9acfeeb0e46dfd6ca68784528cab00d8e6e8da087cce2bf7d060fe2b2c742a814c23689ff6af' diff --git a/vendor/built_in_modules/gprs/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/gprs/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df201..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/locales/en.yml b/vendor/built_in_modules/gprs/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/config/routes.rb b/vendor/built_in_modules/gprs/test/dummy/config/routes.rb deleted file mode 100644 index bb509f27..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/gprs/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/log/.gitkeep b/vendor/built_in_modules/gprs/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/public/404.html b/vendor/built_in_modules/gprs/test/dummy/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/public/422.html b/vendor/built_in_modules/gprs/test/dummy/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/public/500.html b/vendor/built_in_modules/gprs/test/dummy/public/500.html deleted file mode 100644 index b80307fc..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/dummy/public/favicon.ico b/vendor/built_in_modules/gprs/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/gprs/test/dummy/script/rails b/vendor/built_in_modules/gprs/test/dummy/script/rails deleted file mode 100755 index f8da2cff..00000000 --- a/vendor/built_in_modules/gprs/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# 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/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb b/vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb deleted file mode 100644 index bb6d0908..00000000 --- a/vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'test_helper' - -class Panel::Gprs::BackEnd::LocationsControllerTest < ActionController::TestCase - test "should get index" do - get :index - assert_response :success - end - - test "should get edit" do - get :edit - assert_response :success - end - -end diff --git a/vendor/built_in_modules/gprs/test/gprs_test.rb b/vendor/built_in_modules/gprs/test/gprs_test.rb deleted file mode 100644 index 1ab42707..00000000 --- a/vendor/built_in_modules/gprs/test/gprs_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class GprsTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, Gprs - end -end diff --git a/vendor/built_in_modules/gprs/test/integration/navigation_test.rb b/vendor/built_in_modules/gprs/test/integration/navigation_test.rb deleted file mode 100644 index 97a94c9b..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/test_helper.rb b/vendor/built_in_modules/gprs/test/test_helper.rb deleted file mode 100644 index dcd3b276..00000000 --- a/vendor/built_in_modules/gprs/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/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb b/vendor/built_in_modules/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb deleted file mode 100644 index e1302ea2..00000000 --- a/vendor/built_in_modules/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Panel::Gprs::BackEnd::LocationsHelperTest < ActionView::TestCase -end From 2c69590c36f781eece8bc1179e3df902a0023656 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 7 Dec 2012 12:40:21 +0800 Subject: [PATCH 13/44] rename of GPRS now it's named location --- app/uploaders/location_uploader.rb | 61 +++++++++++++++ vendor/built_in_modules/location/.gitignore | 6 ++ vendor/built_in_modules/location/Gemfile | 17 ++++ vendor/built_in_modules/location/MIT-LICENSE | 20 +++++ vendor/built_in_modules/location/README.rdoc | 3 + vendor/built_in_modules/location/Rakefile | 39 ++++++++++ .../location/app/assets/images/gprs/.gitkeep | 0 .../app/assets/javascripts/gprs/.gitkeep | 0 .../panel/gprs/back_end/locations.js | 2 + .../app/assets/stylesheets/gprs/.gitkeep | 0 .../panel/gprs/back_end/locations.css | 4 + .../location/app/controllers/.gitkeep | 0 .../back_end/locations_controller.rb | 77 +++++++++++++++++++ .../location/app/helpers/.gitkeep | 0 .../locations/back_end/locations_helper.rb | 2 + .../location/app/mailers/.gitkeep | 0 .../location/app/models/.gitkeep | 0 .../location/app/models/location.rb | 11 +++ .../location/app/views/.gitkeep | 0 .../back_end/locations/_form.html.erb | 30 ++++++++ .../back_end/locations/edit.html.erb | 4 + .../back_end/locations/index.html.erb | 34 ++++++++ .../locations/back_end/locations/new.html.erb | 3 + .../back_end/locations/show.html.erb | 0 .../location/config/routes.rb | 12 +++ vendor/built_in_modules/location/init.rb | 43 +++++++++++ .../built_in_modules/location/lib/location.rb | 4 + .../location/lib/location/engine.rb | 4 + .../location/lib/location/version.rb | 3 + .../location/lib/tasks/location_tasks.rake | 4 + .../location/location.gemspec | 23 ++++++ vendor/built_in_modules/location/script/rails | 6 ++ .../location/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 + .../location/test/dummy/app/mailers/.gitkeep | 0 .../location/test/dummy/app/models/.gitkeep | 0 .../app/views/layouts/application.html.erb | 14 ++++ .../location/test/dummy/config.ru | 4 + .../location/test/dummy/config/application.rb | 45 +++++++++++ .../location/test/dummy/config/boot.rb | 10 +++ .../location/test/dummy/config/database.yml | 25 ++++++ .../location/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 ++++ .../location/test/dummy/config/locales/en.yml | 5 ++ .../location/test/dummy/config/routes.rb | 58 ++++++++++++++ .../location/test/dummy/lib/assets/.gitkeep | 0 .../location/test/dummy/log/.gitkeep | 0 .../location/test/dummy/public/404.html | 26 +++++++ .../location/test/dummy/public/422.html | 26 +++++++ .../location/test/dummy/public/500.html | 26 +++++++ .../location/test/dummy/public/favicon.ico | 0 .../location/test/dummy/script/rails | 6 ++ .../back_end/locations_controller_test.rb | 14 ++++ .../test/integration/navigation_test.rb | 10 +++ .../location/test/location_test.rb | 7 ++ .../location/test/test_helper.rb | 10 +++ .../gprs/back_end/locations_helper_test.rb | 4 + 68 files changed, 915 insertions(+) create mode 100644 app/uploaders/location_uploader.rb create mode 100644 vendor/built_in_modules/location/.gitignore create mode 100644 vendor/built_in_modules/location/Gemfile create mode 100644 vendor/built_in_modules/location/MIT-LICENSE create mode 100644 vendor/built_in_modules/location/README.rdoc create mode 100644 vendor/built_in_modules/location/Rakefile create mode 100644 vendor/built_in_modules/location/app/assets/images/gprs/.gitkeep create mode 100644 vendor/built_in_modules/location/app/assets/javascripts/gprs/.gitkeep create mode 100644 vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js create mode 100644 vendor/built_in_modules/location/app/assets/stylesheets/gprs/.gitkeep create mode 100644 vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css create mode 100644 vendor/built_in_modules/location/app/controllers/.gitkeep create mode 100644 vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb create mode 100644 vendor/built_in_modules/location/app/helpers/.gitkeep create mode 100644 vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb create mode 100644 vendor/built_in_modules/location/app/mailers/.gitkeep create mode 100644 vendor/built_in_modules/location/app/models/.gitkeep create mode 100644 vendor/built_in_modules/location/app/models/location.rb create mode 100644 vendor/built_in_modules/location/app/views/.gitkeep create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb create mode 100644 vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/show.html.erb create mode 100644 vendor/built_in_modules/location/config/routes.rb create mode 100644 vendor/built_in_modules/location/init.rb create mode 100644 vendor/built_in_modules/location/lib/location.rb create mode 100644 vendor/built_in_modules/location/lib/location/engine.rb create mode 100644 vendor/built_in_modules/location/lib/location/version.rb create mode 100644 vendor/built_in_modules/location/lib/tasks/location_tasks.rake create mode 100644 vendor/built_in_modules/location/location.gemspec create mode 100755 vendor/built_in_modules/location/script/rails create mode 100644 vendor/built_in_modules/location/test/dummy/Rakefile create mode 100644 vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js create mode 100644 vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css create mode 100644 vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb create mode 100644 vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb create mode 100644 vendor/built_in_modules/location/test/dummy/app/mailers/.gitkeep create mode 100644 vendor/built_in_modules/location/test/dummy/app/models/.gitkeep create mode 100644 vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb create mode 100644 vendor/built_in_modules/location/test/dummy/config.ru create mode 100644 vendor/built_in_modules/location/test/dummy/config/application.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/boot.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/database.yml create mode 100644 vendor/built_in_modules/location/test/dummy/config/environment.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/environments/development.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/environments/production.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/environments/test.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb create mode 100644 vendor/built_in_modules/location/test/dummy/config/locales/en.yml create mode 100644 vendor/built_in_modules/location/test/dummy/config/routes.rb create mode 100644 vendor/built_in_modules/location/test/dummy/lib/assets/.gitkeep create mode 100644 vendor/built_in_modules/location/test/dummy/log/.gitkeep create mode 100644 vendor/built_in_modules/location/test/dummy/public/404.html create mode 100644 vendor/built_in_modules/location/test/dummy/public/422.html create mode 100644 vendor/built_in_modules/location/test/dummy/public/500.html create mode 100644 vendor/built_in_modules/location/test/dummy/public/favicon.ico create mode 100755 vendor/built_in_modules/location/test/dummy/script/rails create mode 100644 vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb create mode 100644 vendor/built_in_modules/location/test/integration/navigation_test.rb create mode 100644 vendor/built_in_modules/location/test/location_test.rb create mode 100644 vendor/built_in_modules/location/test/test_helper.rb create mode 100644 vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb diff --git a/app/uploaders/location_uploader.rb b/app/uploaders/location_uploader.rb new file mode 100644 index 00000000..1c2ec99d --- /dev/null +++ b/app/uploaders/location_uploader.rb @@ -0,0 +1,61 @@ +class LocationUploader < CarrierWave::Uploader::Base + + # Include RMagick or ImageScience support: + # include CarrierWave::RMagick + # include CarrierWave::ImageScience + include CarrierWave::MiniMagick + + # Choose what kind of storage to use for this uploader: + # storage :file + # storage :s3 + + # Override the directory where uploaded files will be stored. + # This is a sensible default for uploaders that are meant to be mounted: + def store_dir + "location/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" + end + + # Provide a default URL as a default if there hasn't been a file uploaded: + # def default_url + # "/images/fallback/" + [version_name, "default.png"].compact.join('_') + # end + + # Process files as they are uploaded: + # process :scale => [200, 300] + # + # def scale(width, height) + # # do something + # end + + # Create different versions of your uploaded files: + # version :thumb do + # process :scale => [50, 50] + # end + + version :thumb do + process :resize_to_fill => [150, 120] + end + + # Add a white list of extensions which are allowed to be uploaded. + # For images you might use something like this: + # def extension_white_list + # %w(jpg jpeg gif png) + # end + + # Override the filename of the uploaded files: + # def filename + # "something.jpg" if original_filename + # end + +# def manipulate! +# raise current_path.inspect +# image = ::MiniMagick::Image.open(current_path) +# image = yield(image) +# image.write(current_path) +# ::MiniMagick::Image.open(current_path) +# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e +# raise CarrierWave::ProcessingError.new("Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: #{e}") +# end + +end + diff --git a/vendor/built_in_modules/location/.gitignore b/vendor/built_in_modules/location/.gitignore new file mode 100644 index 00000000..1463de6d --- /dev/null +++ b/vendor/built_in_modules/location/.gitignore @@ -0,0 +1,6 @@ +.bundle/ +log/*.log +pkg/ +test/dummy/db/*.sqlite3 +test/dummy/log/*.log +test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/location/Gemfile b/vendor/built_in_modules/location/Gemfile new file mode 100644 index 00000000..cdc455ae --- /dev/null +++ b/vendor/built_in_modules/location/Gemfile @@ -0,0 +1,17 @@ +source "http://rubygems.org" + +# Declare your gem's dependencies in gprs.gemspec. +# Bundler will treat runtime dependencies like base dependencies, and +# development dependencies will be added by default to the :development group. +gemspec + +# jquery-rails is used by the dummy application +gem "jquery-rails" + +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. + +# To use debugger +# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/vendor/built_in_modules/location/MIT-LICENSE b/vendor/built_in_modules/location/MIT-LICENSE new file mode 100644 index 00000000..406f17b7 --- /dev/null +++ b/vendor/built_in_modules/location/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright 2012 YOURNAME + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/location/README.rdoc b/vendor/built_in_modules/location/README.rdoc new file mode 100644 index 00000000..0e425195 --- /dev/null +++ b/vendor/built_in_modules/location/README.rdoc @@ -0,0 +1,3 @@ += Location + +This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/location/Rakefile b/vendor/built_in_modules/location/Rakefile new file mode 100644 index 00000000..66353374 --- /dev/null +++ b/vendor/built_in_modules/location/Rakefile @@ -0,0 +1,39 @@ +#!/usr/bin/env rake +begin + require 'bundler/setup' +rescue LoadError + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' +end +begin + require 'rdoc/task' +rescue LoadError + require 'rdoc/rdoc' + require 'rake/rdoctask' + RDoc::Task = Rake::RDocTask +end + +RDoc::Task.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'Location' + rdoc.options << '--line-numbers' + rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('lib/**/*.rb') +end + +APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) +load 'rails/tasks/engine.rake' + + +Bundler::GemHelper.install_tasks + +require 'rake/testtask' + +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.libs << 'test' + t.pattern = 'test/**/*_test.rb' + t.verbose = false +end + + +task :default => :test diff --git a/vendor/built_in_modules/location/app/assets/images/gprs/.gitkeep b/vendor/built_in_modules/location/app/assets/images/gprs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/assets/javascripts/gprs/.gitkeep b/vendor/built_in_modules/location/app/assets/javascripts/gprs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js b/vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js new file mode 100644 index 00000000..dee720fa --- /dev/null +++ b/vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/gprs/.gitkeep b/vendor/built_in_modules/location/app/assets/stylesheets/gprs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css b/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css new file mode 100644 index 00000000..afad32db --- /dev/null +++ b/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css @@ -0,0 +1,4 @@ +/* + Place all the styles related to the matching controller here. + They will automatically be included in application.css. +*/ diff --git a/vendor/built_in_modules/location/app/controllers/.gitkeep b/vendor/built_in_modules/location/app/controllers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb new file mode 100644 index 00000000..5ad721e6 --- /dev/null +++ b/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb @@ -0,0 +1,77 @@ +class Panel::Locations::BackEnd::LocationsController < OrbitBackendController + + #before_filter :clean_values, :only => [:create, :update] + + before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete] + before_filter :force_order_for_user,:except => [:get_locations,:index] + #before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations] + + def index + @locations = Location.all + respond_to do |format| + format.html # new.html.erb + format.json { render json: @locations } + end + end + + def new + @location = Location.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @location } + end + end + + def edit + @location = Location.find(params[:id]) + end + + def show + @location = Location.find(params[:id]) + respond_to do |format| + format.html + format.json { render json: @location } + end + end + + def create + @location = Location.new(params[:location]) + @location.save! + redirect_to panel_gprs_back_end_locations_url + end + + def update + @location = Location.find(params[:id]) + @location.update_attributes(params[:location]) + redirect_to panel_gprs_back_end_locations_url + end + + def destroy + @location = Location.find(params[:id]) + @location.destroy + redirect_to panel_gprs_back_end_locations_url + + end + + def get_locations + locations = Location.all + @data = Array.new + + locations.each do |location| + picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}" + thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}" + @data << { name: location.name, + pic_url: picurl, + thumb_url: thumburl, + longitude: location.longitude, + latitude: location.latitude, + description: location.description } + end + + #print readable json + render :json => JSON.pretty_generate({location: @data}) + + #render :json => {location: @data}.to_json + end +end diff --git a/vendor/built_in_modules/location/app/helpers/.gitkeep b/vendor/built_in_modules/location/app/helpers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb b/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb new file mode 100644 index 00000000..c6dcef87 --- /dev/null +++ b/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb @@ -0,0 +1,2 @@ +module Panel::Locations::BackEnd::LocationsHelper +end diff --git a/vendor/built_in_modules/location/app/mailers/.gitkeep b/vendor/built_in_modules/location/app/mailers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/models/.gitkeep b/vendor/built_in_modules/location/app/models/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/models/location.rb b/vendor/built_in_modules/location/app/models/location.rb new file mode 100644 index 00000000..58d032bd --- /dev/null +++ b/vendor/built_in_modules/location/app/models/location.rb @@ -0,0 +1,11 @@ +class Location + include Mongoid::Document + include Mongoid::Timestamps + + mount_uploader :file, LocationUploader + + field :name + field :description + field :longitude, type: Float + field :latitude, type: Float +end diff --git a/vendor/built_in_modules/location/app/views/.gitkeep b/vendor/built_in_modules/location/app/views/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb new file mode 100644 index 00000000..62e8b21b --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb @@ -0,0 +1,30 @@ +
+ +
+ <%= f.text_field :name, :class=>"span4", :placeholder => "Area" %> +
+
+
+ +
+ <%= f.file_field :file %> +
+
+
+ +
+ <%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %> + <%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %> +
+
+
+ +
+ <%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %> +
+
+
+
+ <%= f.submit "Save", :class=>"btn" %> +
+
diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb new file mode 100644 index 00000000..82a59afa --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb @@ -0,0 +1,4 @@ +<%= form_for @location, :url=> panel_gprs_back_end_location_path(@location), :html => { :class=>"form-horizontal"} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> + diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb new file mode 100644 index 00000000..9bbe06e7 --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb @@ -0,0 +1,34 @@ + + + + + + + + + <%if is_manager? %> + + + <% end %> + + + + <% @locations.each do |location| %> + + + + + + + <%if is_manager? %> + + + <%end%> + + + <% end %> + +
<%= t('location.picture') %><%= t('location.name') %><%= t('location.longitude') %><%= t('location.latitude') %><%= t('location.description') %><%= t('location.edit') %><%= t('location.delete') %>
<%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %><%= location.name%><%= location.longitude%><%= location.latitude%><%= location.description%><%= link_to 'Edit', edit_panel_locations_back_end_location_path(location) %><%= link_to 'Destroy', panel_locations_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %>
+<%if is_manager? %> +<%= link_to 'New', new_panel_locations_back_end_location_path %> +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb new file mode 100644 index 00000000..4f911d83 --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb @@ -0,0 +1,3 @@ +<%= form_for @location, :url=> panel_gprs_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/show.html.erb b/vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/show.html.erb new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/config/routes.rb b/vendor/built_in_modules/location/config/routes.rb new file mode 100644 index 00000000..1205145e --- /dev/null +++ b/vendor/built_in_modules/location/config/routes.rb @@ -0,0 +1,12 @@ +Rails.application.routes.draw do + namespace :panel do + namespace :locations do + namespace :back_end do + + match "locations/get_locations" => "locations#get_locations" + + resources :locations + end + end + end +end diff --git a/vendor/built_in_modules/location/init.rb b/vendor/built_in_modules/location/init.rb new file mode 100644 index 00000000..f772c780 --- /dev/null +++ b/vendor/built_in_modules/location/init.rb @@ -0,0 +1,43 @@ +module Location + OrbitApp.registration "Location",:type=> 'ModuleApp' do + module_label 'miss_module_i18n.location' + base_url File.expand_path File.dirname(__FILE__) + # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' + + # version "0.1" + # organization "Rulingcom" + # author "RD dep" + # intro "I am intro" + # update_info 'some update_info' + + # front_end do + # app_page 'bulletins' + # end + + # category ["BulletinCategory"] + + # widgets do + # default_widget do + # query 'Bulletin.all' + # image :image + # end + + # categories_query 'BulletinCategory.all' + # tags_query 'LocationTag.all' + + # customize_widget "index","location.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] + # customize_widget "bulletins_and_web_links","location.widget.bulletins_and_web_links" + # # item "index","location.widget.index",:default_template=>true,:fields=>["title","category","postdate"] + # # item "bulletins_and_web_links","location.widget.bulletins_and_web_links" + # end + + side_bar do + head_label_i18n 'miss_module_i18n.location',:icon_class=>"icons-location" + available_for [:admin,:guest,:manager,:sub_manager] + active_for_controllers ({:private=>['locations']}) + + head_link_path "panel_locations_back_end_locations_path" + + end + end +end diff --git a/vendor/built_in_modules/location/lib/location.rb b/vendor/built_in_modules/location/lib/location.rb new file mode 100644 index 00000000..b13f49bd --- /dev/null +++ b/vendor/built_in_modules/location/lib/location.rb @@ -0,0 +1,4 @@ +require "gprs/engine" + +module Location +end diff --git a/vendor/built_in_modules/location/lib/location/engine.rb b/vendor/built_in_modules/location/lib/location/engine.rb new file mode 100644 index 00000000..161a9bbd --- /dev/null +++ b/vendor/built_in_modules/location/lib/location/engine.rb @@ -0,0 +1,4 @@ +module Location + class Engine < Rails::Engine + end +end diff --git a/vendor/built_in_modules/location/lib/location/version.rb b/vendor/built_in_modules/location/lib/location/version.rb new file mode 100644 index 00000000..95df884b --- /dev/null +++ b/vendor/built_in_modules/location/lib/location/version.rb @@ -0,0 +1,3 @@ +module Location + VERSION = "0.0.1" +end diff --git a/vendor/built_in_modules/location/lib/tasks/location_tasks.rake b/vendor/built_in_modules/location/lib/tasks/location_tasks.rake new file mode 100644 index 00000000..ba45136c --- /dev/null +++ b/vendor/built_in_modules/location/lib/tasks/location_tasks.rake @@ -0,0 +1,4 @@ +# desc "Explaining what the task does" +# task :gprs do +# # Task goes here +# end diff --git a/vendor/built_in_modules/location/location.gemspec b/vendor/built_in_modules/location/location.gemspec new file mode 100644 index 00000000..5d20e869 --- /dev/null +++ b/vendor/built_in_modules/location/location.gemspec @@ -0,0 +1,23 @@ +$:.push File.expand_path("../lib", __FILE__) + +# Maintain your gem's version: +require "gprs/version" + +# Describe your gem and declare its dependencies: +Gem::Specification.new do |s| + s.name = "gprs" + s.version = Location::VERSION + s.authors = ["TODO: Your name"] + s.email = ["TODO: Your email"] + s.homepage = "TODO" + s.summary = "TODO: Summary of Location." + s.description = "TODO: Description of Location." + + s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] + s.test_files = Dir["test/**/*"] + + s.add_dependency "rails", "~> 3.1.8" + # s.add_dependency "jquery-rails" + + s.add_development_dependency "sqlite3" +end diff --git a/vendor/built_in_modules/location/script/rails b/vendor/built_in_modules/location/script/rails new file mode 100755 index 00000000..e323e44b --- /dev/null +++ b/vendor/built_in_modules/location/script/rails @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + +ENGINE_PATH = File.expand_path('../..', __FILE__) +load File.expand_path('../../test/dummy/script/rails', __FILE__) diff --git a/vendor/built_in_modules/location/test/dummy/Rakefile b/vendor/built_in_modules/location/test/dummy/Rakefile new file mode 100644 index 00000000..36458522 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/Rakefile @@ -0,0 +1,7 @@ +#!/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/location/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js new file mode 100644 index 00000000..37c7bfcd --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js @@ -0,0 +1,9 @@ +// 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/location/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css new file mode 100644 index 00000000..fc25b572 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css @@ -0,0 +1,7 @@ +/* + * 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/location/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb new file mode 100644 index 00000000..e8065d95 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb @@ -0,0 +1,3 @@ +class ApplicationController < ActionController::Base + protect_from_forgery +end diff --git a/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb new file mode 100644 index 00000000..de6be794 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/vendor/built_in_modules/location/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/location/test/dummy/app/mailers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/location/test/dummy/app/models/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb new file mode 100644 index 00000000..9a8a761b --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb @@ -0,0 +1,14 @@ + + + + Dummy + <%= stylesheet_link_tag "application" %> + <%= javascript_include_tag "application" %> + <%= csrf_meta_tags %> + + + +<%= yield %> + + + diff --git a/vendor/built_in_modules/location/test/dummy/config.ru b/vendor/built_in_modules/location/test/dummy/config.ru new file mode 100644 index 00000000..1989ed8d --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config.ru @@ -0,0 +1,4 @@ +# 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/location/test/dummy/config/application.rb b/vendor/built_in_modules/location/test/dummy/config/application.rb new file mode 100644 index 00000000..f03b73e0 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/application.rb @@ -0,0 +1,45 @@ +require File.expand_path('../boot', __FILE__) + +require 'rails/all' + +Bundler.require +require "gprs" + +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/location/test/dummy/config/boot.rb b/vendor/built_in_modules/location/test/dummy/config/boot.rb new file mode 100644 index 00000000..eba06813 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/boot.rb @@ -0,0 +1,10 @@ +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/location/test/dummy/config/database.yml b/vendor/built_in_modules/location/test/dummy/config/database.yml new file mode 100644 index 00000000..51a4dd45 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/database.yml @@ -0,0 +1,25 @@ +# 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/location/test/dummy/config/environment.rb b/vendor/built_in_modules/location/test/dummy/config/environment.rb new file mode 100644 index 00000000..3da5eb91 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/environment.rb @@ -0,0 +1,5 @@ +# Load the rails application +require File.expand_path('../application', __FILE__) + +# Initialize the rails application +Dummy::Application.initialize! diff --git a/vendor/built_in_modules/location/test/dummy/config/environments/development.rb b/vendor/built_in_modules/location/test/dummy/config/environments/development.rb new file mode 100644 index 00000000..95a50b91 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/environments/development.rb @@ -0,0 +1,30 @@ +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/location/test/dummy/config/environments/production.rb b/vendor/built_in_modules/location/test/dummy/config/environments/production.rb new file mode 100644 index 00000000..ca2c5888 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/environments/production.rb @@ -0,0 +1,60 @@ +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/location/test/dummy/config/environments/test.rb b/vendor/built_in_modules/location/test/dummy/config/environments/test.rb new file mode 100644 index 00000000..6810c914 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/environments/test.rb @@ -0,0 +1,39 @@ +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/location/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb new file mode 100644 index 00000000..59385cdf --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# 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/location/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb new file mode 100644 index 00000000..9e8b0131 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb @@ -0,0 +1,10 @@ +# 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/location/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb new file mode 100644 index 00000000..72aca7e4 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb @@ -0,0 +1,5 @@ +# 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/location/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb new file mode 100644 index 00000000..370a8fa2 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb @@ -0,0 +1,7 @@ +# 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 = '181584334acb820e1d0e0e53b71c0985251f4e5bfd188a962d5f9acfeeb0e46dfd6ca68784528cab00d8e6e8da087cce2bf7d060fe2b2c742a814c23689ff6af' diff --git a/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb new file mode 100644 index 00000000..952473ff --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb @@ -0,0 +1,8 @@ +# 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/location/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb new file mode 100644 index 00000000..999df201 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# 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/location/test/dummy/config/locales/en.yml b/vendor/built_in_modules/location/test/dummy/config/locales/en.yml new file mode 100644 index 00000000..179c14ca --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/locales/en.yml @@ -0,0 +1,5 @@ +# 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/location/test/dummy/config/routes.rb b/vendor/built_in_modules/location/test/dummy/config/routes.rb new file mode 100644 index 00000000..bb509f27 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/config/routes.rb @@ -0,0 +1,58 @@ +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/location/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/location/test/dummy/lib/assets/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/log/.gitkeep b/vendor/built_in_modules/location/test/dummy/log/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/public/404.html b/vendor/built_in_modules/location/test/dummy/public/404.html new file mode 100644 index 00000000..9a48320a --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/public/404.html @@ -0,0 +1,26 @@ + + + + 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/location/test/dummy/public/422.html b/vendor/built_in_modules/location/test/dummy/public/422.html new file mode 100644 index 00000000..83660ab1 --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/public/422.html @@ -0,0 +1,26 @@ + + + + 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/location/test/dummy/public/500.html b/vendor/built_in_modules/location/test/dummy/public/500.html new file mode 100644 index 00000000..b80307fc --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/public/500.html @@ -0,0 +1,26 @@ + + + + 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/location/test/dummy/public/favicon.ico b/vendor/built_in_modules/location/test/dummy/public/favicon.ico new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/location/test/dummy/script/rails b/vendor/built_in_modules/location/test/dummy/script/rails new file mode 100755 index 00000000..f8da2cff --- /dev/null +++ b/vendor/built_in_modules/location/test/dummy/script/rails @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +# 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/location/test/functional/panel/gprs/back_end/locations_controller_test.rb b/vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb new file mode 100644 index 00000000..0edd65ab --- /dev/null +++ b/vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb @@ -0,0 +1,14 @@ +require 'test_helper' + +class Panel::Location::BackEnd::LocationsControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + end + + test "should get edit" do + get :edit + assert_response :success + end + +end diff --git a/vendor/built_in_modules/location/test/integration/navigation_test.rb b/vendor/built_in_modules/location/test/integration/navigation_test.rb new file mode 100644 index 00000000..97a94c9b --- /dev/null +++ b/vendor/built_in_modules/location/test/integration/navigation_test.rb @@ -0,0 +1,10 @@ +require 'test_helper' + +class NavigationTest < ActionDispatch::IntegrationTest + fixtures :all + + # test "the truth" do + # assert true + # end +end + diff --git a/vendor/built_in_modules/location/test/location_test.rb b/vendor/built_in_modules/location/test/location_test.rb new file mode 100644 index 00000000..b85756bc --- /dev/null +++ b/vendor/built_in_modules/location/test/location_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class LocationTest < ActiveSupport::TestCase + test "truth" do + assert_kind_of Module, Location + end +end diff --git a/vendor/built_in_modules/location/test/test_helper.rb b/vendor/built_in_modules/location/test/test_helper.rb new file mode 100644 index 00000000..dcd3b276 --- /dev/null +++ b/vendor/built_in_modules/location/test/test_helper.rb @@ -0,0 +1,10 @@ +# 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/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb b/vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb new file mode 100644 index 00000000..9e39a511 --- /dev/null +++ b/vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Panel::Location::BackEnd::LocationsHelperTest < ActionView::TestCase +end From 062ebecae314ab92f991a26cbcf2a8870af810f2 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 7 Dec 2012 12:40:47 +0800 Subject: [PATCH 14/44] fix serval bugs on sidebar. --- app/models/module_app.rb | 24 +++++++++++++++++-- lib/orbit_app/helper/context_link_renderer.rb | 2 +- lib/orbit_app/helper/renderer.rb | 5 ++-- lib/orbit_app/helper/side_bar_renderer.rb | 2 +- vendor/built_in_modules/ad_banner/init.rb | 4 ++-- vendor/built_in_modules/archive/init.rb | 6 ++--- vendor/built_in_modules/gallery/init.rb | 2 +- vendor/built_in_modules/page_content/init.rb | 2 +- .../_web_link_category.html.erb | 2 +- vendor/built_in_modules/web_resource/init.rb | 8 +++---- 10 files changed, 39 insertions(+), 18 deletions(-) diff --git a/app/models/module_app.rb b/app/models/module_app.rb index b64ac908..98fc719e 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -63,11 +63,31 @@ class ModuleApp end def is_manager?(user) - managing_users.include?(user) + if user.nil? + return false + else + m_users = managing_users + if m_users.blank? + false + else + m_users.include?(user) + end + end end def is_sub_manager?(user) - sub_managing_users.include?(user) || is_manager?(user) + if user.nil? + return false + else # when user is guest + s_m_users = sub_managing_users + result = false + if s_m_users.blank? + result = false + else + result = s_m_users.include?(user) + end + result || is_manager?(user) + end end def managing_users diff --git a/lib/orbit_app/helper/context_link_renderer.rb b/lib/orbit_app/helper/context_link_renderer.rb index d4014fae..530b0946 100644 --- a/lib/orbit_app/helper/context_link_renderer.rb +++ b/lib/orbit_app/helper/context_link_renderer.rb @@ -25,7 +25,7 @@ protected else (eval(available_for_in_sym).include? @current_user rescue false) end # of case - return true if result || @current_user.admin? + return true if result || (@current_user.admin? rescue false) end # of collect false end diff --git a/lib/orbit_app/helper/renderer.rb b/lib/orbit_app/helper/renderer.rb index ee2ffb23..70b0f111 100644 --- a/lib/orbit_app/helper/renderer.rb +++ b/lib/orbit_app/helper/renderer.rb @@ -8,10 +8,11 @@ module Renderer protected def active_for_app_auth? - if @module_app.nil? + module_app = get_module_app + if module_app.nil? false else - @module_app.id.to_s == @params[:module_app_id] ? true : false + module_app.id.to_s == @params[:module_app_id] ? true : false end end diff --git a/lib/orbit_app/helper/side_bar_renderer.rb b/lib/orbit_app/helper/side_bar_renderer.rb index ba6f7c7d..e0e1f994 100644 --- a/lib/orbit_app/helper/side_bar_renderer.rb +++ b/lib/orbit_app/helper/side_bar_renderer.rb @@ -25,7 +25,7 @@ module SideBarRenderer def display? #控制sidebar 要不要算圖 if is_manager? || is_admin? #如果是系統管理員 或 是模組管理員 true - elsif (@current_module_app.open rescue false) # 如果app 被設定成 開放 + elsif (@current_module_app.open rescue true) # 如果app 被設定成 開放 true elsif is_member? #如果app 是封閉 那至少需要是 member true diff --git a/vendor/built_in_modules/ad_banner/init.rb b/vendor/built_in_modules/ad_banner/init.rb index 6776ee0a..e4c7f8cc 100644 --- a/vendor/built_in_modules/ad_banner/init.rb +++ b/vendor/built_in_modules/ad_banner/init.rb @@ -35,12 +35,12 @@ module AdBanner side_bar do head_label_i18n 'admin.ad_banner',:icon_class=>"icons-landscape" available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['ad_banners', 'ad_images']}) + active_for_controllers ({:public=>['admin/ad_banners', 'admin/ad_images']}) head_link_path "admin_ad_banners_path" context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'ad_banner'}))", + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'AdBanner'}))", :priority=>6, :active_for_app_auth => 'ad_banners', :available_for => [:admin] diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb index 565b2cdf..23cc97b7 100644 --- a/vendor/built_in_modules/archive/init.rb +++ b/vendor/built_in_modules/archive/init.rb @@ -28,7 +28,7 @@ module Archive side_bar do head_label_i18n 'miss_module_i18n.archive',:icon_class=>"icons-archive" available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['archive_file_categorys'],:public=>['panel/archive/back_end/tags']}) + active_for_controllers ({:private=>['archive_file_categorys','archive_files'],:public=>['panel/archive/back_end/tags']}) active_for_object_auth ['BulletinCategory'] head_link_path "panel_archive_back_end_archive_files_path" @@ -36,13 +36,13 @@ module Archive context_link 'miss_module_i18n._archive.all', :link_path=>"panel_archive_back_end_archive_files_path" , :priority=>1, - :active_for_action=>{:archive_file=>:index}, + :active_for_action=>{:archive_files=>:index}, :available_for => [:all] context_link 'add', :link_path=>"new_panel_archive_back_end_archive_file_path" , :priority=>2, - :active_for_action=>{:archive_file=>:new}, + :active_for_action=>{:archive_files=>:new}, :available_for => [:admin] context_link 'categories', diff --git a/vendor/built_in_modules/gallery/init.rb b/vendor/built_in_modules/gallery/init.rb index e7db1e81..3e7fa633 100644 --- a/vendor/built_in_modules/gallery/init.rb +++ b/vendor/built_in_modules/gallery/init.rb @@ -50,7 +50,7 @@ module Gallery :available_for => [:manager] context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'gallery'}))", + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Gallery'}))", :priority=>6, :active_for_app_auth => 'gallery', :available_for => [:admin] diff --git a/vendor/built_in_modules/page_content/init.rb b/vendor/built_in_modules/page_content/init.rb index 2bf8a2f7..73199b18 100644 --- a/vendor/built_in_modules/page_content/init.rb +++ b/vendor/built_in_modules/page_content/init.rb @@ -24,7 +24,7 @@ module PageContent head_link_path "panel_page_content_back_end_page_contexts_path" context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'page_content'}))", + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'PageContent'}))", :priority=>1, :active_for_app_auth => 'PageContext', :available_for => [:admin] diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/_web_link_category.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/_web_link_category.html.erb index f78b9878..bb278435 100644 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/_web_link_category.html.erb +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/_web_link_category.html.erb @@ -8,7 +8,7 @@
<% end -%> diff --git a/vendor/built_in_modules/web_resource/init.rb b/vendor/built_in_modules/web_resource/init.rb index c581506b..3362849a 100644 --- a/vendor/built_in_modules/web_resource/init.rb +++ b/vendor/built_in_modules/web_resource/init.rb @@ -36,19 +36,19 @@ module WebResource context_link 'list_', :link_path=>"panel_web_resource_back_end_web_links_path" , :priority=>1, - :active_for_action=>{:bulletins=>:index}, + :active_for_action=>{:web_links=>:index}, :available_for => [:all] context_link 'link', :link_path=>"new_panel_web_resource_back_end_web_link_path" , :priority=>2, - :active_for_action=>{:bulletins=>:new}, + :active_for_action=>{:web_links=>:new}, :available_for => [:sub_manager] context_link 'categories', :link_path=>"panel_web_resource_back_end_web_link_categorys_path" , :priority=>3, - :active_for_action=>{:bulletin_categorys=>:index}, + :active_for_action=>{:web_link_categorys=>:index}, :available_for => [:manager] context_link 'tags', @@ -58,7 +58,7 @@ module WebResource :available_for => [:manager] context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'web_resource'}))", + :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'WebResource'}))", :priority=>6, :active_for_app_auth => 'web_resource', :available_for => [:admin] From 41bcbdd2f0b9e023fdace99b231951181bf0f372 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Mon, 24 Dec 2012 11:55:33 +0800 Subject: [PATCH 15/44] missing file? --- vendor/built_in_modules/announcement/init.rb | 6 +++--- vendor/built_in_modules/archive/init.rb | 2 +- .../miss_module/config/locales/zh_tw.yml | 11 +++++++++++ vendor/built_in_modules/personal_book/init.rb | 2 +- vendor/built_in_modules/personal_diploma/init.rb | 2 +- vendor/built_in_modules/personal_experience/init.rb | 2 +- vendor/built_in_modules/personal_honor/init.rb | 2 +- vendor/built_in_modules/personal_journal/init.rb | 2 +- vendor/built_in_modules/personal_lab/init.rb | 2 +- vendor/built_in_modules/personal_patent/init.rb | 2 +- vendor/built_in_modules/personal_project/init.rb | 2 +- vendor/built_in_modules/personal_research/init.rb | 2 +- vendor/built_in_modules/personal_seminar/init.rb | 2 +- 13 files changed, 25 insertions(+), 14 deletions(-) diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb index e2d81f81..547f6f9a 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -2,7 +2,7 @@ module Announcement OrbitApp.registration "Announcement",:type=> 'ModuleApp' do module_label 'announcement.announcement' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement' + personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'announcement.announcement' version "0.1" organization "Rulingcom" @@ -41,13 +41,13 @@ module Announcement context_link 'announcement.all_articles', :link_path=>"panel_announcement_back_end_bulletins_path" , - :priority=>1, + :priority=>2, :active_for_action=>{:bulletins=>:index}, :available_for => [:all] context_link 'announcement.add_new', :link_path=>"new_panel_announcement_back_end_bulletin_path" , - :priority=>2, + :priority=>1, :active_for_action=>{:bulletins=>:new}, :available_for => [:sub_manager] diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb index 23cc97b7..2753e33c 100644 --- a/vendor/built_in_modules/archive/init.rb +++ b/vendor/built_in_modules/archive/init.rb @@ -2,7 +2,7 @@ module Archive OrbitApp.registration "Archive",:type=> 'ModuleApp' do module_label 'miss_module_i18n.archive' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'admin.archive' + personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'miss_plugin_i18n.archive' version "0.1" organization "Rulingcom" 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 b91058c4..d104ca5f 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 @@ -8,3 +8,14 @@ zh_tw: calendars: 日曆 gallery: 相簿 location: Location + 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_seminar: Personal Seminar \ No newline at end of file diff --git a/vendor/built_in_modules/personal_book/init.rb b/vendor/built_in_modules/personal_book/init.rb index d0798631..b362fedc 100644 --- a/vendor/built_in_modules/personal_book/init.rb +++ b/vendor/built_in_modules/personal_book/init.rb @@ -2,7 +2,7 @@ module PersonalBook OrbitApp.registration "Book",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_book/plugin/profile",:i18n=>'admin.personal_book' + personal_plugin :enable => true,:path=>"panel/personal_book/plugin/profile",:i18n=>'miss_module_i18n.personal_book' end diff --git a/vendor/built_in_modules/personal_diploma/init.rb b/vendor/built_in_modules/personal_diploma/init.rb index 636d951b..0147cbf8 100644 --- a/vendor/built_in_modules/personal_diploma/init.rb +++ b/vendor/built_in_modules/personal_diploma/init.rb @@ -2,7 +2,7 @@ module PersonalDiploma OrbitApp.registration "Diploma",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_diploma/plugin/profile",:i18n=>'admin.personal_diploma' + personal_plugin :enable => true,:path=>"panel/personal_diploma/plugin/profile",:i18n=>'miss_plugin_i18n.personal_diploma' end diff --git a/vendor/built_in_modules/personal_experience/init.rb b/vendor/built_in_modules/personal_experience/init.rb index 37ad178c..0afedc1c 100644 --- a/vendor/built_in_modules/personal_experience/init.rb +++ b/vendor/built_in_modules/personal_experience/init.rb @@ -2,7 +2,7 @@ module PersonalExperience OrbitApp.registration "Experience",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_experience/plugin/profile",:i18n=>'admin.personal_experience' + personal_plugin :enable => true,:path=>"panel/personal_experience/plugin/profile",:i18n=>'miss_plugin_i18n.personal_experience' end diff --git a/vendor/built_in_modules/personal_honor/init.rb b/vendor/built_in_modules/personal_honor/init.rb index 5d30556e..7d2de98a 100644 --- a/vendor/built_in_modules/personal_honor/init.rb +++ b/vendor/built_in_modules/personal_honor/init.rb @@ -2,7 +2,7 @@ module PersonalHonor OrbitApp.registration "Honor",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_honor/plugin/profile",:i18n=>'admin.personal_honor' + personal_plugin :enable => true,:path=>"panel/personal_honor/plugin/profile",:i18n=>'miss_plugin_i18n.personal_honor' end diff --git a/vendor/built_in_modules/personal_journal/init.rb b/vendor/built_in_modules/personal_journal/init.rb index 822913e3..8fdd1787 100644 --- a/vendor/built_in_modules/personal_journal/init.rb +++ b/vendor/built_in_modules/personal_journal/init.rb @@ -2,7 +2,7 @@ module PersonalJournal OrbitApp.registration "Journal",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_journal/plugin/profile",:i18n=>'admin.personal_journal' + personal_plugin :enable => true,:path=>"panel/personal_journal/plugin/profile",:i18n=>'miss_plugin_i18n.personal_journal' end diff --git a/vendor/built_in_modules/personal_lab/init.rb b/vendor/built_in_modules/personal_lab/init.rb index a0951853..a01aced8 100644 --- a/vendor/built_in_modules/personal_lab/init.rb +++ b/vendor/built_in_modules/personal_lab/init.rb @@ -2,7 +2,7 @@ module PersonalLab OrbitApp.registration "Lab",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_lab/plugin/profile",:i18n=>'admin.personal_lab' + personal_plugin :enable => true,:path=>"panel/personal_lab/plugin/profile",:i18n=>'miss_plugin_i18n.personal_lab' end diff --git a/vendor/built_in_modules/personal_patent/init.rb b/vendor/built_in_modules/personal_patent/init.rb index 7114e651..7587fff0 100644 --- a/vendor/built_in_modules/personal_patent/init.rb +++ b/vendor/built_in_modules/personal_patent/init.rb @@ -2,7 +2,7 @@ module PersonalPatent OrbitApp.registration "Patent",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_patent/plugin/profile",:i18n=>'admin.personal_patent' + personal_plugin :enable => true,:path=>"panel/personal_patent/plugin/profile",:i18n=>'miss_plugin_i18n.personal_patent' end diff --git a/vendor/built_in_modules/personal_project/init.rb b/vendor/built_in_modules/personal_project/init.rb index 2370b5ef..db357d43 100644 --- a/vendor/built_in_modules/personal_project/init.rb +++ b/vendor/built_in_modules/personal_project/init.rb @@ -2,7 +2,7 @@ module PersonalProject OrbitApp.registration "Research Project",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_project/plugin/profile",:i18n=>'admin.personal_project' + personal_plugin :enable => true,:path=>"panel/personal_project/plugin/profile",:i18n=>'miss_plugin_i18n.personal_project' end diff --git a/vendor/built_in_modules/personal_research/init.rb b/vendor/built_in_modules/personal_research/init.rb index ca9cd058..96e8f7a0 100644 --- a/vendor/built_in_modules/personal_research/init.rb +++ b/vendor/built_in_modules/personal_research/init.rb @@ -2,7 +2,7 @@ module PersonalResearch OrbitApp.registration "Research",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_research/plugin/profile",:i18n=>'admin.personal_research' + personal_plugin :enable => true,:path=>"panel/personal_research/plugin/profile",:i18n=>'miss_plugin_i18n.personal_research' end diff --git a/vendor/built_in_modules/personal_seminar/init.rb b/vendor/built_in_modules/personal_seminar/init.rb index 6cb9829f..5aa57aeb 100644 --- a/vendor/built_in_modules/personal_seminar/init.rb +++ b/vendor/built_in_modules/personal_seminar/init.rb @@ -2,7 +2,7 @@ module PersonalSeminar OrbitApp.registration "Seminar",:type=> 'ModuleApp' do base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_seminar/plugin/profile",:i18n=>'admin.personal_seminar' + personal_plugin :enable => true,:path=>"panel/personal_seminar/plugin/profile",:i18n=>'miss_plugin_i18n.personal_seminar' end From 47a63e3dab06016d543419f93354ae32b277c698 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Tue, 25 Dec 2012 10:45:08 +0800 Subject: [PATCH 16/44] fix widget. --- lib/parsers/parser_front_end.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index 1cf2bc23..119c2706 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -102,9 +102,19 @@ module ParserFrontEnd when 'text' ret << part.content_translations[locale.to_s] rescue '' when 'module_widget' - url = "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" + # url = "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" + # options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : 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}" + # ret << "
" + url = case part.widget_path + when 'default_widget' + "/panel/orbit_app/widget/\#{part.widget_style}?inner=true" + 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].blank? : 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}" - ret << "
" + ret << "" + when 'public_r_tag' ret << send("generate_#{part.public_r_tag}s", part.public_r_tag_object_id, page) else From ec791a6646b73ca5236d3dabe760d1dd2c3e1275 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Tue, 25 Dec 2012 10:45:33 +0800 Subject: [PATCH 17/44] keep zh_Tw alive --- config/locales/zh_tw.yml | 1761 +++++++++++++++++++------------------- 1 file changed, 880 insertions(+), 881 deletions(-) diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 083d77cf..972a1a77 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -1,905 +1,904 @@ -# zh_tw: +zh_tw: -# _locale: 中文 + _locale: 中文 -# access: -# denied: -# app: -# not_sub_manager: 拒絕存取,因你不是此應用程式次管理員 -# not_manager: 拒絕存取,因你不是此應用程式管理員 -# not_authed_user: 拒絕存取,因你不是此應用程式授權使用者 -# object: 拒絕存取,因你沒有權限 -# not_admin: 拒絕存取,因你不是此應用程式管理員 -# account_settings: 帳號設定 -# action: 操作 -# ad: -# chinese_1: 在套圖中出現次數 1次請輸入1 -# chinese_2: 輸入連結 -# chinese_3: 輸入標題 -# ab_fx: 轉場效果 -# add_link: Add a reference link -# banner_best_size: 輪播圖片尺寸 -# best_size: 最佳尺寸 -# best_size_example: "Ex: 500px x 300px" -# new_image: 新增輪播圖片 -# not_showing: 沒有顯示 -# picture_list: 圖片列表 -# sec_place_holder: 每張輪播圖片顯示秒數(3秒就請輸入3) -# select_fx: Select the effect type -# set_dates: Set the image to start and end dates -# set_range: Set the range time -# showing: 顯示中 -# success_destroy_ad_image: 刪除圖片成功 -# trans_unit_sec: 秒 -# transition_sec: 轉場單位時間 -# update_banner: 更新輪播 -# upload_pictures: Upload pictures -# widget_info_for_ad_image_size: "此區塊圖片尺寸使用: %{best_size}" -# ad_banner: 廣告輪播 -# add: 新增 -# add_attribute_field: Add attribute field -# add_image: Add image -# add_item: 新增項目 -# add_member: Add member -# add_more: Add more -# address_modal: -# default_title: 地址 -# street_address: 街道地址 -# city: 城市 -# county: 縣市 -# zip: 郵遞區號 -# country: 國家/地區 -# addthis_tools: -# add_to_bookmark: 加入書籤 -# admin: 管理員 -# all: All -# all_content: 所有內容 -# all_file: 所有檔案 -# all_member: 所有會員 -# all_plugin_summary: All plugin summary -# all_plugins: All plugins -# always_display_title: 永遠顯示標題 -# app_auth: -# list_setting_result: 授權列表 -# assigning_manager: -# add_manager_fail: 新增管理員失敗 -# add_manager_ok: 新增管理員成功 -# assigning_sub_manager: -# add_sub_manager_fail: 新增次管理員失敗 -# add_sub_manager_ok: 新增次管理員成功 -# can_not_add_this_user: 不能新增這個使用員 -# delete_manager: -# fail: 刪除管理員失敗 -# success: 刪除管理員成功 -# delete_sub_manager: -# fail: 刪除次管理員失敗 -# success: 刪除次管理員成功 -# failed_no_user: 失敗,不是使用者 -# operation_not_permitted: Operation not permitted -# approval: -# not_pass: 拒絕 -# not_pass_reason: 拒絕原因 -# pass: 已認可 -# setting: 審核設定 -# stat: 審核狀態 -# user_list: 使用者列表 -# approval_: 審核 -# archive: Archive -# asset: 資產 -# attributes: 屬性 -# auth: -# add_manager: 新增管理員 -# add_sub_manager: 新增次管理員 -# add_to_block_list: 增加到封鎖名單 -# add_to_privilege_list: 增加到特許名單 -# all_member: 所有會員 -# auth_by: -由%{user_display_name}授權 -# by_role: 用戶狀態 -# by_sub_role: 次用戶狀態 -# author: 作者 -# back: 回上一步 -# basic: 基本 -# browse: 瀏覽 -# built_in: Built-in -# calendar: Calendar -# cancel: 取消 -# cant_delete_self: 不可以刪除自己 -# cant_empty_star: 不能為空白 (*) -# cant_revoke_self_admin: 不可以撤銷自己的管理狀態 -# categories: 類別 -# category: 類別 -# category_auth: 類別授權 -# clear: 清除 -# close: Close -# content: 內容 -# courses: 開課數 -# create: -# error: -# link: 建立連結時出錯 -# page: 建立頁面時出錯 -# fail: 建立失敗 -# success: -# asset_category: 資產類別已成功建立 -# co_author: Co-author was successfully created. -# link: Link was successfully created. -# link: 連結已成功建立 -# page: 頁面已成功建立 -# user: 使用者已成功建立 -# create_: 建立 -# cross_lang: 跨語言輸入 -# data: 資料 -# date: -# calendar: 紀年法 -# range: 本欄為時間區段 -# format: 格式 -# tw_calendar: 民國 -# minguo_calendar: -# after: 民國 -# before: 民前 -# first_year: 民國元年 -# year: 年 -# month: 月 -# west_calendar: 西元 -# date_: Date -# dashboard: -# bulletin: 公告 -# news_bulletin: 新聞 -# page_context: 頁面 -# web_link: 鏈接 -# dashboard_: 儀表版 -# deadline: 最後期限 -# default: Default -# default_css: 預設樣式表 -# delete: -# file: 刪除檔案 -# success: -# paper: Paper was successfully deleted. -# delete_: 刪除 -# description: 描述 -# desktop: 桌面 -# disable: 關閉 -# disabled: Disabled -# dots: ●●●●●● -# download: 下載 -# downloaded: 已下載 -# edit: 編輯 -# editing: -# asset: 編輯資產 -# design: 編輯設計 -# link: 編輯連結 -# page: 編輯頁面 -# email: 電子郵件 -# enable: 開啟 -# enabled_for: 啟用 -# end: 結束 -# end_date: 結束日期 -# errors: -# at_least_one: 至少擁有一個值 -# file: -# size: 檔案大小 -# type: 檔案類型 -# upload: 上傳檔案 -# file_: 檔案 -# file_type: 檔案類型 -# followers: Followers -# forgot_password: 忘記密碼? -# frequency: 頻率 -# frontend_data_count: Frontend data count -# gallery: Gallery -# help: 幫助 -# hidden: 隱藏的 -# hide: 隱藏 -# hits: 點擊次數 -# homepage: 首頁 -# horizontal: 水平的 -# hot: 熱門 -# image: 圖片 -# images: Images -# info: 信息 -# initial: 起始值 -# intro: 簡介 -# is_published: 已發佈 -# item: 項目 -# item_name: Item name -# javascripts: Javascripts -# key: 索引 -# last_modified: 最後修改者 -# layout: 範本 -# link: 連結 -# list: -# ad_banner: 廣告輪播列表 -# asset: 資產列表 -# info: 使用者資訊列表 -# link: 連結列表 -# purchase: 已購買項目列表 -# role: 使用者角色列表 -# user: 使用者列表 -# list_: 列表 -# list_lower: 列表 -# lists: -# markups: -# text_field: 文字輸入框 -# select: 下拉選單 -# date: 日期 -# text_area: 文字輸入方塊 -# radio_button: 單選 -# checkbox: 多選 -# locale: Locale -# location: Location -# login: 登入 -# logout: 登出 -# mail: -# address: 電子郵件地址 -# authentication: 電子郵件認證 -# domain: 電子郵件網域名稱 -# enable_starttls_auto: 啟用安全通訊 -# password: 密碼 -# port: 電子郵件傳輸埠 -# setting: 電子郵件設定 -# tls: 電子郵件TLS -# user_name: 電子郵件帳號 -# manager: 管理者 -# manager: 管理者 -# markup: 輸入模式 -# markup_options: Markup options -# markup_value: Markup value -# me: Me -# member: 會員 -# menu_enabled_for: 選單啟用 -# module: Module -# module_authorization: 模組授權 -# more_plus: 更多+ -# most_visited_page: 最多瀏覽頁面 -# multilingual: 多語系 -# name: 名稱 -# need_home: You need a home page -# neutral_title: Neutral title -# neutral_for: Neutral for -# new: -# asset: 新增資產 -# banner: 新增橫幅 -# design: 新增設計 -# link: 新增連結 -# page: 新增頁面 -# user: 新增使用者 -# info: 新增使用者資訊 -# role: 新增使用者角色 -# new_: New -# news: 新聞 -# no_: "不是" -# no_deadline: 沒有期限 -# object_auth: -# a_object_must_have_only_one_object_auth_profile_for_each_action: '' -# list_title_of_users: 授權列表 -# new_object_auth: 新增授權 -# off_upcase: "開啟" -# on_upcase: "關閉" -# options: 選項 -# or_lower: 或 -# organization: 組織 -# page: 頁面 -# page_part_kinds: -# module_widget: 外掛模塊 -# public_r_tag: 系統模塊 -# text: 文字區域 -# passed: 通過審核 -# password: 密碼 -# password_confirmation: 確認密碼 -# pending: 待審核 -# picture: 圖片 -# placeholder: Placeholder -# plugins: Plugins -# postdate: 張貼日期 -# posted_by: 張貼人 -# preview: 預覽 -# profile: Profile -# publications: Publications -# purchase: 購買 -# quantity: 數量 -# quick_edit: 快速編輯 -# recent_update: 近期更新 -# referral_in_links: 參考連結 -# register: 註冊 -# registered: 已註冊 -# rejected: 拒絕 -# rejected_reason: '拒絕原因:' -# rejected_reason_empty: "拒絕核准, 沒有參考資訊" -# related_links: 相關連結 -# role: 身份 -# roles: 身份 -# ruling_site: 銳綸網站 -# search: -# domains: Google Search Domains -# not_found: "沒有搜尋結果" -# result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" -# sitesearch: 全站搜尋 -# too_many: "搜尋有關 ' %{search_word} '尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋?" -# unit_get: "列出由 :%{unit_name}發佈的資料,共有%{item_num}筆" -# search_: Search -# search_google: 搜尋Google -# setup_member: 會員設定 -# show: 顯示 -# show_mode: -# index: 清單 -# summary: 摘要 -# thumbnail: 縮圖 -# site: -# description: 網站描述 -# description_help: '' -# footer: 網站頁尾 -# footer_help: '' -# info: 網站資訊 -# keywords: 搜尋關鍵字 -# keywords_help: '' -# language: 網站語言 -# search: 網站搜尋 -# search_help: 請輸入送交Google搜尋的參數 -# settings: 基本設定 -# sub_menu: 次選單 -# title: 網站標題 -# title_help: '' -# site_: 網站 -# site_info: 網站資訊 -# sitemap: 網站地圖 -# site_name: 網站名稱 -# size: Size -# start: 開始 -# start_date: 開始日期 -# statistics: 統計資訊 -# status: 狀態 -# structure: 結構 -# sub_manager: 次管理員 -# subtitle: 副標題 -# submit: 送出 -# submit_approval: 送出已核准 -# submit_user_list: 送出使用者列表 -# sure?: "您確定嗎?" -# sys: -# can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示" -# limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}" -# module_page_lang_not_support: "很抱歉,此頁面沒有開放中文版本" -# not_previewable: "不支援預覽" -# preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp等圖片格式" -# sys_basic_form: 系統基本資料表 -# system_info: 系統資訊 -# tag_cloud: 標籤雲 -# tags: 標籤 -# template: 樣版 -# template_name: 樣版名稱 -# text: 內文 -# theme: 主題 -# themes: 主題 -# title: 標題 -# top: 置頂 -# total_visitors: 總計造訪人次 -# traffic: 流量 -# type: 類型 -# unit_name: 單位名稱 -# unzip_success: "App unzip procress is finished, please restart the server to apply effect" -# up_to_date: 最新版本 -# update: -# error: -# link: 更新連接時出錯 -# fail: 更新消息 -# success: -# co_author: Co-author was successfully updated. -# content: 內容已更新成功 -# link: 連結已更新成功 -# page: 頁面已更新成功 -# paper: Paper was successfully updated. -# user: User was successfully updated. -# success_: S使用者已更新成功 -# update_at: 最後更新時間 -# url: 網址 -# use_status: '' -# user: 使用者 -# version: 版本 -# vertical: 垂直的 -# view: 檢視 -# view_count: 查看次數 -# visitors_this_month: 本月造訪人次 -# visitors_this_week: 本星期造訪人次 -# visitors_this_year: 今年造訪人次 -# visitors_today: 今日造訪人次 -# yes_: "是" -# <<<<<<< HEAD -# ======= + access: + denied: + app: + not_sub_manager: 拒絕存取,因你不是此應用程式次管理員 + not_manager: 拒絕存取,因你不是此應用程式管理員 + not_authed_user: 拒絕存取,因你不是此應用程式授權使用者 + object: 拒絕存取,因你沒有權限 + not_admin: 拒絕存取,因你不是此應用程式管理員 + account_settings: 帳號設定 + action: 操作 + ad: + chinese_1: 在套圖中出現次數 1次請輸入1 + chinese_2: 輸入連結 + chinese_3: 輸入標題 + ab_fx: 轉場效果 + add_link: Add a reference link + banner_best_size: 輪播圖片尺寸 + best_size: 最佳尺寸 + best_size_example: "Ex: 500px x 300px" + new_image: 新增輪播圖片 + not_showing: 沒有顯示 + picture_list: 圖片列表 + sec_place_holder: 每張輪播圖片顯示秒數(3秒就請輸入3) + select_fx: Select the effect type + set_dates: Set the image to start and end dates + set_range: Set the range time + showing: 顯示中 + success_destroy_ad_image: 刪除圖片成功 + trans_unit_sec: 秒 + transition_sec: 轉場單位時間 + update_banner: 更新輪播 + upload_pictures: Upload pictures + widget_info_for_ad_image_size: "此區塊圖片尺寸使用: %{best_size}" + ad_banner: 廣告輪播 + add: 新增 + add_attribute_field: Add attribute field + add_image: Add image + add_item: 新增項目 + add_member: Add member + add_more: Add more + address_modal: + default_title: 地址 + street_address: 街道地址 + city: 城市 + county: 縣市 + zip: 郵遞區號 + country: 國家/地區 + addthis_tools: + add_to_bookmark: 加入書籤 + admin: 管理員 + all: All + all_content: 所有內容 + all_file: 所有檔案 + all_member: 所有會員 + all_plugin_summary: All plugin summary + all_plugins: All plugins + always_display_title: 永遠顯示標題 + app_auth: + list_setting_result: 授權列表 + assigning_manager: + add_manager_fail: 新增管理員失敗 + add_manager_ok: 新增管理員成功 + assigning_sub_manager: + add_sub_manager_fail: 新增次管理員失敗 + add_sub_manager_ok: 新增次管理員成功 + can_not_add_this_user: 不能新增這個使用員 + delete_manager: + fail: 刪除管理員失敗 + success: 刪除管理員成功 + delete_sub_manager: + fail: 刪除次管理員失敗 + success: 刪除次管理員成功 + failed_no_user: 失敗,不是使用者 + operation_not_permitted: Operation not permitted + approval: + not_pass: 拒絕 + not_pass_reason: 拒絕原因 + pass: 已認可 + setting: 審核設定 + stat: 審核狀態 + user_list: 使用者列表 + approval_: 審核 + archive: Archive + asset: 資產 + attributes: 屬性 + auth: + add_manager: 新增管理員 + add_sub_manager: 新增次管理員 + add_to_block_list: 增加到封鎖名單 + add_to_privilege_list: 增加到特許名單 + all_member: 所有會員 + auth_by: -由%{user_display_name}授權 + by_role: 用戶狀態 + by_sub_role: 次用戶狀態 + author: 作者 + back: 回上一步 + basic: 基本 + browse: 瀏覽 + built_in: Built-in + calendar: Calendar + cancel: 取消 + cant_delete_self: 不可以刪除自己 + cant_empty_star: 不能為空白 (*) + cant_revoke_self_admin: 不可以撤銷自己的管理狀態 + categories: 類別 + category: 類別 + category_auth: 類別授權 + clear: 清除 + close: Close + content: 內容 + courses: 開課數 + create: + error: + link: 建立連結時出錯 + page: 建立頁面時出錯 + fail: 建立失敗 + success: + asset_category: 資產類別已成功建立 + co_author: Co-author was successfully created. + link: Link was successfully created. + link: 連結已成功建立 + page: 頁面已成功建立 + user: 使用者已成功建立 + create_: 建立 + cross_lang: 跨語言輸入 + data: 資料 + date: + calendar: 紀年法 + range: 本欄為時間區段 + format: 格式 + tw_calendar: 民國 + minguo_calendar: + after: 民國 + before: 民前 + first_year: 民國元年 + year: 年 + month: 月 + west_calendar: 西元 + date_: Date + dashboard: + bulletin: 公告 + news_bulletin: 新聞 + page_context: 頁面 + web_link: 鏈接 + dashboard_: 儀表版 + deadline: 最後期限 + default: Default + default_css: 預設樣式表 + delete: + file: 刪除檔案 + success: + paper: Paper was successfully deleted. + delete_: 刪除 + description: 描述 + desktop: 桌面 + disable: 關閉 + disabled: Disabled + dots: ●●●●●● + download: 下載 + downloaded: 已下載 + edit: 編輯 + editing: + asset: 編輯資產 + design: 編輯設計 + link: 編輯連結 + page: 編輯頁面 + email: 電子郵件 + enable: 開啟 + enabled_for: 啟用 + end: 結束 + end_date: 結束日期 + errors: + at_least_one: 至少擁有一個值 + file: + size: 檔案大小 + type: 檔案類型 + upload: 上傳檔案 + file_: 檔案 + file_type: 檔案類型 + followers: Followers + forgot_password: 忘記密碼? + frequency: 頻率 + frontend_data_count: Frontend data count + gallery: Gallery + help: 幫助 + hidden: 隱藏的 + hide: 隱藏 + hits: 點擊次數 + homepage: 首頁 + horizontal: 水平的 + hot: 熱門 + image: 圖片 + images: Images + info: 信息 + initial: 起始值 + intro: 簡介 + is_published: 已發佈 + item: 項目 + item_name: Item name + javascripts: Javascripts + key: 索引 + last_modified: 最後修改者 + layout: 範本 + link: 連結 + list: + ad_banner: 廣告輪播列表 + asset: 資產列表 + info: 使用者資訊列表 + link: 連結列表 + purchase: 已購買項目列表 + role: 使用者角色列表 + user: 使用者列表 + list_: 列表 + list_lower: 列表 + lists: + markups: + text_field: 文字輸入框 + select: 下拉選單 + date: 日期 + text_area: 文字輸入方塊 + radio_button: 單選 + checkbox: 多選 + locale: Locale + location: Location + login: 登入 + logout: 登出 + mail: + address: 電子郵件地址 + authentication: 電子郵件認證 + domain: 電子郵件網域名稱 + enable_starttls_auto: 啟用安全通訊 + password: 密碼 + port: 電子郵件傳輸埠 + setting: 電子郵件設定 + tls: 電子郵件TLS + user_name: 電子郵件帳號 + manager: 管理者 + manager: 管理者 + markup: 輸入模式 + markup_options: Markup options + markup_value: Markup value + me: Me + member: 會員 + menu_enabled_for: 選單啟用 + module: Module + module_authorization: 模組授權 + more_plus: 更多+ + most_visited_page: 最多瀏覽頁面 + multilingual: 多語系 + name: 名稱 + need_home: You need a home page + neutral_title: Neutral title + neutral_for: Neutral for + new: + asset: 新增資產 + banner: 新增橫幅 + design: 新增設計 + link: 新增連結 + page: 新增頁面 + user: 新增使用者 + info: 新增使用者資訊 + role: 新增使用者角色 + new_: New + news: 新聞 + no_: "不是" + no_deadline: 沒有期限 + object_auth: + a_object_must_have_only_one_object_auth_profile_for_each_action: '' + list_title_of_users: 授權列表 + new_object_auth: 新增授權 + off_upcase: "開啟" + on_upcase: "關閉" + options: 選項 + or_lower: 或 + organization: 組織 + page: 頁面 + page_part_kinds: + module_widget: 外掛模塊 + public_r_tag: 系統模塊 + text: 文字區域 + passed: 通過審核 + password: 密碼 + password_confirmation: 確認密碼 + pending: 待審核 + picture: 圖片 + placeholder: Placeholder + plugins: Plugins + postdate: 張貼日期 + posted_by: 張貼人 + preview: 預覽 + profile: Profile + publications: Publications + purchase: 購買 + quantity: 數量 + quick_edit: 快速編輯 + recent_update: 近期更新 + referral_in_links: 參考連結 + register: 註冊 + registered: 已註冊 + rejected: 拒絕 + rejected_reason: '拒絕原因:' + rejected_reason_empty: "拒絕核准, 沒有參考資訊" + related_links: 相關連結 + role: 身份 + roles: 身份 + ruling_site: 銳綸網站 + search: + domains: Google Search Domains + not_found: "沒有搜尋結果" + result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" + sitesearch: 全站搜尋 + too_many: "搜尋有關 ' %{search_word} '尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋?" + unit_get: "列出由 :%{unit_name}發佈的資料,共有%{item_num}筆" + search_: Search + search_google: 搜尋Google + setup_member: 會員設定 + show: 顯示 + show_mode: + index: 清單 + summary: 摘要 + thumbnail: 縮圖 + site: + description: 網站描述 + description_help: '' + footer: 網站頁尾 + footer_help: '' + info: 網站資訊 + keywords: 搜尋關鍵字 + keywords_help: '' + language: 網站語言 + search: 網站搜尋 + search_help: 請輸入送交Google搜尋的參數 + settings: 基本設定 + sub_menu: 次選單 + title: 網站標題 + title_help: '' + site_: 網站 + site_info: 網站資訊 + sitemap: 網站地圖 + site_name: 網站名稱 + size: Size + start: 開始 + start_date: 開始日期 + statistics: 統計資訊 + status: 狀態 + structure: 結構 + sub_manager: 次管理員 + subtitle: 副標題 + submit: 送出 + submit_approval: 送出已核准 + submit_user_list: 送出使用者列表 + sure?: "您確定嗎?" + sys: + can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示" + limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}" + module_page_lang_not_support: "很抱歉,此頁面沒有開放中文版本" + not_previewable: "不支援預覽" + preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp等圖片格式" + sys_basic_form: 系統基本資料表 + system_info: 系統資訊 + tag_cloud: 標籤雲 + tags: 標籤 + template: 樣版 + template_name: 樣版名稱 + text: 內文 + theme: 主題 + themes: 主題 + title: 標題 + top: 置頂 + total_visitors: 總計造訪人次 + traffic: 流量 + type: 類型 + unit_name: 單位名稱 + unzip_success: "App unzip procress is finished, please restart the server to apply effect" + up_to_date: 最新版本 + update: + error: + link: 更新連接時出錯 + fail: 更新消息 + success: + co_author: Co-author was successfully updated. + content: 內容已更新成功 + link: 連結已更新成功 + page: 頁面已更新成功 + paper: Paper was successfully updated. + user: User was successfully updated. + success_: S使用者已更新成功 + update_at: 最後更新時間 + url: 網址 + use_status: '' + user: 使用者 + version: 版本 + vertical: 垂直的 + view: 檢視 + view_count: 查看次數 + visitors_this_month: 本月造訪人次 + visitors_this_week: 本星期造訪人次 + visitors_this_year: 今年造訪人次 + visitors_today: 今日造訪人次 + yes_: "是" -# nccu: -# date: 起迄日期 -# file: 附加檔案 -# file_description: 檔案描述 -# file_name: 檔案名稱 -# link_name: 連結名稱 -# picture: 刊頭圖片 -# selected_file: 選擇檔案 -# tags: 頁籤 -# url: 連結位置 + + nccu: + date: 起迄日期 + file: 附加檔案 + file_description: 檔案描述 + file_name: 檔案名稱 + link_name: 連結名稱 + picture: 刊頭圖片 + selected_file: 選擇檔案 + tags: 頁籤 + url: 連結位置 -# # : <<<<<<< HEAD -# # : ======= -# errors: -# at_least_one: 必須至少有一個值 -# admin: -# infos: -# add_attribute_field: 新增 -# save: 儲存 -# initial: 起始值 -# markup: 輸入模式 -# item_name: 資料表名稱 -# name: 名稱 -# options: 選項 -# :cross_lang: 跨語言輸入 -# add_more: 使用者可自行延伸欄位 -# add: 新增 -# placeholder: 輸入協助 -# type: 類型 -# placeholder: 提示內容 -# list: 自定選單 -# is_range: 是 -# not_range: 否 -# date: -# claendar: 紀年法 -# range: 本欄為時間區段 -# format: 格式 -# tw_claendar: 民國 -# minguo_calendar: -# after: 民國 -# before: 民前 -# first_year: 民國元年 -# year: 年 -# month: 月 -# west_claendar: 西元 -# access: -# denied: -# app: -# not_sub_manager: 拒絕存取因你不是此應用程式次管理員 -# not_manager: 拒絕存取因你不是此應用程式管理員 -# not_authed_user: 拒絕存取因你不是此應用程式授權使用者 -# not_admin: 拒絕存取因你不是此應用程式次管理員 -# object: 拒絕存取因你不是網站管理者 -# action: 操作 -# ad_banner: 廣告輪播 -# orbit_gallery: 活動花絮 -# ad: -# sec_place_holder: 3秒請輸入3 -# ab_fx: 轉場特效 -# all_banners: 輪播清單 -# banner_best_size: Banner 尺寸 -# best_size: 最佳尺寸 -# cate_auth: 分類授權 -# delete_banner: 刪除整組輪播 -# new_banner: 新增輪播 -# new_image: 新增橫幅 -# showing: 顯示中 -# not_showing: 沒有顯示 -# picture_list: 圖片列表 -# title: 標題 -# transition_sec: 轉場單位時間 -# trans_unit_sec: 秒 -# update_banner: 更新輪播 -# widget_info_for_ad_image_size: "此區塊圖片尺寸請使用 %{best_size}" -# add: 新增 -# add_item: 新增項目 -# add_language: 新增語言 -# add_drop_down_item: +增加Orbit選單 -# admin: 網站管理者 -# all_articles: 列表 -# always_display_title: 永遠顯示於標題列 -# announcement: 公告管理 -# asset: 資產 -# assets: -# file: 檔案 -# album: 相簿 -# video: 影片 -# book: 書籍 -# attributes: 屬性 -# author: 作者 -# calendar: 行事曆 -# cant_delete_self: 您不可以刪除自己。 -# cant_revoke_self_admin: 您不可以撤銷自己的管理身份。 -# category: 類別 -# choose_file: 請選擇一個文件... -# class: 階級 -# content: 內容 -# contenteditable: -# update_done: 更新完成 -# update_failed: 更新失敗 -# create_error_link: 新增連接時出錯。 -# create_error_page: 新增頁面時出錯。 -# create_success_home: 首頁已成功新增。 -# create_success_layout: 樣板已成功新增。 -# create_success_link: 連結已成功新增。 -# create_success_page: 頁面已成功新增。 -# create_success_home: 首頁已成功新增。 -# create_success_layout: 佈局已成功新增。 -# create_success_link: 連結已成功新增。 -# create_success_page: 頁面已成功新增。 -# create_success_snippet: 片段已成功新增。 -# create_success_user: 用戶已成功新增。。 -# dashboard: 儀表板 -# data: 選擇檔案 -# delete_language: 刪除語言 -# description: 描述 -# design: 版型管理 -# disable_language: 禁用語言 -# edit: 編輯 -# editing_home: 編輯首頁 -# editing_layout: 編輯樣板 -# editing_link: 編輯連結 -# editing_page: 編輯頁面 -# editing_snippet: 編輯片段 -# editing_info: 編輯用戶資料 -# editing_role: 編輯用戶身份 -# email: Email -# enable_language: 啟用語言 -# enabled_for: 啟用 -# file_name: 檔名 -# file_size: 檔案大小 -# file_upload: 文件上載 -# format: 格式 -# home: 首頁 -# id: ID -# info: 資料 -# intro: 簡介 -# is_published: 被出版 -# item: 網站架構 -# key: 關鍵 -# keywords: 關鍵字 -# language: 語言 -# layout: 佈局 -# layout_name: 佈局名字 -# link: 連結管理 -# links: 網路資源 -# list_assets: 資產列表 -# list_designs: 設計列表 -# list_items: 項目列表 -# list_puchases: 購買清單 -# list_snippets: 斷片列表 -# list_users: 使用列表 -# list_infos: 用戶資料列表 -# list_roles: 用戶身份列表 -# mail_address: 郵件地址 -# mail_port: 傳輸埠 -# mail_domain: 網域名稱 -# mail_authentication: 認證 -# mail_user_name: 帳號 -# mail_password: 密碼 -# mail_tls: TLS -# mail_enable_starttls_auto: Enable Start TLS Auto -# member: 會員 -# menu_enabled_for: 選單啟用 -# module: -# authorization: 模組授權 -# move_down: 往下移 -# move_up: 往上移 -# multilingual: 多種語言 -# my_avatar: 我的頭像 -# no_home_page: 您沒有首頁 -# no_layout: 您沒有佈局 -# name: 名稱 -# new_admin: -# side_bar: -# all_user: 所有使用者 -# add_user: 新增使用者 -# user_roles: 角色 -# user_info: 使用者資訊 -# user: 會員 -# users: -# all_plugin_summary: 全部 -# profile: 基本資料 -# roles: -# staff: 職員資料 -# student: 學生資料 -# teacher: 教師資料 -# action: -# add: 新增 -# edit: 編輯 -# delete: 刪除 -# quick_edit: 快速編輯 -# next: 下一頁 -# prev: 上一頁 -# attributes: -# roles: 角色 -# name: 名稱 -# publications: 出版數 -# courses: 開課數 -# followers: 被關注數 -# show_mode: -# index: 清單 -# summary: 摘要 -# thumbnail: 縮圖 -# table_header: -# status: 狀態 -# category: 分類 -# tags: 標籤 -# clear_filter: 重置 -# new_asset: 新增資產 -# new_component: 新增元件 -# new_design: 新設計 -# new_home: 新增首頁 -# new_layout: 新增樣板 -# new_link: 新增連結 -# new_page: 新增頁面 -# new_snippet: 新增片段 -# new_user: 新增使用 -# new_info: 新增用戶資料 -# new_role: 新增用戶身份 -# news: 新聞 -# non_multilingual: -# object_auth: -# list_title_of_users: 授權清單-%{auth_title} -# update_done: 更新完成,結果顯示於清單 -# update_failed: 更新失敗 -# options: 選項 -# orig_upload_file: 原上傳檔名 -# page: 頁面管理 -# page_context: -# edit: 編輯 -# ob_auth: -# edit: 分類授權 -# page_part_kinds: -# text: 文字區塊 -# public_r_tag: 系統模塊 -# module_widget: 外掛模塊 -# position: 位置 -# published?: 發布? -# purchase: 購買 -# role: 身份 -# roles: 身份 -# site_description: 網站描述 -# site_footer: 網站頁尾 -# site_settings: 基本設定 -# site_sub_menu: 網站次選單 -# site_title: 網站標題 -# setup_member: 成員設置 -# setup_translations: 語系設定 -# setup_designs: 版型設定 -# site: 網站 -# site_setting: 網站設定 -# super_pages: 可編頁面 -# structure: 網站結構 -# tags: 標籤 -# title: 標題 -# translation: 翻譯 -# type: 類型 -# up_to_date: 最新版本 -# update_error_link: 更新鏈接時出現錯誤。 -# update_error_page: 更新頁面時出現錯誤。 -# update_success_content: 內容已成功更新。 -# update_success_home: 首頁已成功更新。 -# update_success_layout: 樣板已成功更新。 -# update_success_link: 連結已成功更新。 -# update_success_page: 頁面已成功更新。 -# update_success_snippet: 片段已成功更新。 -# update_success_user: 用戶已成功更新 -# upload_design: 上傳設計 -# url: URL -# user: 用戶 -# user_new_interface: -# sys_basic_form: 系統基本資料表 -# password: 密碼 -# password_confirmation: 確認密碼 -# email: 使用者帳號信箱 -# user_role: -# auth: -# all_member: 所有會員 -# manager: 管理員 -# sub_manager: 次管理員 -# by_role: 根據身份 -# by_sub_role: 根據次身份 -# block_list: 封鎖名單 -# add_manager: 增加到管理員 -# add_sub_manager: 增加到次管理員 -# add_to_block_list: 封鎖名單 -# add_to_privilege_list: 特許名單 -# auth_by: -由%{user_display_name}授權 -# user: 使用會員 -# info: 用戶資料 -# panel: 用戶面板 -# role: 用戶身份 +# : <<<<<<< HEAD +# : ======= + errors: + at_least_one: 必須至少有一個值 + admin: + infos: + add_attribute_field: 新增 + save: 儲存 + initial: 起始值 + markup: 輸入模式 + item_name: 資料表名稱 + name: 名稱 + options: 選項 + :cross_lang: 跨語言輸入 + add_more: 使用者可自行延伸欄位 + add: 新增 + placeholder: 輸入協助 + type: 類型 + placeholder: 提示內容 + list: 自定選單 + is_range: 是 + not_range: 否 + date: + claendar: 紀年法 + range: 本欄為時間區段 + format: 格式 + tw_claendar: 民國 + minguo_calendar: + after: 民國 + before: 民前 + first_year: 民國元年 + year: 年 + month: 月 + west_claendar: 西元 + access: + denied: + app: + not_sub_manager: 拒絕存取因你不是此應用程式次管理員 + not_manager: 拒絕存取因你不是此應用程式管理員 + not_authed_user: 拒絕存取因你不是此應用程式授權使用者 + not_admin: 拒絕存取因你不是此應用程式次管理員 + object: 拒絕存取因你不是網站管理者 + action: 操作 + ad_banner: 廣告輪播 + orbit_gallery: 活動花絮 + ad: + sec_place_holder: 3秒請輸入3 + ab_fx: 轉場特效 + all_banners: 輪播清單 + banner_best_size: Banner 尺寸 + best_size: 最佳尺寸 + cate_auth: 分類授權 + delete_banner: 刪除整組輪播 + new_banner: 新增輪播 + new_image: 新增橫幅 + showing: 顯示中 + not_showing: 沒有顯示 + picture_list: 圖片列表 + title: 標題 + transition_sec: 轉場單位時間 + trans_unit_sec: 秒 + update_banner: 更新輪播 + widget_info_for_ad_image_size: "此區塊圖片尺寸請使用 %{best_size}" + add: 新增 + add_item: 新增項目 + add_language: 新增語言 + add_drop_down_item: +增加Orbit選單 + admin: 網站管理者 + all_articles: 列表 + always_display_title: 永遠顯示於標題列 + announcement: 公告管理 + asset: 資產 + assets: + file: 檔案 + album: 相簿 + video: 影片 + book: 書籍 + attributes: 屬性 + author: 作者 + calendar: 行事曆 + cant_delete_self: 您不可以刪除自己。 + cant_revoke_self_admin: 您不可以撤銷自己的管理身份。 + category: 類別 + choose_file: 請選擇一個文件... + class: 階級 + content: 內容 + contenteditable: + update_done: 更新完成 + update_failed: 更新失敗 + create_error_link: 新增連接時出錯。 + create_error_page: 新增頁面時出錯。 + create_success_home: 首頁已成功新增。 + create_success_layout: 樣板已成功新增。 + create_success_link: 連結已成功新增。 + create_success_page: 頁面已成功新增。 + create_success_home: 首頁已成功新增。 + create_success_layout: 佈局已成功新增。 + create_success_link: 連結已成功新增。 + create_success_page: 頁面已成功新增。 + create_success_snippet: 片段已成功新增。 + create_success_user: 用戶已成功新增。。 + dashboard: 儀表板 + data: 選擇檔案 + delete_language: 刪除語言 + description: 描述 + design: 版型管理 + disable_language: 禁用語言 + edit: 編輯 + editing_home: 編輯首頁 + editing_layout: 編輯樣板 + editing_link: 編輯連結 + editing_page: 編輯頁面 + editing_snippet: 編輯片段 + editing_info: 編輯用戶資料 + editing_role: 編輯用戶身份 + email: Email + enable_language: 啟用語言 + enabled_for: 啟用 + file_name: 檔名 + file_size: 檔案大小 + file_upload: 文件上載 + format: 格式 + home: 首頁 + id: ID + info: 資料 + intro: 簡介 + is_published: 被出版 + item: 網站架構 + key: 關鍵 + keywords: 關鍵字 + language: 語言 + layout: 佈局 + layout_name: 佈局名字 + link: 連結管理 + links: 網路資源 + list_assets: 資產列表 + list_designs: 設計列表 + list_items: 項目列表 + list_puchases: 購買清單 + list_snippets: 斷片列表 + list_users: 使用列表 + list_infos: 用戶資料列表 + list_roles: 用戶身份列表 + mail_address: 郵件地址 + mail_port: 傳輸埠 + mail_domain: 網域名稱 + mail_authentication: 認證 + mail_user_name: 帳號 + mail_password: 密碼 + mail_tls: TLS + mail_enable_starttls_auto: Enable Start TLS Auto + member: 會員 + menu_enabled_for: 選單啟用 + module: + authorization: 模組授權 + move_down: 往下移 + move_up: 往上移 + multilingual: 多種語言 + my_avatar: 我的頭像 + no_home_page: 您沒有首頁 + no_layout: 您沒有佈局 + name: 名稱 + new_admin: + side_bar: + all_user: 所有使用者 + add_user: 新增使用者 + user_roles: 角色 + user_info: 使用者資訊 + user: 會員 + users: + all_plugin_summary: 全部 + profile: 基本資料 + roles: + staff: 職員資料 + student: 學生資料 + teacher: 教師資料 + action: + add: 新增 + edit: 編輯 + delete: 刪除 + quick_edit: 快速編輯 + next: 下一頁 + prev: 上一頁 + attributes: + roles: 角色 + name: 名稱 + publications: 出版數 + courses: 開課數 + followers: 被關注數 + show_mode: + index: 清單 + summary: 摘要 + thumbnail: 縮圖 + table_header: + status: 狀態 + category: 分類 + tags: 標籤 + clear_filter: 重置 + new_asset: 新增資產 + new_component: 新增元件 + new_design: 新設計 + new_home: 新增首頁 + new_layout: 新增樣板 + new_link: 新增連結 + new_page: 新增頁面 + new_snippet: 新增片段 + new_user: 新增使用 + new_info: 新增用戶資料 + new_role: 新增用戶身份 + news: 新聞 + non_multilingual: + object_auth: + list_title_of_users: 授權清單-%{auth_title} + update_done: 更新完成,結果顯示於清單 + update_failed: 更新失敗 + options: 選項 + orig_upload_file: 原上傳檔名 + page: 頁面管理 + page_context: + edit: 編輯 + ob_auth: + edit: 分類授權 + page_part_kinds: + text: 文字區塊 + public_r_tag: 系統模塊 + module_widget: 外掛模塊 + position: 位置 + published?: 發布? + purchase: 購買 + role: 身份 + roles: 身份 + site_description: 網站描述 + site_footer: 網站頁尾 + site_settings: 基本設定 + site_sub_menu: 網站次選單 + site_title: 網站標題 + setup_member: 成員設置 + setup_translations: 語系設定 + setup_designs: 版型設定 + site: 網站 + site_setting: 網站設定 + super_pages: 可編頁面 + structure: 網站結構 + tags: 標籤 + title: 標題 + translation: 翻譯 + type: 類型 + up_to_date: 最新版本 + update_error_link: 更新鏈接時出現錯誤。 + update_error_page: 更新頁面時出現錯誤。 + update_success_content: 內容已成功更新。 + update_success_home: 首頁已成功更新。 + update_success_layout: 樣板已成功更新。 + update_success_link: 連結已成功更新。 + update_success_page: 頁面已成功更新。 + update_success_snippet: 片段已成功更新。 + update_success_user: 用戶已成功更新 + upload_design: 上傳設計 + url: URL + user: 用戶 + user_new_interface: + sys_basic_form: 系統基本資料表 + password: 密碼 + password_confirmation: 確認密碼 + email: 使用者帳號信箱 + user_role: + auth: + all_member: 所有會員 + manager: 管理員 + sub_manager: 次管理員 + by_role: 根據身份 + by_sub_role: 根據次身份 + block_list: 封鎖名單 + add_manager: 增加到管理員 + add_sub_manager: 增加到次管理員 + add_to_block_list: 封鎖名單 + add_to_privilege_list: 特許名單 + auth_by: -由%{user_display_name}授權 + user: 使用會員 + info: 用戶資料 + panel: 用戶面板 + role: 用戶身份 -# dashboard: -# bulletin: 公告 -# news_bulletin: 新聞 -# page_context: 頁面 -# web_link: 鏈接 + dashboard: + bulletin: 公告 + news_bulletin: 新聞 + page_context: 頁面 + web_link: 鏈接 -# panel: + panel: -# # : >>>>>>> various_bugs -# # Chinese (Taiwan) translations for Ruby on Rails -# # by tsechingho (http://github.com/tsechingho) -# date: -# formats: -# default: "%Y-%m-%d" -# short: "%b%d日" -# long: "%Y年%b%d日" -# day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六] -# abbr_day_names: [日, 一, 二, 三, 四, 五, 六] -# month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月] -# abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月] -# order: [ :year, :month, :day ] +# : >>>>>>> various_bugs +# Chinese (Taiwan) translations for Ruby on Rails +# by tsechingho (http://github.com/tsechingho) + date: + formats: + default: "%Y-%m-%d" + short: "%b%d日" + long: "%Y年%b%d日" + day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六] + abbr_day_names: [日, 一, 二, 三, 四, 五, 六] + month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月] + abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月] + order: [ :year, :month, :day ] -# time: -# formats: -# default: "%Y年%b%d日 %A %H:%M:%S %Z" -# short: "%b%d日 %H:%M" -# long: "%Y年%b%d日 %H:%M" -# am: "上午" -# pm: "下午" + time: + formats: + default: "%Y年%b%d日 %A %H:%M:%S %Z" + short: "%b%d日 %H:%M" + long: "%Y年%b%d日 %H:%M" + am: "上午" + pm: "下午" -# datetime: -# distance_in_words: -# half_a_minute: "半分鐘" -# less_than_x_seconds: -# one: "不到一秒" -# other: "不到 %{count} 秒" -# x_seconds: -# one: "一秒" -# other: "%{count} 秒" -# less_than_x_minutes: -# one: "不到一分鐘" -# other: "不到 %{count} 分鐘" -# x_minutes: -# one: "一分鐘" -# other: "%{count} 分鐘" -# about_x_hours: -# one: "大約一小時" -# other: "大約 %{count} 小時" -# x_days: -# one: "一天" -# other: "%{count} 天" -# about_x_months: -# one: "大約一個月" -# other: "大約 %{count} 個月" -# x_months: -# one: "一個月" -# other: "%{count} 個月" -# about_x_years: -# one: "大約一年" -# other: "大約 %{count} 年" -# over_x_years: -# one: "一年多" -# other: "%{count} 年多" -# almost_x_years: -# one: "接近一年" -# other: "接近 %{count} 年" -# prompts: -# year: "年" -# month: "月" -# day: "日" -# hour: "時" -# minute: "分" -# second: "秒" + datetime: + distance_in_words: + half_a_minute: "半分鐘" + less_than_x_seconds: + one: "不到一秒" + other: "不到 %{count} 秒" + x_seconds: + one: "一秒" + other: "%{count} 秒" + less_than_x_minutes: + one: "不到一分鐘" + other: "不到 %{count} 分鐘" + x_minutes: + one: "一分鐘" + other: "%{count} 分鐘" + about_x_hours: + one: "大約一小時" + other: "大約 %{count} 小時" + x_days: + one: "一天" + other: "%{count} 天" + about_x_months: + one: "大約一個月" + other: "大約 %{count} 個月" + x_months: + one: "一個月" + other: "%{count} 個月" + about_x_years: + one: "大約一年" + other: "大約 %{count} 年" + over_x_years: + one: "一年多" + other: "%{count} 年多" + almost_x_years: + one: "接近一年" + other: "接近 %{count} 年" + prompts: + year: "年" + month: "月" + day: "日" + hour: "時" + minute: "分" + second: "秒" -# number: -# format: -# separator: "." -# delimiter: "," -# precision: 3 -# significant: false -# strip_insignificant_zeros: false -# currency: -# format: -# format: "%u %n" -# unit: "NT$" -# separator: "." -# delimiter: "," -# precision: 2 -# significant: false -# strip_insignificant_zeros: false -# percentage: -# format: -# delimiter: "" -# precision: -# format: -# delimiter: "" -# human: -# format: -# delimiter: "" -# precision: 1 -# significant: false -# strip_insignificant_zeros: false -# storage_units: -# format: "%n %u" -# units: -# byte: -# one: "Byte" -# other: "Bytes" -# kb: "KB" -# mb: "MB" -# gb: "GB" -# tb: "TB" -# decimal_units: -# format: "%n %u" -# units: -# # 10^-21 zepto, 10^-24 yocto -# atto: "渺" # 10^-18 -# femto: "飛" # 10^-15 毫微微 -# pico: "漠" # 10^-12 微微 -# nano: "奈" # 10^-9 毫微 -# micro: "微" # 10^-6 -# mili: "毫" # 10^-3 milli -# centi: "厘" # 10^-2 -# deci: "分" # 10^-1 -# unit: "" -# ten: -# one: "十" -# other: "十" # 10^1 -# hundred: "百" # 10^2 -# thousand: "千" # 10^3 kilo -# million: "百萬" # 10^6 mega -# billion: "十億" # 10^9 giga -# trillion: "兆" # 10^12 tera -# quadrillion: "千兆" # 10^15 peta -# # 10^18 exa, 10^21 zetta, 10^24 yotta + number: + format: + separator: "." + delimiter: "," + precision: 3 + significant: false + strip_insignificant_zeros: false + currency: + format: + format: "%u %n" + unit: "NT$" + separator: "." + delimiter: "," + precision: 2 + significant: false + strip_insignificant_zeros: false + percentage: + format: + delimiter: "" + precision: + format: + delimiter: "" + human: + format: + delimiter: "" + precision: 1 + significant: false + strip_insignificant_zeros: false + storage_units: + format: "%n %u" + units: + byte: + one: "Byte" + other: "Bytes" + kb: "KB" + mb: "MB" + gb: "GB" + tb: "TB" + decimal_units: + format: "%n %u" + units: + # 10^-21 zepto, 10^-24 yocto + atto: "渺" # 10^-18 + femto: "飛" # 10^-15 毫微微 + pico: "漠" # 10^-12 微微 + nano: "奈" # 10^-9 毫微 + micro: "微" # 10^-6 + mili: "毫" # 10^-3 milli + centi: "厘" # 10^-2 + deci: "分" # 10^-1 + unit: "" + ten: + one: "十" + other: "十" # 10^1 + hundred: "百" # 10^2 + thousand: "千" # 10^3 kilo + million: "百萬" # 10^6 mega + billion: "十億" # 10^9 giga + trillion: "兆" # 10^12 tera + quadrillion: "千兆" # 10^15 peta + # 10^18 exa, 10^21 zetta, 10^24 yotta -# support: -# array: -# words_connector: ", " -# two_words_connector: " 和 " -# last_word_connector: ", 和 " -# select: -# prompt: "請選擇" + support: + array: + words_connector: ", " + two_words_connector: " 和 " + last_word_connector: ", 和 " + select: + prompt: "請選擇" -# search: -# not_found: "沒有搜尋結果" -# domains: Google Search Domains -# site_search: "全站搜尋" -# sitesearch: Google Site Search -# site_setting_help: 請輸入送交Google搜尋的參數 -# result_get: "搜尋有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" -# too_many: "搜尋有關 ' %{search_word} ' 尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋" + search: + not_found: "沒有搜尋結果" + domains: Google Search Domains + site_search: "全站搜尋" + sitesearch: Google Site Search + site_setting_help: 請輸入送交Google搜尋的參數 + result_get: "搜尋有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" + too_many: "搜尋有關 ' %{search_word} ' 尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋" -# result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" -# unit_get: "列出由:%{unit_name}發佈的資料,共有%{item_num}筆" -# activerecord: -# errors: -# template: # ~ 2.3.5 backward compatible -# header: -# one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" -# other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" -# body: "以下欄位發生問題:" -# full_messages: -# format: "%{attribute} %{message}" -# messages: -# inclusion: "沒有包含在列表中" -# exclusion: "是被保留的關鍵字" -# invalid: "是無效的" -# confirmation: "不符合確認值" -# accepted: "必須是可被接受的" -# empty: "不能留空" -# blank: "不能是空白字元" -# too_long: "過長(最長是 %{count} 個字)" -# too_short: "過短(最短是 %{count} 個字)" -# wrong_length: "字數錯誤(必須是 %{count} 個字)" -# not_a_number: "不是數字" -# not_an_integer: "必須是整數" -# greater_than: "必須大於 %{count}" -# greater_than_or_equal_to: "必須大於或等於 %{count}" -# equal_to: "必須等於 %{count}" -# less_than: "必須小於 %{count}" -# less_than_or_equal_to: "必須小於或等於 %{count}" -# odd: "必須是奇數" -# even: "必須是偶數" -# taken: "已經被使用" -# record_invalid: "校驗失敗: %{errors}" + result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料" + unit_get: "列出由:%{unit_name}發佈的資料,共有%{item_num}筆" + activerecord: + errors: + template: # ~ 2.3.5 backward compatible + header: + one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" + other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" + body: "以下欄位發生問題:" + full_messages: + format: "%{attribute} %{message}" + messages: + inclusion: "沒有包含在列表中" + exclusion: "是被保留的關鍵字" + invalid: "是無效的" + confirmation: "不符合確認值" + accepted: "必須是可被接受的" + empty: "不能留空" + blank: "不能是空白字元" + too_long: "過長(最長是 %{count} 個字)" + too_short: "過短(最短是 %{count} 個字)" + wrong_length: "字數錯誤(必須是 %{count} 個字)" + not_a_number: "不是數字" + not_an_integer: "必須是整數" + greater_than: "必須大於 %{count}" + greater_than_or_equal_to: "必須大於或等於 %{count}" + equal_to: "必須等於 %{count}" + less_than: "必須小於 %{count}" + less_than_or_equal_to: "必須小於或等於 %{count}" + odd: "必須是奇數" + even: "必須是偶數" + taken: "已經被使用" + record_invalid: "校驗失敗: %{errors}" -# activemodel: -# errors: -# template: -# header: -# one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" -# other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" -# body: "以下欄位發生問題:" + activemodel: + errors: + template: + header: + one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" + other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" + body: "以下欄位發生問題:" errors: format: "%{attribute} %{message}" From 2dd2368378211bca2c4632d5aff9a60ba9bd82d8 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Tue, 25 Dec 2012 11:26:23 +0800 Subject: [PATCH 18/44] remove merge marks --- config/locales/zh_tw.yml | 4 ---- vendor/built_in_modules/archive/init.rb | 8 ++++---- .../built_in_modules/miss_module/config/locales/zh_tw.yml | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 3ea48c90..9c087807 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -342,10 +342,6 @@ zh_tw: visitors_today: 今日造訪人次 yes_: "是" -<<<<<<< HEAD - -======= ->>>>>>> 858e942da234fffa3053a995231f2b0d9eee43d1 nccu: date: 起迄日期 file: 附加檔案 diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb index 15e83978..5efd18f7 100644 --- a/vendor/built_in_modules/archive/init.rb +++ b/vendor/built_in_modules/archive/init.rb @@ -2,11 +2,11 @@ module Archive OrbitApp.registration "Archive",:type=> 'ModuleApp' do module_label 'miss_module_i18n.archive' base_url File.expand_path File.dirname(__FILE__) -<<<<<<< HEAD + personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'miss_plugin_i18n.archive' -======= - personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'admin.archive' ->>>>>>> 858e942da234fffa3053a995231f2b0d9eee43d1 +# ======= +# personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'admin.archive' +# >>>>>>> 858e942da234fffa3053a995231f2b0d9eee43d1 version "0.1" organization "Rulingcom" 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 c8108e3c..18cbc760 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 @@ -8,7 +8,8 @@ zh_tw: calendars: 日曆 gallery: 相簿 location: Location -<<<<<<< HEAD + + miss_plugin_i18n: personal_book: Personal Book personal_diploma: Personal Diploma @@ -20,5 +21,4 @@ zh_tw: personal_project: Personal Project personal_research: Personal Research personal_seminar: Personal Seminar -======= ->>>>>>> 858e942da234fffa3053a995231f2b0d9eee43d1 + From 9edf0dca54cdda5c7d78ec4353075b9c066ebeeb Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Wed, 16 Jan 2013 14:07:09 +0800 Subject: [PATCH 19/44] ika re-redesign module widget --- .../admin/default_widget_setting.css | 20 ++++++---- app/helpers/application_helper.rb | 10 ++++- .../_custom_widget_setting.html.erb | 31 +++++++++------ .../_default_widget_setting.html.erb | 9 ++++- .../_default_widget_style_panel.html.erb | 21 ++++++---- app/views/admin/page_parts/_edit.html.erb | 10 +++-- .../admin/page_parts/_module_widget.html.erb | 39 ++++++++++++------- .../_widget_data_source_category.html.erb | 4 +- .../_widget_data_source_tag.html.erb | 4 +- 9 files changed, 97 insertions(+), 51 deletions(-) diff --git a/app/assets/stylesheets/admin/default_widget_setting.css b/app/assets/stylesheets/admin/default_widget_setting.css index e68bb3aa..8bbe4a50 100644 --- a/app/assets/stylesheets/admin/default_widget_setting.css +++ b/app/assets/stylesheets/admin/default_widget_setting.css @@ -1,6 +1,11 @@ +label{ + white-space: nowrap !important; +} .style_switch{} -.style_switch ul{} +.style_switch ul{ + margin: 0; +} .style_switch li{ float: left; @@ -9,19 +14,18 @@ width: 103px; } .style_radio{ - margin: 0 0 5px 10px; + cursor: pointer; + margin: 0 0 0 10px; } .style_img{ display: block; - margin: 0 0 5px; + margin: 5px 0 5px -28px; } .style_description{ color: #6B6B6B; display: block; - margin: 0 0 0 5px; + font-size: 12px; + margin: 0 0 0 -25px; + white-space: normal; } - -label{ -    white-space: nowrap !important ; -} \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5c6cca95..980db7bc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -54,8 +54,14 @@ module ApplicationHelper raw(formatted_messages.join) end - def link_back - link_to t('back'), get_go_back, :class => 'nav' + def link_back(custom_class=nil) + case custom_class + when nil + link_to t('back'), get_go_back, :class => 'nav' + else + link_to t('back'), get_go_back, :class => custom_class + end + end # Clean the link back diff --git a/app/views/admin/page_parts/_custom_widget_setting.html.erb b/app/views/admin/page_parts/_custom_widget_setting.html.erb index a257336e..dea11a06 100644 --- a/app/views/admin/page_parts/_custom_widget_setting.html.erb +++ b/app/views/admin/page_parts/_custom_widget_setting.html.erb @@ -1,12 +1,21 @@ -
- - <% if @module_app.widgets[@widget_path].blank? %> - <%= t("default_widget.no_support_setting")%> - <%else%> - <%= select('page_part', 'widget_style', @module_app.widgets[@widget_path]) %> - <% end %> +
+ +
+ <% if @module_app.widgets[@widget_path].blank? %> + <%= t("default_widget.no_support_setting")%> + <%else%> + <%= select('page_part', 'widget_style', @module_app.widgets[@widget_path]) %> + <% end %> +
+
+ <% if(@module_app.widget_options && @module_app.widget_options.has_key?(@widget_path)) %> - - <%= render :partial=> "widget_ext_options" %> - <% end %> -
\ No newline at end of file +
+ +
+ <%= render :partial=> "widget_ext_options" %> +
+
+ <% end %> \ No newline at end of file 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 728bf010..09d648eb 100644 --- a/app/views/admin/page_parts/_default_widget_setting.html.erb +++ b/app/views/admin/page_parts/_default_widget_setting.html.erb @@ -1,4 +1,8 @@ -
+
+ +
@@ -22,7 +26,7 @@ <%= select_tag "page_part[widget_field_type][]", widget_fiield_type_options(i), :include_blank => true %>
-
+

<% end %>
@@ -32,3 +36,4 @@ <%= text_field_tag :widget_data_count,@part.widget_data_count %>
+
\ No newline at end of file diff --git a/app/views/admin/page_parts/_default_widget_style_panel.html.erb b/app/views/admin/page_parts/_default_widget_style_panel.html.erb index 3a4096b4..df8ac8d8 100644 --- a/app/views/admin/page_parts/_default_widget_style_panel.html.erb +++ b/app/views/admin/page_parts/_default_widget_style_panel.html.erb @@ -1,45 +1,50 @@ -
- +
+ +
  • <%=image_tag 'module/default_widgets/style01.png'%> - <%= t("default_widget.caption.typeA") %> + <%= t("default_widget.caption.typeA") %> + +
  • <%=image_tag 'module/default_widgets/style02.png'%> <%= t("default_widget.caption.typeA") %> +
  • <%=image_tag 'module/default_widgets/style03.png'%> <%= t("default_widget.caption.typeB_style3") %> +
  • <%=image_tag 'module/default_widgets/style04.png'%> <%= t("default_widget.caption.typeB_style4") %> +
  • <%=image_tag 'module/default_widgets/style05.png'%> <%= t("default_widget.caption.typeC") %> +
+
\ No newline at end of file diff --git a/app/views/admin/page_parts/_edit.html.erb b/app/views/admin/page_parts/_edit.html.erb index c4bc7476..ac44a619 100644 --- a/app/views/admin/page_parts/_edit.html.erb +++ b/app/views/admin/page_parts/_edit.html.erb @@ -1,6 +1,6 @@ <%= stylesheet_link_tag "admin/default_widget_setting" %> -<%= form_for @part, :url => admin_page_part_path(@part) do |f| %> +<%= form_for @part, :url => admin_page_part_path(@part),:html=>{:class=>"clear form-horizontal edit_page_part"} do |f| %> <% LIST[:page_part_kinds].each do |kind| %> <%= f.radio_button :kind, kind, :class => 'part_kind' %> @@ -12,7 +12,9 @@
<% end %> -

- <%= f.submit t(:update_) %> <%= link_back %> -

+
+ <%= f.submit t(:update_),:class=>"btn btn-primary" %> + <%= link_back("btn") %> + +
<% end %> diff --git a/app/views/admin/page_parts/_module_widget.html.erb b/app/views/admin/page_parts/_module_widget.html.erb index 5cfcbbf0..18400c79 100644 --- a/app/views/admin/page_parts/_module_widget.html.erb +++ b/app/views/admin/page_parts/_module_widget.html.erb @@ -1,29 +1,40 @@
- <%= f.fields_for :title_translations do |f| %> + <%= f.fields_for :title_translations do |f| %> <% @site_valid_locales.each do |locale| %> -

- <%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %> - <%= f.text_field locale, :value => (@part.title_translations[locale] rescue nil),:size=>30 %> -

- <% end %> +
+ <%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}",:class=>"control-label" %> +
+ <%= f.text_field locale, :value => (@part.title_translations[locale] rescue nil),:size=>30 %> +
+
<% end %> + <% end %>
-

- + +

+ +
<%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %> -

+
+
-

- +

+ +
<%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> -

+
+
-
+
<%= render :partial => 'widget_data_source_category' %>
-
+
<%= render :partial => 'widget_data_source_tag' %>
diff --git a/app/views/admin/page_parts/_widget_data_source_category.html.erb b/app/views/admin/page_parts/_widget_data_source_category.html.erb index bd358cda..03ec505e 100644 --- a/app/views/admin/page_parts/_widget_data_source_category.html.erb +++ b/app/views/admin/page_parts/_widget_data_source_category.html.erb @@ -1,5 +1,6 @@ - + <% if @categories %> +
<%= nil_radio_button(@part,:category) %> <%= content_tag_for(:label, @categories,:class=>"radio inline") do |category|%> @@ -7,6 +8,7 @@ <%= category.title%> <% end %>
+
<% else %> <%= t("default_widget.no_support_setting")%> <% end %> \ No newline at end of file diff --git a/app/views/admin/page_parts/_widget_data_source_tag.html.erb b/app/views/admin/page_parts/_widget_data_source_tag.html.erb index 062cd1f5..ff2241e0 100644 --- a/app/views/admin/page_parts/_widget_data_source_tag.html.erb +++ b/app/views/admin/page_parts/_widget_data_source_tag.html.erb @@ -1,5 +1,6 @@ - + <% if @categories %> +
<%= nil_radio_button(@part,:tag) %> <%= content_tag_for(:label, @tags,:class=>"radio inline") do |tag|%> @@ -7,6 +8,7 @@ <%= tag[I18n.locale]%> <% end %>
+
<% else %> <%= t("default_widget.no_support_setting")%> <% end %> \ No newline at end of file From 0cc616f9881284124c51ab8921cbb053497c7dca Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Mon, 21 Jan 2013 16:56:37 +0800 Subject: [PATCH 20/44] page can use default widget --- app/assets/javascripts/page_edit.js.erb | 40 ++++++------ .../admin/module_apps_controller.rb | 31 +--------- .../admin/page_parts_controller.rb | 10 +-- app/controllers/admin/pages_controller.rb | 61 ++++++++++++++++--- app/controllers/default_widget_controller.rb | 20 ++++-- app/helpers/admin/page_parts_helper.rb | 43 ++++++++++--- .../module_apps/reload_frontend_pages.js.erb | 5 -- .../_custom_widget_setting.html.erb | 3 +- .../_default_widget_setting.html.erb | 25 ++++++-- .../_default_widget_style_panel.html.erb | 18 ++++-- .../admin/page_parts/_module_widget.html.erb | 8 +-- .../_widget_data_source_category.html.erb | 32 ++++++---- .../_widget_data_source_tag.html.erb | 18 ++++-- .../admin/page_parts/_widget_setting.html.erb | 6 +- .../old_partials/_widget_categories.html.erb | 1 - .../old_partials/_widget_tags.html.erb | 1 - .../page_parts/reload_widget_styles.js.erb | 4 +- .../admin/page_parts/reload_widgets.js.erb | 6 +- app/views/admin/pages/_app_selector.html.erb | 2 +- app/views/admin/pages/_form.html.erb | 52 +++++++++------- .../admin/pages/_frontend_setting.html.erb | 3 + app/views/admin/pages/edit.html.erb | 1 + .../pages/reload_front_end_setting.js.erb | 8 +++ .../admin/pages/reload_frontend_pages.js.erb | 24 ++++++++ config/locales/zh_tw.yml | 1 + config/routes.rb | 7 ++- lib/parsers/parser_common.rb | 16 +++-- lib/parsers/parser_front_end.rb | 13 +++- 28 files changed, 305 insertions(+), 154 deletions(-) delete mode 100644 app/views/admin/module_apps/reload_frontend_pages.js.erb delete mode 100644 app/views/admin/page_parts/old_partials/_widget_categories.html.erb delete mode 100644 app/views/admin/page_parts/old_partials/_widget_tags.html.erb create mode 100644 app/views/admin/pages/_frontend_setting.html.erb create mode 100644 app/views/admin/pages/reload_front_end_setting.js.erb create mode 100644 app/views/admin/pages/reload_frontend_pages.js.erb diff --git a/app/assets/javascripts/page_edit.js.erb b/app/assets/javascripts/page_edit.js.erb index 29047c7b..aec24de6 100644 --- a/app/assets/javascripts/page_edit.js.erb +++ b/app/assets/javascripts/page_edit.js.erb @@ -1,5 +1,11 @@ function get_part_id(){ - return $(".edit_page_part").attr("action").split('/').pop(); + return $(".edit_page_part,.edit_page").attr("action").split('/').pop(); +} + +function get_object_path(){ + a = window.location.href.split('/'); + a.pop(); + return a.join('/'); } $("div.editable").live("mouseenter mouseleave", function (event) { @@ -10,26 +16,26 @@ $("#page_design").live('change', function() { $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_themes'); }); -$("#page_module_app_id").live('change', function() { - var app_id = $(this).val(); - if(app_id!=''){ - $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_frontend_pages',function(data, textStatus){ - if(textStatus == 'success'){ - $(this).after(data); - } - }); - } - else{ - $("#app_page_url").children().remove(); - } -}); +// $("#page_module_app_id").live('change', function() { +// var app_id = $(this).val(); +// if(app_id!=''){ +// $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_after_module_changed',function(data, textStatus){ +// if(textStatus == 'success'){ +// $(this).after(data); +// } +// }); +// } +// else{ +// $("#app_page_url").children().remove(); +// } +// }); $("#module_app_list select").live('change', function() { - $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_widgets?part_id=' + get_part_id()); + $.getScript(get_object_path() + '/reload_after_module_changed?module_app_id='+$(this).val()); //?part_id=' + get_part_id()); }); -$("#widget_list select").live('change', function() { - $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_widget_styles?module_app_id=' + $("#module_app_list select").val() + '&part_id=' + get_part_id()); +$("#widget_list select,#frontend_list select").live('change', function() { + $.getScript(get_object_path() +'/reload_after_list_changed?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() );//+ '&part_id=' + get_part_id()); }); $("#tag_list select").live('change', function() { diff --git a/app/controllers/admin/module_apps_controller.rb b/app/controllers/admin/module_apps_controller.rb index 9729a97a..da029420 100644 --- a/app/controllers/admin/module_apps_controller.rb +++ b/app/controllers/admin/module_apps_controller.rb @@ -9,32 +9,6 @@ class Admin::ModuleAppsController < ApplicationController end - def reload_frontend_pages - @categories =[] - @module_app = ModuleApp.find(params[:id]) - - @frontend_path = @module_app.widgets.keys[0] if ( !@module_app.widgets.blank? && @module_app.widgets[0].blank? ) - - @frontend_style = @module_app.widgets[@frontend_path] if ( !@frontend_path.blank? ) - - case @module_app.key - when 'announcement' - @categories = BulletinCategory.all - @tags = AnnouncementTag.all - when 'news' - @categories = NewsBulletinCategory.all - @tags = NewsTag.all - when 'web_resource' - @categories = WebLinkCategory.all - @tags = WebResourceTag.all - when 'archive' - @categories = ArchiveFileCategory.all - @tags = ArchiveTag.all - end - respond_to do |format| - format.js {} - end - end def module_auth_proc @module_app = ModuleApp.find(params[:id]) @@ -136,7 +110,6 @@ class Admin::ModuleAppsController < ApplicationController end #user is not permited to do that flash[:notice] = t('app_auth.operation_not_permitted') - render :nothing => true, :status => 403 - end - + render :nothing => true,:status => 403 + end end \ No newline at end of file diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index af6b0ed8..e3d8b88a 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -91,9 +91,9 @@ class Admin::PagePartsController < ApplicationController end def reload_widgets - @part = PagePart.find params[:part_id] + @part = PagePart.find params[:id] @categories =[] - @module_app = ModuleApp.find(params[:id]) + @module_app = ModuleApp.find(params[:module_app_id]) @widget_path = @module_app.widgets.keys[0] if ( @module_app.widgets[0].blank? ) @@ -122,9 +122,9 @@ class Admin::PagePartsController < ApplicationController def reload_widget_styles @module_app = ModuleApp.find(params[:module_app_id]) - @part = PagePart.find params[:part_id] - @user_choose =@widget_path= params[:id] - @widget_style = @module_app.widgets[params[:id]] + @part = PagePart.find params[:id] + @user_choose =@widget_path= params[:frontend] + @widget_style = @module_app.widgets[@widget_path] respond_to do |format| format.js {} diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index 73ddc398..bd3dad6f 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -19,15 +19,21 @@ helper Admin::PagePartsHelper end def edit - @item = Page.find(params[:id]) + @item = @page =Page.find(params[:id]) + @user_choose = @item.app_frontend_url @apps = ModuleApp.excludes(app_pages: nil).entries @module_apps = ModuleApp.excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc) @designs = Design.all.entries @design = @item.design ? @item.design : @designs.first - @app_frontend_urls = @item.module_app.app_pages if @item.module_app - + + if @item.module_app + @app_frontend_urls = @item.module_app.app_pages + @app_frontend_urls << 'default_widget' if @item.module_app.has_default_widget? + end + + if @item.module_app @module_app = @item.module_app @@ -84,13 +90,13 @@ helper Admin::PagePartsHelper def update @item = Page.find(params[:id]) - if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank? - @item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id ) - end - - params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field] - params[:page][:frontend_field_type] = nil + if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank? + @item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id ) + end + params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field] + params[:page][:frontend_field_type] = nil + if @item.update_attributes(params[:page]) flash[:notice] = t('update.success.page') respond_to do |format| @@ -123,7 +129,44 @@ helper Admin::PagePartsHelper format.js { @item = @item.parent } end end + + def reload_front_end_setting + @page = Page.find params[:id] + @module_app = ModuleApp.find params[:module_app_id] + @chosen_frontend = @user_choose = params[:frontend] + end + + def reload_frontend_pages + @page = Page.find params[:id] + # @categories =[] + @module_app = ModuleApp.find(params[:module_app_id]) + @app_frontend_urls = @module_app.app_pages + @app_frontend_urls << 'default_widget' if @module_app.has_default_widget? + + + case @module_app.key + when 'announcement' + @categories = BulletinCategory.all + @tags = AnnouncementTag.all + when 'news' + @categories = NewsBulletinCategory.all + @tags = NewsTag.all + when 'web_resource' + @categories = WebLinkCategory.all + @tags = WebResourceTag.all + when 'archive' + @categories = ArchiveFileCategory.all + @tags = ArchiveTag.all + else + @categories = [] + @tags = [] + end + respond_to do |format| + format.js {} + end + end + def reload_themes @design = Design.find(params[:id]) @themes = @design.themes diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index ba5e8ba5..92c28c5e 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -1,7 +1,12 @@ class DefaultWidgetController< OrbitWidgetController def front_end_available(var) - @page_part = PagePart.find params[:part_id] + @page_part = case params[:item_type] + when "page" + Page.find params[:page_id] + when "page_part" + PagePart.find params[:part_id] + end @page_part.module_app.enable_frontend? end @@ -9,10 +14,17 @@ class DefaultWidgetController< OrbitWidgetController @tag_class = nil @default_widget = @page_part.module_app.get_default_widget - @widget_image_field = @default_widget[:image] - data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3) + @widget_image_field = @default_widget["image"] || @default_widget[:image] + data_limit = 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) + 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) + end @data = eval(@default_widget["query"]).limit(data_limit).includes(@widget_image_field) - @fields = @page_part.widget_field + case params[:type] when "typeA" diff --git a/app/helpers/admin/page_parts_helper.rb b/app/helpers/admin/page_parts_helper.rb index e8a1afc4..b9253112 100644 --- a/app/helpers/admin/page_parts_helper.rb +++ b/app/helpers/admin/page_parts_helper.rb @@ -10,33 +10,60 @@ module Admin::PagePartsHelper end def widget_field_options(i,local_item=nil) - local_item = @part if local_item.nil? + local_item = @part if local_item.nil? && @part + local_item = @page if local_item.nil? && @page options = @module_app.widget_fields.collect{|widget_field| [I18n.t(widget_field[1]), widget_field[0]]} - options_for_select(options, (local_item[:widget_field][i][0] if (local_item && !local_item[:widget_field].blank? && !local_item[:widget_field][i].blank?)) ) + + case local_item + when Page + options_for_select(options, (local_item[:frontend_field][i][0] if (local_item && !local_item[:frontend_field].blank? && !local_item[:frontend_field][i].blank?)) ) + when PagePart + options_for_select(options, (local_item[:widget_field][i][0] if (local_item && !local_item[:widget_field].blank? && !local_item[:widget_field][i].blank?)) ) + end end def widget_fiield_type_options(i,local_item=nil) options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]} - local_item = @part if local_item.nil? - options_for_select(options, (local_item[:widget_field][i][1] if (local_item && !local_item[:widget_field].blank? && !local_item[:widget_field][i].blank?)) ) + local_item = @part if local_item.nil? && @part + local_item = @page if local_item.nil? && @page + + case local_item + when Page + options_for_select(options, (local_item[:frontend_field][i][1] if (local_item && !local_item[:frontend_field].blank? && !local_item[:frontend_field][i].blank?)) ) + when PagePart + options_for_select(options, (local_item[:widget_field][i][1] if (local_item && !local_item[:widget_field].blank? && !local_item[:widget_field][i].blank?)) ) + end end def tag_checked_value(part,radio_value) - part and (part[:tag] == radio_value) ? true : false + part and (part[:tag] == radio_value.to_s) ? true : false end def category_checked_value(part,radio_value) - part and (part[:category] == radio_value) ? true : false + part and (part[:category] == radio_value.to_s) ? true : false end def style_checked_value(part,radio_value) - part and (part.widget_style == radio_value) ? true : false + case part + when Page + (part.frontend_style == radio_value) ? true : false + when PagePart + (part.widget_style == radio_value) ? true : false + when nil + false + end end def nil_radio_button(part,tag_or_cate) + field_name = case part + when PagePart + 'page_part' + when Page + 'page' + end content_tag :label,:class=>"radio inline" do - op = radio_button("page_part", tag_or_cate, '' , :checked => eval("#{tag_or_cate}_checked_value(part,'')")) + op = radio_button(field_name, tag_or_cate, '' , :checked => eval("#{tag_or_cate}_checked_value(part,'')")) op << I18n.t("default_widget.no_value") end end diff --git a/app/views/admin/module_apps/reload_frontend_pages.js.erb b/app/views/admin/module_apps/reload_frontend_pages.js.erb deleted file mode 100644 index 4bfbd7fc..00000000 --- a/app/views/admin/module_apps/reload_frontend_pages.js.erb +++ /dev/null @@ -1,5 +0,0 @@ -$('#app_page_url').html("<%= escape_javascript(select 'page', 'app_frontend_url', @module_app.app_pages) %>"); -$('#app_page_frontend_style').html("<%= escape_javascript(select 'page', 'frontend_style', @module_app.widgets[@frontend_path]) if !@frontend_path.blank? %>"); -$('#app_page_category').html("<%= j (select 'page', 'category', @categories.collect{|category| [category.title, category.id]}, {:include_blank => true}) if @categories %>"); -$('#app_page_tag').html("<%= j (select 'page', 'tag', @tags.collect{|tag| [tag[I18n.locale], tag.id]}, {:include_blank => true}) if @tags %>"); -$('#app_page_frontend_field').html("<%= j render '../admin/pages/frontend_fields' %>") diff --git a/app/views/admin/page_parts/_custom_widget_setting.html.erb b/app/views/admin/page_parts/_custom_widget_setting.html.erb index dea11a06..8d1ca8f8 100644 --- a/app/views/admin/page_parts/_custom_widget_setting.html.erb +++ b/app/views/admin/page_parts/_custom_widget_setting.html.erb @@ -3,14 +3,13 @@ <%= t("default_widget.select_widget_style") %>
- <% if @module_app.widgets[@widget_path].blank? %> + <% if @module_app.widgets.nil? || (@module_app.widgets[@widget_path].blank? rescue true) %> <%= t("default_widget.no_support_setting")%> <%else%> <%= select('page_part', 'widget_style', @module_app.widgets[@widget_path]) %> <% end %>
- <% if(@module_app.widget_options && @module_app.widget_options.has_key?(@widget_path)) %>
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 09d648eb..8496b19b 100644 --- a/app/views/admin/page_parts/_default_widget_setting.html.erb +++ b/app/views/admin/page_parts/_default_widget_setting.html.erb @@ -1,6 +1,17 @@ +<% case object%> + <% when PagePart %> + <% object_name = 'page_part' %> + <% field_name = 'widget_field' %> + <% data_count = 'widget_data_count' %> + <% when Page %> + <% object_name = 'page' %> + <% field_name = 'frontend_field' %> + <% data_count = 'frontend_data_count' %> +<% end %> +
@@ -20,20 +31,24 @@
<%= i+1 %> - <%= select_tag "page_part[widget_field][]", widget_field_options(i), :include_blank => true %> + <%= select_tag "#{object_name}[#{field_name}][]", widget_field_options(i), :include_blank => true %> - <%= select_tag "page_part[widget_field_type][]", widget_fiield_type_options(i), :include_blank => true %>
+ <%= select_tag "#{object_name}[#{field_name}_type][]", widget_fiield_type_options(i), :include_blank => true %>

<% end %>
- <%= label_tag t("default_widget.widget_data_count") %> + + <%= label_tag t("default_widget.widget_data_count") %> +
- <%= text_field_tag :widget_data_count,@part.widget_data_count %> + + <%= text_field_tag "#{object_name}[#{data_count}]",object.send(data_count) %> +
\ No newline at end of file diff --git a/app/views/admin/page_parts/_default_widget_style_panel.html.erb b/app/views/admin/page_parts/_default_widget_style_panel.html.erb index df8ac8d8..49d40214 100644 --- a/app/views/admin/page_parts/_default_widget_style_panel.html.erb +++ b/app/views/admin/page_parts/_default_widget_style_panel.html.erb @@ -1,3 +1,11 @@ +<% field_name='' %> +<% case object %> + <% when Page %> + <% field_name = "page[frontend_style]" %> + <% when PagePart %> + <% field_name = "page_part[widget_style]" %> +<% end %> +
@@ -32,17 +32,17 @@
- <%= render :partial => 'widget_data_source_category' %> + <%= render :partial => 'widget_data_source_category' ,:locals=>{:object=>@part}%>
- <%= render :partial => 'widget_data_source_tag' %> + <%= render :partial => 'widget_data_source_tag' ,:locals=>{:object=>@part} %>
- <%= render :partial => 'widget_setting' ,:locals=>{:f=>f} %> + <%= render :partial => 'widget_setting' ,:locals=>{:f=>f,:object=>@part} %>
-
- <%= f.label :name, t(:module), :class => 'control-label' %> + +
+ <%= f.label '',t("default_widget.select_module_app"), :class => 'control-label' %>
<%= render :partial => "app_selector", :locals => { :f => f } %> - - <%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> - - - <%= select('page','frontend_style', @frontend_style, :selected => @item[:frontend_style], :include_blank => true ) rescue ''%> - - - <%= select('page','category', @categories.collect{|category| [category.title, category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%> - - - <%= select('page','tag', @tags.collect{|tag| [tag[I18n.locale], tag.id]}, :selected => @item[:tag], :include_blank => true ) rescue ''%> - - - <%= render 'frontend_fields' %> - -
-
- <%= f.label :frontend_data_count, t(:frontend_data_count), :class => 'control-label' %> -
- <%= f.text_field :frontend_data_count %> + +
+ <%= f.label '', t("page.select_app_url"), :class => 'control-label' %> +
+ <%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%>
+ + + +
+ <%= render :partial=>"admin/page_parts/widget_data_source_category",:locals=>{:object=>@item} %> +
+ +
+ <%= render :partial=>"admin/page_parts/widget_data_source_tag" ,:locals=>{:object=>@item}%> +
+ +
+ <%= render :partial => 'frontend_setting', :locals=>{:object=>@item,:f=>f} %> +
+ +
<%= f.label :is_published, "#{t(:is_published)} ?", :class => 'control-label' %>
diff --git a/app/views/admin/pages/_frontend_setting.html.erb b/app/views/admin/pages/_frontend_setting.html.erb new file mode 100644 index 00000000..4e639272 --- /dev/null +++ b/app/views/admin/pages/_frontend_setting.html.erb @@ -0,0 +1,3 @@ +<% if show_default_widget_setting_panel %> +<%= render :partial=>'admin/page_parts/widget_setting',:locals=>{:object=>object,:f=>f} %> +<% end %> \ No newline at end of file diff --git a/app/views/admin/pages/edit.html.erb b/app/views/admin/pages/edit.html.erb index aecf04c7..8bd76634 100644 --- a/app/views/admin/pages/edit.html.erb +++ b/app/views/admin/pages/edit.html.erb @@ -1,3 +1,4 @@ +<%= stylesheet_link_tag "admin/default_widget_setting" %> <% content_for :sidebar do %> <%= render 'admin/items/site_map_left_bar' %> <% end -%> diff --git a/app/views/admin/pages/reload_front_end_setting.js.erb b/app/views/admin/pages/reload_front_end_setting.js.erb new file mode 100644 index 00000000..ea5cb336 --- /dev/null +++ b/app/views/admin/pages/reload_front_end_setting.js.erb @@ -0,0 +1,8 @@ +<% if show_default_widget_setting_panel %> + // $('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@page} %>"); + + $('#frontend_setting').html("<%= j render :partial => 'admin/page_parts/default_widget_style_panel',:locals=>{:object=>@page} %>"); + $('#frontend_setting').append("<%= j render :partial => 'admin/page_parts/default_widget_setting',:locals=>{:object=>@page} %>"); + <% else %> + $('#frontend_setting').html("<%= j render :partial => 'custom_frontend_setting' %>"); +<% end %> \ No newline at end of file diff --git a/app/views/admin/pages/reload_frontend_pages.js.erb b/app/views/admin/pages/reload_frontend_pages.js.erb new file mode 100644 index 00000000..8af0f8d5 --- /dev/null +++ b/app/views/admin/pages/reload_frontend_pages.js.erb @@ -0,0 +1,24 @@ + +$('#app_page_category').html("<%= j render :partial => 'admin/page_parts/widget_data_source_category' ,:locals=>{:object=>@page}%>"); +$('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@page} %>"); + +<% if !@module_app.app_pages.blank? %> + $('#app_page_url').html("<%= escape_javascript(select 'page', 'app_frontend_url', options_for_select(@app_frontend_urls, @app_frontend_urls.first)) %>"); + <%else %> + $('#app_page_url').html("<%= t('default_widget.no_support_setting')%>"); +<% end %> + +<% if @app_frontend_urls.first =='default_widget' %> + $('#app_page_frontend_style').html("<%= escape_javascript(select 'page', 'frontend_style', @module_app.widgets[@frontend_path]) if !@frontend_path.blank? %>"); + <% else %> + $('#app_page_frontend_style').html("<%= t('default_widget.no_support_setting')%>"); +<% end %> + +<% if show_default_widget_setting_panel %> + $('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@page} %>"); + + $('#frontend_setting').html("<%= j render :partial => 'admin/page_parts/default_widget_style_panel',:locals=>{:object=>@page} %>"); + $('#frontend_setting').append("<%= j render :partial => 'admin/page_parts/default_widget_setting',:locals=>{:object=>@page} %>"); + <% else %> + $('#frontend_setting').html("<%= j render :partial => 'custom_frontend_setting' %>"); +<% end %> \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index a79e7897..68c750dd 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -153,6 +153,7 @@ zh_tw: default_widget: no_support_setting: 沒有可以使用的設定 no_value: 不設定(全部) + fields_: 前台輸出欄位 fields_order: 輸出欄位順序 fields_style: 輸出欄位樣式 select_module_app: 外掛模組選擇 diff --git a/config/routes.rb b/config/routes.rb index 0d51680a..3c74c1e7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -82,6 +82,8 @@ Orbit::Application.routes.draw do member do get 'delete' get 'reload_themes' + get 'reload_after_module_changed',:action=>'reload_frontend_pages' + get 'reload_after_list_changed',:action=> 'reload_front_end_setting' end end @@ -101,14 +103,13 @@ Orbit::Application.routes.draw do match 'remove_manager/:app_manager_id' ,:action=> 'remove_manager',:via => "delete",:as =>:remove_manager match 'remove_sub_manager/:app_sub_manager_id' ,:action=> 'remove_sub_manager',:via => "delete",:as =>:remove_sub_manager - get 'reload_frontend_pages' end end resources :page_parts do member do - get 'reload_widgets' - get 'reload_widget_styles' + get 'reload_after_module_changed',:action=>'reload_widgets' + get 'reload_after_list_changed',:action=> 'reload_widget_styles' get 'reload_r_tag_options' end end diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 1075fe75..d6bafdd3 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -184,15 +184,21 @@ module ParserCommon # page_contents def parse_contents_edit(body, page, edit=nil) public_r_tags = [] + url = '' body.css('.page_content').each do |content| ret = '' category = params[:category_id].blank? ? page[:category] : params[:category_id] tag = params[:tag_id].blank? ? page[:tag] : params[:tag_id] if (content["main"] == "true" && !page.module_app.nil?) - ret << "
" + if page.app_frontend_url == 'default_widget' + url = "/panel/orbit_app/widget/#{page.frontend_style}?inner=true" + else + url = "/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}" + end + ret << "
" else part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil part_title = part.title rescue nil @@ -213,7 +219,7 @@ module ParserCommon raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil? "/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" end - options = "&part_id=#{part.id}&category_id=#{!part[:category].blank? ? part[:category].blank? : 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}" + options = "&part_id=#{part.id}&category_id=#{!part[:category].blank? ? part[:category].blank? : 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' ret << "" diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index 246e6c20..36aa172b 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -95,11 +95,18 @@ module ParserFrontEnd # page_contents def parse_contents(body, page, edit=nil, locale) public_r_tags = [] + url = '' body.css('.page_content').each do |content| ret = '' if (content["main"] == "true" && !page.module_app.nil?) - url = "/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}\#{(\"/\" + params[:id]) if params[:id] && !params[:id].eql?(page.id.to_s)}\#{(\"/\" + params[:controller_action]) if params[:controller_action] && params[:id]}?inner=true" - 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]}" + if page.app_frontend_url == 'default_widget' + url = "/panel/orbit_app/widget/#{page.frontend_style}?inner=true" + else + "/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}\#{(\"/\" + params[:id]) if params[:id] && !params[:id].eql?(page.id.to_s)}\#{(\"/\" + params[:controller_action]) if params[:controller_action] && params[:id]}?inner=true" + end + + + 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 @@ -116,7 +123,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].blank? : 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}" + options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : 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 979df9ac8003af9874605cb6250b42c027906e3d Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Wed, 23 Jan 2013 18:51:18 +0800 Subject: [PATCH 21/44] daily commit --- .../admin/page_parts_controller.rb | 23 +++++---- app/controllers/admin/pages_controller.rb | 10 ++-- app/helpers/admin/page_parts_helper.rb | 27 +++++++--- app/helpers/default_widget_helper.rb | 3 +- app/models/page_part.rb | 10 +++- .../_custom_widget_setting.html.erb | 4 +- app/views/admin/page_parts/_edit.html.erb | 3 +- .../admin/page_parts/_module_widget.html.erb | 4 +- app/views/admin/page_parts/_reset.html.erb | 8 +++ .../admin/page_parts/reload_widgets.js.erb | 25 ++++++---- .../pages/_custom_frontend_setting.html.erb | 8 +++ app/views/admin/pages/_form.html.erb | 22 ++++----- .../admin/pages/reload_frontend_pages.js.erb | 49 +++++++++++-------- config/locales/zh_tw.yml | 11 +++-- config/routes.rb | 6 +++ lib/tasks/migrate.rake | 24 +++++---- .../announcement/announcement.json | 41 +++++++++------- .../widget/bulletins_controller.rb | 7 --- .../bulletins_and_web_links.html.erb | 23 --------- .../bulletins/bulletins_and_web_links.js.erb | 3 -- 20 files changed, 179 insertions(+), 132 deletions(-) create mode 100644 app/views/admin/page_parts/_reset.html.erb create mode 100644 app/views/admin/pages/_custom_frontend_setting.html.erb delete mode 100644 vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb delete mode 100644 vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.js.erb diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index e3d8b88a..4336c288 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -25,14 +25,14 @@ class Admin::PagePartsController < ApplicationController def edit @part = PagePart.find(params[:id]) @module_apps = ModuleApp.excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc) - @module_app = @part.module_app ? @part.module_app : @module_apps[0] + @module_app = @part.module_app ? @part.module_app : nil @user_choose = @part.widget_path @r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag @tag_objects = @r_tag.classify.constantize.all rescue nil - @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] + @widget_path = @part.widget_path ? @part.widget_path : (@module_app.widgets.keys[0] rescue nil) - if @module_app.widgets.any?{|b| b.class == Array} + if @module_app && @module_app.widgets.any?{|b| b.class == Array} @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? end @@ -49,7 +49,7 @@ class Admin::PagePartsController < ApplicationController when 'archive' @categories = ArchiveFileCategory.all @tags = ArchiveTag.all - end + end if @module_app end def create @@ -61,7 +61,11 @@ class Admin::PagePartsController < ApplicationController params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field] params[:page_part][:widget_field_type] = nil - + + if params[:page_part][:module_app].blank? + params[:page_part][:module_app] = nil + params[:page_part][:kind] = nil + end if @part.update_attributes(params[:page_part]) set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu') flash.now[:notice] = t('update.success.content') @@ -93,12 +97,11 @@ class Admin::PagePartsController < ApplicationController def reload_widgets @part = PagePart.find params[:id] @categories =[] - @module_app = ModuleApp.find(params[:module_app_id]) + @module_app = ModuleApp.find(params[:module_app_id]) rescue nil - @widget_path = @module_app.widgets.keys[0] if ( @module_app.widgets[0].blank? ) + @widget_path = @module_app.widgets.keys[0] if (@module_app && @module_app.widgets[0].blank? ) @widget_style = @module_app.widgets[@widget_path] if ( !@widget_path.blank? ) - case @module_app.key when 'announcement' @categories = BulletinCategory.all @@ -112,9 +115,9 @@ class Admin::PagePartsController < ApplicationController when 'archive' @categories = ArchiveFileCategory.all @tags = ArchiveTag.all - end + end if @module_app - @part.widget_path = @module_app.widgets.first if @module_app.needs_to_widget_option? + @part.widget_path = @module_app.widgets.first if( @module_app && @module_app.needs_to_widget_option?) respond_to do |format| format.js {} end diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index bd3dad6f..e1cd0c0d 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -137,15 +137,15 @@ helper Admin::PagePartsHelper end def reload_frontend_pages - @page = Page.find params[:id] + @page = Page.find params[:id] rescue nil # @categories =[] - @module_app = ModuleApp.find(params[:module_app_id]) + @module_app = ModuleApp.find(params[:module_app_id]) rescue nil - @app_frontend_urls = @module_app.app_pages - @app_frontend_urls << 'default_widget' if @module_app.has_default_widget? + @app_frontend_urls = @module_app.nil? ? nil : @module_app.app_pages + @app_frontend_urls << 'default_widget' if(@module_app && @module_app.has_default_widget?) - case @module_app.key + case (@module_app.nil? ? nil : @module_app.key ) when 'announcement' @categories = BulletinCategory.all @tags = AnnouncementTag.all diff --git a/app/helpers/admin/page_parts_helper.rb b/app/helpers/admin/page_parts_helper.rb index b9253112..36e58605 100644 --- a/app/helpers/admin/page_parts_helper.rb +++ b/app/helpers/admin/page_parts_helper.rb @@ -36,20 +36,35 @@ module Admin::PagePartsHelper end def tag_checked_value(part,radio_value) - part and (part[:tag] == radio_value.to_s) ? true : false + if radio_value.blank? + part[:tag].blank?? true : false + else + part and (part[:tag] == radio_value.to_s) ? true : false + end end - def category_checked_value(part,radio_value) - part and (part[:category] == radio_value.to_s) ? true : false + if radio_value.blank? + part[:category].blank?? true : false + else + part and (part[:category] == radio_value.to_s) ? true : false + end end def style_checked_value(part,radio_value) case part when Page - (part.frontend_style == radio_value) ? true : false + if part.frontend_style.nil? && radio_value == "typeA" + true + else + (part.frontend_style == radio_value) ? true : false + end when PagePart - (part.widget_style == radio_value) ? true : false + if part.widget_style.nil? && radio_value == "typeA" + true + else + (part.widget_style == radio_value) ? true : false + end when nil false end @@ -69,7 +84,7 @@ module Admin::PagePartsHelper end def show_default_widget_setting_panel - if @module_app.has_default_widget? && (!@user_choose.nil? && @user_choose== 'default_widget') #&& @part.widget_path == 'default_widget' + if @module_app && @module_app.has_default_widget? && (!@user_choose.nil? && @user_choose== 'default_widget') #&& @part.widget_path == 'default_widget' true else false diff --git a/app/helpers/default_widget_helper.rb b/app/helpers/default_widget_helper.rb index acab557c..645f50f0 100644 --- a/app/helpers/default_widget_helper.rb +++ b/app/helpers/default_widget_helper.rb @@ -49,7 +49,8 @@ module DefaultWidgetHelper when nil eval method_entry else - eval("#{method_entry}('#{object}')" ) + object = "'#{object.to_s}'" if object.class == BSON::ObjectId + eval("#{method_entry}(#{object})" ) end end diff --git a/app/models/page_part.rb b/app/models/page_part.rb index ebaac684..b48c8060 100644 --- a/app/models/page_part.rb +++ b/app/models/page_part.rb @@ -23,6 +23,15 @@ class PagePart before_save :delete_empty_widget_field after_save :update_parent + # def module_app + # if self[:module_app] + # self[:module_app] + # elsif self[:kind] == 'module_widget' + # self.page.module_app + # else + # nil + # end + # end protected @@ -37,5 +46,4 @@ class PagePart self.page.save end - end \ No newline at end of file diff --git a/app/views/admin/page_parts/_custom_widget_setting.html.erb b/app/views/admin/page_parts/_custom_widget_setting.html.erb index 8d1ca8f8..33615e5b 100644 --- a/app/views/admin/page_parts/_custom_widget_setting.html.erb +++ b/app/views/admin/page_parts/_custom_widget_setting.html.erb @@ -3,14 +3,14 @@ <%= t("default_widget.select_widget_style") %>
- <% if @module_app.widgets.nil? || (@module_app.widgets[@widget_path].blank? rescue true) %> + <% if @module_app.nil? || @module_app.widgets.nil? || (@module_app.widgets[@widget_path].blank? rescue true) %> <%= t("default_widget.no_support_setting")%> <%else%> <%= select('page_part', 'widget_style', @module_app.widgets[@widget_path]) %> <% end %>
- <% if(@module_app.widget_options && @module_app.widget_options.has_key?(@widget_path)) %> + <% if(@module_app && @module_app.widget_options && @module_app.widget_options.has_key?(@widget_path)) %>
diff --git a/app/views/admin/page_parts/_edit.html.erb b/app/views/admin/page_parts/_edit.html.erb index ac44a619..812f50c7 100644 --- a/app/views/admin/page_parts/_edit.html.erb +++ b/app/views/admin/page_parts/_edit.html.erb @@ -1,10 +1,11 @@ <%= stylesheet_link_tag "admin/default_widget_setting" %> <%= form_for @part, :url => admin_page_part_path(@part),:html=>{:class=>"clear form-horizontal edit_page_part"} do |f| %> - <% LIST[:page_part_kinds].each do |kind| %> + <%= label_tag '',:class=>'checkbox inline' do %> <%= f.radio_button :kind, kind, :class => 'part_kind' %> <%= t(kind, :scope => 'page_part_kinds') %> + <% end %> <% end %> <% LIST[:page_part_kinds].each do |kind| %>
diff --git a/app/views/admin/page_parts/_module_widget.html.erb b/app/views/admin/page_parts/_module_widget.html.erb index 4693e05d..6b62194d 100644 --- a/app/views/admin/page_parts/_module_widget.html.erb +++ b/app/views/admin/page_parts/_module_widget.html.erb @@ -17,7 +17,7 @@ <%= t "default_widget.select_module_app" %>
- <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path,:id=>"page_module_app_id"} %> + <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => (@module_app.id rescue nil)), {:include_blank => true }, {:rel => admin_page_parts_path,:id=>"page_module_app_id"} %>
@@ -26,7 +26,7 @@ <%= t "default_widget.select_widget_path" %>
- <%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> + <%= f.select :widget_path, @module_app ? @module_app.widgets.collect{|k,v| [k.humanize, k]} : [], {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %>
diff --git a/app/views/admin/page_parts/_reset.html.erb b/app/views/admin/page_parts/_reset.html.erb new file mode 100644 index 00000000..3698d0f5 --- /dev/null +++ b/app/views/admin/page_parts/_reset.html.erb @@ -0,0 +1,8 @@ +
+ +
+ <%= t('default_widget.no_support_setting') %> +
+
\ No newline at end of file diff --git a/app/views/admin/page_parts/reload_widgets.js.erb b/app/views/admin/page_parts/reload_widgets.js.erb index c0133f38..4ac362c6 100644 --- a/app/views/admin/page_parts/reload_widgets.js.erb +++ b/app/views/admin/page_parts/reload_widgets.js.erb @@ -1,13 +1,20 @@ -$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|k,v| k},@part.widget_path) %>"); -$("#widget_data_source_category").html("<%= j render :partial => 'widget_data_source_category',:locals=>{:object=>@part} %>"); -$("#widget_data_source_tag").html("<%= j render :partial => 'widget_data_source_tag',:locals=>{:object=>@part} %>"); +<% if @module_app%> + $('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|k,v| k},@part.widget_path) %>"); + $("#widget_data_source_category").html("<%= j render :partial => 'widget_data_source_category',:locals=>{:object=>@part} %>"); + $("#widget_data_source_tag").html("<%= j render :partial => 'widget_data_source_tag',:locals=>{:object=>@part} %>"); -<% if !@part.widget_path.blank? %> - <% if show_default_widget_setting_panel %> - $('#widget_setting').html("<%= j render :partial => 'default_widget_style_panel' %>"); - $('#widget_setting').append("<%= j render :partial => 'default_widget_setting',:locals=>{:object=>@part} %>"); - <% elsif show_custom_widget_setting_panel %> - $('#widget_setting').html("<%= j render :partial => 'custom_widget_setting' %>"); + <% if @part %> + <% if show_default_widget_setting_panel %> + $('#widget_setting').html("<%= j render :partial => 'default_widget_style_panel' %>"); + $('#widget_setting').append("<%= j render :partial => 'default_widget_setting',:locals=>{:object=>@part} %>"); + <% elsif show_custom_widget_setting_panel %> + $('#widget_setting').html("<%= j render :partial => 'custom_widget_setting' %>"); + <% end %> <% end %> + <% else %> + $('#widget_option').find("div.well.controls").html("<%= t('default_widget.no_support_setting')%>"); + $('#widget_setting').html("<%=j render :partial=> 'reset',:locals=>{:label_i18n=>'default_widget.select_widget_style'}%>"); + $('#widget_list select').html("<%= j options_for_select([]) %>"); <% end %> + diff --git a/app/views/admin/pages/_custom_frontend_setting.html.erb b/app/views/admin/pages/_custom_frontend_setting.html.erb new file mode 100644 index 00000000..8b52708e --- /dev/null +++ b/app/views/admin/pages/_custom_frontend_setting.html.erb @@ -0,0 +1,8 @@ +
+ +
+ <%= t("default_widget.no_support_setting")%> +
+
diff --git a/app/views/admin/pages/_form.html.erb b/app/views/admin/pages/_form.html.erb index 90f32d72..8198cda6 100644 --- a/app/views/admin/pages/_form.html.erb +++ b/app/views/admin/pages/_form.html.erb @@ -2,9 +2,12 @@ <%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
- <%= f.label :name, t(:name), :class => 'control-label' %> + <%= f.label :name, '*'+t(:name), :class => 'control-label' %> + +
<%= f.text_field :name, :class => 'text input-xlarge' %> + 請輸入數字或英文,不可使用空白
@@ -44,19 +47,12 @@
- <%= f.label '', t("page.select_app_url"), :class => 'control-label' %> + <%= f.label '', t("front_page.select_app_url"), :class => 'control-label' %>
- <%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> + <%= select('page','app_frontend_url', @app_frontend_urls || [], :selected => @item.app_frontend_url ) rescue ''%>
-
<%= render :partial=>"admin/page_parts/widget_data_source_category",:locals=>{:object=>@item} %> @@ -72,7 +68,7 @@
- <%= f.label :is_published, "#{t(:is_published)} ?", :class => 'control-label' %> + <%= f.label :is_published, "#{t('front_page.is_published')} ?", :class => 'control-label' %>
- <%= f.label :menu_enabled_for, "#{t(:menu_enabled_for)}:", :class => 'control-label' %> + <%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:", :class => 'control-label' %>
<% @site_valid_locales.each do |valid_locale| %>
- <%= f.label :enabled_for, "#{t(:enabled_for)}:", :class => 'control-label' %> + <%= f.label :enabled_for, "#{t('front_page.link_enable_lang')}:", :class => 'control-label' %>
<% @site_valid_locales.each do |valid_locale| %>
- <% if(@module_app && @module_app.widget_options && @module_app.widget_options.has_key?(@widget_path)) %> + <% if(@module_app && @module_app.widget_options(@widget_path)) %>
diff --git a/app/views/admin/page_parts/_module_widget.html.erb b/app/views/admin/page_parts/_module_widget.html.erb index 1db248b5..38fb013f 100644 --- a/app/views/admin/page_parts/_module_widget.html.erb +++ b/app/views/admin/page_parts/_module_widget.html.erb @@ -17,7 +17,7 @@ <%= t "default_widget.select_module_app" %>
- <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => (@module_app.id rescue nil)), {:include_blank => true }, {:rel => admin_page_parts_path,:id=>"page_module_app_id"} %> + <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :module_name, :selected => (@module_app.id rescue nil)), {:include_blank => true }, {:rel => admin_page_parts_path,:id=>"page_module_app_id"} %>
@@ -26,7 +26,7 @@ <%= t "default_widget.select_widget_path" %>
- <%= f.select :widget_path, @module_app ? @module_app.widgets.collect{|k,v| [k.humanize, 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 => admin_page_parts_path } %>
diff --git a/app/views/admin/page_parts/_widget_data_source_tag.html.erb b/app/views/admin/page_parts/_widget_data_source_tag.html.erb index 521d2ff4..bcb3e9c3 100644 --- a/app/views/admin/page_parts/_widget_data_source_tag.html.erb +++ b/app/views/admin/page_parts/_widget_data_source_tag.html.erb @@ -14,7 +14,7 @@ <%= content_tag_for(:label, @tags,:class=>"radio inline") do |tag|%> <%= radio_button_tag("#{field_name}[tag]", tag.id, tag_checked_value(object,tag.id) ) %> <%= tag[I18n.locale]%> - <% end %> + <% end if @tags%> <% else %> <%= t("default_widget.no_support_setting")%> diff --git a/app/views/admin/page_parts/_widget_ext_options.html.erb b/app/views/admin/page_parts/_widget_ext_options.html.erb index c38d0543..6985939b 100644 --- a/app/views/admin/page_parts/_widget_ext_options.html.erb +++ b/app/views/admin/page_parts/_widget_ext_options.html.erb @@ -1,5 +1,6 @@ - <% @module_app.widget_options[@widget_path].each do |key,options| %> - <%= label_tag(t(@module_app.widget_options_fields_i18n[@widget_path][key]))%> + <% @module_app.widget_options(@widget_path).get_options.each do |key,settings| %> + <% options = settings[:opts] %> + <%= label_tag(t(settings[:label_i18n]))%> <% case options%> <% when Hash%> <%= select_tag "page_part[widget_options][#{key}]", options_from_collection_for_select(eval(options["query"]), options["value"], options["label"].to_s, :selected => (@part.widget_options[key] rescue nil)) %> diff --git a/app/views/admin/page_parts/reload_widgets.js.erb b/app/views/admin/page_parts/reload_widgets.js.erb index 40e9ec8f..c32e07c2 100644 --- a/app/views/admin/page_parts/reload_widgets.js.erb +++ b/app/views/admin/page_parts/reload_widgets.js.erb @@ -1,5 +1,5 @@ <% if @module_app%> - $('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|k,v| k},@part.widget_path) %>"); + $('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|k,v| [I18n.t(v['i18n']),k]},@part.widget_path) %>"); $("#widget_data_source_category").html("<%= j render :partial => 'widget_data_source_category',:locals=>{:object=>@part} %>"); $("#widget_data_source_tag").html("<%= j render :partial => 'widget_data_source_tag',:locals=>{:object=>@part} %>"); diff --git a/app/views/admin/pages/_app_selector.html.erb b/app/views/admin/pages/_app_selector.html.erb index 6c0d1b40..9cb4c694 100644 --- a/app/views/admin/pages/_app_selector.html.erb +++ b/app/views/admin/pages/_app_selector.html.erb @@ -1 +1 @@ -<%= f.select :module_app_id, @apps.collect { |t| [t.title.capitalize, t.id] }, {:include_blank => true} ,{:rel => admin_pages_path } %> +<%= f.select :module_app_id, @apps.collect { |t| [t.module_name, t.id] }, {:include_blank => true} ,{:rel => admin_pages_path } %> diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 80ec221c..0bbb1755 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -1,7 +1,11 @@ zh_tw: _locale: 中文 - + rulingcom: + errors: + init: + app_page_noname: 未命名前台頁面 + module_app_noname: 未命名模組 front_page: select_app_url: 模組前台樣式 is_published: 是否公開 @@ -112,6 +116,7 @@ zh_tw: delete: 刪除 delete_file: 刪除檔案 default_widget: + name: 預設樣式 no_support_setting: 沒有可以使用的設定 no_value: 不設定(全部) fields_: 前台輸出欄位 @@ -361,7 +366,7 @@ zh_tw: link: 連結已更新成功 page: 頁面已更新成功 user: 使用者已更新成功 - success_: 更新成功 + # success_: 更新成功 paper: Paper was successfully updated. user: User was successfully updated. success_: S使用者已更新成功 diff --git a/lib/orbit_app/module/front_end.rb b/lib/orbit_app/module/front_end.rb index 65f79f8e..0c5b245c 100644 --- a/lib/orbit_app/module/front_end.rb +++ b/lib/orbit_app/module/front_end.rb @@ -4,13 +4,14 @@ module OrbitApp Version = "0.1" module ClassMethods - @@frontend_pages = [] + @@frontend_pages = [] + #Record all frontend pages of orbit - def add(var) + def add(var) #build @@frontend_pages @@frontend_pages << var end - def all + def all #return all frontend_pages of orbit return @@frontend_pages end @@ -21,18 +22,18 @@ module OrbitApp other.extend( ClassMethods ) end - class AppPageSet + class AppPageSet # From Registration def initialize(&block) - @frontend_pages = [] + @frontend_pages = [] block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? end - def app_page(name,options ={}) - @frontend_pages << AppPage.new(name,options) + def app_page(name,&block) + @frontend_pages << AppPage.new(name,&block) end - def to_module_app_format - @frontend_pages.collect{|t| t.name} + def to_module_app_format #For ModuleApp to fetch data + @frontend_pages.collect{|t| [t.get_i18n,t.name]} end end @@ -40,10 +41,20 @@ module OrbitApp class AppPage attr_reader :name - def initialize(name,options ={}) + def initialize(name,&block) @name = name + @frontend_i18n = 'rulingcom.errors.init.app_page_noname' + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? end + def frontend_i18n(i18n) + @frontend_i18n = i18n + end + + def get_i18n + @frontend_i18n + end + def finalize! end diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb index 4c64f629..4911042b 100644 --- a/lib/orbit_app/module/registration.rb +++ b/lib/orbit_app/module/registration.rb @@ -35,6 +35,7 @@ module OrbitApp @key = name.underscore.singularize @side_bar = nil @front_end_app_pages = nil + @module_label = 'rulingcom.errors.init.module_app_noname' block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? setup_module_app end @@ -46,7 +47,7 @@ module OrbitApp def setup_module_app module_app = get_module_app module_app = ModuleApp.new(:key=>@key,:title=>name) if module_app.nil? - + module_app.refetch_setting!(self) begin module_app.save(:validate=>false) rescue @@ -59,6 +60,10 @@ module OrbitApp @module_label end + def get_default_widget_fields + return @widget_set.get_fields + end + def get_default_widget if @widget_set.nil? # Init not defining widget return {} @@ -77,32 +82,40 @@ module OrbitApp @front_end_app_pages.nil? ? [] : @front_end_app_pages.to_module_app_format end + def get_widget_by_path(path) + if @widget_set + @widget_set.find_by_path(path) + else + nil + end + end + def get_widgets @widget_set.nil? ? {} : @widget_set.to_module_app_format end def get_categories - @widget_set.get_categories + @widget_set.get_categories rescue [] end def get_tags - @widget_set.get_tags + @widget_set.get_tags rescue [] end - def front_end(&block) + def front_end(&block) #setter for front_end from init @front_end_app_pages = FrontendUtility::AppPageSet.new(&block) end - def side_bar(&block) + def side_bar(&block) #setter for side_bar from init @side_bar = SideBarRegisition::SideBar.new(@name,@key,method(:get_module_app),&block) end - def personal_plugin(params) + def personal_plugin(params) #setter for personal_plugin from init # TODO 這裡要看是一些檔案是不是都有 Plugin::Registration.new_from_module_app(@name,@base_path,params) end - def widgets(&block) + def widgets(&block) #setter for widget from init # @widgets = WidgetRegisition::WidgetSet.new(&block) @widget_set = WidgetUtility::WidgetSet.new(&block) diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb index 5c6932bd..a02a2427 100644 --- a/lib/orbit_app/module/widget.rb +++ b/lib/orbit_app/module/widget.rb @@ -34,6 +34,12 @@ module OrbitApp define_method(field){|var| instance_variable_set( "@" + field, var)} end + def find_by_path(path) + @widgets.each do |widget| + return widget if widget.name == path + end + end + def get_categories eval(@categories_query) rescue nil end @@ -46,9 +52,17 @@ module OrbitApp @default_widget = DefaultWidget.new(&block) end - def customize_widget(name,label,options ={}) - @widgets << Widget.new(name,label,options) - end + def customize_widget(name,&block) + @widgets << Widget.new(name,&block) + end + + # def customize_widget(name,label,options ={}) + # @widgets << Widget.new(name,label,options) + # end + + # def customize_widget_options_fields_i18n(settings) + # @customize_widget_options_fields_i18n = settings + # end def to_module_app_format hash = {} @@ -57,10 +71,13 @@ module OrbitApp hash end + def get_fields + get_default_widget.get_fields + end + def get_default_widget return @default_widget end - end class DefaultWidget @@ -69,9 +86,16 @@ module OrbitApp def initialize(&block) @query = nil @image = nil + @more_link = {} + @fields = [] block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? end + def more_link_to(label_i18n,path_method) + @more_link[:label_i18n] = label_i18n + @more_link[:path_method] = path_method + end + def self.get_interface_args #will need to work with design {:name=>"default_widget",:field=>nil,:label=>'label',:style=>STYLE} @@ -81,6 +105,18 @@ module OrbitApp {:query=>@query,:image=>@image} rescue nil end + def link_field(field_name,setting) + @fields << [field_name,setting,:link] + end + + def field(field_name) + @fields << [field_name,nil,:field] + end + + def get_fields + @fields + end + def query(var) @query = var end @@ -94,19 +130,38 @@ module OrbitApp class Widget attr_reader :name,:default_template,:fields - def initialize(name,label,options ={}) + def initialize(name,&block) @name = name - @fields = options[:fields] - @label = label - @style= options[:style] + @options = {} + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + + # @fields = options[:fields] + # @label = label + # @style= options[:style] end - def to_hash - {:name => @name,:fields=>@fields,:label=>@label,:style=>@style} + def widget_i18n(str) # "gallery.widget.widget1" + @widget_i18n = str + end + + def style(ary)# [] + @style = ary + end + + def get_options + @options end - def finalize! + def options(opt_name,*options) # "vertical", + option = options[0] + @options[opt_name] = {:label_i18n=>option[:i18n] , :opts=>option[:options_item]} + # options => :i18n => "gallery.widget_option.vertical",:options_item=>[1, 2] + # :i18n =>"gallery.widget_option.album",:options_item => {"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name} + end + + def to_hash + {:name => @name,:fields=>@fields,:label=>@label,:style=>@style,:i18n=>@widget_i18n} end protected diff --git a/lib/orbit_app/module_app_membership_tools.rb b/lib/orbit_app/module_app_membership_tools.rb new file mode 100644 index 00000000..a7a9a378 --- /dev/null +++ b/lib/orbit_app/module_app_membership_tools.rb @@ -0,0 +1,73 @@ +module OrbitApp + module ModuleAppMembershipTools + def is_manager?(user) + if user.nil? + return false + else + m_users = managing_users + if m_users.blank? + false + else + m_users.include?(user) + end + end + end + + def is_sub_manager?(user) + if user.nil? + return false + else # when user is guest + s_m_users = sub_managing_users + result = false + if s_m_users.blank? + result = false + else + result = s_m_users.include?(user) + end + result || is_manager?(user) + end + end + + def managing_users + self.managers.collect{ |t| t.user } + end + + def sub_managing_users + self.sub_managers.collect{ |t| t.user } + end + + def assign_manager(user,assigner) + manager = AppManager.first(conditions: {managing_app_id: self.id,user_id: user.id}) rescue nil + if manager.nil? + manager = self.managers.create(:user_id => user.id,:rule_creator_id => (assigner.id rescue nil)) + end + manager + end + + def assign_sub_manager(user,assigner) + submanager = AppManager.first(conditions: {sub_managing_app_id: self.id,user_id: user.id}) rescue nil + if submanager.nil? && !self.managing_users.include?(user) + submanager = self.sub_managers.create(:user_id => user.id,:rule_creator_id => (assigner.id rescue nil) ) + end + submanager + end + + def remove_manager(user) + manager = AppManager.first(conditions: {managing_app_id: self.id,user_id: user.id}) rescue nil + if manager + manager.destroy + else + false + end + end + + def remove_sub_manager(user) + submanager = AppManager.first(conditions: {sub_managing_app_id: self.id,user_id: user.id}) rescue nil + if submanager + submanager.destroy + else + false + end + end + end +end \ 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 e4c7f8cc..4a9aafba 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 'ad_banner.ad_banner' + module_label 'miss_module_i18n.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 8b1b6131..995bf2f5 100644 --- a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml @@ -11,6 +11,8 @@ zh_tw: editing_announcement_category: 編輯公告類別 error: no_avilb_cate_for_posting: 公告必需有一個類別才能發送,請與管理員聯絡 + front_end: + bulletins: 請LIN給名字前台頁 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 dad19454..c1174dac 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -12,7 +12,9 @@ module Announcement update_info 'some update_info' front_end do - app_page 'bulletins' + app_page 'bulletins' do + frontend_i18n "announcement.front_end.bulletins" + end end category ["BulletinCategory"] @@ -21,13 +23,18 @@ module Announcement default_widget do query 'Bulletin.all' image :image + field :postdate + link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self} + link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}} end categories_query 'BulletinCategory.all' tags_query 'AnnouncementTag.all' - customize_widget "index","announcement.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] - customize_widget "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" + customize_widget "index" do + widget_i18n "announcement.widget.index" + style ["1","2"] + end # item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"] # item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" 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 4ef309e6..807fca2b 100644 --- a/vendor/built_in_modules/archive/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/archive/config/locales/zh_tw.yml @@ -1,7 +1,9 @@ zh_tw: _locale: 中文 - + archive: + widget: + archive_files: 檔案室Wiget add: 新增 back: 回去 create: 創造 diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb index 5efd18f7..53d57479 100644 --- a/vendor/built_in_modules/archive/init.rb +++ b/vendor/built_in_modules/archive/init.rb @@ -26,7 +26,10 @@ module Archive # categories_query 'BulletinCategory.all' # tags_query 'ArchiveTag.all' - customize_widget "archive_files","archive.widget.archive_files",:style=>[] + customize_widget "archive_files" do + widget_i18n "archive.widget.archive_files" + style [] + end end side_bar do diff --git a/vendor/built_in_modules/gallery/app/models/gallery_category.rb b/vendor/built_in_modules/gallery/app/models/gallery_category.rb index 622ec4a4..07c5df8c 100644 --- a/vendor/built_in_modules/gallery/app/models/gallery_category.rb +++ b/vendor/built_in_modules/gallery/app/models/gallery_category.rb @@ -1,17 +1,21 @@ class GalleryCategory - include Mongoid::Document - include Mongoid::Timestamps + include Mongoid::Document + include Mongoid::Timestamps - include OrbitCoreLib::ObjectAuthable + include OrbitCoreLib::ObjectAuthable - ObjectAuthTitlesOptions = %W{new_album} - APP_NAME = "album" + ObjectAuthTitlesOptions = %W{new_album} + APP_NAME = "album" - field :name, localize: true + field :name, localize: true - has_many :gallery_albums, :autosave => true, :dependent => :destroy + has_many :gallery_albums, :autosave => true, :dependent => :destroy - def pp_object - name - end + def title + name + end + + def pp_object + name + end end \ No newline at end of file diff --git a/vendor/built_in_modules/gallery/config/locales/zh_tw.yml b/vendor/built_in_modules/gallery/config/locales/zh_tw.yml index 164c93cc..33a480ae 100644 --- a/vendor/built_in_modules/gallery/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/gallery/config/locales/zh_tw.yml @@ -23,6 +23,8 @@ zh_tw: edit: 編輯 delete_selected: 刪除選擇項目 del_album?: "要刪除這本相簿嗎?" + front_end: + albums: 相簿前台 album_not_found: 找不到此相簿 pic_not_found: 找不到該照片 save: 儲存 @@ -33,6 +35,8 @@ zh_tw: set_cover: 設為封面 sure?: "你確定嗎?" no_description: 沒有描述 + widget: + widget1: Widget1 widget_option: horizontal: 水平圖片數量 vertical: 垂直圖片數量 diff --git a/vendor/built_in_modules/gallery/init.rb b/vendor/built_in_modules/gallery/init.rb index 3e7fa633..615d6593 100644 --- a/vendor/built_in_modules/gallery/init.rb +++ b/vendor/built_in_modules/gallery/init.rb @@ -11,7 +11,9 @@ module Gallery update_info 'some update_info' front_end do - app_page 'albums' + app_page 'albums' do + frontend_i18n "gallery.front_end.albums" + end end category ["gallery_categories"] @@ -25,8 +27,17 @@ module Gallery categories_query 'GalleryCategory.all' # tags_query 'GalleryTag.all' - customize_widget "albums","gallery.widget.albums",:fields=>[],:style=>[] - + #* customize_widget "albums","gallery.widget.albums",:fields=>[],:style=>[],:options=>{"widget1"=>{"vertical"=>[1, 2], "horizontal"=>[1, 2, 3, 4, 5, 6], "album_id"=>{"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}}} + #* customize_widget_options_fields_i18n({"widget1"=>{"vertical"=>"gallery.widget_option.vertical", "horizontal"=>"gallery.widget_option.horizontal", "album_id"=>"gallery.widget_option.album"}} ) + + customize_widget "widget1" do + widget_i18n "gallery.widget.widget1" + style [] + options "vertical",:i18n => "gallery.widget_option.vertical",:options_item=>[1, 2] + options "horizontal",:i18n => "gallery.widget_option.horizontal",:options_item=>[1, 2,3,4,5,6] + options "album_id",:i18n =>"gallery.widget_option.album",:options_item => {"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name} + end + end side_bar do 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 18cbc760..aeea83c6 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 @@ -7,8 +7,8 @@ zh_tw: calendar: 日曆模組 calendars: 日曆 gallery: 相簿 - location: Location - + location: (未命名)Location + ad_banner: 廣告輪播 miss_plugin_i18n: personal_book: Personal Book diff --git a/vendor/built_in_modules/personal_book/init.rb b/vendor/built_in_modules/personal_book/init.rb index b362fedc..47bff5bd 100644 --- a/vendor/built_in_modules/personal_book/init.rb +++ b/vendor/built_in_modules/personal_book/init.rb @@ -1,6 +1,6 @@ module PersonalBook OrbitApp.registration "Book",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_diploma/init.rb b/vendor/built_in_modules/personal_diploma/init.rb index 0147cbf8..adf2ce23 100644 --- a/vendor/built_in_modules/personal_diploma/init.rb +++ b/vendor/built_in_modules/personal_diploma/init.rb @@ -1,6 +1,6 @@ module PersonalDiploma OrbitApp.registration "Diploma",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_experience/init.rb b/vendor/built_in_modules/personal_experience/init.rb index 0afedc1c..b1cc47a2 100644 --- a/vendor/built_in_modules/personal_experience/init.rb +++ b/vendor/built_in_modules/personal_experience/init.rb @@ -1,5 +1,6 @@ module PersonalExperience OrbitApp.registration "Experience",:type=> 'ModuleApp' do + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_honor/init.rb b/vendor/built_in_modules/personal_honor/init.rb index 7d2de98a..7c27a359 100644 --- a/vendor/built_in_modules/personal_honor/init.rb +++ b/vendor/built_in_modules/personal_honor/init.rb @@ -1,6 +1,6 @@ module PersonalHonor OrbitApp.registration "Honor",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_journal/init.rb b/vendor/built_in_modules/personal_journal/init.rb index 8fdd1787..42e8bdc3 100644 --- a/vendor/built_in_modules/personal_journal/init.rb +++ b/vendor/built_in_modules/personal_journal/init.rb @@ -1,6 +1,6 @@ module PersonalJournal OrbitApp.registration "Journal",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_lab/init.rb b/vendor/built_in_modules/personal_lab/init.rb index a01aced8..989dc90f 100644 --- a/vendor/built_in_modules/personal_lab/init.rb +++ b/vendor/built_in_modules/personal_lab/init.rb @@ -1,6 +1,6 @@ module PersonalLab OrbitApp.registration "Lab",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_patent/init.rb b/vendor/built_in_modules/personal_patent/init.rb index 7587fff0..ff12d639 100644 --- a/vendor/built_in_modules/personal_patent/init.rb +++ b/vendor/built_in_modules/personal_patent/init.rb @@ -1,6 +1,6 @@ module PersonalPatent OrbitApp.registration "Patent",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_project/init.rb b/vendor/built_in_modules/personal_project/init.rb index db357d43..b0b8d69e 100644 --- a/vendor/built_in_modules/personal_project/init.rb +++ b/vendor/built_in_modules/personal_project/init.rb @@ -1,6 +1,6 @@ module PersonalProject OrbitApp.registration "Research Project",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_research/init.rb b/vendor/built_in_modules/personal_research/init.rb index 96e8f7a0..5787cd05 100644 --- a/vendor/built_in_modules/personal_research/init.rb +++ b/vendor/built_in_modules/personal_research/init.rb @@ -1,6 +1,6 @@ module PersonalResearch OrbitApp.registration "Research",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.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' diff --git a/vendor/built_in_modules/personal_seminar/init.rb b/vendor/built_in_modules/personal_seminar/init.rb index 5aa57aeb..b66d9d76 100644 --- a/vendor/built_in_modules/personal_seminar/init.rb +++ b/vendor/built_in_modules/personal_seminar/init.rb @@ -1,6 +1,6 @@ module PersonalSeminar OrbitApp.registration "Seminar",:type=> 'ModuleApp' do - + module_label 'miss_plugin_i18n.personal_seminar' base_url File.expand_path File.dirname(__FILE__) personal_plugin :enable => true,:path=>"panel/personal_seminar/plugin/profile",:i18n=>'miss_plugin_i18n.personal_seminar' diff --git a/vendor/built_in_modules/web_resource/init.rb b/vendor/built_in_modules/web_resource/init.rb index 3362849a..abbf2332 100644 --- a/vendor/built_in_modules/web_resource/init.rb +++ b/vendor/built_in_modules/web_resource/init.rb @@ -21,8 +21,9 @@ module WebResource categories_query 'BulletinCategory.all' tags_query 'WebResourceTag.all' - customize_widget "home_list","web_resource.widget.home_list" - + customize_widget "home_list" do + widget_i18n "web_resource.widget.home_list" + end end side_bar do From c33a723a2a122861c5352cd0e693c8df55cd0840 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 16 Jan 2013 02:37:49 +0800 Subject: [PATCH 25/44] Fix css bug when precompile --- app/assets/stylesheets/admin/default_widget_setting.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/stylesheets/admin/default_widget_setting.css b/app/assets/stylesheets/admin/default_widget_setting.css index 8bbe4a50..6db0cc82 100644 --- a/app/assets/stylesheets/admin/default_widget_setting.css +++ b/app/assets/stylesheets/admin/default_widget_setting.css @@ -29,3 +29,7 @@ label{ margin: 0 0 0 -25px; white-space: normal; } + +label{ + white-space: nowrap !important ; +} From 87a89f81ce91eb3f72cfb58d0207f3bbd7f96e18 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 16 Jan 2013 08:14:42 +0800 Subject: [PATCH 26/44] Fix bug for mobile app routes --- app/controllers/application_controller.rb | 2 +- app/controllers/mobile_controller.rb | 2 +- app/views/mobile/_footer.mobile.erb | 4 ++-- app/views/mobile/_header.mobile.erb | 2 +- app/views/mobile/_menu.mobile.erb | 6 ++--- app/views/mobile/announcement.mobile.erb | 2 +- app/views/mobile/index.mobile.erb | 2 +- app/views/mobile/page.mobile.erb | 2 +- config/routes.rb | 28 +++++++++++------------ 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b0fc4adb..7f4ea0fa 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -130,7 +130,7 @@ class ApplicationController < ActionController::Base respond_to do |format| format.html { render :text => parse_page_content(@item), :layout => 'page_layout' } format.rss { render_main_rss } - format.mobile { redirect_to mobile_path } + format.mobile { redirect_to mobile_path(:app => params[:app]) } end else render :text => '404 Not Found' diff --git a/app/controllers/mobile_controller.rb b/app/controllers/mobile_controller.rb index d07e9a87..369bfa22 100644 --- a/app/controllers/mobile_controller.rb +++ b/app/controllers/mobile_controller.rb @@ -54,7 +54,7 @@ class MobileController < ApplicationController protected def no_footer_for_app - @no_footer = true if request.path.starts_with?("/app") + @no_footer = true if request.path =~ /app/ end end diff --git a/app/views/mobile/_footer.mobile.erb b/app/views/mobile/_footer.mobile.erb index 8bff0fa0..17a38e90 100644 --- a/app/views/mobile/_footer.mobile.erb +++ b/app/views/mobile/_footer.mobile.erb @@ -7,12 +7,12 @@ <% end %>
  • - <%= link_to mobile_map_path, {"data-transition" => "flip"} do %> + <%= link_to mobile_map_path(:app => params[:app]), {"data-transition" => "flip"} do %> <% end %>
  • - <%= link_to mobile_dialog_contact_path, {"data-rel" => "dialog"} do %> + <%= link_to mobile_dialog_contact_path(:app => params[:app]), {"data-rel" => "dialog"} do %> <% end %>
  • diff --git a/app/views/mobile/_header.mobile.erb b/app/views/mobile/_header.mobile.erb index 428d689b..3e0df561 100644 --- a/app/views/mobile/_header.mobile.erb +++ b/app/views/mobile/_header.mobile.erb @@ -3,7 +3,7 @@ <%= image_tag asset_path('mobile/logo.png') %> - <%= link_to mobile_dialog_language_path, {:class => "ui-btn-right language", "data-iconpos" => "notext", "data-icon" => "search", "data-rel" => "dialog"} do %> + <%= link_to mobile_dialog_language_path(:app => params[:app]), {:class => "ui-btn-right language", "data-iconpos" => "notext", "data-icon" => "search", "data-rel" => "dialog"} do %> <% end %> \ No newline at end of file diff --git a/app/views/mobile/_menu.mobile.erb b/app/views/mobile/_menu.mobile.erb index eecc8226..ec92ea84 100644 --- a/app/views/mobile/_menu.mobile.erb +++ b/app/views/mobile/_menu.mobile.erb @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/app/views/mobile/announcement.mobile.erb b/app/views/mobile/announcement.mobile.erb index 247ca214..ff2ea10f 100644 --- a/app/views/mobile/announcement.mobile.erb +++ b/app/views/mobile/announcement.mobile.erb @@ -1,7 +1,7 @@
      <% @bulletins.each do |bulletin| %>
    • - <%= link_to mobile_announcement_content_path(bulletin), :class => "ui-link-inherit" do %> + <%= link_to mobile_announcement_content_path(:app => params[:app], :id => bulletin), :class => "ui-link-inherit" do %> <%= image_tag bulletin.image.url, :class => "ui-li-thumb" %>

      <%= bulletin.title %>

      <%= display_date(bulletin.postdate) %>

      diff --git a/app/views/mobile/index.mobile.erb b/app/views/mobile/index.mobile.erb index e283c002..7bbf2607 100644 --- a/app/views/mobile/index.mobile.erb +++ b/app/views/mobile/index.mobile.erb @@ -12,7 +12,7 @@ <%= image_tag bulletin.image.url %>

    - <%= link_to bulletin.title, mobile_announcement_content_path(bulletin) %> + <%= link_to bulletin.title, mobile_announcement_content_path(:app => params[:app], :id => bulletin) %>

    <%= display_date(bulletin.postdate) %>

    <%= bulletin.subtitle %>
    diff --git a/app/views/mobile/page.mobile.erb b/app/views/mobile/page.mobile.erb index 91c8ab71..8e6952e4 100644 --- a/app/views/mobile/page.mobile.erb +++ b/app/views/mobile/page.mobile.erb @@ -1,7 +1,7 @@
      <% @page_contexts.each do |page_context| %>
    • - <%= link_to mobile_page_content_path(page_context) do %> + <%= link_to mobile_page_content_path(:app => params[:app], :id => page_context) do %>

      <%= page_context.page.title %>

      <% end %>
    • diff --git a/config/routes.rb b/config/routes.rb index 271b8366..75b05f3d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -244,7 +244,7 @@ Orbit::Application.routes.draw do #match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal' # match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal' - def controller_paths(controller, actions) + def controller_paths(controller, actions, scope=nil) actions.each do |action| if action.eql? 'index' match "#{controller}" => "#{controller}##{action}", :as => "#{controller}" @@ -255,21 +255,21 @@ Orbit::Application.routes.draw do end controller_paths :front, %w[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] + # controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content] - scope 'app' do - controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content] - end + # scope 'app' do + # controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content] + # end - scope '/mobile' do - match 'announcement' => 'mobile#announcement', :as => 'mobile_announcement' - match 'announcement_content/:id' => 'mobile#announcement_content', :as => 'mobile_announcement_content' - match 'dialog_contact' => 'mobile#dialog_contact', :as => 'mobile_dialog_contact' - match 'dialog_copyright' => 'mobile#dialog_copyright', :as => 'mobile_dialog_copyright' - match 'dialog_language' => 'mobile#dialog_language', :as => 'mobile_dialog_language' - match 'map' => 'mobile#map', :as => 'mobile_map' - match 'page' => 'mobile#page', :as => 'mobile_page' - match 'page_content/:id' => 'mobile#page_content', :as => 'mobile_page_content' + scope '/mobile(/:app)' do + match '/announcement' => 'mobile#announcement', :as => 'mobile_announcement' + match '/announcement_content/:id' => 'mobile#announcement_content', :as => 'mobile_announcement_content' + match '/dialog_contact' => 'mobile#dialog_contact', :as => 'mobile_dialog_contact' + match '/dialog_copyright' => 'mobile#dialog_copyright', :as => 'mobile_dialog_copyright' + match '/dialog_language' => 'mobile#dialog_language', :as => 'mobile_dialog_language' + match '/map' => 'mobile#map', :as => 'mobile_map' + match '/page' => 'mobile#page', :as => 'mobile_page' + match '/page_content/:id' => 'mobile#page_content', :as => 'mobile_page_content' root :to => 'mobile#index', :as => 'mobile' end From 18a51f070ebc74f5f0154d2a0538581d7946f810 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Jan 2013 10:37:55 +0800 Subject: [PATCH 27/44] member roles edit --- app/assets/javascripts/inc/attribute_onoff.js | 18 +++++++++--------- app/controllers/admin/infos_controller.rb | 5 ++++- .../admin/users_new_interface/_form.html.erb | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/inc/attribute_onoff.js b/app/assets/javascripts/inc/attribute_onoff.js index f1541a11..0c22901c 100644 --- a/app/assets/javascripts/inc/attribute_onoff.js +++ b/app/assets/javascripts/inc/attribute_onoff.js @@ -1,14 +1,14 @@ function checkSwitch() { - $(".groups").each(function() { - $(this).find('.form-horizontal > .hide').length < $(this).find('.form-horizontal > div').length ? $(this).removeClass("disabled") : $(this).addClass("disabled") - }); + // $(".groups").each(function() { + // $(this).find('.form-horizontal > .hide').length < $(this).find('.form-horizontal > div').length ? $(this).removeClass("disabled") : $(this).addClass("disabled") + // }); // $(".groups").addClass('disabled').has('.groups > .form-horizontal > div:not(.hide)').removeClass('disabled'); } $(document).ready(function(){ - checkSwitch(); + // checkSwitch(); $('.onoff').click(function () { - if($(this).parents("h4").length==1) { + if($(this).parent("h4").length==1) { $(this).parents(".map-block").toggleClass("disabled"); $(this).parents(".map-block").find(".form-horizontal").toggleClass("hide"); if($(this).parents(".map-block").hasClass("disabled")){ @@ -19,17 +19,17 @@ $(document).ready(function(){ $(this).siblings(".subrole_disable_field").val("false"); } } - if($(this).parents("legend").length==1) { + if($(this).parent("legend").length==1) { $(this).toggleClass("disabled"); - $(this).parents("legend").next("div").toggleClass("hide"); - if($(this).parents("legend").next("div").hasClass("hide")){ + $(this).parent("legend").next("div").toggleClass("hide"); + if($(this).parent("legend").next("div").hasClass("hide")){ $(this).text("OFF"); $(this).siblings(".subrole_disable_field").val("true"); }else{ $(this).text("ON"); $(this).siblings(".subrole_disable_field").val("false"); } - checkSwitch(); + // checkSwitch(); } return false; }); diff --git a/app/controllers/admin/infos_controller.rb b/app/controllers/admin/infos_controller.rb index d6325ef0..c35f2246 100644 --- a/app/controllers/admin/infos_controller.rb +++ b/app/controllers/admin/infos_controller.rb @@ -11,7 +11,10 @@ class Admin::InfosController < ApplicationController @roles = Role.excludes('disabled' => true) - render :template => 'admin/attributes/index' + # render :template => 'admin/attributes/index' + + redirect_to(edit_admin_info_path(Info.first.id.to_s)) + end def show diff --git a/app/views/admin/users_new_interface/_form.html.erb b/app/views/admin/users_new_interface/_form.html.erb index 76f304fa..d11de282 100644 --- a/app/views/admin/users_new_interface/_form.html.erb +++ b/app/views/admin/users_new_interface/_form.html.erb @@ -11,7 +11,7 @@
    From 0b18cf48e3a123ba062a38bf7afbd83cb73981a4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Jan 2013 11:09:38 +0800 Subject: [PATCH 28/44] member roles edit --- app/views/admin/attributes/edit.html.erb | 2 +- app/views/admin/roles/role_field.html.erb | 2 +- app/views/admin/roles/sub_role_field.html.erb | 2 +- .../attribute_field/_list_block.html.erb | 2 +- .../archive/config/locales/zh_tw.yml | 306 ------------------ 5 files changed, 4 insertions(+), 310 deletions(-) diff --git a/app/views/admin/attributes/edit.html.erb b/app/views/admin/attributes/edit.html.erb index b3cc2bb8..aa87d73c 100644 --- a/app/views/admin/attributes/edit.html.erb +++ b/app/views/admin/attributes/edit.html.erb @@ -54,7 +54,7 @@
    - <%= f.submit t(:save),:class=>"btn btn-primary"%> + <%= f.submit t(:submit),:class=>"btn btn-primary"%> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
    <% end %> diff --git a/app/views/admin/roles/role_field.html.erb b/app/views/admin/roles/role_field.html.erb index 43880fac..31269133 100644 --- a/app/views/admin/roles/role_field.html.erb +++ b/app/views/admin/roles/role_field.html.erb @@ -21,7 +21,7 @@
    <%#= f.hidden_field :id, :value => params[:role_id] if !params[:role_id].blank? %> <%= hidden_field_tag 'id', params[:role_id] if !params[:role_id].blank? %> - <%= f.submit t(:save),:class=>"btn btn-primary"%> + <%= f.submit t(:submit),:class=>"btn btn-primary"%> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
    diff --git a/app/views/admin/roles/sub_role_field.html.erb b/app/views/admin/roles/sub_role_field.html.erb index de741270..38b1e5e8 100644 --- a/app/views/admin/roles/sub_role_field.html.erb +++ b/app/views/admin/roles/sub_role_field.html.erb @@ -21,7 +21,7 @@
    <%#= f.hidden_field :id, :value => params[:role_id] if !params[:role_id].blank? %> <%= hidden_field_tag 'sub_role[id]', params[:role_id] if !params[:role_id].blank? %> - <%= f.submit t(:save),:class=>"btn btn-primary"%> + <%= f.submit t(:submit),:class=>"btn btn-primary"%> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
    diff --git a/app/views/shared/attribute_field/_list_block.html.erb b/app/views/shared/attribute_field/_list_block.html.erb index 1843a1fc..cb38b887 100644 --- a/app/views/shared/attribute_field/_list_block.html.erb +++ b/app/views/shared/attribute_field/_list_block.html.erb @@ -2,7 +2,7 @@
    <%= hidden_field_tag "#{temp_field_name}[count]",((values.keys.collect{|t| t.to_i}.max rescue nil) || 0 ),:class=>"list_count"%> <%= hidden_field_tag "#{temp_field_name}[name]",field_name,:class=>"field_name"%> - +
    <%if values.blank? %>
    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 807fca2b..c2790d32 100644 --- a/vendor/built_in_modules/archive/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/archive/config/locales/zh_tw.yml @@ -20,313 +20,7 @@ zh_tw: update: 更新 yes_: "Yes" - admin: - action: 行動 - add_language: 新增語言 - admin: 管理 - action: 行動 - announcement: 公告 - asset: 資產 - attributes: 屬性 - cant_delete_self: 您不可以刪除自己。 - cant_revoke_self_admin: 您不可以撤銷自己的管理作用。 - class: 階級 - content: 內容 - create_error_link: 創建連接時出錯。 - create_error_page: 創建頁面時出錯。 - create_success_home: 首頁已成功創建。 - create_success_layout: 樣板已成功創建。 - create_success_link: 連結已成功創建。 - create_success_page: 頁面已成功創建。 - create_success_snippet: 片段已成功創建 - create_success_user: 用戶已成功創建。。 - data: 數據 - delete_language: 刪除語言 - description: 描述 - disable_language: 禁用語言 - editing_home: 編輯首頁 - editing_layout: 編輯樣板 - editing_link: 編輯連結 - editing_page: 編輯頁面 - editing_snippet: 編輯片段 - editing_user_info: 編輯用戶資料 - editing_user_role: 編輯用戶角色 - email: Email - enable_language: 啟用語言 - file_name: 檔名 - file_size: 檔案大小 - format: 格式 - home: 首頁 - id: ID - info: 資料 - is_published: 被出版 - item: 項目 - key: 關鍵 - language: 語言 - layout: 佈局 - layout_name: 佈局名字 - list_assets: 資產清單 - list_items: 項目清單 - list_layouts: 佈局清單 - list_snippets: 斷片清單 - list_users: 使用清單 - list_user_infos: 用戶資料清單 - list_user_roles: 用戶角色清單 - member: 會員 - move_down: 往下移 - move_up: 往上移 - multilingual: 多種語言 - my_avatar: 我的頭像 - no_home_page: 您沒有首頁 - no_layout: 您沒有佈局 - name: 名稱 - new_asset: 新增資產 - new_component: 新增元件 - new_home: 新增首頁 - new_layout: 新增樣板 - new_link: 新增連結 - new_page: 新增頁面 - new_snippet: 新增片段 - new_user: 新增使用 - new_user_info: 新增用戶資料 - new_user_role: 新增用戶角色 - non_multilingual: 非多種語言 - options: 選項 - orig_upload_file: 原上傳檔名 - position: 位置 - published?: 發布? - role: 角色 - roles: 角色。 - title: 標題 - translation: 翻譯 - type: 類型 - update_error_link: 更新鏈接時出現錯誤。 - update_error_page: 更新頁面時出現錯誤。 - update_success_content: 內容已成功更新。 - update_success_home: 首頁已成功更新。 - update_success_layout: 樣板已成功更新。 - update_success_link: 連結已成功更新。 - update_success_page: 頁面已成功更新。 - update_success_snippet: 片段已成功更新。 - update_success_user: 用戶已成功更新 - url: URL - user: 用戶 - user_info: 用戶資料 - user_panel: 用戶面板 - user_role: 用戶角色 panel: - -# Chinese (Taiwan) translations for Ruby on Rails -# by tsechingho (http://github.com/tsechingho) - date: - formats: - default: "%Y-%m-%d" - short: "%b%d日" - long: "%Y年%b%d日" - day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六] - abbr_day_names: [日, 一, 二, 三, 四, 五, 六] - month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月] - abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月] - order: [ :year, :month, :day ] - - time: - formats: - default: "%Y年%b%d日 %A %H:%M:%S %Z" - short: "%b%d日 %H:%M" - long: "%Y年%b%d日 %H:%M" - am: "上午" - pm: "下午" - - datetime: - distance_in_words: - half_a_minute: "半分鐘" - less_than_x_seconds: - one: "不到一秒" - other: "不到 %{count} 秒" - x_seconds: - one: "一秒" - other: "%{count} 秒" - less_than_x_minutes: - one: "不到一分鐘" - other: "不到 %{count} 分鐘" - x_minutes: - one: "一分鐘" - other: "%{count} 分鐘" - about_x_hours: - one: "大約一小時" - other: "大約 %{count} 小時" - x_days: - one: "一天" - other: "%{count} 天" - about_x_months: - one: "大約一個月" - other: "大約 %{count} 個月" - x_months: - one: "一個月" - other: "%{count} 個月" - about_x_years: - one: "大約一年" - other: "大約 %{count} 年" - over_x_years: - one: "一年多" - other: "%{count} 年多" - almost_x_years: - one: "接近一年" - other: "接近 %{count} 年" - prompts: - year: "年" - month: "月" - day: "日" - hour: "時" - minute: "分" - second: "秒" - - number: - format: - separator: "." - delimiter: "," - precision: 3 - significant: false - strip_insignificant_zeros: false - currency: - format: - format: "%u %n" - unit: "NT$" - separator: "." - delimiter: "," - precision: 2 - significant: false - strip_insignificant_zeros: false - percentage: - format: - delimiter: "" - precision: - format: - delimiter: "" - human: - format: - delimiter: "" - precision: 1 - significant: false - strip_insignificant_zeros: false - storage_units: - format: "%n %u" - units: - byte: - one: "Byte" - other: "Bytes" - kb: "KB" - mb: "MB" - gb: "GB" - tb: "TB" - decimal_units: - format: "%n %u" - units: - # 10^-21 zepto, 10^-24 yocto - atto: "渺" # 10^-18 - femto: "飛" # 10^-15 毫微微 - pico: "漠" # 10^-12 微微 - nano: "奈" # 10^-9 毫微 - micro: "微" # 10^-6 - mili: "毫" # 10^-3 milli - centi: "厘" # 10^-2 - deci: "分" # 10^-1 - unit: "" - ten: - one: "十" - other: "十" # 10^1 - hundred: "百" # 10^2 - thousand: "千" # 10^3 kilo - million: "百萬" # 10^6 mega - billion: "十億" # 10^9 giga - trillion: "兆" # 10^12 tera - quadrillion: "千兆" # 10^15 peta - # 10^18 exa, 10^21 zetta, 10^24 yotta - - support: - array: - words_connector: ", " - two_words_connector: " 和 " - last_word_connector: ", 和 " - select: - prompt: "請選擇" - - activerecord: - errors: - template: # ~ 2.3.5 backward compatible - header: - one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" - other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" - body: "以下欄位發生問題:" - full_messages: - format: "%{attribute} %{message}" - messages: - inclusion: "沒有包含在列表中" - exclusion: "是被保留的關鍵字" - invalid: "是無效的" - confirmation: "不符合確認值" - accepted: "必須是可被接受的" - empty: "不能留空" - blank: "不能是空白字元" - too_long: "過長(最長是 %{count} 個字)" - too_short: "過短(最短是 %{count} 個字)" - wrong_length: "字數錯誤(必須是 %{count} 個字)" - not_a_number: "不是數字" - not_an_integer: "必須是整數" - greater_than: "必須大於 %{count}" - greater_than_or_equal_to: "必須大於或等於 %{count}" - equal_to: "必須等於 %{count}" - less_than: "必須小於 %{count}" - less_than_or_equal_to: "必須小於或等於 %{count}" - odd: "必須是奇數" - even: "必須是偶數" - taken: "已經被使用" - record_invalid: "校驗失敗: %{errors}" - - activemodel: - errors: - template: - header: - one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" - other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" - body: "以下欄位發生問題:" - - errors: - format: "%{attribute} %{message}" - messages: - inclusion: "沒有包含在列表中" - exclusion: "是被保留的關鍵字" - invalid: "是無效的" - confirmation: "不符合確認值" - accepted: "必須是可被接受的" - empty: "不能留空" - blank: "不能是空白字元" - too_long: "過長(最長是 %{count} 個字)" - too_short: "過短(最短是 %{count} 個字)" - wrong_length: "字數錯誤(必須是 %{count} 個字)" - not_a_number: "不是數字" - not_an_integer: "必須是整數" - greater_than: "必須大於 %{count}" - greater_than_or_equal_to: "必須大於或等於 %{count}" - equal_to: "必須等於 %{count}" - less_than: "必須小於 %{count}" - less_than_or_equal_to: "必須小於或等於 %{count}" - odd: "必須是奇數" - even: "必須是偶數" - template: - header: - one: "有 1 個錯誤發生使得「%{model}」無法被儲存。" - other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" - body: "以下欄位發生問題:" - - helpers: - select: - prompt: "請選擇" - submit: - create: "新增%{model}" - update: "更新%{model}" - submit: "儲存%{model}" - From b2bc62dadd4459f90d22cd12f925ca7ce2dae7d2 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Tue, 22 Jan 2013 12:19:32 +0800 Subject: [PATCH 29/44] fixed orbit bar that like nccu bar now, and add rails version in Gemfile --- Gemfile | 2 +- app/assets/javascripts/orbit-bar-search.js | 70 +++++++++++++--------- app/views/layouts/_orbit_bar.html.erb | 26 ++++---- 3 files changed, 57 insertions(+), 41 deletions(-) diff --git a/Gemfile b/Gemfile index 07a50937..98c341c9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'http://rubygems.org' -gem 'rails' +gem 'rails', "~> 3.2.9" gem "brakeman" gem 'mime-types' diff --git a/app/assets/javascripts/orbit-bar-search.js b/app/assets/javascripts/orbit-bar-search.js index cc422b12..265cd92b 100644 --- a/app/assets/javascripts/orbit-bar-search.js +++ b/app/assets/javascripts/orbit-bar-search.js @@ -1,28 +1,42 @@ -$(document).on('click', '.orbit-bar-search', function (){ - if ($(this).parents('.search').hasClass('visible')){ - $(this).parents('.search').stop().animate({ - 'width':'28px', - },500); - $('.navbar-search').stop().animate({ - 'left':'30px', - 'opacity':'0', - },200); - $(this).parents('.search').css({ - 'background-color': 'transparent', - }); - $(this).parents('.search').removeClass('visible'); - } - else{ - $(this).parents('.search').stop().animate({ - 'width':'265px', - },200); - $('.navbar-search').stop().animate({ - 'left':'7px', - 'opacity':'1' - },500); - $(this).parents('.search').css({ - 'background-color': 'rgba(0, 0, 0, 0.5)', - }); - $(this).parents('.search').addClass('visible'); - } -}); \ No newline at end of file + +$(document).ready(function(){ + $('.search').tooltip({ + placement: "bottom" + }); +}); +$(document).on('mouseenter', '.orbit-bar-search', function (){ + $(this).parents('.search').stop().animate({ + 'width':'265px', + },200); + $('.navbar-search').stop().animate({ + 'left':'4px', + 'opacity':'1' + },500); + $(this).parents('.search').css({ + 'background-color': 'rgba(0, 0, 0, 0.5)', + }); + $(this).parents('.search').addClass('visible'); +}); + + +$(document).on('mouseleave', '.search.visible', function (){ + $(this).stop().animate({ + 'width':'28px', + },500); + $('.navbar-search').stop().animate({ + 'left':'30px', + 'opacity':'0', + },200); + $(this).css({ + 'background-color': 'transparent', + }); + $(this).removeClass('visible'); +}); + +$(document).on("mouseenter",".orbit-bar-language, .language-menu",function(){ + $(this).parents('.language').addClass("open") +}) + +$(document).on("mouseleave",".orbit-bar-language, .language-menu",function(){ + $(this).parents('.language').removeClass("open") +}) diff --git a/app/views/layouts/_orbit_bar.html.erb b/app/views/layouts/_orbit_bar.html.erb index 36638302..7d20daf1 100644 --- a/app/views/layouts/_orbit_bar.html.erb +++ b/app/views/layouts/_orbit_bar.html.erb @@ -10,25 +10,19 @@
    \\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 diff --git a/vendor/built_in_modules/personal_seminar/.gitignore b/vendor/built_in_modules/personal_conference/.gitignore similarity index 100% rename from vendor/built_in_modules/personal_seminar/.gitignore rename to vendor/built_in_modules/personal_conference/.gitignore diff --git a/vendor/built_in_modules/personal_seminar/Gemfile b/vendor/built_in_modules/personal_conference/Gemfile similarity index 89% rename from vendor/built_in_modules/personal_seminar/Gemfile rename to vendor/built_in_modules/personal_conference/Gemfile index 2491fccd..b63cf622 100644 --- a/vendor/built_in_modules/personal_seminar/Gemfile +++ b/vendor/built_in_modules/personal_conference/Gemfile @@ -1,6 +1,6 @@ source "http://rubygems.org" -# Declare your gem's dependencies in personal_seminar.gemspec. +# Declare your gem's dependencies in personal_conference.gemspec. # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development group. gemspec diff --git a/vendor/built_in_modules/personal_seminar/MIT-LICENSE b/vendor/built_in_modules/personal_conference/MIT-LICENSE similarity index 100% rename from vendor/built_in_modules/personal_seminar/MIT-LICENSE rename to vendor/built_in_modules/personal_conference/MIT-LICENSE diff --git a/vendor/built_in_modules/personal_seminar/README.rdoc b/vendor/built_in_modules/personal_conference/README.rdoc similarity index 100% rename from vendor/built_in_modules/personal_seminar/README.rdoc rename to vendor/built_in_modules/personal_conference/README.rdoc diff --git a/vendor/built_in_modules/personal_seminar/Rakefile b/vendor/built_in_modules/personal_conference/Rakefile similarity index 95% rename from vendor/built_in_modules/personal_seminar/Rakefile rename to vendor/built_in_modules/personal_conference/Rakefile index 651670ac..ea0eb18b 100644 --- a/vendor/built_in_modules/personal_seminar/Rakefile +++ b/vendor/built_in_modules/personal_conference/Rakefile @@ -14,7 +14,7 @@ end RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'PersonalSeminar' + rdoc.title = 'PersonalConference' rdoc.options << '--line-numbers' rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('lib/**/*.rb') diff --git a/vendor/built_in_modules/personal_seminar/app/assets/images/personal_seminar/.gitkeep b/vendor/built_in_modules/personal_conference/app/assets/images/personal_conference/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/assets/images/personal_seminar/.gitkeep rename to vendor/built_in_modules/personal_conference/app/assets/images/personal_conference/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/app/assets/javascripts/personal_seminar/.gitkeep b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/assets/javascripts/personal_seminar/.gitkeep rename to vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/app/assets/stylesheets/personal_seminar/.gitkeep b/vendor/built_in_modules/personal_conference/app/assets/stylesheets/personal_conference/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/assets/stylesheets/personal_seminar/.gitkeep rename to vendor/built_in_modules/personal_conference/app/assets/stylesheets/personal_conference/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/app/controllers/.gitkeep b/vendor/built_in_modules/personal_conference/app/controllers/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/controllers/.gitkeep rename to vendor/built_in_modules/personal_conference/app/controllers/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/app/controllers/application_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/application_controller.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/controllers/application_controller.rb rename to vendor/built_in_modules/personal_conference/app/controllers/application_controller.rb diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/conference_author_types_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/conference_author_types_controller.rb new file mode 100644 index 00000000..8fc2290a --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/conference_author_types_controller.rb @@ -0,0 +1,8 @@ +class Panel::PersonalConference::BackEnd::ConferenceAuthorTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController + + def initialize + super + @app_type = 'conference_author_type' + end + +end diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/conference_paper_types_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/conference_paper_types_controller.rb new file mode 100644 index 00000000..c251c25d --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/conference_paper_types_controller.rb @@ -0,0 +1,8 @@ +class Panel::PersonalConference::BackEnd::ConferencePaperTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController + + def initialize + super + @app_type = 'conference_paper_type' + end + +end diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/tags_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/tags_controller.rb new file mode 100644 index 00000000..296d6086 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/tags_controller.rb @@ -0,0 +1,8 @@ +class Panel::PersonalConference::BackEnd::TagsController < Admin::TagsController + + def initialize + super + @app_title = 'personal_conference' + end + +end diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conference_categorys_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conference_categorys_controller.rb new file mode 100644 index 00000000..cb27cbda --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conference_categorys_controller.rb @@ -0,0 +1,145 @@ +class Panel::PersonalConference::BackEnd::WritingConferenceCategorysController < OrbitBackendController + + include OrbitControllerLib::DivisionForDisable + + before_filter :force_order_for_visitor,:only=>[:index,:show] + before_filter :force_order_for_user,:except => [:index,:show] + before_filter :for_app_manager,:except => [:index] + + def index + + get_types + + @writing_conference_categorys = @types.all + @writing_conference_category = @types.new(:display => 'List') + + # @url = panel_personal_conference_back_end_writing_conference_categorys_path + @url = eval("panel_personal_conference_back_end_#{@app_type}s_path") + + respond_to do |format| + format.html # index.html.erb + format.js + end + end + + # GET /writing_conferences/1 + # GET /writing_conferences/1.xml + def show + + get_types + + @writing_conference_category = @types.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.js + end + end + + # GET /writing_conferences/new + # GET /writing_conferences/new.xml + def new + + get_types + + @writing_conference_category = @types.new(:display => 'List') + + @verb = :post + + respond_to do |format| + format.html # new.html.erb + format.js + end + end + + # GET /writing_conferences/1/edit + def edit + + get_types + + @writing_conference_category = @types.find(params[:id]) + + # @url = panel_personal_conference_back_end_writing_conference_category_path(@writing_conference_category) + # @url = eval("panel_personal_conference_back_end_#{@app_type}_path(@writing_conference_category)") + @url = polymorphic_path([:panel, :personal_conference, :back_end, @writing_conference_category]) + + @verb = :put + + respond_to do |format| + format.html + format.js + end + end + + # POST /writing_conferences + # POST /writing_conferences.xml + def create + + get_types + + @writing_conference_category = @types.new(params[:writing_conference_category]) + + respond_to do |format| + if @writing_conference_category.save + format.html { redirect_to(panel_personal_conference_back_end_writing_conference_categorys_url, :notice => t('writing_conference_category.create_writing_conference_category_success')) } + format.js + else + format.html { render :action => "new" } + format.js { render action: "new" } + end + end + end + + # PUT /writing_conferences/1 + # PUT /writing_conferences/1.xml + def update + + get_types + + @writing_conference_category = @types.find(params[:id]) + # debugger + # @url = panel_personal_conference_back_end_writing_conference_category_path(@writing_conference_category) + # @url = eval("panel_personal_conference_back_end_#{@app_type}_path(#{@writing_conference_category})") + @url = polymorphic_path([:panel, :personal_conference, :back_end, @writing_conference_category]) + + respond_to do |format| + if @writing_conference_category.update_attributes(params[:writing_conference_category]) + format.html { redirect_to(panel_personal_conference_back_end_writing_conference_categorys_url, :notice => t('writing_conference_category.update_writing_conference_category_success')) } + # format.xml { head :ok } + format.js + else + format.html { render :action => "edit" } + format.js { render :action => "edit" } + end + end + end + + # DELETE /writing_conferences/1 + # DELETE /writing_conferences/1.xml + def destroy + + get_types + + @writing_conference_category = @types.find(params[:id]) + @writing_conference_category.disable = @writing_conference_category.disable ? false : true + + if @writing_conference_category.save! + respond_to do |format| + format.html { redirect_to(panel_personal_conference_back_end_writing_conference_categorys_url) } + # format.xml { head :ok } + format.js + end + else + flash[:error] = t("writing_conference_category.update_failed") + format.html { render :action => "index" } + end + + end + + protected + + def get_types + @types = @app_type.classify.constantize + end + +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 new file mode 100644 index 00000000..eb2d1b04 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb @@ -0,0 +1,309 @@ +class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBackendController + include AdminHelper + include OrbitControllerLib::DivisionForDisable + + before_filter :authenticate_user! + before_filter :force_order_for_visitor,:only=>[:index,:show] + before_filter :force_order_for_user,:except => [:index,:show] + + before_filter :only => [ :new,:edit,:update] do |controller| + controller.get_categorys('WritingConferenceCategory') + end + + def index + + get_categorys("ConferencePaperType",params[:conference_paper_type_id]) + @filter = params[:filter] + new_filter = params[:new_filter] + + if @filter && params[:clear] + @filter.delete(params[:type]) + elsif @filter && new_filter + if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) + @filter[new_filter[:type]].delete(new_filter[:id].to_s) + elsif @filter.has_key?(new_filter[:type]) + @filter[new_filter[:type]] << new_filter[:id].to_s + else + @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) + end + elsif new_filter + @filter = {new_filter[:type] => [new_filter[:id].to_s]} + end + + @paper_types = ConferencePaperType.all + @paper_type_ids = @paper_types.collect{|t| t.id.to_s} + [nil] + + + # @writing_conferences = WritingConference.search(params[:category_id]) + #@writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_conferences : WritingConference.all.page(params[:page]).per(10) + + @writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_conference",:conference_paper_type_id.in => @paper_type_ids) : get_viewable("writing_conference",:conference_paper_type_id.in => @paper_type_ids) + + + get_tags + + respond_to do |format| + format.html # index.html.erb + format.xml { render :xml => @writing_conferences } + format.js + end + end + + def writing_conference_setting + + @author_types = ConferenceAuthorType.all + @paper_types = ConferencePaperType.all + + get_tags + + @set_author_type = ConferenceAuthorType.new(:display => 'List') + @author_type_url = panel_personal_conference_back_end_writing_conferences_path + + @set_paper_type = ConferencePaperType.new(:display => 'List') + @paper_type_url = panel_personal_conference_back_end_writing_conferences_path + + + end + + def paper_type_quick_add + @set_paper_type = ConferencePaperType.new(:display => 'List') + @paper_type_url = panel_personal_conference_back_end_writing_conferences_path + @set_paper_type.id = params[:id] + + respond_to do |format| + format.js + end + + end + + def paper_type_quick_edit + + @set_paper_type = ConferencePaperType.find(params[:writing_conference_id]) + @paper_type_url = panel_personal_conference_back_end_writing_conference_path(@set_paper_type) + + respond_to do |format| + format.js + end + end + + def author_type_quick_add + @set_author_type = ConferenceAuthorType.new(:display => 'List') + @author_type_url = panel_personal_conference_back_end_writing_conferences_path + @set_author_type.id = params[:id] + + respond_to do |format| + format.js + end + + end + + def author_type_quick_edit + + @set_author_type = ConferenceAuthorType.find(params[:writing_conference_id]) + @author_type_url = panel_personal_conference_back_end_writing_conference_path(@set_author_type) + + respond_to do |format| + format.js + end + end + + # GET /writing_conferences/1 + # GET /writing_conferences/1.xml + def show + @writing_conference = WritingConference.find(params[:id]) + respond_to do |format| + format.html # show.html.erb + format.xml { render :xml => @writing_conference } + end + end + + # GET /writing_conferences/new + # GET /writing_conferences/new.xml + def new + @writing_conference = WritingConference.new + # @writing_conference_files = WritingConferenceFile.all + # @paper_types = ConferenceLevelType.all + @author_types = ConferenceAuthorType.all + @paper_types = ConferencePaperType.all + get_tags + + respond_to do |format| + format.html # new.html.erb + format.xml { render :xml => @writing_conference } + end + end + + # GET /writing_conferences/1/edit + def edit + @writing_conference = WritingConference.find(params[:id]) + + # @paper_types = ConferenceLevelType.all + @author_types = ConferenceAuthorType.all + @paper_types = ConferencePaperType.all + + get_tags + end + + # POST /writing_conferences + # POST /writing_conferences.xml + def create + + if params[:conference_paper_type] + + @conference_paper_type = ConferencePaperType.new(params[:conference_paper_type]) + + respond_to do |format| + if @conference_paper_type.save + format.js { render 'create_writing_conference_setting' } + end + end + + elsif params[:conference_author_type] + + @conference_author_type = ConferenceAuthorType.new(params[:conference_author_type]) + + respond_to do |format| + if @conference_author_type.save + format.js { render 'create_writing_conference_setting' } + end + end + + else + + # @paper_types = ConferenceLevelType.all + @author_types = ConferenceAuthorType.all + @paper_types = ConferencePaperType.all + get_tags + + @writing_conference = WritingConference.new(params[:writing_conference]) + + if params[:writing_conference][:user_id] + @writing_conference.create_user_id = params[:writing_conference][:user_id] + @writing_conference.update_user_id = params[:writing_conference][:user_id] + else + @writing_conference.create_user_id = current_user.id + @writing_conference.update_user_id = current_user.id + end + + respond_to do |format| + if @writing_conference.save + + if params[:writing_conference][:user_id] + format.html { redirect_to(admin_users_new_interface_url(:id=>params[:writing_conference][:user_id],:show_plugin_profile=>'Conference')) } + else + format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) } + end + + format.xml { render :xml => @writing_conference, :status => :created, :location => @writing_conference } + else + format.html { render :action => "new" } + format.xml { render :xml => @writing_conference.errors, :status => :unprocessable_entity } + end + end + end + + end + + # PUT /writing_conferences/1 + # PUT /writing_conferences/1.xml + def update + + if params[:conference_paper_type] + + @conference_paper_type = ConferencePaperType.find(params[:id]) + + respond_to do |format| + + if @conference_paper_type.update_attributes(params[:conference_paper_type]) + # format.html { redirect_to(panel_announcement_back_end_bulletins_url) } + format.js { render 'update_writing_conference_setting' } + end + end + + elsif params[:conference_author_type] + + @conference_author_type = ConferenceAuthorType.find(params[:id]) + + respond_to do |format| + + if @conference_author_type.update_attributes(params[:conference_author_type]) + # format.html { redirect_to(panel_announcement_back_end_bulletins_url) } + format.js { render 'update_writing_conference_setting' } + end + end + + else + + @writing_conference = WritingConference.find(params[:id]) + + @writing_conference.update_user_id = current_user.id + + params[:writing_conference][:tag_ids] ||=[] + + respond_to do |format| + if @writing_conference.update_attributes(params[:writing_conference]) + format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) } + # format.js { render 'toggle_enable' } + format.xml { head :ok } + else + format.html { render :action => "edit" } + format.xml { render :xml => @writing_conference.errors, :status => :unprocessable_entity } + end + end + end + + end + + # DELETE /writing_conferences/1 + # DELETE /writing_conferences/1.xml + def destroy + @writing_conference = WritingConference.find(params[:id]) + @writing_conference.destroy + + respond_to do |format| + format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) } + # format.xml { head :ok } + format.js + end + end + + def delete + if params[:ids] + writing_conferences = WritingConference.any_in(:_id => params[:ids]).delete_all + end + redirect_to panel_personal_conference_back_end_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) + end + + protected + + + # def get_index_categories(id = nil) + # @bulletin_categorys = [] + # if(is_manager? || is_admin?) + # @bulletin_categorys = (id ? BulletinCategory.admin_manager_all.find(id).to_a : BulletinCategory.admin_manager_all) + # elsif is_sub_manager? + # @bulletin_categorys = BulletinCategory.all + # end + # @bulletin_categorys + # end + + + # def get_categorys(id = nil) + # @writing_conference_categorys = [] + # if(is_manager? || is_admin?) + # @writing_conference_categorys = (id ? WritingConferenceCategory.admin_manager_all.find(id).to_a : WritingConferenceCategory.admin_manager_all)) + # elsif is_sub_manager? + # @writing_conference_categorys = WritingConferenceCategory.all.authed_for_user(current_user,'edit') + # end + # if @writing_conference_categorys.empty? && params[:action] != "index" + # flash[:alert] = t("announcement.error.no_avilb_cate_for_posting") + # redirect_to :action => :index + # end + # end + + def get_tags + module_app = ModuleApp.first(:conditions => {:key => 'personal_conference'}) + @tags = Tag.all(:conditions => {:module_app_id => module_app.id}) + end + +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 new file mode 100644 index 00000000..5b754ec9 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/plugin/writing_conferences_controller.rb @@ -0,0 +1,187 @@ +class Panel::PersonalConference::Plugin::WritingConferencesController < OrbitBackendController + include AdminHelper + include OrbitControllerLib::DivisionForDisable + + before_filter :authenticate_user! + before_filter :force_order_for_visitor,:only=>[:index,:show] + before_filter :force_order_for_user,:except => [:index,:show] + + before_filter :only => [ :new,:edit,:update] do |controller| + controller.get_categorys('WritingConferenceCategory') + end + + + def index + + get_categorys("ConferencePaperType",params[:conference_paper_type_id]) + @filter = params[:filter] + new_filter = params[:new_filter] + + if @filter && params[:clear] + @filter.delete(params[:type]) + elsif @filter && new_filter + if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) + @filter[new_filter[:type]].delete(new_filter[:id].to_s) + elsif @filter.has_key?(new_filter[:type]) + @filter[new_filter[:type]] << new_filter[:id].to_s + else + @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) + end + elsif new_filter + @filter = {new_filter[:type] => [new_filter[:id].to_s]} + end + @paper_types = ConferencePaperType.all + @paper_type_ids = @paper_types.collect{|t| t.id.to_s} + [nil] + + + # @writing_conferences = WritingConference.search(params[:category_id]) + #@writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_conferences : WritingConference.all.page(params[:page]).per(10) + @writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_conference",:create_user_id => current_user.id) : get_viewable("writing_conference", :create_user_id => current_user.id) + + get_tags + + respond_to do |format| + format.html # index.html.erb + format.xml { render :xml => @writing_conferences } + format.js + end + end + + # GET /writing_conferences/1 + # GET /writing_conferences/1.xml + def show + @writing_conference = WritingConference.find(params[:id]) + respond_to do |format| + format.html # show.html.erb + format.xml { render :xml => @writing_conference } + end + end + + # GET /writing_conferences/new + # GET /writing_conferences/new.xml + def new + + @writing_conference = WritingConference.new + # @writing_conference_files = WritingConferenceFile.all + # @level_types = ConferenceLevelType.all + @author_types = ConferenceAuthorType.all + @paper_types = ConferencePaperType.all + + get_tags + + respond_to do |format| + format.html # new.html.erb + format.xml { render :xml => @writing_conference } + end + end + + # GET /writing_conferences/1/edit + def edit + @writing_conference = WritingConference.find(params[:id]) + + # @level_types = ConferenceLevelType.all + @author_types = ConferenceAuthorType.all + @paper_types = ConferencePaperType.all + + get_tags + end + + # POST /writing_conferences + # POST /writing_conferences.xml + def create + + # @level_types = ConferenceLevelType.all + @author_types = ConferenceAuthorType.all + @paper_types = ConferencePaperType.all + get_tags + + @writing_conference = WritingConference.new(params[:writing_conference]) + + @writing_conference.create_user_id = current_user.id + @writing_conference.update_user_id = current_user.id + + respond_to do |format| + if @writing_conference.save + format.html { redirect_to(panel_personal_conference_plugin_writing_conferences_url) } + format.xml { render :xml => @writing_conference, :status => :created, :location => @writing_conference } + else + format.html { render :action => "new" } + format.xml { render :xml => @writing_conference.errors, :status => :unprocessable_entity } + end + end + end + + # PUT /writing_conferences/1 + # PUT /writing_conferences/1.xml + def update + @writing_conference = WritingConference.find(params[:id]) + + @writing_conference.update_user_id = current_user.id + + params[:writing_conference][:tag_ids] ||=[] + + respond_to do |format| + if @writing_conference.update_attributes(params[:writing_conference]) + format.html { redirect_to(panel_personal_conference_plugin_writing_conferences_url) } + # format.js { render 'toggle_enable' } + format.xml { head :ok } + else + format.html { render :action => "edit" } + format.xml { render :xml => @writing_conference.errors, :status => :unprocessable_entity } + end + end + end + + # DELETE /writing_conferences/1 + # DELETE /writing_conferences/1.xml + def destroy + @writing_conference = WritingConference.find(params[:id]) + @writing_conference.destroy + + respond_to do |format| + format.html { redirect_to(panel_personal_conference_plugin_writing_conferences_url) } + # format.xml { head :ok } + format.js + end + end + + def delete + if params[:ids] + writing_conferences = WritingConference.any_in(:_id => params[:ids]).delete_all + end + redirect_to panel_personal_conference_plugin_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) + end + + protected + + + # def get_index_categories(id = nil) + # @bulletin_categorys = [] + # if(is_manager? || is_admin?) + # @bulletin_categorys = (id ? BulletinCategory.admin_manager_all.find(id).to_a : BulletinCategory.admin_manager_all) + # elsif is_sub_manager? + # @bulletin_categorys = BulletinCategory.all + # end + # @bulletin_categorys + # end + + + # def get_categorys(id = nil) + # @writing_conference_categorys = [] + # if(is_manager? || is_admin?) + # @writing_conference_categorys = (id ? WritingConferenceCategory.admin_manager_all.find(id).to_a : WritingConferenceCategory.admin_manager_all)) + # elsif is_sub_manager? + # @writing_conference_categorys = WritingConferenceCategory.all.authed_for_user(current_user,'edit') + # end + # if @writing_conference_categorys.empty? && params[:action] != "index" + # flash[:alert] = t("announcement.error.no_avilb_cate_for_posting") + # redirect_to :action => :index + # end + # end + + def get_tags + module_app = ModuleApp.first(:conditions => {:key => 'personal_conference'}) + @tags = Tag.all(:conditions => {:module_app_id => module_app.id}) + end + +end diff --git a/vendor/built_in_modules/personal_seminar/app/helpers/.gitkeep b/vendor/built_in_modules/personal_conference/app/helpers/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/helpers/.gitkeep rename to vendor/built_in_modules/personal_conference/app/helpers/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/app/mailers/.gitkeep b/vendor/built_in_modules/personal_conference/app/mailers/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/mailers/.gitkeep rename to vendor/built_in_modules/personal_conference/app/mailers/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/app/models/.gitkeep b/vendor/built_in_modules/personal_conference/app/models/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/models/.gitkeep rename to vendor/built_in_modules/personal_conference/app/models/.gitkeep diff --git a/vendor/built_in_modules/personal_conference/app/models/conference_author_type.rb b/vendor/built_in_modules/personal_conference/app/models/conference_author_type.rb new file mode 100644 index 00000000..1614cdfb --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/models/conference_author_type.rb @@ -0,0 +1,9 @@ +# encoding: utf-8 + +class ConferenceAuthorType < WritingConferenceCategory + + field :title, localize: true + + has_and_belongs_to_many :writing_conferences + +end diff --git a/vendor/built_in_modules/personal_conference/app/models/conference_paper_type.rb b/vendor/built_in_modules/personal_conference/app/models/conference_paper_type.rb new file mode 100644 index 00000000..b0f27e23 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/models/conference_paper_type.rb @@ -0,0 +1,9 @@ +# encoding: utf-8 + +class ConferencePaperType < WritingConferenceCategory + + field :title, localize: true + + has_and_belongs_to_many :writing_conferences + +end diff --git a/vendor/built_in_modules/personal_conference/app/models/personal_conference_tag.rb b/vendor/built_in_modules/personal_conference/app/models/personal_conference_tag.rb new file mode 100644 index 00000000..bdcfc948 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/models/personal_conference_tag.rb @@ -0,0 +1,9 @@ +class PersonalConferenceTag < Tag + + has_and_belongs_to_many :writing_conferences + + def get_visible_links(sort = :title) + self.writing_conferences.where(:is_hidden => false).desc(:is_top, sort) + end + +end diff --git a/vendor/built_in_modules/personal_seminar/app/models/writing_seminar.rb b/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb similarity index 73% rename from vendor/built_in_modules/personal_seminar/app/models/writing_seminar.rb rename to vendor/built_in_modules/personal_conference/app/models/writing_conference.rb index 00c8b8ac..d10a8afe 100644 --- a/vendor/built_in_modules/personal_seminar/app/models/writing_seminar.rb +++ b/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb @@ -1,6 +1,6 @@ # encoding: utf-8 -class WritingSeminar +class WritingConference include Mongoid::Document include Mongoid::Timestamps include Mongoid::MultiParameterAttributes @@ -11,15 +11,15 @@ class WritingSeminar field :paper_title, localize: true - field :seminar_title, localize: true + field :conference_title, localize: true field :authors, localize: true field :location, localize: true field :sponsor, localize: true - has_and_belongs_to_many :tags, :class_name => "PersonalSeminarTag" + has_and_belongs_to_many :tags, :class_name => "PersonalConferenceTag" - has_and_belongs_to_many :seminar_author_types - has_and_belongs_to_many :seminar_paper_types + has_and_belongs_to_many :conference_author_types + has_and_belongs_to_many :conference_paper_types field :year @@ -38,9 +38,9 @@ class WritingSeminar # field :is_hot, :type => Boolean, :default => false # field :is_hidden, :type => Boolean, :default => false - has_many :writing_seminar_files, :autosave => true, :dependent => :destroy + has_many :writing_conference_files, :autosave => true, :dependent => :destroy - accepts_nested_attributes_for :writing_seminar_files, :allow_destroy => true + accepts_nested_attributes_for :writing_conference_files, :allow_destroy => true # before_save :update_avliable_language, :clean_checkboxs @@ -48,7 +48,7 @@ class WritingSeminar before_validation :add_http - after_save :save_writing_seminar_files + 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?} @@ -56,7 +56,7 @@ class WritingSeminar if category_id.to_s.size > 0 - find(:all, :conditions => {writing_seminar_category_id: category_id}).desc( :is_top, :title ) + find(:all, :conditions => {writing_conference_category_id: category_id}).desc( :is_top, :title ) else @@ -91,8 +91,8 @@ class WritingSeminar end end - def save_writing_seminar_files - self.writing_seminar_files.each do |t| + def save_writing_conference_files + self.writing_conference_files.each do |t| if t.should_destroy t.destroy end @@ -102,11 +102,11 @@ class WritingSeminar def create_link title = ["\"#{self.paper_title}\""] - title << self.seminar_title + title << self.conference_title title << self.sponsor title << self.location title << "#{period_start_date}-#{period_end_date}" - # title << "(#{self.seminar_paper_types.collect{|x| x.title}.join(', ')})" + # title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})" title.join(', ') end @@ -121,8 +121,8 @@ class WritingSeminar def clean_checkboxs self.tag_ids.delete('') - self.seminar_author_type_ids.delete('') - self.seminar_level_type_ids.delete('') + self.conference_author_type_ids.delete('') + self.conference_level_type_ids.delete('') end -end \ No newline at end of file +end diff --git a/vendor/built_in_modules/personal_seminar/app/models/writing_seminar_category.rb b/vendor/built_in_modules/personal_conference/app/models/writing_conference_category.rb similarity index 65% rename from vendor/built_in_modules/personal_seminar/app/models/writing_seminar_category.rb rename to vendor/built_in_modules/personal_conference/app/models/writing_conference_category.rb index 9bd69430..435daf8c 100644 --- a/vendor/built_in_modules/personal_seminar/app/models/writing_seminar_category.rb +++ b/vendor/built_in_modules/personal_conference/app/models/writing_conference_category.rb @@ -1,30 +1,30 @@ # encoding: utf-8 -class WritingSeminarCategory +class WritingConferenceCategory include Mongoid::Document include Mongoid::Timestamps include OrbitCoreLib::ObjectAuthable include OrbitCoreLib::ObjectDisable # include Mongoid::MultiParameterAttributes - AfterObjectAuthUrl = '/panel/personal_seminar/back_end/writing_seminar_categorys' - APP_NAME = 'writing_seminar' + AfterObjectAuthUrl = '/panel/personal_conference/back_end/writing_conference_categorys' + APP_NAME = 'writing_conference' # ObjectAuthTitlesOptions = %W{edit} ObjectAuthTitlesOptions = %W{submit_new fact_check} field :key - has_many :writing_seminars + has_many :writing_conferences def pp_object title end def self.from_id(id) - WritingSeminarCategory.find(id) rescue nil + WritingConferenceCategory.find(id) rescue nil end def self.is_localized?(field_name) self.fields[field_name.to_s].localized? end -end \ No newline at end of file +end diff --git a/vendor/built_in_modules/personal_seminar/app/models/writing_seminar_file.rb b/vendor/built_in_modules/personal_conference/app/models/writing_conference_file.rb similarity index 78% rename from vendor/built_in_modules/personal_seminar/app/models/writing_seminar_file.rb rename to vendor/built_in_modules/personal_conference/app/models/writing_conference_file.rb index e8673019..f098bce0 100644 --- a/vendor/built_in_modules/personal_seminar/app/models/writing_seminar_file.rb +++ b/vendor/built_in_modules/personal_conference/app/models/writing_conference_file.rb @@ -1,4 +1,4 @@ -class WritingSeminarFile +class WritingConferenceFile include Mongoid::Document include Mongoid::Timestamps @@ -9,6 +9,6 @@ class WritingSeminarFile field :should_destroy, :type => Boolean field :title, localize: true - belongs_to :writing_seminar + belongs_to :writing_conference end diff --git a/vendor/built_in_modules/personal_seminar/app/views/.gitkeep b/vendor/built_in_modules/personal_conference/app/views/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/.gitkeep rename to vendor/built_in_modules/personal_conference/app/views/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/_form.html.erb similarity index 76% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/_form.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/_form.html.erb index 94d168b8..47931776 100644 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/_form.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/_form.html.erb @@ -1,8 +1,8 @@ <% # encoding: utf-8 %> -<%= form_for(:writing_seminar_category, :remote => true, :url => @url, :method => @verb, :html => { :id => 'form_writing_seminar_category' } ) do |f| %> +<%= form_for(:writing_conference_category, :remote => true, :url => @url, :method => @verb, :html => { :id => 'form_writing_conference_category' } ) do |f| %> -

    <%= (@writing_seminar_category.new_record? ? 'Add' : 'Edit') %>

    +

    <%= (@writing_conference_category.new_record? ? 'Add' : 'Edit') %>

    <%= f.label :key %> @@ -16,7 +16,7 @@
    <%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
    - <%= f.text_field locale, :class => 'input-xxlarge', :value => (@writing_seminar_category.title_translations[locale] rescue nil) %> + <%= f.text_field locale, :class => 'input-xxlarge', :value => (@writing_conference_category.title_translations[locale] rescue nil) %>
    <% end %> @@ -41,4 +41,4 @@
    <% end %> - \ No newline at end of file + diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/_quick_edit_qe.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/_quick_edit_qe.html.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/_quick_edit_qe.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/_quick_edit_qe.html.erb diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/_writing_conference_category.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/_writing_conference_category.html.erb new file mode 100644 index 00000000..9176ec8c --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/_writing_conference_category.html.erb @@ -0,0 +1,22 @@ + + + + <%= writing_conference_category.key %> +
    + +
    + + <% if @types.is_localized?(:title) %> + <% @site_valid_locales.each do |locale| %> + <%= writing_conference_category.title_translations[locale] rescue nil %> + <% end %> + <% else %> + <%= writing_conference_category.title %> + <% end %> + diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/create.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/create.js.erb new file mode 100644 index 00000000..b17a94fa --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/create.js.erb @@ -0,0 +1,2 @@ +$('<%= j render :partial => 'writing_conference_category', :collection => [@writing_conference_category] %>').appendTo('#writing_conference_categorys').hide().fadeIn(); +$("#form_writing_conference_category")[0].reset(); diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/destroy.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/destroy.js.erb new file mode 100644 index 00000000..27eacbab --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/destroy.js.erb @@ -0,0 +1 @@ +$("#<%= dom_id @writing_conference_category %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@writing_conference_category) %> "); diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/edit.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/edit.html.erb new file mode 100644 index 00000000..c7b89dbd --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/edit.html.erb @@ -0,0 +1,7 @@ +

    <%= t('personal_conference.editing_personal_conference_class') %>

    + +<%= form_for @writing_conference_category, :url => panel_personal_conference_back_end_writing_conference_category_path(@writing_conference_category) do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> + +<%= link_back %> diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/edit.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/edit.js.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/edit.js.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/edit.js.erb diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/index.html.erb similarity index 56% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/index.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/index.html.erb index 3b29d1c8..359c0e4a 100644 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/index.html.erb @@ -3,22 +3,22 @@ <%= @types %> - +
    - + <% if @types.is_localized?(:title) %> <% @site_valid_locales.each do |locale| %> <% end %> <% else %> - + <% end %> - <%= render :partial => 'writing_seminar_category', :collection => @writing_seminar_categorys %> + <%= render :partial => 'writing_conference_category', :collection => @writing_conference_categorys %>
    <%= t('writing_seminar_category.key') %><%= t('writing_conference_category.key') %><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %><%= t('writing_seminar_category.title') %><%= t('writing_conference_category.title') %>
    diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/new.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/new.html.erb new file mode 100644 index 00000000..46d19941 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/new.html.erb @@ -0,0 +1,19 @@ +<% content_for :secondary do %> +<%= render :partial => '/panel/personal_conference/back_end/personal_conference_secondary' %> +<% end -%> + +<%= flash_messages %> + +
    +
    +
    +
    +
    + +

    <%= t('writing_conference_category.new_personal_conference_class') %>

    +<%= form_for @writing_conference_category, :url => panel_personal_conference_back_end_writing_conference_categorys_path do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> + +<%= link_back %> + diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/new.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/new.js.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/new.js.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/new.js.erb diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/update.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/update.js.erb new file mode 100644 index 00000000..58c2c0e7 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conference_categorys/update.js.erb @@ -0,0 +1,4 @@ +$("#<%= dom_id @writing_conference_category %>").replaceWith("<%= j render :partial => 'writing_conference_category', :collection => [@writing_conference_category] %>"); +<% @writing_conference_category = @types.new(:display => 'List') # reset for new form %> +$("#form_writing_conference_category").replaceWith("<%= j render "form" %>") +$("#form_writing_conference_category")[0].reset(); diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_author_type_qe.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_author_type_qe.html.erb similarity index 92% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_author_type_qe.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_author_type_qe.html.erb index f0994f90..d38241dd 100644 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_author_type_qe.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_author_type_qe.html.erb @@ -26,9 +26,9 @@ <% end %>
    <% end %> - \ No newline at end of file + diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_filter.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_filter.html.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_filter.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_filter.html.erb diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_form.html.erb similarity index 69% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_form.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_form.html.erb index 90a011e3..93ec5a0a 100644 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_form.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_form.html.erb @@ -10,13 +10,13 @@
    -

    <%= f.label :paper_type ,t("personal_seminar.paper_type")%>

    +

    <%= f.label :paper_type ,t("personal_conference.paper_type")%>

    <% @paper_types.each do |paper_type| %> <%= content_tag :label,:class => "checkbox inline" do -%> - <%= check_box_tag 'writing_seminar[seminar_paper_type_ids][]', paper_type.id, @writing_seminar.seminar_paper_type_ids.include?(paper_type.id)%> + <%= check_box_tag 'writing_conference[conference_paper_type_ids][]', paper_type.id, @writing_conference.conference_paper_type_ids.include?(paper_type.id)%> <%= paper_type.title %> - <%= hidden_field_tag 'writing_seminar[seminar_paper_type_ids][]', '' %> + <%= hidden_field_tag 'writing_conference[conference_paper_type_ids][]', '' %> <% end %> <% end %>
    @@ -26,13 +26,13 @@
    -

    <%= f.label :author_type ,t("personal_seminar.author_type")%>

    +

    <%= f.label :author_type ,t("personal_conference.author_type")%>

    <% @author_types.each do |author_type| %> <%= content_tag :label,:class => "checkbox inline" do -%> - <%= check_box_tag 'writing_seminar[seminar_author_type_ids][]', author_type.id, @writing_seminar.seminar_author_type_ids.include?(author_type.id)%> + <%= check_box_tag 'writing_conference[conference_author_type_ids][]', author_type.id, @writing_conference.conference_author_type_ids.include?(author_type.id)%> <%= author_type.title %> - <%= hidden_field_tag 'writing_seminar[seminar_author_type_ids][]', '' %> + <%= hidden_field_tag 'writing_conference[conference_author_type_ids][]', '' %> <% end %> <% end %>
    @@ -47,9 +47,9 @@
    <% @tags.each do |tag| %> <%= content_tag :label,:class => "checkbox inline" do -%> - <%= check_box_tag 'writing_seminar[tag_ids][]', tag.id, @writing_seminar.tag_ids.include?(tag.id)%> + <%= check_box_tag 'writing_conference[tag_ids][]', tag.id, @writing_conference.tag_ids.include?(tag.id)%> <%= tag[I18n.locale] %> - <%= hidden_field_tag 'writing_seminar[tag_ids][]', '' %> + <%= hidden_field_tag 'writing_conference[tag_ids][]', '' %> <% end %> <% end %>
    @@ -74,8 +74,8 @@ <% end %>
    - <%= f.label :year ,t("personal_seminar.year")%> - <%= select_year((@writing_seminar.year ? @writing_seminar.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_seminar[year]'} ) %> + <%= f.label :year ,t("personal_conference.year")%> + <%= 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]'} ) %>
    - <%= f.label :period_start_date ,t("personal_seminar.period_start_date")%> + <%= f.label :period_start_date ,t("personal_conference.period_start_date")%> <%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
    - <%= f.label :period_end_date ,t("personal_seminar.period_end_date")%> + <%= f.label :period_end_date ,t("personal_conference.period_end_date")%> <%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
    @@ -100,34 +100,34 @@
    ">
    - <%= f.label :paper_title ,t("personal_seminar.paper_title")%> + <%= f.label :paper_title ,t("personal_conference.paper_title")%> <%= f.fields_for :paper_title_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.paper_title_translations[locale] rescue nil) %> + <%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.paper_title_translations[locale] rescue nil) %> <% end %>
    - <%= f.label :seminar_title ,t("personal_seminar.seminar_title")%> - <%= f.fields_for :seminar_title_translations do |f| %> + <%= f.label :conference_title ,t("personal_conference.conference_title")%> + <%= f.fields_for :conference_title_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.seminar_title_translations[locale] rescue nil) %> + <%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.conference_title_translations[locale] rescue nil) %> <% end %>
    - <%= f.label :location ,t("personal_seminar.location")%> + <%= f.label :location ,t("personal_conference.location")%> <%= f.fields_for :location_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.location_translations[locale] rescue nil) %> + <%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.location_translations[locale] rescue nil) %> <% end %>
    - <%= f.label :sponsor ,t("personal_seminar.sponsor")%> + <%= f.label :sponsor ,t("personal_conference.sponsor")%> <%= f.fields_for :sponsor_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.sponsor_translations[locale] rescue nil) %> + <%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.sponsor_translations[locale] rescue nil) %> <% end %>
    @@ -135,7 +135,7 @@ <%= f.label :authors,t("web_resource.authors") %> <%= f.fields_for :authors_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_area locale, :size => "60x3", :value => (@writing_seminar.authors_translations[locale] rescue nil) %> + <%= f.text_area locale, :size => "60x3", :value => (@writing_conference.authors_translations[locale] rescue nil) %> <% end %>
    @@ -146,32 +146,32 @@
    - <%= f.label :publication_date ,t("personal_seminar.publication_date")%> + <%= f.label :publication_date ,t("personal_conference.publication_date")%> <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month, :day] }, {:class => 'span1'} %>
    - <%= f.label :url, t("personal_seminar.url") %> + <%= f.label :url, t("personal_conference.url") %> <%= f.text_field :url %>
    - <%= f.label :keywords, t("personal_seminar.keywords") %> + <%= f.label :keywords, t("personal_conference.keywords") %> <%= f.text_field :keywords %>
    - <%= f.label :abstract, t("personal_seminar.abstract") %> + <%= f.label :abstract, t("personal_conference.abstract") %> <%= f.text_field :abstract %>
    <%= f.label :language, t("personal_journal.language") %> - <%= f.select :language, WritingSeminar::LANGUAGE_TYPES, :prompt => 'Select' %> + <%= f.select :language, WritingConference::LANGUAGE_TYPES, :prompt => 'Select' %>
    - <%= f.label :note, t("personal_seminar.note") %> + <%= f.label :note, t("personal_conference.note") %> <%= f.text_area :note, :size => "60x3" %>
    @@ -197,7 +197,7 @@
    - <%= hidden_field_tag 'plugin_file_field_count', @writing_seminar.writing_seminar_files.count %> + <%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %> ADD/新增
    @@ -206,9 +206,9 @@ - <% @writing_seminar.writing_seminar_files.each_with_index do |writing_seminar_file, i| %> - <%= f.fields_for :writing_seminar_files, writing_seminar_file do |f| %> - <%= render :partial => 'form_file', :object => writing_seminar_file, :locals => {:f => f, :i => i} %> + <% @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 %> @@ -242,7 +242,7 @@ var new_id = $(this).prev().attr('value'); var old_id = new RegExp("new_add_plugin_files", "g"); $(this).prev().attr('value', parseInt(new_id) + 1); - $(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_seminar_files) %>").replace(old_id, new_id)); + $(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id)); }); $('.add_plugin_files_block a.delete').live('click', function(){ @@ -255,4 +255,4 @@ }); -<% end %> \ No newline at end of file +<% end %> diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_form_file.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_form_file.html.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_form_file.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_form_file.html.erb diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_list_author_type.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_list_author_type.html.erb new file mode 100644 index 00000000..80cd726f --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_list_author_type.html.erb @@ -0,0 +1,11 @@ +<% # encoding: utf-8 %> + + + <%= list_author_type.title %> + + + 編輯 + <%= link_to show_toggle_archive_btn(list_author_type), + polymorphic_path([:panel, :personal_conference, :back_end, list_author_type]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %> + + diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_list_paper_type.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_list_paper_type.html.erb new file mode 100644 index 00000000..11b16128 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_list_paper_type.html.erb @@ -0,0 +1,11 @@ +<% # encoding: utf-8 %> + + + <%= list_paper_type.title %> + + + 編輯 + <%= link_to show_toggle_archive_btn(list_paper_type), + polymorphic_path([:panel, :personal_conference, :back_end, list_paper_type]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %> + + diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_paper_type_qe.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_paper_type_qe.html.erb similarity index 93% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_paper_type_qe.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_paper_type_qe.html.erb index a96aaab6..2c9a9797 100644 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_paper_type_qe.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_paper_type_qe.html.erb @@ -26,9 +26,9 @@ <% end %>
    <% end %> - \ No newline at end of file + diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_sort_headers.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_sort_headers.html.erb new file mode 100644 index 00000000..29fb2056 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_sort_headers.html.erb @@ -0,0 +1,4 @@ +<%= render_sort_bar(true, delete_panel_personal_conference_back_end_writing_conferences_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]), + ['year', 'year', 'span1', 'writing_conference.year'], + ['title', 'title','span3', 'writing_conference.title'], + ['create_modified', 'create_user_id','span1-3', 'writing_conference.create_modified']).html_safe %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_writing_conference.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_writing_conference.html.erb new file mode 100644 index 00000000..3f884496 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/_writing_conference.html.erb @@ -0,0 +1,21 @@ + + + <% if (writing_conference.create_user_id == current_user.id) || is_manager? %> + <%= check_box_tag 'to_delete[]', writing_conference.id, false, :class => "checkbox_in_list" %> + <% end -%> + + <%= writing_conference.year %> + + <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %> +
    + +
    + + <%= User.from_id(writing_conference.create_user_id).name rescue ''%> + + diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/author_type_quick_add.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/author_type_quick_add.js.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/author_type_quick_add.js.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/author_type_quick_add.js.erb diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/author_type_quick_edit.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/author_type_quick_edit.js.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/author_type_quick_edit.js.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/author_type_quick_edit.js.erb diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/create_writing_conference_setting.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/create_writing_conference_setting.js.erb new file mode 100644 index 00000000..6831b06b --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/create_writing_conference_setting.js.erb @@ -0,0 +1,10 @@ + +<% if !@conference_paper_type.blank? %> +$("#myModal1").modal('hide'); +$('<%= j render :partial => 'list_paper_type', :collection => [@conference_paper_type] %>').appendTo('#paper_types').hide().fadeIn(); +<% end %> + +<% if !@conference_author_type.blank? %> +$("#myModal2").modal('hide'); +$('<%= j render :partial => 'list_author_type', :collection => [@conference_author_type] %>').appendTo('#author_types').hide().fadeIn(); +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/destroy.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/destroy.js.erb new file mode 100644 index 00000000..46ccd29a --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/destroy.js.erb @@ -0,0 +1 @@ +$("#<%= dom_id @writing_conference %>").remove(); diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/edit.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/edit.html.erb new file mode 100644 index 00000000..9348b28c --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/edit.html.erb @@ -0,0 +1,5 @@ +

    <%= t('personal_conference.editing_personal_conference') %>

    + +<%= form_for @writing_conference, :url => panel_personal_conference_back_end_writing_conference_path(@writing_conference), :html => {:class => 'clear'} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/index.html.erb new file mode 100644 index 00000000..8553e0a6 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/index.html.erb @@ -0,0 +1,22 @@ +<%= render 'filter' %> + + + + + + + + + + + + <%= render :partial => 'writing_conference', :collection => @writing_conferences %> + +
    + +
    + <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path, :class => 'btn btn-primary pull-right' %> +
    + <%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> +
    +
    diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/index.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/index.js.erb new file mode 100644 index 00000000..b3851d26 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/index.js.erb @@ -0,0 +1,3 @@ +$("#sort_headers").html("<%= j render 'sort_headers' %>"); +$("#tbody_writing_conferences").html("<%= j render :partial => 'writing_conference', :collection => @writing_conferences %>"); +$("#writing_conference_pagination").html("<%= j paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/new.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/new.html.erb new file mode 100644 index 00000000..3e450f81 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/new.html.erb @@ -0,0 +1,10 @@ + +<%= flash_messages %> +
    +

    <%= t('writing_conference.new_personal_conference') %>

    +<%= form_for @writing_conference, :url => panel_personal_conference_back_end_writing_conferences_path, :html => {:class => 'clear'} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> +
    +<%#= link_back %> + diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/paper_type_quick_add.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/paper_type_quick_add.js.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/paper_type_quick_add.js.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/paper_type_quick_add.js.erb diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/paper_type_quick_edit.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/paper_type_quick_edit.js.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/paper_type_quick_edit.js.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/paper_type_quick_edit.js.erb diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/show.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/show.html.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/show.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/show.html.erb diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/toggle_enable.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/toggle_enable.js.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/toggle_enable.js.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/toggle_enable.js.erb diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/update_writing_conference_setting.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/update_writing_conference_setting.js.erb new file mode 100644 index 00000000..ec6663ee --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/update_writing_conference_setting.js.erb @@ -0,0 +1,10 @@ + +<% if !@conference_paper_type.blank? %> +$("#myModal1").modal('hide'); +$("#<%= dom_id @conference_paper_type %>").replaceWith("<%= j render :partial => 'list_paper_type', :collection => [@conference_paper_type] %>"); +<% end %> + +<% if !@conference_author_type.blank? %> +$("#myModal2").modal('hide'); +$("#<%= dom_id @conference_author_type %>").replaceWith("<%= j render :partial => 'list_author_type', :collection => [@conference_author_type] %>"); +<% end %> diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/writing_seminar_setting.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/writing_conference_setting.html.erb similarity index 94% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/writing_seminar_setting.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/writing_conference_setting.html.erb index f4795b61..fec76937 100644 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/writing_seminar_setting.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/back_end/writing_conferences/writing_conference_setting.html.erb @@ -5,7 +5,7 @@

    - <%= t('add')%> + <%= t('add')%> 論文型態

    @@ -31,7 +31,7 @@

    - <%= t('add')%> + <%= t('add')%> 作者型態

    @@ -143,4 +143,4 @@ <% content_for :page_specific_css do %> <%= stylesheet_link_tag "item" %> -<% end %> \ No newline at end of file +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/_profile.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/_profile.html.erb new file mode 100644 index 00000000..2d30f589 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/_profile.html.erb @@ -0,0 +1,62 @@ +<% + @filter = params[:filter] + new_filter = params[:new_filter] + + if @filter && params[:clear] + @filter.delete(params[:type]) + elsif @filter && new_filter + if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) + @filter[new_filter[:type]].delete(new_filter[:id].to_s) + elsif @filter.has_key?(new_filter[:type]) + @filter[new_filter[:type]] << new_filter[:id].to_s + else + @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) + end + elsif new_filter + @filter = {new_filter[:type] => [new_filter[:id].to_s]} + end + + + if @user + @writing_conferences = WritingConference.where(:create_user_id => @user.id).page(params[:page]).per(10) + else + @writing_conferences = WritingConference.all.page(params[:page]).per(10) + end + + +%> + + + + + + + + + + + + <% @writing_conferences.each do |writing_conference| %> + + + + + + + <% end %> + + + +
    <%= t('writing_conference.year') %><%= t('writing_conference.title') %>
    <%= writing_conference.year %> + <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %> +
    + +<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary pull-right' %> + + +
    + <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_plugin_writing_conference_path, :class => 'btn btn-primary pull-right' %> +
    + <%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> +
    +
    diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_filter.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_filter.html.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_filter.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_filter.html.erb diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_form.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_form.html.erb similarity index 68% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_form.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_form.html.erb index 5c624309..5304d121 100644 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_form.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_form.html.erb @@ -10,13 +10,13 @@
    -

    <%= f.label :paper_type ,t("personal_seminar.paper_type")%>

    +

    <%= f.label :paper_type ,t("personal_conference.paper_type")%>

    <% @paper_types.each do |paper_type| %> <%= content_tag :label,:class => "checkbox inline" do -%> - <%= check_box_tag 'writing_seminar[seminar_paper_type_ids][]', paper_type.id, @writing_seminar.seminar_paper_type_ids.include?(paper_type.id)%> + <%= check_box_tag 'writing_conference[conference_paper_type_ids][]', paper_type.id, @writing_conference.conference_paper_type_ids.include?(paper_type.id)%> <%= paper_type.title %> - <%= hidden_field_tag 'writing_seminar[seminar_paper_type_ids][]', '' %> + <%= hidden_field_tag 'writing_conference[conference_paper_type_ids][]', '' %> <% end %> <% end %>
    @@ -26,13 +26,13 @@
    -

    <%= f.label :author_type ,t("personal_seminar.author_type")%>

    +

    <%= f.label :author_type ,t("personal_conference.author_type")%>

    <% @author_types.each do |author_type| %> <%= content_tag :label,:class => "checkbox inline" do -%> - <%= check_box_tag 'writing_seminar[seminar_author_type_ids][]', author_type.id, @writing_seminar.seminar_author_type_ids.include?(author_type.id)%> + <%= check_box_tag 'writing_conference[conference_author_type_ids][]', author_type.id, @writing_conference.conference_author_type_ids.include?(author_type.id)%> <%= author_type.title %> - <%= hidden_field_tag 'writing_seminar[seminar_author_type_ids][]', '' %> + <%= hidden_field_tag 'writing_conference[conference_author_type_ids][]', '' %> <% end %> <% end %>
    @@ -47,9 +47,9 @@
    <% @tags.each do |tag| %> <%= content_tag :label,:class => "checkbox inline" do -%> - <%= check_box_tag 'writing_seminar[tag_ids][]', tag.id, @writing_seminar.tag_ids.include?(tag.id)%> + <%= check_box_tag 'writing_conference[tag_ids][]', tag.id, @writing_conference.tag_ids.include?(tag.id)%> <%= tag[I18n.locale] %> - <%= hidden_field_tag 'writing_seminar[tag_ids][]', '' %> + <%= hidden_field_tag 'writing_conference[tag_ids][]', '' %> <% end %> <% end %>
    @@ -65,8 +65,8 @@
    - <%= f.label :year ,t("personal_seminar.year")%> - <%= select_year((@writing_seminar.year ? @writing_seminar.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_seminar[year]'} ) %> + <%= f.label :year ,t("personal_conference.year")%> + <%= 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]'} ) %>
    - <%= f.label :period_start_date ,t("personal_seminar.period_start_date")%> + <%= f.label :period_start_date ,t("personal_conference.period_start_date")%> <%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
    - <%= f.label :period_end_date ,t("personal_seminar.period_end_date")%> + <%= f.label :period_end_date ,t("personal_conference.period_end_date")%> <%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
    @@ -91,34 +91,34 @@
    ">
    - <%= f.label :paper_title ,t("personal_seminar.paper_title")%> + <%= f.label :paper_title ,t("personal_conference.paper_title")%> <%= f.fields_for :paper_title_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.paper_title_translations[locale] rescue nil) %> + <%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.paper_title_translations[locale] rescue nil) %> <% end %>
    - <%= f.label :seminar_title ,t("personal_seminar.seminar_title")%> - <%= f.fields_for :seminar_title_translations do |f| %> + <%= f.label :conference_title ,t("personal_conference.conference_title")%> + <%= f.fields_for :conference_title_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.seminar_title_translations[locale] rescue nil) %> + <%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.conference_title_translations[locale] rescue nil) %> <% end %>
    - <%= f.label :location ,t("personal_seminar.location")%> + <%= f.label :location ,t("personal_conference.location")%> <%= f.fields_for :location_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.location_translations[locale] rescue nil) %> + <%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.location_translations[locale] rescue nil) %> <% end %>
    - <%= f.label :sponsor ,t("personal_seminar.sponsor")%> + <%= f.label :sponsor ,t("personal_conference.sponsor")%> <%= f.fields_for :sponsor_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.sponsor_translations[locale] rescue nil) %> + <%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.sponsor_translations[locale] rescue nil) %> <% end %>
    @@ -126,7 +126,7 @@ <%= f.label :authors,t("web_resource.authors") %> <%= f.fields_for :authors_translations do |f| %> <%= I18nVariable.from_locale(locale) %> - <%= f.text_area locale, :size => "60x3", :value => (@writing_seminar.authors_translations[locale] rescue nil) %> + <%= f.text_area locale, :size => "60x3", :value => (@writing_conference.authors_translations[locale] rescue nil) %> <% end %>
    @@ -137,32 +137,32 @@
    - <%= f.label :publication_date ,t("personal_seminar.publication_date")%> + <%= f.label :publication_date ,t("personal_conference.publication_date")%> <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month, :day] }, {:class => 'span1'} %>
    - <%= f.label :url, t("personal_seminar.url") %> + <%= f.label :url, t("personal_conference.url") %> <%= f.text_field :url %>
    - <%= f.label :keywords, t("personal_seminar.keywords") %> + <%= f.label :keywords, t("personal_conference.keywords") %> <%= f.text_field :keywords %>
    - <%= f.label :abstract, t("personal_seminar.abstract") %> + <%= f.label :abstract, t("personal_conference.abstract") %> <%= f.text_field :abstract %>
    <%= f.label :language, t("personal_journal.language") %> - <%= f.select :language, WritingSeminar::LANGUAGE_TYPES, :prompt => 'Select' %> + <%= f.select :language, WritingConference::LANGUAGE_TYPES, :prompt => 'Select' %>
    - <%= f.label :note, t("personal_seminar.note") %> + <%= f.label :note, t("personal_conference.note") %> <%= f.text_area :note, :size => "60x3" %>
    @@ -188,7 +188,7 @@
    - <%= hidden_field_tag 'plugin_file_field_count', @writing_seminar.writing_seminar_files.count %> + <%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %> ADD/新增
    @@ -197,9 +197,9 @@ - <% @writing_seminar.writing_seminar_files.each_with_index do |writing_seminar_file, i| %> - <%= f.fields_for :writing_seminar_files, writing_seminar_file do |f| %> - <%= render :partial => 'form_file', :object => writing_seminar_file, :locals => {:f => f, :i => i} %> + <% @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 %> @@ -232,7 +232,7 @@ var new_id = $(this).prev().attr('value'); var old_id = new RegExp("new_add_plugin_files", "g"); $(this).prev().attr('value', parseInt(new_id) + 1); - $(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_seminar_files) %>").replace(old_id, new_id)); + $(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id)); }); $('.add_plugin_files_block a.delete').live('click', function(){ @@ -245,4 +245,4 @@ }); -<% end %> \ No newline at end of file +<% end %> diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_form_file.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_form_file.html.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_form_file.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_form_file.html.erb diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_sort_headers.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_sort_headers.html.erb new file mode 100644 index 00000000..0951e9d8 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_sort_headers.html.erb @@ -0,0 +1,3 @@ +<%= render_sort_bar(true, delete_panel_personal_conference_back_end_writing_conferences_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]), + ['year', 'year', 'span1', 'writing_conference.year'], + ['title', 'title','span3', 'writing_conference.title']).html_safe %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_writing_conference.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_writing_conference.html.erb new file mode 100644 index 00000000..aab55cf8 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/_writing_conference.html.erb @@ -0,0 +1,20 @@ + + + <% if (writing_conference.create_user_id == current_user.id) || is_manager? %> + <%= check_box_tag 'to_delete[]', writing_conference.id, false, :class => "checkbox_in_list" %> + <% end -%> + + <%= writing_conference.year %> + + <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %> +
    + +
    + + + diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/destroy.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/destroy.js.erb new file mode 100644 index 00000000..46ccd29a --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/destroy.js.erb @@ -0,0 +1 @@ +$("#<%= dom_id @writing_conference %>").remove(); diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/edit.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/edit.html.erb new file mode 100644 index 00000000..0316b85c --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/edit.html.erb @@ -0,0 +1,5 @@ +

    <%= t('personal_conference.editing_personal_conference') %>

    + +<%= form_for @writing_conference, :url => panel_personal_conference_plugin_writing_conference_path(@writing_conference), :html => {:class => 'clear'} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/index.html.erb new file mode 100644 index 00000000..a1bcadb1 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/index.html.erb @@ -0,0 +1,22 @@ +<%= render 'filter' %> + + + + + + + + + + + + <%= render :partial => 'writing_conference', :collection => @writing_conferences %> + +
    + +
    + <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_plugin_writing_conference_path, :class => 'btn btn-primary pull-right' %> +
    + <%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> +
    +
    diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/index.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/index.js.erb new file mode 100644 index 00000000..b3851d26 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/index.js.erb @@ -0,0 +1,3 @@ +$("#sort_headers").html("<%= j render 'sort_headers' %>"); +$("#tbody_writing_conferences").html("<%= j render :partial => 'writing_conference', :collection => @writing_conferences %>"); +$("#writing_conference_pagination").html("<%= j paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/new.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/new.html.erb new file mode 100644 index 00000000..de2d2eab --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/new.html.erb @@ -0,0 +1,10 @@ + +<%= flash_messages %> +
    +

    <%= t('writing_conference.new_personal_conference') %>

    +<%= form_for @writing_conference, :url => panel_personal_conference_plugin_writing_conferences_path, :html => {:class => 'clear'} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> +
    +<%#= link_back %> + diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/show.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/show.html.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/show.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/show.html.erb diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/toggle_enable.js.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/toggle_enable.js.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/toggle_enable.js.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/writing_conferences/toggle_enable.js.erb diff --git a/vendor/built_in_modules/personal_seminar/config/locales/en.yml b/vendor/built_in_modules/personal_conference/config/locales/en.yml similarity index 100% rename from vendor/built_in_modules/personal_seminar/config/locales/en.yml rename to vendor/built_in_modules/personal_conference/config/locales/en.yml diff --git a/vendor/built_in_modules/personal_seminar/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_conference/config/locales/zh_tw.yml similarity index 100% rename from vendor/built_in_modules/personal_seminar/config/locales/zh_tw.yml rename to vendor/built_in_modules/personal_conference/config/locales/zh_tw.yml diff --git a/vendor/built_in_modules/personal_conference/config/routes.rb b/vendor/built_in_modules/personal_conference/config/routes.rb new file mode 100644 index 00000000..7b5c9ead --- /dev/null +++ b/vendor/built_in_modules/personal_conference/config/routes.rb @@ -0,0 +1,36 @@ +Rails.application.routes.draw do + + namespace :panel do + namespace :personal_conference do + namespace :back_end do + match 'writing_conference_setting' => "writing_conferences#writing_conference_setting" ,:as => :writing_conference_setting + resources :writing_conferences do + collection do + get 'delete' + end + match "author_type_quick_add" => "writing_conferences#author_type_quick_add" ,:as => :author_type_quick_add + match "author_type_quick_edit" => "writing_conferences#author_type_quick_edit" ,:as => :author_type_quick_edit + match "paper_type_quick_add" => "writing_conferences#paper_type_quick_add" ,:as => :paper_type_quick_add + match "paper_type_quick_edit" => "writing_conferences#paper_type_quick_edit" ,:as => :paper_type_quick_edit + end + resources :conference_paper_types + resources :conference_author_types + # resources :conference_level_types + resources :tags + end + namespace :front_end do + resources :writing_conferences + end + namespace :plugin do + resources :writing_conferences + end + namespace :widget do + match "writing_conferences" => "writing_conferences#index" + match "home_list" => "writing_conferences#home_list" + match "reload_writing_conferences" => "writing_conferences#reload_writing_conferences" + end + end + end + match "/appfront/*path" => redirect("/panel/*path") + +end diff --git a/vendor/built_in_modules/personal_seminar/init.rb b/vendor/built_in_modules/personal_conference/init.rb similarity index 73% rename from vendor/built_in_modules/personal_seminar/init.rb rename to vendor/built_in_modules/personal_conference/init.rb index b66d9d76..c4eca015 100644 --- a/vendor/built_in_modules/personal_seminar/init.rb +++ b/vendor/built_in_modules/personal_conference/init.rb @@ -1,8 +1,8 @@ -module PersonalSeminar - OrbitApp.registration "Seminar",:type=> 'ModuleApp' do - module_label 'miss_plugin_i18n.personal_seminar' +module PersonalConference + OrbitApp.registration "Conference",:type=> 'ModuleApp' do + module_label 'admin.personal_conference' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_seminar/plugin/profile",:i18n=>'miss_plugin_i18n.personal_seminar' + personal_plugin :enable => true,:path=>"panel/personal_conference/plugin/profile",:i18n=>'admin.personal_conference' end @@ -22,4 +22,4 @@ end # :priority=>1,:label=>I18n.t('announcement.add_new'), # :active_for_action=>{:news_bulletins=>:new} -# end \ No newline at end of file +# end diff --git a/vendor/built_in_modules/personal_conference/lib/personal_conference.rb b/vendor/built_in_modules/personal_conference/lib/personal_conference.rb new file mode 100644 index 00000000..0034420f --- /dev/null +++ b/vendor/built_in_modules/personal_conference/lib/personal_conference.rb @@ -0,0 +1,4 @@ +require "personal_conference/engine" + +module PersonalConference +end diff --git a/vendor/built_in_modules/personal_seminar/lib/personal_seminar/engine.rb b/vendor/built_in_modules/personal_conference/lib/personal_conference/engine.rb similarity index 61% rename from vendor/built_in_modules/personal_seminar/lib/personal_seminar/engine.rb rename to vendor/built_in_modules/personal_conference/lib/personal_conference/engine.rb index 9aa97dbc..4c8eb13a 100644 --- a/vendor/built_in_modules/personal_seminar/lib/personal_seminar/engine.rb +++ b/vendor/built_in_modules/personal_conference/lib/personal_conference/engine.rb @@ -1,4 +1,4 @@ -module PersonalSeminar +module PersonalConference class Engine < Rails::Engine end end diff --git a/vendor/built_in_modules/personal_conference/lib/personal_conference/version.rb b/vendor/built_in_modules/personal_conference/lib/personal_conference/version.rb new file mode 100644 index 00000000..0c570453 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/lib/personal_conference/version.rb @@ -0,0 +1,3 @@ +module PersonalConference + VERSION = "0.0.1" +end diff --git a/vendor/built_in_modules/personal_seminar/lib/tasks/personal_seminar_tasks.rake b/vendor/built_in_modules/personal_conference/lib/tasks/personal_conference_tasks.rake similarity index 68% rename from vendor/built_in_modules/personal_seminar/lib/tasks/personal_seminar_tasks.rake rename to vendor/built_in_modules/personal_conference/lib/tasks/personal_conference_tasks.rake index bbeac326..a069f9c2 100644 --- a/vendor/built_in_modules/personal_seminar/lib/tasks/personal_seminar_tasks.rake +++ b/vendor/built_in_modules/personal_conference/lib/tasks/personal_conference_tasks.rake @@ -1,4 +1,4 @@ # desc "Explaining what the task does" -# task :personal_seminar do +# task :personal_conference do # # Task goes here # end diff --git a/vendor/built_in_modules/personal_seminar/personal_seminar.gemspec b/vendor/built_in_modules/personal_conference/personal_conference.gemspec similarity index 89% rename from vendor/built_in_modules/personal_seminar/personal_seminar.gemspec rename to vendor/built_in_modules/personal_conference/personal_conference.gemspec index d3b872dc..5ac24a50 100644 --- a/vendor/built_in_modules/personal_seminar/personal_seminar.gemspec +++ b/vendor/built_in_modules/personal_conference/personal_conference.gemspec @@ -1,11 +1,11 @@ $:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: -require "personal_seminar/version" +require "personal_conference/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| - s.name = "personal_seminar" + s.name = "personal_conference" s.version = PersonalSeminar::VERSION s.authors = ["TODO: Your name"] s.email = ["TODO: Your email"] diff --git a/vendor/built_in_modules/personal_seminar/personal_seminar.json b/vendor/built_in_modules/personal_conference/personal_conference.json similarity index 66% rename from vendor/built_in_modules/personal_seminar/personal_seminar.json rename to vendor/built_in_modules/personal_conference/personal_conference.json index 1209f34e..f0321ce7 100644 --- a/vendor/built_in_modules/personal_seminar/personal_seminar.json +++ b/vendor/built_in_modules/personal_conference/personal_conference.json @@ -1,13 +1,13 @@ { - "title": "personal_seminar", - "object": "writing_seminar", + "title": "personal_conference", + "object": "writing_conference", "version": "0.1", "organization": "Rulingcom", "author": "RD dep", "intro": "A simple blog……", "update_info": "Some info", "create_date": "09-08-2012", - "category": ["WritingSeminarCategory"], + "category": ["WritingConferenceCategory"], "enable_frontend": true, "has_plugin": true } diff --git a/vendor/built_in_modules/personal_seminar/script/rails b/vendor/built_in_modules/personal_conference/script/rails similarity index 100% rename from vendor/built_in_modules/personal_seminar/script/rails rename to vendor/built_in_modules/personal_conference/script/rails diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/Rakefile b/vendor/built_in_modules/personal_conference/test/dummy/Rakefile similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/Rakefile rename to vendor/built_in_modules/personal_conference/test/dummy/Rakefile diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/personal_conference/test/dummy/app/assets/javascripts/application.js similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/app/assets/javascripts/application.js rename to vendor/built_in_modules/personal_conference/test/dummy/app/assets/javascripts/application.js diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/personal_conference/test/dummy/app/assets/stylesheets/application.css similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/app/assets/stylesheets/application.css rename to vendor/built_in_modules/personal_conference/test/dummy/app/assets/stylesheets/application.css diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/personal_conference/test/dummy/app/controllers/application_controller.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/app/controllers/application_controller.rb rename to vendor/built_in_modules/personal_conference/test/dummy/app/controllers/application_controller.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/personal_conference/test/dummy/app/helpers/application_helper.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/app/helpers/application_helper.rb rename to vendor/built_in_modules/personal_conference/test/dummy/app/helpers/application_helper.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/personal_conference/test/dummy/app/mailers/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/app/mailers/.gitkeep rename to vendor/built_in_modules/personal_conference/test/dummy/app/mailers/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/personal_conference/test/dummy/app/models/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/app/models/.gitkeep rename to vendor/built_in_modules/personal_conference/test/dummy/app/models/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/personal_conference/test/dummy/app/views/layouts/application.html.erb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/app/views/layouts/application.html.erb rename to vendor/built_in_modules/personal_conference/test/dummy/app/views/layouts/application.html.erb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config.ru b/vendor/built_in_modules/personal_conference/test/dummy/config.ru similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config.ru rename to vendor/built_in_modules/personal_conference/test/dummy/config.ru diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/application.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/application.rb similarity index 98% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/application.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/application.rb index a6aa4a77..82ff29a4 100644 --- a/vendor/built_in_modules/personal_seminar/test/dummy/config/application.rb +++ b/vendor/built_in_modules/personal_conference/test/dummy/config/application.rb @@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require -require "personal_seminar" +require "personal_conference" module Dummy class Application < Rails::Application diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/boot.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/boot.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/boot.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/boot.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/database.yml b/vendor/built_in_modules/personal_conference/test/dummy/config/database.yml similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/database.yml rename to vendor/built_in_modules/personal_conference/test/dummy/config/database.yml diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/environment.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/environment.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/environment.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/environment.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/environments/development.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/environments/development.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/environments/development.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/environments/development.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/environments/production.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/environments/production.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/environments/production.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/environments/production.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/environments/test.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/environments/test.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/environments/test.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/environments/test.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/backtrace_silencers.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/backtrace_silencers.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/initializers/backtrace_silencers.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/inflections.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/inflections.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/initializers/inflections.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/mime_types.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/mime_types.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/initializers/mime_types.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/secret_token.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/secret_token.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/initializers/secret_token.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/session_store.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/session_store.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/initializers/session_store.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/initializers/wrap_parameters.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/initializers/wrap_parameters.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/initializers/wrap_parameters.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/locales/en.yml b/vendor/built_in_modules/personal_conference/test/dummy/config/locales/en.yml similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/locales/en.yml rename to vendor/built_in_modules/personal_conference/test/dummy/config/locales/en.yml diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/config/routes.rb b/vendor/built_in_modules/personal_conference/test/dummy/config/routes.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/config/routes.rb rename to vendor/built_in_modules/personal_conference/test/dummy/config/routes.rb diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/personal_conference/test/dummy/lib/assets/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/lib/assets/.gitkeep rename to vendor/built_in_modules/personal_conference/test/dummy/lib/assets/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/log/.gitkeep b/vendor/built_in_modules/personal_conference/test/dummy/log/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/log/.gitkeep rename to vendor/built_in_modules/personal_conference/test/dummy/log/.gitkeep diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/public/404.html b/vendor/built_in_modules/personal_conference/test/dummy/public/404.html similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/public/404.html rename to vendor/built_in_modules/personal_conference/test/dummy/public/404.html diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/public/422.html b/vendor/built_in_modules/personal_conference/test/dummy/public/422.html similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/public/422.html rename to vendor/built_in_modules/personal_conference/test/dummy/public/422.html diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/public/500.html b/vendor/built_in_modules/personal_conference/test/dummy/public/500.html similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/public/500.html rename to vendor/built_in_modules/personal_conference/test/dummy/public/500.html diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/public/favicon.ico b/vendor/built_in_modules/personal_conference/test/dummy/public/favicon.ico similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/public/favicon.ico rename to vendor/built_in_modules/personal_conference/test/dummy/public/favicon.ico diff --git a/vendor/built_in_modules/personal_seminar/test/dummy/script/rails b/vendor/built_in_modules/personal_conference/test/dummy/script/rails similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/dummy/script/rails rename to vendor/built_in_modules/personal_conference/test/dummy/script/rails diff --git a/vendor/built_in_modules/personal_seminar/test/integration/navigation_test.rb b/vendor/built_in_modules/personal_conference/test/integration/navigation_test.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/integration/navigation_test.rb rename to vendor/built_in_modules/personal_conference/test/integration/navigation_test.rb 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 new file mode 100644 index 00000000..c3e0a3ba --- /dev/null +++ b/vendor/built_in_modules/personal_conference/test/personal_conference_test.rb @@ -0,0 +1,7 @@ +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_seminar/test/test_helper.rb b/vendor/built_in_modules/personal_conference/test/test_helper.rb similarity index 100% rename from vendor/built_in_modules/personal_seminar/test/test_helper.rb rename to vendor/built_in_modules/personal_conference/test/test_helper.rb diff --git a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/seminar_author_types_controller.rb b/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/seminar_author_types_controller.rb deleted file mode 100644 index b9bc5adf..00000000 --- a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/seminar_author_types_controller.rb +++ /dev/null @@ -1,8 +0,0 @@ -class Panel::PersonalSeminar::BackEnd::SeminarAuthorTypesController < Panel::PersonalSeminar::BackEnd::WritingSeminarCategorysController - - def initialize - super - @app_type = 'seminar_author_type' - end - -end diff --git a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/seminar_paper_types_controller.rb b/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/seminar_paper_types_controller.rb deleted file mode 100644 index ad01abb9..00000000 --- a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/seminar_paper_types_controller.rb +++ /dev/null @@ -1,8 +0,0 @@ -class Panel::PersonalSeminar::BackEnd::SeminarPaperTypesController < Panel::PersonalSeminar::BackEnd::WritingSeminarCategorysController - - def initialize - super - @app_type = 'seminar_paper_type' - end - -end diff --git a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/tags_controller.rb b/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/tags_controller.rb deleted file mode 100644 index d42ac3b1..00000000 --- a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/tags_controller.rb +++ /dev/null @@ -1,8 +0,0 @@ -class Panel::PersonalSeminar::BackEnd::TagsController < Admin::TagsController - - def initialize - super - @app_title = 'personal_seminar' - end - -end diff --git a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/writing_seminar_categorys_controller.rb b/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/writing_seminar_categorys_controller.rb deleted file mode 100644 index 7714dd86..00000000 --- a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/writing_seminar_categorys_controller.rb +++ /dev/null @@ -1,145 +0,0 @@ -class Panel::PersonalSeminar::BackEnd::WritingSeminarCategorysController < OrbitBackendController - - include OrbitControllerLib::DivisionForDisable - - before_filter :force_order_for_visitor,:only=>[:index,:show] - before_filter :force_order_for_user,:except => [:index,:show] - before_filter :for_app_manager,:except => [:index] - - def index - - get_types - - @writing_seminar_categorys = @types.all - @writing_seminar_category = @types.new(:display => 'List') - - # @url = panel_personal_seminar_back_end_writing_seminar_categorys_path - @url = eval("panel_personal_seminar_back_end_#{@app_type}s_path") - - respond_to do |format| - format.html # index.html.erb - format.js - end - end - - # GET /writing_seminars/1 - # GET /writing_seminars/1.xml - def show - - get_types - - @writing_seminar_category = @types.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.js - end - end - - # GET /writing_seminars/new - # GET /writing_seminars/new.xml - def new - - get_types - - @writing_seminar_category = @types.new(:display => 'List') - - @verb = :post - - respond_to do |format| - format.html # new.html.erb - format.js - end - end - - # GET /writing_seminars/1/edit - def edit - - get_types - - @writing_seminar_category = @types.find(params[:id]) - - # @url = panel_personal_seminar_back_end_writing_seminar_category_path(@writing_seminar_category) - # @url = eval("panel_personal_seminar_back_end_#{@app_type}_path(@writing_seminar_category)") - @url = polymorphic_path([:panel, :personal_seminar, :back_end, @writing_seminar_category]) - - @verb = :put - - respond_to do |format| - format.html - format.js - end - end - - # POST /writing_seminars - # POST /writing_seminars.xml - def create - - get_types - - @writing_seminar_category = @types.new(params[:writing_seminar_category]) - - respond_to do |format| - if @writing_seminar_category.save - format.html { redirect_to(panel_personal_seminar_back_end_writing_seminar_categorys_url, :notice => t('writing_seminar_category.create_writing_seminar_category_success')) } - format.js - else - format.html { render :action => "new" } - format.js { render action: "new" } - end - end - end - - # PUT /writing_seminars/1 - # PUT /writing_seminars/1.xml - def update - - get_types - - @writing_seminar_category = @types.find(params[:id]) - # debugger - # @url = panel_personal_seminar_back_end_writing_seminar_category_path(@writing_seminar_category) - # @url = eval("panel_personal_seminar_back_end_#{@app_type}_path(#{@writing_seminar_category})") - @url = polymorphic_path([:panel, :personal_seminar, :back_end, @writing_seminar_category]) - - respond_to do |format| - if @writing_seminar_category.update_attributes(params[:writing_seminar_category]) - format.html { redirect_to(panel_personal_seminar_back_end_writing_seminar_categorys_url, :notice => t('writing_seminar_category.update_writing_seminar_category_success')) } - # format.xml { head :ok } - format.js - else - format.html { render :action => "edit" } - format.js { render :action => "edit" } - end - end - end - - # DELETE /writing_seminars/1 - # DELETE /writing_seminars/1.xml - def destroy - - get_types - - @writing_seminar_category = @types.find(params[:id]) - @writing_seminar_category.disable = @writing_seminar_category.disable ? false : true - - if @writing_seminar_category.save! - respond_to do |format| - format.html { redirect_to(panel_personal_seminar_back_end_writing_seminar_categorys_url) } - # format.xml { head :ok } - format.js - end - else - flash[:error] = t("writing_seminar_category.update_failed") - format.html { render :action => "index" } - end - - end - - protected - - def get_types - @types = @app_type.classify.constantize - end - -end diff --git a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/writing_seminars_controller.rb b/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/writing_seminars_controller.rb deleted file mode 100644 index 5a8da417..00000000 --- a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/back_end/writing_seminars_controller.rb +++ /dev/null @@ -1,311 +0,0 @@ -class Panel::PersonalSeminar::BackEnd::WritingSeminarsController < OrbitBackendController - include AdminHelper - include OrbitControllerLib::DivisionForDisable - - before_filter :authenticate_user! - before_filter :force_order_for_visitor,:only=>[:index,:show] - before_filter :force_order_for_user,:except => [:index,:show] - - before_filter :only => [ :new,:edit,:update] do |controller| - controller.get_categorys('WritingSeminarCategory') - end - - def index - - get_categorys("SeminarPaperType",params[:seminar_paper_type_id]) - @filter = params[:filter] - new_filter = params[:new_filter] - - if @filter && params[:clear] - @filter.delete(params[:type]) - elsif @filter && new_filter - if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) - @filter[new_filter[:type]].delete(new_filter[:id].to_s) - elsif @filter.has_key?(new_filter[:type]) - @filter[new_filter[:type]] << new_filter[:id].to_s - else - @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) - end - elsif new_filter - @filter = {new_filter[:type] => [new_filter[:id].to_s]} - end - - @paper_types = SeminarPaperType.all - @paper_type_ids = @paper_types.collect{|t| t.id.to_s} + [nil] - - - # @writing_seminars = WritingSeminar.search(params[:category_id]) - #@writing_seminars = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_seminars : WritingSeminar.all.page(params[:page]).per(10) - - @writing_seminars = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_seminar",:seminar_paper_type_id.in => @paper_type_ids) : get_viewable("writing_seminar",:seminar_paper_type_id.in => @paper_type_ids) - - - get_tags - - respond_to do |format| - format.html # index.html.erb - format.xml { render :xml => @writing_seminars } - format.js - end - end - - def writing_seminar_setting - - @author_types = SeminarAuthorType.all - @paper_types = SeminarPaperType.all - - get_tags - - @set_author_type = SeminarAuthorType.new(:display => 'List') - @author_type_url = panel_personal_seminar_back_end_writing_seminars_path - - @set_paper_type = SeminarPaperType.new(:display => 'List') - @paper_type_url = panel_personal_seminar_back_end_writing_seminars_path - - - end - - def paper_type_quick_add - @set_paper_type = SeminarPaperType.new(:display => 'List') - @paper_type_url = panel_personal_seminar_back_end_writing_seminars_path - @set_paper_type.id = params[:id] - - respond_to do |format| - format.js - end - - end - - def paper_type_quick_edit - - @set_paper_type = SeminarPaperType.find(params[:writing_seminar_id]) - @paper_type_url = panel_personal_seminar_back_end_writing_seminar_path(@set_paper_type) - - respond_to do |format| - format.js - end - end - - def author_type_quick_add - @set_author_type = SeminarAuthorType.new(:display => 'List') - @author_type_url = panel_personal_seminar_back_end_writing_seminars_path - @set_author_type.id = params[:id] - - respond_to do |format| - format.js - end - - end - - def author_type_quick_edit - - @set_author_type = SeminarAuthorType.find(params[:writing_seminar_id]) - @author_type_url = panel_personal_seminar_back_end_writing_seminar_path(@set_author_type) - - respond_to do |format| - format.js - end - end - - # GET /writing_seminars/1 - # GET /writing_seminars/1.xml - def show - @writing_seminar = WritingSeminar.find(params[:id]) - respond_to do |format| - format.html # show.html.erb - format.xml { render :xml => @writing_seminar } - end - end - - # GET /writing_seminars/new - # GET /writing_seminars/new.xml - def new - - @writing_seminar = WritingSeminar.new - # @writing_seminar_files = WritingSeminarFile.all - # @paper_types = SeminarLevelType.all - @author_types = SeminarAuthorType.all - @paper_types = SeminarPaperType.all - - get_tags - - respond_to do |format| - format.html # new.html.erb - format.xml { render :xml => @writing_seminar } - end - end - - # GET /writing_seminars/1/edit - def edit - @writing_seminar = WritingSeminar.find(params[:id]) - - # @paper_types = SeminarLevelType.all - @author_types = SeminarAuthorType.all - @paper_types = SeminarPaperType.all - - get_tags - end - - # POST /writing_seminars - # POST /writing_seminars.xml - def create - - if params[:seminar_paper_type] - - @seminar_paper_type = SeminarPaperType.new(params[:seminar_paper_type]) - - respond_to do |format| - if @seminar_paper_type.save - format.js { render 'create_writing_seminar_setting' } - end - end - - elsif params[:seminar_author_type] - - @seminar_author_type = SeminarAuthorType.new(params[:seminar_author_type]) - - respond_to do |format| - if @seminar_author_type.save - format.js { render 'create_writing_seminar_setting' } - end - end - - else - - # @paper_types = SeminarLevelType.all - @author_types = SeminarAuthorType.all - @paper_types = SeminarPaperType.all - get_tags - - @writing_seminar = WritingSeminar.new(params[:writing_seminar]) - - if params[:writing_seminar][:user_id] - @writing_seminar.create_user_id = params[:writing_seminar][:user_id] - @writing_seminar.update_user_id = params[:writing_seminar][:user_id] - else - @writing_seminar.create_user_id = current_user.id - @writing_seminar.update_user_id = current_user.id - end - - respond_to do |format| - if @writing_seminar.save - - if params[:writing_seminar][:user_id] - format.html { redirect_to(admin_users_new_interface_url(:id=>params[:writing_seminar][:user_id],:show_plugin_profile=>'Seminar')) } - else - format.html { redirect_to(panel_personal_seminar_back_end_writing_seminars_url) } - end - - format.xml { render :xml => @writing_seminar, :status => :created, :location => @writing_seminar } - else - format.html { render :action => "new" } - format.xml { render :xml => @writing_seminar.errors, :status => :unprocessable_entity } - end - end - end - - end - - # PUT /writing_seminars/1 - # PUT /writing_seminars/1.xml - def update - - if params[:seminar_paper_type] - - @seminar_paper_type = SeminarPaperType.find(params[:id]) - - respond_to do |format| - - if @seminar_paper_type.update_attributes(params[:seminar_paper_type]) - # format.html { redirect_to(panel_announcement_back_end_bulletins_url) } - format.js { render 'update_writing_seminar_setting' } - end - end - - elsif params[:seminar_author_type] - - @seminar_author_type = SeminarAuthorType.find(params[:id]) - - respond_to do |format| - - if @seminar_author_type.update_attributes(params[:seminar_author_type]) - # format.html { redirect_to(panel_announcement_back_end_bulletins_url) } - format.js { render 'update_writing_seminar_setting' } - end - end - - else - - @writing_seminar = WritingSeminar.find(params[:id]) - - @writing_seminar.update_user_id = current_user.id - - params[:writing_seminar][:tag_ids] ||=[] - - respond_to do |format| - if @writing_seminar.update_attributes(params[:writing_seminar]) - format.html { redirect_to(panel_personal_seminar_back_end_writing_seminars_url) } - # format.js { render 'toggle_enable' } - format.xml { head :ok } - else - format.html { render :action => "edit" } - format.xml { render :xml => @writing_seminar.errors, :status => :unprocessable_entity } - end - end - end - - end - - # DELETE /writing_seminars/1 - # DELETE /writing_seminars/1.xml - def destroy - @writing_seminar = WritingSeminar.find(params[:id]) - @writing_seminar.destroy - - respond_to do |format| - format.html { redirect_to(panel_personal_seminar_back_end_writing_seminars_url) } - # format.xml { head :ok } - format.js - end - end - - def delete - if params[:ids] - writing_seminars = WritingSeminar.any_in(:_id => params[:ids]).delete_all - end - redirect_to panel_personal_seminar_back_end_writing_seminars_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) - end - - protected - - - # def get_index_categories(id = nil) - # @bulletin_categorys = [] - # if(is_manager? || is_admin?) - # @bulletin_categorys = (id ? BulletinCategory.admin_manager_all.find(id).to_a : BulletinCategory.admin_manager_all) - # elsif is_sub_manager? - # @bulletin_categorys = BulletinCategory.all - # end - # @bulletin_categorys - # end - - - # def get_categorys(id = nil) - # @writing_seminar_categorys = [] - # if(is_manager? || is_admin?) - # @writing_seminar_categorys = (id ? WritingSeminarCategory.admin_manager_all.find(id).to_a : WritingSeminarCategory.admin_manager_all)) - # elsif is_sub_manager? - # @writing_seminar_categorys = WritingSeminarCategory.all.authed_for_user(current_user,'edit') - # end - # if @writing_seminar_categorys.empty? && params[:action] != "index" - # flash[:alert] = t("announcement.error.no_avilb_cate_for_posting") - # redirect_to :action => :index - # end - # end - - def get_tags - module_app = ModuleApp.first(:conditions => {:key => 'personal_seminar'}) - @tags = Tag.all(:conditions => {:module_app_id => module_app.id}) - end - -end diff --git a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/plugin/writing_seminars_controller.rb b/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/plugin/writing_seminars_controller.rb deleted file mode 100644 index ec92a6be..00000000 --- a/vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/plugin/writing_seminars_controller.rb +++ /dev/null @@ -1,187 +0,0 @@ -class Panel::PersonalSeminar::Plugin::WritingSeminarsController < OrbitBackendController - include AdminHelper - include OrbitControllerLib::DivisionForDisable - - before_filter :authenticate_user! - before_filter :force_order_for_visitor,:only=>[:index,:show] - before_filter :force_order_for_user,:except => [:index,:show] - - before_filter :only => [ :new,:edit,:update] do |controller| - controller.get_categorys('WritingSeminarCategory') - end - - - def index - - get_categorys("SeminarPaperType",params[:seminar_paper_type_id]) - @filter = params[:filter] - new_filter = params[:new_filter] - - if @filter && params[:clear] - @filter.delete(params[:type]) - elsif @filter && new_filter - if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) - @filter[new_filter[:type]].delete(new_filter[:id].to_s) - elsif @filter.has_key?(new_filter[:type]) - @filter[new_filter[:type]] << new_filter[:id].to_s - else - @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) - end - elsif new_filter - @filter = {new_filter[:type] => [new_filter[:id].to_s]} - end - @paper_types = SeminarPaperType.all - @paper_type_ids = @paper_types.collect{|t| t.id.to_s} + [nil] - - - # @writing_seminars = WritingSeminar.search(params[:category_id]) - #@writing_seminars = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_seminars : WritingSeminar.all.page(params[:page]).per(10) - @writing_seminars = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_seminar",:create_user_id => current_user.id) : get_viewable("writing_seminar", :create_user_id => current_user.id) - - get_tags - - respond_to do |format| - format.html # index.html.erb - format.xml { render :xml => @writing_seminars } - format.js - end - end - - # GET /writing_seminars/1 - # GET /writing_seminars/1.xml - def show - @writing_seminar = WritingSeminar.find(params[:id]) - respond_to do |format| - format.html # show.html.erb - format.xml { render :xml => @writing_seminar } - end - end - - # GET /writing_seminars/new - # GET /writing_seminars/new.xml - def new - - @writing_seminar = WritingSeminar.new - # @writing_seminar_files = WritingSeminarFile.all - # @level_types = SeminarLevelType.all - @author_types = SeminarAuthorType.all - @paper_types = SeminarPaperType.all - - get_tags - - respond_to do |format| - format.html # new.html.erb - format.xml { render :xml => @writing_seminar } - end - end - - # GET /writing_seminars/1/edit - def edit - @writing_seminar = WritingSeminar.find(params[:id]) - - # @level_types = SeminarLevelType.all - @author_types = SeminarAuthorType.all - @paper_types = SeminarPaperType.all - - get_tags - end - - # POST /writing_seminars - # POST /writing_seminars.xml - def create - - # @level_types = SeminarLevelType.all - @author_types = SeminarAuthorType.all - @paper_types = SeminarPaperType.all - get_tags - - @writing_seminar = WritingSeminar.new(params[:writing_seminar]) - - @writing_seminar.create_user_id = current_user.id - @writing_seminar.update_user_id = current_user.id - - respond_to do |format| - if @writing_seminar.save - format.html { redirect_to(panel_personal_seminar_plugin_writing_seminars_url) } - format.xml { render :xml => @writing_seminar, :status => :created, :location => @writing_seminar } - else - format.html { render :action => "new" } - format.xml { render :xml => @writing_seminar.errors, :status => :unprocessable_entity } - end - end - end - - # PUT /writing_seminars/1 - # PUT /writing_seminars/1.xml - def update - @writing_seminar = WritingSeminar.find(params[:id]) - - @writing_seminar.update_user_id = current_user.id - - params[:writing_seminar][:tag_ids] ||=[] - - respond_to do |format| - if @writing_seminar.update_attributes(params[:writing_seminar]) - format.html { redirect_to(panel_personal_seminar_plugin_writing_seminars_url) } - # format.js { render 'toggle_enable' } - format.xml { head :ok } - else - format.html { render :action => "edit" } - format.xml { render :xml => @writing_seminar.errors, :status => :unprocessable_entity } - end - end - end - - # DELETE /writing_seminars/1 - # DELETE /writing_seminars/1.xml - def destroy - @writing_seminar = WritingSeminar.find(params[:id]) - @writing_seminar.destroy - - respond_to do |format| - format.html { redirect_to(panel_personal_seminar_plugin_writing_seminars_url) } - # format.xml { head :ok } - format.js - end - end - - def delete - if params[:ids] - writing_seminars = WritingSeminar.any_in(:_id => params[:ids]).delete_all - end - redirect_to panel_personal_seminar_plugin_writing_seminars_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) - end - - protected - - - # def get_index_categories(id = nil) - # @bulletin_categorys = [] - # if(is_manager? || is_admin?) - # @bulletin_categorys = (id ? BulletinCategory.admin_manager_all.find(id).to_a : BulletinCategory.admin_manager_all) - # elsif is_sub_manager? - # @bulletin_categorys = BulletinCategory.all - # end - # @bulletin_categorys - # end - - - # def get_categorys(id = nil) - # @writing_seminar_categorys = [] - # if(is_manager? || is_admin?) - # @writing_seminar_categorys = (id ? WritingSeminarCategory.admin_manager_all.find(id).to_a : WritingSeminarCategory.admin_manager_all)) - # elsif is_sub_manager? - # @writing_seminar_categorys = WritingSeminarCategory.all.authed_for_user(current_user,'edit') - # end - # if @writing_seminar_categorys.empty? && params[:action] != "index" - # flash[:alert] = t("announcement.error.no_avilb_cate_for_posting") - # redirect_to :action => :index - # end - # end - - def get_tags - module_app = ModuleApp.first(:conditions => {:key => 'personal_seminar'}) - @tags = Tag.all(:conditions => {:module_app_id => module_app.id}) - end - -end diff --git a/vendor/built_in_modules/personal_seminar/app/models/personal_seminar_tag.rb b/vendor/built_in_modules/personal_seminar/app/models/personal_seminar_tag.rb deleted file mode 100644 index 3054f245..00000000 --- a/vendor/built_in_modules/personal_seminar/app/models/personal_seminar_tag.rb +++ /dev/null @@ -1,9 +0,0 @@ -class PersonalSeminarTag < Tag - - has_and_belongs_to_many :writing_seminars - - def get_visible_links(sort = :title) - self.writing_seminars.where(:is_hidden => false).desc(:is_top, sort) - end - -end \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/models/seminar_author_type.rb b/vendor/built_in_modules/personal_seminar/app/models/seminar_author_type.rb deleted file mode 100644 index c32a1842..00000000 --- a/vendor/built_in_modules/personal_seminar/app/models/seminar_author_type.rb +++ /dev/null @@ -1,9 +0,0 @@ -# encoding: utf-8 - -class SeminarAuthorType < WritingSeminarCategory - - field :title, localize: true - - has_and_belongs_to_many :writing_seminars - -end \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/models/seminar_paper_type.rb b/vendor/built_in_modules/personal_seminar/app/models/seminar_paper_type.rb deleted file mode 100644 index 50b8bc0c..00000000 --- a/vendor/built_in_modules/personal_seminar/app/models/seminar_paper_type.rb +++ /dev/null @@ -1,9 +0,0 @@ -# encoding: utf-8 - -class SeminarPaperType < WritingSeminarCategory - - field :title, localize: true - - has_and_belongs_to_many :writing_seminars - -end \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/_writing_seminar_category.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/_writing_seminar_category.html.erb deleted file mode 100644 index af477f32..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/_writing_seminar_category.html.erb +++ /dev/null @@ -1,22 +0,0 @@ - - - - <%= writing_seminar_category.key %> -
    - -
    - - <% if @types.is_localized?(:title) %> - <% @site_valid_locales.each do |locale| %> - <%= writing_seminar_category.title_translations[locale] rescue nil %> - <% end %> - <% else %> - <%= writing_seminar_category.title %> - <% end %> - diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/create.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/create.js.erb deleted file mode 100644 index 796935a7..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/create.js.erb +++ /dev/null @@ -1,2 +0,0 @@ -$('<%= j render :partial => 'writing_seminar_category', :collection => [@writing_seminar_category] %>').appendTo('#writing_seminar_categorys').hide().fadeIn(); -$("#form_writing_seminar_category")[0].reset(); \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/destroy.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/destroy.js.erb deleted file mode 100644 index 0387e8e2..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @writing_seminar_category %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@writing_seminar_category) %> "); \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/edit.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/edit.html.erb deleted file mode 100644 index 0dd54059..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/edit.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -

    <%= t('personal_seminar.editing_personal_seminar_class') %>

    - -<%= form_for @writing_seminar_category, :url => panel_personal_seminar_back_end_writing_seminar_category_path(@writing_seminar_category) do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> - -<%= link_back %> diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/new.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/new.html.erb deleted file mode 100644 index 52ca2d51..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/new.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<% content_for :secondary do %> -<%= render :partial => '/panel/personal_seminar/back_end/personal_seminar_secondary' %> -<% end -%> - -<%= flash_messages %> - -
    -
    -
    -
    -
    - -

    <%= t('writing_seminar_category.new_personal_seminar_class') %>

    -<%= form_for @writing_seminar_category, :url => panel_personal_seminar_back_end_writing_seminar_categorys_path do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> - -<%= link_back %> - diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/update.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/update.js.erb deleted file mode 100644 index 217e760e..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminar_categorys/update.js.erb +++ /dev/null @@ -1,4 +0,0 @@ -$("#<%= dom_id @writing_seminar_category %>").replaceWith("<%= j render :partial => 'writing_seminar_category', :collection => [@writing_seminar_category] %>"); -<% @writing_seminar_category = @types.new(:display => 'List') # reset for new form %> -$("#form_writing_seminar_category").replaceWith("<%= j render "form" %>") -$("#form_writing_seminar_category")[0].reset(); \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_list_author_type.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_list_author_type.html.erb deleted file mode 100644 index a0e273e5..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_list_author_type.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<% # encoding: utf-8 %> - - - <%= list_author_type.title %> - - - 編輯 - <%= link_to show_toggle_archive_btn(list_author_type), - polymorphic_path([:panel, :personal_seminar, :back_end, list_author_type]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %> - - \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_list_paper_type.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_list_paper_type.html.erb deleted file mode 100644 index 3f4e567c..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_list_paper_type.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<% # encoding: utf-8 %> - - - <%= list_paper_type.title %> - - - 編輯 - <%= link_to show_toggle_archive_btn(list_paper_type), - polymorphic_path([:panel, :personal_seminar, :back_end, list_paper_type]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %> - - \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_sort_headers.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_sort_headers.html.erb deleted file mode 100644 index 0addfce3..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_sort_headers.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= render_sort_bar(true, delete_panel_personal_seminar_back_end_writing_seminars_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]), - ['year', 'year', 'span1', 'writing_seminar.year'], - ['title', 'title','span3', 'writing_seminar.title'], - ['create_modified', 'create_user_id','span1-3', 'writing_seminar.create_modified']).html_safe %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_writing_seminar.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_writing_seminar.html.erb deleted file mode 100644 index b9571826..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/_writing_seminar.html.erb +++ /dev/null @@ -1,21 +0,0 @@ - - - <% if (writing_seminar.create_user_id == current_user.id) || is_manager? %> - <%= check_box_tag 'to_delete[]', writing_seminar.id, false, :class => "checkbox_in_list" %> - <% end -%> - - <%= writing_seminar.year %> - - <%= link_to writing_seminar.create_link, panel_personal_seminar_front_end_writing_seminar_path(writing_seminar) %> -
    - -
    - - <%= User.from_id(writing_seminar.create_user_id).name rescue ''%> - - diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/create_writing_seminar_setting.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/create_writing_seminar_setting.js.erb deleted file mode 100644 index e4255313..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/create_writing_seminar_setting.js.erb +++ /dev/null @@ -1,10 +0,0 @@ - -<% if !@seminar_paper_type.blank? %> -$("#myModal1").modal('hide'); -$('<%= j render :partial => 'list_paper_type', :collection => [@seminar_paper_type] %>').appendTo('#paper_types').hide().fadeIn(); -<% end %> - -<% if !@seminar_author_type.blank? %> -$("#myModal2").modal('hide'); -$('<%= j render :partial => 'list_author_type', :collection => [@seminar_author_type] %>').appendTo('#author_types').hide().fadeIn(); -<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/destroy.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/destroy.js.erb deleted file mode 100644 index 71681388..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @writing_seminar %>").remove(); \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/edit.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/edit.html.erb deleted file mode 100644 index da8b2e25..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/edit.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

    <%= t('personal_seminar.editing_personal_seminar') %>

    - -<%= form_for @writing_seminar, :url => panel_personal_seminar_back_end_writing_seminar_path(@writing_seminar), :html => {:class => 'clear'} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/index.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/index.html.erb deleted file mode 100644 index bf170f01..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/index.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<%= render 'filter' %> - - - - - - - - - - - - <%= render :partial => 'writing_seminar', :collection => @writing_seminars %> - -
    - -
    - <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_seminar_back_end_writing_seminar_path, :class => 'btn btn-primary pull-right' %> -
    - <%= paginate @writing_seminars, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> -
    -
    diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/index.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/index.js.erb deleted file mode 100644 index 4c4caaf0..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/index.js.erb +++ /dev/null @@ -1,3 +0,0 @@ -$("#sort_headers").html("<%= j render 'sort_headers' %>"); -$("#tbody_writing_seminars").html("<%= j render :partial => 'writing_seminar', :collection => @writing_seminars %>"); -$("#writing_seminar_pagination").html("<%= j paginate @writing_seminars, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/new.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/new.html.erb deleted file mode 100644 index 920067f0..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/new.html.erb +++ /dev/null @@ -1,10 +0,0 @@ - -<%= flash_messages %> -
    -

    <%= t('writing_seminar.new_personal_seminar') %>

    -<%= form_for @writing_seminar, :url => panel_personal_seminar_back_end_writing_seminars_path, :html => {:class => 'clear'} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> -
    -<%#= link_back %> - diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/update_writing_seminar_setting.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/update_writing_seminar_setting.js.erb deleted file mode 100644 index 698d4ada..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/back_end/writing_seminars/update_writing_seminar_setting.js.erb +++ /dev/null @@ -1,10 +0,0 @@ - -<% if !@seminar_paper_type.blank? %> -$("#myModal1").modal('hide'); -$("#<%= dom_id @seminar_paper_type %>").replaceWith("<%= j render :partial => 'list_paper_type', :collection => [@seminar_paper_type] %>"); -<% end %> - -<% if !@seminar_author_type.blank? %> -$("#myModal2").modal('hide'); -$("#<%= dom_id @seminar_author_type %>").replaceWith("<%= j render :partial => 'list_author_type', :collection => [@seminar_author_type] %>"); -<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/_profile.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/_profile.html.erb deleted file mode 100644 index 590ecdda..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/_profile.html.erb +++ /dev/null @@ -1,62 +0,0 @@ -<% - @filter = params[:filter] - new_filter = params[:new_filter] - - if @filter && params[:clear] - @filter.delete(params[:type]) - elsif @filter && new_filter - if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) - @filter[new_filter[:type]].delete(new_filter[:id].to_s) - elsif @filter.has_key?(new_filter[:type]) - @filter[new_filter[:type]] << new_filter[:id].to_s - else - @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) - end - elsif new_filter - @filter = {new_filter[:type] => [new_filter[:id].to_s]} - end - - - if @user - @writing_seminars = WritingSeminar.where(:create_user_id => @user.id).page(params[:page]).per(10) - else - @writing_seminars = WritingSeminar.all.page(params[:page]).per(10) - end - - -%> - - - - - - - - - - - - <% @writing_seminars.each do |writing_seminar| %> - - - - - - - <% end %> - - - -
    <%= t('writing_seminar.year') %><%= t('writing_seminar.title') %>
    <%= writing_seminar.year %> - <%= link_to writing_seminar.create_link, panel_personal_seminar_front_end_writing_seminar_path(writing_seminar) %> -
    - -<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_seminar_back_end_writing_seminar_path(:user_id => @user.id), :class => 'btn btn-primary pull-right' %> - - -
    - <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_seminar_plugin_writing_seminar_path, :class => 'btn btn-primary pull-right' %> -
    - <%= paginate @writing_seminars, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> -
    -
    diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_sort_headers.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_sort_headers.html.erb deleted file mode 100644 index 39a77825..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_sort_headers.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= render_sort_bar(true, delete_panel_personal_seminar_back_end_writing_seminars_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]), - ['year', 'year', 'span1', 'writing_seminar.year'], - ['title', 'title','span3', 'writing_seminar.title']).html_safe %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_writing_seminar.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_writing_seminar.html.erb deleted file mode 100644 index 8d001c47..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/_writing_seminar.html.erb +++ /dev/null @@ -1,20 +0,0 @@ - - - <% if (writing_seminar.create_user_id == current_user.id) || is_manager? %> - <%= check_box_tag 'to_delete[]', writing_seminar.id, false, :class => "checkbox_in_list" %> - <% end -%> - - <%= writing_seminar.year %> - - <%= link_to writing_seminar.create_link, panel_personal_seminar_front_end_writing_seminar_path(writing_seminar) %> -
    - -
    - - - diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/destroy.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/destroy.js.erb deleted file mode 100644 index 71681388..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @writing_seminar %>").remove(); \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/edit.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/edit.html.erb deleted file mode 100644 index 79118270..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/edit.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

    <%= t('personal_seminar.editing_personal_seminar') %>

    - -<%= form_for @writing_seminar, :url => panel_personal_seminar_plugin_writing_seminar_path(@writing_seminar), :html => {:class => 'clear'} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/index.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/index.html.erb deleted file mode 100644 index a9c4bfe8..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/index.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<%= render 'filter' %> - - - - - - - - - - - - <%= render :partial => 'writing_seminar', :collection => @writing_seminars %> - -
    - -
    - <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_seminar_plugin_writing_seminar_path, :class => 'btn btn-primary pull-right' %> -
    - <%= paginate @writing_seminars, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> -
    -
    diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/index.js.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/index.js.erb deleted file mode 100644 index 4c4caaf0..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/index.js.erb +++ /dev/null @@ -1,3 +0,0 @@ -$("#sort_headers").html("<%= j render 'sort_headers' %>"); -$("#tbody_writing_seminars").html("<%= j render :partial => 'writing_seminar', :collection => @writing_seminars %>"); -$("#writing_seminar_pagination").html("<%= j paginate @writing_seminars, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); \ No newline at end of file diff --git a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/new.html.erb b/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/new.html.erb deleted file mode 100644 index a4c8cae2..00000000 --- a/vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/plugin/writing_seminars/new.html.erb +++ /dev/null @@ -1,10 +0,0 @@ - -<%= flash_messages %> -
    -

    <%= t('writing_seminar.new_personal_seminar') %>

    -<%= form_for @writing_seminar, :url => panel_personal_seminar_plugin_writing_seminars_path, :html => {:class => 'clear'} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> -
    -<%#= link_back %> - diff --git a/vendor/built_in_modules/personal_seminar/config/routes.rb b/vendor/built_in_modules/personal_seminar/config/routes.rb deleted file mode 100644 index d99e2801..00000000 --- a/vendor/built_in_modules/personal_seminar/config/routes.rb +++ /dev/null @@ -1,40 +0,0 @@ -Rails.application.routes.draw do - - namespace :panel do - namespace :personal_seminar do - namespace :back_end do - - match 'writing_seminar_setting' => "writing_seminars#writing_seminar_setting" ,:as => :writing_seminar_setting - - resources :writing_seminars do - collection do - get 'delete' - end - - match "author_type_quick_add" => "writing_seminars#author_type_quick_add" ,:as => :author_type_quick_add - match "author_type_quick_edit" => "writing_seminars#author_type_quick_edit" ,:as => :author_type_quick_edit - - match "paper_type_quick_add" => "writing_seminars#paper_type_quick_add" ,:as => :paper_type_quick_add - match "paper_type_quick_edit" => "writing_seminars#paper_type_quick_edit" ,:as => :paper_type_quick_edit - end - resources :seminar_paper_types - resources :seminar_author_types - # resources :seminar_level_types - resources :tags - end - namespace :front_end do - resources :writing_seminars - end - namespace :plugin do - resources :writing_seminars - end - namespace :widget do - match "writing_seminars" => "writing_seminars#index" - match "home_list" => "writing_seminars#home_list" - match "reload_writing_seminars" => "writing_seminars#reload_writing_seminars" - end - end - end - match "/appfront/*path" => redirect("/panel/*path") - -end diff --git a/vendor/built_in_modules/personal_seminar/lib/personal_seminar.rb b/vendor/built_in_modules/personal_seminar/lib/personal_seminar.rb deleted file mode 100644 index 62d873f8..00000000 --- a/vendor/built_in_modules/personal_seminar/lib/personal_seminar.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "personal_seminar/engine" - -module PersonalSeminar -end diff --git a/vendor/built_in_modules/personal_seminar/lib/personal_seminar/version.rb b/vendor/built_in_modules/personal_seminar/lib/personal_seminar/version.rb deleted file mode 100644 index eb05e148..00000000 --- a/vendor/built_in_modules/personal_seminar/lib/personal_seminar/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module PersonalSeminar - VERSION = "0.0.1" -end diff --git a/vendor/built_in_modules/personal_seminar/test/personal_seminar_test.rb b/vendor/built_in_modules/personal_seminar/test/personal_seminar_test.rb deleted file mode 100644 index e04b4928..00000000 --- a/vendor/built_in_modules/personal_seminar/test/personal_seminar_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class PersonalSeminarTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, PersonalSeminar - end -end From 8f334f694800c5fd7ef8760487c618624df62b63 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 24 Jan 2013 18:25:09 +0800 Subject: [PATCH 33/44] modularize conference --- app/assets/javascripts/desktop.js | 1 - .../desktop_publications_controller.rb | 44 ------------------- app/views/desktop/index.html.erb | 3 +- app/views/desktop/seminar_p.html.erb | 33 -------------- .../assets/javascripts/personal_conference.js | 1 + .../personal_conference/desktop/.gitkeep | 0 .../desktop/conference_pages.js | 2 +- .../desktop/conference_p_controller.rb | 5 +++ .../desktop/conference_pages_controller.rb | 14 ++++++ .../desktop/conference_p.html.erb | 33 ++++++++++++++ .../desktop/conference_pages/index.html.erb | 0 .../desktop/conference_pages/new.html.erb | 0 .../personal_conference/config/routes.rb | 4 ++ 13 files changed, 60 insertions(+), 80 deletions(-) delete mode 100644 app/views/desktop/seminar_p.html.erb create mode 100644 vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference.js create mode 100644 vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/.gitkeep rename {app/assets/javascripts => vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference}/desktop/conference_pages.js (95%) create mode 100644 vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_p_controller.rb create mode 100644 vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb create mode 100644 vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_p.html.erb rename app/views/desktop/seminar_pages/list.html.erb => vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb (100%) rename app/views/desktop/seminar_pages/add.html.erb => vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb (100%) diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js index 52f48bdd..d8d67107 100644 --- a/app/assets/javascripts/desktop.js +++ b/app/assets/javascripts/desktop.js @@ -15,4 +15,3 @@ //= require orbitTimeline //= require orbitdesktop //= require desktop/books_pages -//= require desktop/conference_pages diff --git a/app/controllers/desktop_publications_controller.rb b/app/controllers/desktop_publications_controller.rb index 6902e0ef..918b99e2 100644 --- a/app/controllers/desktop_publications_controller.rb +++ b/app/controllers/desktop_publications_controller.rb @@ -1,10 +1,6 @@ require 'mime/types' class DesktopPublicationsController< ApplicationController - #def journal_p - # render "desktop/journal_p", :layout => false - #end - def books render "desktop/books", :layout => false end @@ -16,44 +12,4 @@ class DesktopPublicationsController< ApplicationController def books_add render "desktop/books/add", :layout => false end - - def conference_p - render "desktop/conference_p", :layout => false - end - - def conference_p_list - render "desktop/conference_pages/list", :layout => false - end - - def conference_p_add - render "desktop/conference_pages/add", :layout => false - end - -# def create_journal -# Journal.create(user_id: current_user.id, title: "Ice Cream Sandwich") -# b = Array.new -# b << {"success"=>"true"} -# render :json=>b.to_json -# end -# -# -# def delete_journal -# @journals = Journal.find("") -# @journals.delete -# b = Array.new -# b << {"success"=>"true"} -# render :json=>b.to_json -# end -# -# def update_journal -# @journal = Journal.find("4ff2d6ebbd98eb02b9000017") -# @papers = @journal.papers -# @papers.each do |paper| -# paper.update_attributes(:user_id => current_user.id) -# end -# b = Array.new -# -# b << {"success"=>"true"} -# render :json=>b.to_json -# end end diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb index e62f40d6..7446117b 100644 --- a/app/views/desktop/index.html.erb +++ b/app/views/desktop/index.html.erb @@ -13,7 +13,7 @@
  • Journal Papers
  • -
  • Conference Papers
  • +
  • Conference Papers
  • Books
  • @@ -103,3 +103,4 @@ o.notify("Welcome "+o.currentUsername+"!!","alert",3); <%= javascript_include_tag "personal_journal" %> +<%= javascript_include_tag "personal_conference" %> diff --git a/app/views/desktop/seminar_p.html.erb b/app/views/desktop/seminar_p.html.erb deleted file mode 100644 index 45cb0863..00000000 --- a/app/views/desktop/seminar_p.html.erb +++ /dev/null @@ -1,33 +0,0 @@ -
    -
    - -
    - -
    -
    -
    -
    -
    -
    -
    diff --git a/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference.js b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference.js new file mode 100644 index 00000000..20daf27e --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference.js @@ -0,0 +1 @@ +//= require_tree ./personal_conference/desktop diff --git a/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/.gitkeep b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/app/assets/javascripts/desktop/conference_pages.js b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js similarity index 95% rename from app/assets/javascripts/desktop/conference_pages.js rename to vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js index d341a60a..fdf3c389 100644 --- a/app/assets/javascripts/desktop/conference_pages.js +++ b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js @@ -39,7 +39,7 @@ orbitDesktop.prototype.initializeConference = function(target,url,cache){ bindHandlers(); } - this.initializeConference.rues = function(){ + this.initializeConference.coauthor = function(){ var bindHandlers = function(){ o.simple_drop_down(); diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_p_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_p_controller.rb new file mode 100644 index 00000000..c10256a9 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_p_controller.rb @@ -0,0 +1,5 @@ +class Panel::PersonalConference::Desktop::ConferencePController < ApplicationController + def conference_p + render panel_personal_conference_desktop_conference_p_path, :layout => false + end +end 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 new file mode 100644 index 00000000..602b24d0 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb @@ -0,0 +1,14 @@ +class Panel::PersonalConference::Desktop::ConferencePagesController < ApplicationController + def index + respond_to do |format| + format.html { render :layout => false} + end + end + + def new + 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_p.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_p.html.erb new file mode 100644 index 00000000..23e1484c --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_p.html.erb @@ -0,0 +1,33 @@ +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    diff --git a/app/views/desktop/seminar_pages/list.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb similarity index 100% rename from app/views/desktop/seminar_pages/list.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb diff --git a/app/views/desktop/seminar_pages/add.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb similarity index 100% rename from app/views/desktop/seminar_pages/add.html.erb rename to vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/new.html.erb diff --git a/vendor/built_in_modules/personal_conference/config/routes.rb b/vendor/built_in_modules/personal_conference/config/routes.rb index 7b5c9ead..cd11c6c5 100644 --- a/vendor/built_in_modules/personal_conference/config/routes.rb +++ b/vendor/built_in_modules/personal_conference/config/routes.rb @@ -2,6 +2,10 @@ Rails.application.routes.draw do namespace :panel do namespace :personal_conference do + namespace :desktop do + match 'conference_p' => 'conference_p#conference_p' + resources :conference_pages, :only => [:index, :new] + end namespace :back_end do match 'writing_conference_setting' => "writing_conferences#writing_conference_setting" ,:as => :writing_conference_setting resources :writing_conferences do From 8e98aa10bc76cf6ea733e33cd30f19c6c4476b00 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 17 Jan 2013 15:57:12 +0800 Subject: [PATCH 34/44] modularize factories --- db/seeds.rb | 8 +++++++- .../spec}/factories/co_author_relations.rb | 0 .../personal_journal/spec}/factories/co_authors.rb | 0 .../spec}/factories/journal_level_types.rb | 1 - .../spec}/factories/writing_journal_files.rb | 0 .../personal_journal/spec}/factories/writing_journals.rb | 0 6 files changed, 7 insertions(+), 2 deletions(-) rename {spec => vendor/built_in_modules/personal_journal/spec}/factories/co_author_relations.rb (100%) rename {spec => vendor/built_in_modules/personal_journal/spec}/factories/co_authors.rb (100%) rename {spec => vendor/built_in_modules/personal_journal/spec}/factories/journal_level_types.rb (99%) rename {spec => vendor/built_in_modules/personal_journal/spec}/factories/writing_journal_files.rb (100%) rename {spec => vendor/built_in_modules/personal_journal/spec}/factories/writing_journals.rb (100%) diff --git a/db/seeds.rb b/db/seeds.rb index 07a19519..60788465 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,6 +1,11 @@ require 'factory_girl' require 'faker' +FactoryGirl.definition_file_paths = Dir["#{Rails.root}/vendor/built_in_modules/*/spec/factories"] + +FactoryGirl.find_definitions + + CoAuthorRelation.destroy_all CoAuthor.destroy_all JournalLevelType.destroy_all @@ -8,7 +13,8 @@ WritingJournalFile.destroy_all WritingJournal.destroy_all #Dir[Rails.root.join("spec/factories/*.rb")].each {|f| require f} -10.times do + +10.size.times do FactoryGirl.create(:journal_level) end diff --git a/spec/factories/co_author_relations.rb b/vendor/built_in_modules/personal_journal/spec/factories/co_author_relations.rb similarity index 100% rename from spec/factories/co_author_relations.rb rename to vendor/built_in_modules/personal_journal/spec/factories/co_author_relations.rb diff --git a/spec/factories/co_authors.rb b/vendor/built_in_modules/personal_journal/spec/factories/co_authors.rb similarity index 100% rename from spec/factories/co_authors.rb rename to vendor/built_in_modules/personal_journal/spec/factories/co_authors.rb diff --git a/spec/factories/journal_level_types.rb b/vendor/built_in_modules/personal_journal/spec/factories/journal_level_types.rb similarity index 99% rename from spec/factories/journal_level_types.rb rename to vendor/built_in_modules/personal_journal/spec/factories/journal_level_types.rb index 5aee752b..631a39c9 100644 --- a/spec/factories/journal_level_types.rb +++ b/vendor/built_in_modules/personal_journal/spec/factories/journal_level_types.rb @@ -1,6 +1,5 @@ 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| diff --git a/spec/factories/writing_journal_files.rb b/vendor/built_in_modules/personal_journal/spec/factories/writing_journal_files.rb similarity index 100% rename from spec/factories/writing_journal_files.rb rename to vendor/built_in_modules/personal_journal/spec/factories/writing_journal_files.rb diff --git a/spec/factories/writing_journals.rb b/vendor/built_in_modules/personal_journal/spec/factories/writing_journals.rb similarity index 100% rename from spec/factories/writing_journals.rb rename to vendor/built_in_modules/personal_journal/spec/factories/writing_journals.rb From e244493b55a75122eeb9bc15ffa17292154b7d4c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2013 16:19:36 +0800 Subject: [PATCH 35/44] member plugin edit --- .../back_end/page_contexts_controller.rb | 6 ++- .../back_end/page_contexts/_form.html.erb | 1 + .../page_contexts/_page_context.html.erb | 2 +- .../front_end/writing_books_controller.rb | 30 +++++++++++++++ .../app/models/book_paper_type.rb | 4 -- .../writing_books/_paper_type_qe.html.erb | 2 +- .../back_end/writing_books/index.html.erb | 1 + .../front_end/writing_books/index.html.erb | 27 +++++++++++++ .../front_end/writing_books/show.html.erb | 37 ++++++++++++++++++ .../front_end/honors_controller.rb | 28 ++++++++++++++ .../front_end/honors/index.html.erb | 27 +++++++++++++ .../front_end/honors/show.html.erb | 15 ++++++++ .../front_end/writing_journals_controller.rb | 31 +++++++++++++++ .../back_end/writing_journals/index.html.erb | 1 + .../front_end/writing_journals/index.html.erb | 27 +++++++++++++ .../front_end/writing_journals/show.html.erb | 38 +++++++++++++++++++ .../front_end/writing_patents_controller.rb | 29 ++++++++++++++ .../back_end/writing_patents/index.html.erb | 1 + .../front_end/writing_patents/index.html.erb | 27 +++++++++++++ .../front_end/writing_patents/show.html.erb | 31 +++++++++++++++ .../front_end/projects_controller.rb | 28 ++++++++++++++ .../front_end/projects/index.html.erb | 27 +++++++++++++ .../front_end/projects/show.html.erb | 34 +++++++++++++++++ .../front_end/researchs_controller.rb | 27 +++++++++++++ .../front_end/researchs/index.html.erb | 27 +++++++++++++ .../front_end/researchs/show.html.erb | 29 ++++++++++++++ .../front_end/writing_seminars_controller.rb | 31 +++++++++++++++ .../front_end/writing_seminars/index.html.erb | 26 +++++++++++++ .../front_end/writing_seminars/show.html.erb | 36 ++++++++++++++++++ 29 files changed, 623 insertions(+), 7 deletions(-) create mode 100644 vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/front_end/writing_books_controller.rb create mode 100644 vendor/built_in_modules/personal_book/app/views/panel/personal_book/front_end/writing_books/index.html.erb create mode 100644 vendor/built_in_modules/personal_book/app/views/panel/personal_book/front_end/writing_books/show.html.erb create mode 100644 vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/front_end/honors_controller.rb create mode 100644 vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/front_end/honors/index.html.erb create mode 100644 vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/front_end/honors/show.html.erb create mode 100644 vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/front_end/writing_journals_controller.rb create mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/front_end/writing_journals/index.html.erb create mode 100644 vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/front_end/writing_journals/show.html.erb create mode 100644 vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/front_end/writing_patents_controller.rb create mode 100644 vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/front_end/writing_patents/index.html.erb create mode 100644 vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/front_end/writing_patents/show.html.erb create mode 100644 vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/front_end/projects_controller.rb create mode 100644 vendor/built_in_modules/personal_project/app/views/panel/personal_project/front_end/projects/index.html.erb create mode 100644 vendor/built_in_modules/personal_project/app/views/panel/personal_project/front_end/projects/show.html.erb create mode 100644 vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/front_end/researchs_controller.rb create mode 100644 vendor/built_in_modules/personal_research/app/views/panel/personal_research/front_end/researchs/index.html.erb create mode 100644 vendor/built_in_modules/personal_research/app/views/panel/personal_research/front_end/researchs/show.html.erb create mode 100644 vendor/built_in_modules/personal_seminar/app/controllers/panel/personal_seminar/front_end/writing_seminars_controller.rb create mode 100644 vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/front_end/writing_seminars/index.html.erb create mode 100644 vendor/built_in_modules/personal_seminar/app/views/panel/personal_seminar/front_end/writing_seminars/show.html.erb diff --git a/vendor/built_in_modules/page_content/app/controllers/panel/page_content/back_end/page_contexts_controller.rb b/vendor/built_in_modules/page_content/app/controllers/panel/page_content/back_end/page_contexts_controller.rb index facbebb4..53822782 100644 --- a/vendor/built_in_modules/page_content/app/controllers/panel/page_content/back_end/page_contexts_controller.rb +++ b/vendor/built_in_modules/page_content/app/controllers/panel/page_content/back_end/page_contexts_controller.rb @@ -96,7 +96,11 @@ class Panel::PageContent::BackEnd::PageContextsController < OrbitBackendControll @create_page_context.save end - format.html { redirect_to(panel_page_content_back_end_page_contexts_url, :notice => t('page_content.update_page_content_success')) } + if !params[:page].blank? + format.html { redirect_to(panel_page_content_back_end_page_contexts_url(:page =>params[:page]), :notice => t('page_content.update_page_content_success')) } + else + format.html { redirect_to(panel_page_content_back_end_page_contexts_url, :notice => t('page_content.update_page_content_success')) } + end format.js { render 'toggle_enable' } format.xml { head :ok } else diff --git a/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_form.html.erb b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_form.html.erb index f10615f3..726c34e4 100644 --- a/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_form.html.erb +++ b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_form.html.erb @@ -37,6 +37,7 @@
    + <%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %> <%= f.submit t('submit'), :class=>'btn btn-primary' %> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
    diff --git a/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_page_context.html.erb b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_page_context.html.erb index ea526a79..1b4c3d90 100644 --- a/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_page_context.html.erb +++ b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_page_context.html.erb @@ -5,7 +5,7 @@