Feature flag spending proposals
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
class Admin::SpendingProposalsController < Admin::BaseController
|
||||
include FeatureFlags
|
||||
|
||||
has_filters %w{unresolved accepted rejected}, only: :index
|
||||
|
||||
load_and_authorize_resource
|
||||
|
||||
feature_flag :spending_proposals
|
||||
|
||||
def index
|
||||
@spending_proposals = @spending_proposals.includes([:geozone]).send(@current_filter).order(created_at: :desc).page(params[:page])
|
||||
end
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
class SpendingProposalsController < ApplicationController
|
||||
include FeatureFlags
|
||||
|
||||
before_action :authenticate_user!, except: [:index]
|
||||
|
||||
load_and_authorize_resource
|
||||
|
||||
feature_flag :spending_proposals
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
@@ -29,4 +33,4 @@ class SpendingProposalsController < ApplicationController
|
||||
params.require(:spending_proposal).permit(:title, :description, :external_url, :geozone_id, :terms_of_service, :captcha, :captcha_key)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
<%= link_to t("layouts.header.debates"), debates_path, class: ("active" if controller_name == "debates") %>
|
||||
<% end %>
|
||||
<%= link_to t("layouts.header.proposals"), proposals_path, class: ("active" if controller_name == "proposals") %>
|
||||
<%= link_to t("layouts.header.spending_proposals"), spending_proposals_path, class: ("active" if controller_name == "spending_proposals") %>
|
||||
<% if feature?(:spending_proposals) %>
|
||||
<%= link_to t("layouts.header.spending_proposals"), spending_proposals_path, class: ("active" if controller_name == "spending_proposals") %>
|
||||
<% end %>
|
||||
<%= link_to t("layouts.header.more_information"), page_path('more_information'), class: ("active" if current_page?("/more_information")) %>
|
||||
<% if Setting['blog_url'] %>
|
||||
<%= link_to Setting['blog_url'], target: "_blank" do %>
|
||||
|
||||
Reference in New Issue
Block a user