routes.rb 3.63 KB
Newer Older
Alexandre Friquet's avatar
Alexandre Friquet committed
1
2
3
4
#
# OLIGAA - Stands for "Outil en Ligne d'Information et de Gestion des Activités
# des Associations" which is an online tool for associations to manage news,
# actors and activities.
5
# Copyright (C) 2010-2018 Comité Départemental du Sport Adapté de la Gironde (CDSA
Alexandre Friquet's avatar
Alexandre Friquet committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 33) <contact@cdsa33.org>
#
# This file is part of OLIGAA.
#
# OLIGAA is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# OLIGAA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with OLIGAA.  If not, see <http://www.gnu.org/licenses/>.
#
23
Rails.application.routes.draw do
Alexandre Friquet's avatar
Alexandre Friquet committed
24
25
  resources :events
  resources :event_types do
26
    patch :update_ga_events, :on => :member
Alexandre Friquet's avatar
Alexandre Friquet committed
27
28
29
  end
  resources :menus, :except => [:index, :show] do
    member do
30
31
      patch :move_up
      patch :move_down
Alexandre Friquet's avatar
Alexandre Friquet committed
32
33
34
35
    end
  end
  resources :pages do
    member do
36
37
      patch :move_up
      patch :move_down
Alexandre Friquet's avatar
Alexandre Friquet committed
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
    end
  end
  resources :activity_categories, :except => :index
  resources :activities
  resources :sessions, :only => [:new, :create, :destroy]
  resource :settings, :only => [:edit, :update]
  resources :novel_types, :except => :index
  resources :novels do
    collection do
      get :public_index
      get :feed
    end
    get :duplicate, :on => :member
  end
  resources :members do
    get :raz_pass, :on => :member
    post :search_contacts, on: :collection
    get :map, on: :collection
56
57
58
    resources :performances, except: [:index, :show] do
      patch :toggle, on: :member
    end
59
    resources :subscriptions do
60
      get :option, on: :collection
61
      get :card, on: :member
62
      patch :toggle_billing, on: :member
63
      get :renew, on: :member
64
    end
Alexandre Friquet's avatar
Alexandre Friquet committed
65
66
67
  end
  resources :member_groups, :except => [:index] do
    member do
68
      patch :filter_members
Alexandre Friquet's avatar
Alexandre Friquet committed
69
70
71
72
73
      get :members
    end
  end
  resources :public_types
  resources :emails do
74
    patch :send_off, :on => :member
Alexandre Friquet's avatar
Alexandre Friquet committed
75
76
77
78
79
80
81
82
    get :recipients_by_member_groups, :on => :member
    get :recipients_by_contact_types, :on => :member
  end
  resources :contact_types, :except => :show
  resource :contact_us, :only => [:new, :create], :path_names => { :new => "write"}
  resources :newsletters
  resources :partners do
    member do
83
84
      patch :move_up
      patch :move_down
Alexandre Friquet's avatar
Alexandre Friquet committed
85
86
87
88
89
    end
    get :display, on: :collection
  end
  resources :partners_groups, except: [:index, :show] do
    member do
90
91
      patch :move_up
      patch :move_down
Alexandre Friquet's avatar
Alexandre Friquet committed
92
93
    end
  end
94
  resources :club_novels, except: :show
95

96
97
  patch '/newsletter_items/:id/move_up' => 'newsletter_items#move_up', as: 'move_up_item'
  patch '/newsletter_items/:id/move_down' => 'newsletter_items#move_down', as: 'move_down_item'
Alexandre Friquet's avatar
Alexandre Friquet committed
98

99
100
  get 'login' => 'sessions#new', :as => :login
  get 'logout' => 'sessions#destroy', :as => :logout
Alexandre Friquet's avatar
Alexandre Friquet committed
101

102
103
104
  get '/calendar(/:year(/:month))' => 'calendar#show', :as => :calendar, :constraints => {:year => /\d{4}/, :month => /\d{1,2}/}
  get '/calendar(/:year(/:month.pdf))' => 'calendar#show', :as => :calendar_pdf, :format => :pdf, :constraints => {:year => /\d{4}/, :month => /\d{1,2}/}
  patch 'filter_calendar' => 'calendar#update', :as => :filter_calendar
Alexandre Friquet's avatar
Alexandre Friquet committed
105

106
  get '/help/redcloth' => 'help#redcloth', :as => :redcloth_help
Alexandre Friquet's avatar
Alexandre Friquet committed
107

108
  get '/sitemap' => 'sitemap#index', :as => :sitemap
Alexandre Friquet's avatar
Alexandre Friquet committed
109

110
111
  get '/platform' => 'platform#index', as: :platform

Alexandre Friquet's avatar
Alexandre Friquet committed
112
  root :to => 'novels#public_index'
113
end