Add change log in investment participatory budget

This commit is contained in:
German Galia
2019-06-02 17:44:38 +02:00
committed by lalo
parent 259e05c3e0
commit 16ffa2a259
16 changed files with 243 additions and 3 deletions

View File

@@ -2,17 +2,19 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
include FeatureFlags
include CommentableActions
include DownloadSettingsHelper
include ChangeLogHelper
feature_flag :budgets
has_orders %w[oldest], only: [:show, :edit]
has_filters %w[all], only: [:index, :toggle_selection]
before_action :load_budget
before_action :load_budget, except: :show_investment_log
before_action :load_investment, only: [:show, :edit, :update, :toggle_selection]
before_action :load_ballot, only: [:show, :index]
before_action :parse_valuation_filters
before_action :load_investments, only: [:index, :toggle_selection]
before_action :load_change_log, only: [:show]
def index
respond_to do |format|
@@ -129,4 +131,8 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
end
end
end
def load_change_log
@logs = Budget::Investment::ChangeLog.by_investment(@investment.id)
end
end