From 8f885e8bb7815832b30366ec8eb47b9a831710a3 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Mon, 6 Feb 2012 16:58:19 +0800 Subject: [PATCH] Use key not title for module_app in parser. Modify announcement routes. --- lib/parsers/parser_back_end.rb | 2 +- lib/parsers/parser_front_end.rb | 2 +- vendor/built_in_modules/announcement/announcement.json | 2 +- vendor/built_in_modules/announcement/config/routes.rb | 8 +++----- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/parsers/parser_back_end.rb b/lib/parsers/parser_back_end.rb index 23b40b19..6d953a53 100644 --- a/lib/parsers/parser_back_end.rb +++ b/lib/parsers/parser_back_end.rb @@ -103,7 +103,7 @@ module ParserBackEnd c.define_tag 'content' do |tag| ret = '' if (tag.attributes["main"] == "true" && !page.module_app.nil?) - ret << "
" + ret << "
" else part = page.page_parts.detect{ |p| p.name.to_s == tag.attr['name'].to_s } ret << "
" diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index be288612..66b933f7 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -127,7 +127,7 @@ module ParserFrontEnd c.define_tag 'content' do |tag| ret = '' if (tag.attributes["main"] == "true" && !page.module_app.nil?) - ret << "
" else diff --git a/vendor/built_in_modules/announcement/announcement.json b/vendor/built_in_modules/announcement/announcement.json index 56146333..9ad6951e 100644 --- a/vendor/built_in_modules/announcement/announcement.json +++ b/vendor/built_in_modules/announcement/announcement.json @@ -6,6 +6,6 @@ "intro": "A simple blog……", "update_info": "Some info", "create_date": "11-11-2011", - "app_pages": ["/panel/announcement/front_end/"], + "app_pages": ["bulletins"], "enable_frontend": true } diff --git a/vendor/built_in_modules/announcement/config/routes.rb b/vendor/built_in_modules/announcement/config/routes.rb index 09ada425..fa8b6659 100644 --- a/vendor/built_in_modules/announcement/config/routes.rb +++ b/vendor/built_in_modules/announcement/config/routes.rb @@ -5,19 +5,17 @@ Rails.application.routes.draw do namespace :back_end do root :to => "bulletins#index" resources :bulletins - resources :bulletin_categorys, :controller => 'bulletin_categorys' do - match "quick_edit/:bulletin_category_id" => "bulletin_categorys#quick_edit" ,:as => :quick_edit - end + resources :bulletin_categorys, :controller => 'bulletin_categorys' do + match "quick_edit/:bulletin_category_id" => "bulletin_categorys#quick_edit" ,:as => :quick_edit + end end namespace :front_end do root :to => "bulletins#index" resources :bulletins - match "show/:id" => "bulletins#show" ,:as => :bulletin end namespace :widget do root :to => "bulletins#index" end end end - match "/appfront/*path" => redirect("/panel/*path") end