Adds view mode on proposals
This commit is contained in:
@@ -8,6 +8,7 @@ class ProposalsController < ApplicationController
|
||||
before_action :load_geozones, only: [:edit, :map, :summary]
|
||||
before_action :authenticate_user!, except: [:index, :show, :map, :summary]
|
||||
before_action :destroy_map_location_association, only: :update
|
||||
before_action :set_view, only: :index
|
||||
|
||||
feature_flag :proposals
|
||||
|
||||
@@ -127,6 +128,10 @@ class ProposalsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def set_view
|
||||
@view = (params[:view] == "minimal") ? "minimal" : "default"
|
||||
end
|
||||
|
||||
def load_successful_proposals
|
||||
@proposal_successful_exists = Proposal.successful.exists?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user