Merge pull request #3328 from consul/admin-settings

Improve Admin settings section
This commit is contained in:
Alberto
2019-02-27 10:49:54 +01:00
committed by GitHub
41 changed files with 283 additions and 569 deletions

View File

@@ -4,8 +4,6 @@ class Admin::SettingsController < Admin::BaseController
all_settings = Setting.all.group_by { |s| s.type }
@settings = all_settings['common']
@feature_flags = all_settings['feature']
@banner_styles = all_settings['banner-style']
@banner_imgs = all_settings['banner-img']
end
def update
@@ -27,4 +25,4 @@ class Admin::SettingsController < Admin::BaseController
params.require(:setting).permit(:value)
end
end
end

View File

@@ -64,12 +64,6 @@ class ProposalsController < ApplicationController
def retire_form
end
def share
if Setting['proposal_improvement_path'].present?
@proposal_improvement_path = Setting['proposal_improvement_path']
end
end
def vote_featured
@proposal.register_vote(current_user, 'yes')
set_featured_proposal_votes(@proposal)