Use key not title for module_app in parser.
Modify announcement routes.
This commit is contained in:
		
							parent
							
								
									e02c675595
								
							
						
					
					
						commit
						8f885e8bb7
					
				|  | @ -103,7 +103,7 @@ module ParserBackEnd | |||
|       c.define_tag 'content' do |tag| | ||||
|         ret = '' | ||||
|         if (tag.attributes["main"] == "true" && !page.module_app.nil?) | ||||
|           ret << "<div id='appfrontend' class='dymanic_load' path='/panel/#{page.module_app.title}/front_end/#{page.app_frontend_url}?inner=true'></div>" | ||||
|           ret << "<div id='appfrontend' class='dymanic_load' path='/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}?inner=true'></div>" | ||||
|         else | ||||
|            part = page.page_parts.detect{ |p| p.name.to_s == tag.attr['name'].to_s } | ||||
|             ret << "<div id='#{tag.attr['name']}' part_id='#{part.id}' class='editable' style='border:solid 1px; margin:5px; padding:5px;'>" | ||||
|  |  | |||
|  | @ -127,7 +127,7 @@ module ParserFrontEnd | |||
|       c.define_tag 'content' do |tag| | ||||
|         ret = '' | ||||
|         if (tag.attributes["main"] == "true" && !page.module_app.nil?) | ||||
|           ret << "<div id='appfrontend' class='dymanic_load' path='/panel/#{page.module_app.title}/front_end/#{page.app_frontend_url}" | ||||
|           ret << "<div id='appfrontend' class='dymanic_load' path='/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}" | ||||
|           ret << "/#{id}" if id | ||||
|           ret << "?inner=true'></div>" | ||||
|         else | ||||
|  |  | |||
|  | @ -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 | ||||
| } | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue