diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-03 18:16:53 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-03 18:16:53 +0200 |
| commit | 3789a7943761c1d0995bf2ec199c588c69d41699 (patch) | |
| tree | bdac9a41c068b2ef6aee9d6cbfb485a377ff74bd /config/routes.rb | |
| parent | 5692777652a28ee66463fa4a4b79928fd90c79fc (diff) | |
Reroute events, tags, menuitems under /admin and reture events-without-a-page view
Diffstat (limited to 'config/routes.rb')
| -rw-r--r-- | config/routes.rb | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/config/routes.rb b/config/routes.rb index d19ac25b..fe38d6d7 100644 --- a/config/routes.rb +++ b/config/routes.rb | |||
| @@ -21,20 +21,13 @@ Cccms::Application.routes.draw do | |||
| 21 | # Adding a new locale requires updating all three locations. | 21 | # Adding a new locale requires updating all three locations. |
| 22 | scope '(:locale)', locale: /de|en/ do | 22 | scope '(:locale)', locale: /de|en/ do |
| 23 | 23 | ||
| 24 | resources :tags | 24 | get 'pages/:id/preview', to: 'pages#preview', as: :preview_page |
| 25 | 25 | get 'preview/:token', to: 'shared_previews#show', as: :shared_preview | |
| 26 | resources :events do | ||
| 27 | collection do | ||
| 28 | get :without_node | ||
| 29 | end | ||
| 30 | end | ||
| 31 | |||
| 32 | get 'pages/:id/preview', to: 'pages#preview', as: :preview_page | ||
| 33 | |||
| 34 | get 'preview/:token', to: 'shared_previews#show', as: :shared_preview | ||
| 35 | 26 | ||
| 36 | scope '/admin' do | 27 | scope '/admin' do |
| 28 | resources :events | ||
| 37 | resources :assets | 29 | resources :assets |
| 30 | resources :tags | ||
| 38 | 31 | ||
| 39 | resources :nodes do | 32 | resources :nodes do |
| 40 | collection do | 33 | collection do |
| @@ -84,6 +77,24 @@ Cccms::Application.routes.draw do | |||
| 84 | end | 77 | end |
| 85 | end | 78 | end |
| 86 | 79 | ||
| 80 | resources :menu_items, :except => :show do | ||
| 81 | member do | ||
| 82 | post :sort | ||
| 83 | post :move_up | ||
| 84 | post :move_down | ||
| 85 | end | ||
| 86 | end | ||
| 87 | |||
| 88 | resources :users, :except => :destroy do | ||
| 89 | member do | ||
| 90 | put :reset_otp | ||
| 91 | put :deactivate | ||
| 92 | put :reactivate | ||
| 93 | put :grant_redaktion | ||
| 94 | put :revoke_redaktion | ||
| 95 | end | ||
| 96 | end | ||
| 97 | |||
| 87 | match '' => 'admin#index', :as => :admin, :via => :get | 98 | match '' => 'admin#index', :as => :admin, :via => :get |
| 88 | match 'search' => 'admin#search', :as => :admin_search, :via => :get | 99 | match 'search' => 'admin#search', :as => :admin_search, :via => :get |
| 89 | match 'menu_search' => 'admin#menu_search', :as => :admin_menu_search, :via => :get | 100 | match 'menu_search' => 'admin#menu_search', :as => :admin_menu_search, :via => :get |
| @@ -97,29 +108,12 @@ Cccms::Application.routes.draw do | |||
| 97 | match '/login' => 'sessions#new', :as => :login, :via => :get | 108 | match '/login' => 'sessions#new', :as => :login, :via => :get |
| 98 | match 'search' => 'search#index', :as => :search, :via => :get | 109 | match 'search' => 'search#index', :as => :search, :via => :get |
| 99 | 110 | ||
| 100 | resources :users, :except => :destroy do | ||
| 101 | member do | ||
| 102 | put :reset_otp | ||
| 103 | put :deactivate | ||
| 104 | put :reactivate | ||
| 105 | put :grant_redaktion | ||
| 106 | put :revoke_redaktion | ||
| 107 | end | ||
| 108 | end | ||
| 109 | resource :otp_enrollment, :only => [:show, :create, :update, :destroy] | 111 | resource :otp_enrollment, :only => [:show, :create, :update, :destroy] |
| 110 | resource :otp_challenge, :only => [:new, :create] | 112 | resource :otp_challenge, :only => [:new, :create] |
| 111 | resource :elevation, :only => [:new, :create, :destroy] do | 113 | resource :elevation, :only => [:new, :create, :destroy] do |
| 112 | post :renew | 114 | post :renew |
| 113 | end | 115 | end |
| 114 | 116 | ||
| 115 | resources :menu_items, :except => :show do | ||
| 116 | member do | ||
| 117 | post :sort | ||
| 118 | post :move_up | ||
| 119 | post :move_down | ||
| 120 | end | ||
| 121 | end | ||
| 122 | |||
| 123 | resource :session | 117 | resource :session |
| 124 | 118 | ||
| 125 | get 'rss/updates', :to => 'rss#updates', :as => :rss, :defaults => { :format => :xml } | 119 | get 'rss/updates', :to => 'rss#updates', :as => :rss, :defaults => { :format => :xml } |
