Merge branch 'master' into polls

This commit is contained in:
Juanjo Bazán
2017-01-19 16:51:19 +01:00
254 changed files with 10658 additions and 871 deletions

View File

@@ -69,6 +69,16 @@ Rails.application.routes.draw do
end
end
resources :budgets, only: [:show, :index] do
resources :groups, controller: "budgets/groups", only: [:show]
resources :investments, controller: "budgets/investments", only: [:index, :new, :create, :show, :destroy] do
member { post :vote }
end
resource :ballot, only: :show, controller: "budgets/ballots" do
resources :lines, controller: "budgets/ballot/lines", only: [:create, :destroy]
end
end
scope '/participatory_budget' do
resources :spending_proposals, only: [:index, :new, :create, :show, :destroy], path: 'investment_projects' do
post :vote, on: :member
@@ -153,6 +163,17 @@ Rails.application.routes.draw do
get :summary, on: :collection
end
resources :budgets do
resources :budget_groups do
resources :budget_headings do
end
end
resources :budget_investments, only: [:index, :show, :edit, :update] do
member { patch :toggle_selection }
end
end
resources :signature_sheets, only: [:index, :new, :create, :show]
resources :banners, only: [:index, :new, :create, :edit, :update, :destroy] do
@@ -250,11 +271,17 @@ Rails.application.routes.draw do
end
namespace :valuation do
root to: "spending_proposals#index"
root to: "budgets#index"
resources :spending_proposals, only: [:index, :show, :edit] do
patch :valuate, on: :member
end
resources :budgets, only: :index do
resources :budget_investments, only: [:index, :show, :edit] do
patch :valuate, on: :member
end
end
end
namespace :management do
@@ -289,6 +316,18 @@ Rails.application.routes.draw do
post :vote, on: :member
get :print, on: :collection
end
resources :budgets, only: :index do
collection do
get :create_investments
get :support_investments
get :print_investments
end
resources :investments, only: [:index, :new, :create, :show], controller: 'budgets/investments' do
post :vote, on: :member
get :print, on: :collection
end
end
end
namespace :officing do