Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 43
- Log:
Use of PATH_PREFIX to make the configuration more easy to relocate.
Prompted by Ticket #33, where Radiant URLs were being served relative
to the document root; this is fixed in app/models/behavior.rb though
it is not a very clean solution.
- Author:
- adh
- Date:
- Tue Aug 01 12:23:10 +0100 2006
- Size:
- 3839 Bytes
1 | ActionController::Routing::Routes.draw do |map| |
2 | |
3 | # Admin Routes |
4 | map.with_options(:controller => 'admin/welcome') do |welcome| |
5 | welcome.admin PATH_PREFIX + '/admin', :action => 'index' |
6 | welcome.welcome PATH_PREFIX + '/admin/welcome', :action => 'index' |
7 | welcome.login PATH_PREFIX + '/admin/login', :action => 'login' |
8 | welcome.logout PATH_PREFIX + '/admin/logout', :action => 'logout' |
9 | end |
10 | |
11 | # Export Routes |
12 | map.with_options(:controller => 'admin/export') do |export| |
13 | export.export PATH_PREFIX + '/admin/export', :action => 'yaml' |
14 | export.export_yaml PATH_PREFIX + '/admin/export/yaml', :action => 'yaml' |
15 | end |
16 | |
17 | # Page Routes |
18 | map.with_options(:controller => 'admin/page') do |page| |
19 | page.page_index PATH_PREFIX + '/admin/pages', :action => 'index' |
20 | page.page_edit PATH_PREFIX + '/admin/pages/edit/:id', :action => 'edit' |
21 | page.page_new PATH_PREFIX + '/admin/pages/:parent_id/child/new', :action => 'new' |
22 | page.homepage_new PATH_PREFIX + '/admin/pages/new/homepage', :action => 'new', :slug => '/', :breadcrumb => 'Home' |
23 | page.page_remove PATH_PREFIX + '/admin/pages/remove/:id', :action => 'remove' |
24 | page.page_add_part PATH_PREFIX + '/admin/ui/pages/part/add', :action => 'add_part' |
25 | page.page_children PATH_PREFIX + '/admin/ui/pages/children/:id/:level', :action => 'children', :level => '1' |
26 | page.clear_cache PATH_PREFIX + '/admin/pages/cache/clear', :action => 'clear_cache' |
27 | end |
28 | |
29 | # Layouts Routes |
30 | map.with_options(:controller => 'admin/layout') do |layout| |
31 | layout.layout_index PATH_PREFIX + '/admin/layouts', :action => 'index' |
32 | layout.layout_edit PATH_PREFIX + '/admin/layouts/edit/:id', :action => 'edit' |
33 | layout.layout_new PATH_PREFIX + '/admin/layouts/new', :action => 'new' |
34 | layout.layout_remove PATH_PREFIX + '/admin/layouts/remove/:id', :action => 'remove' |
35 | end |
36 | |
37 | # Snippets Routes |
38 | map.with_options(:controller => 'admin/snippet') do |snippet| |
39 | snippet.snippet_index PATH_PREFIX + '/admin/snippets', :action => 'index' |
40 | snippet.snippet_edit PATH_PREFIX + '/admin/snippets/edit/:id', :action => 'edit' |
41 | snippet.snippet_new PATH_PREFIX + '/admin/snippets/new', :action => 'new' |
42 | snippet.snippet_remove PATH_PREFIX + '/admin/snippets/remove/:id', :action => 'remove' |
43 | end |
44 | |
45 | # Users Routes |
46 | map.with_options(:controller => 'admin/user') do |user| |
47 | user.user_index PATH_PREFIX + '/admin/users', :action => 'index' |
48 | user.user_edit PATH_PREFIX + '/admin/users/edit/:id', :action => 'edit' |
49 | user.user_new PATH_PREFIX + '/admin/users/new', :action => 'new' |
50 | user.user_remove PATH_PREFIX + '/admin/users/remove/:id', :action => 'remove' |
51 | user.user_preferences PATH_PREFIX + '/admin/preferences', :action => 'preferences' |
52 | end |
53 | |
54 | # Site URLs |
55 | map.with_options(:controller => 'site') do |site| |
56 | site.homepage PATH_PREFIX + '/', :action => 'show_page', :url => '/' |
57 | site.not_found PATH_PREFIX + '/error/404', :action => 'not_found' |
58 | site.error PATH_PREFIX + '/error/500', :action => 'error' |
59 | |
60 | # Everything else |
61 | site.connect PATH_PREFIX + '/*url', :action => 'show_page' |
62 | end |
63 | |
64 | end |