Shows next goal information in progress page.
Fixed missing poll feature in features section.
This commit is contained in:
Juan Salvador Pérez García
2018-07-06 12:40:34 +02:00
parent 8bc3b9e67e
commit 39599e39ec
8 changed files with 105 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
class Dashboard::BaseController < ApplicationController
before_action :authenticate_user!
helper_method :proposal, :proposed_actions, :resource, :resources, :next_goal_supports, :next_goal_progress, :community_members_count
helper_method :proposal, :proposed_actions, :resource, :resources, :next_goal, :next_goal_supports, :next_goal_progress, :community_members_count
respond_to :html
layout 'proposals_dashboard'
@@ -21,7 +21,7 @@ class Dashboard::BaseController < ApplicationController
end
def next_goal_supports
@next_goal_supports ||= ProposalDashboardAction.next_goal_for(proposal)&.required_supports || Setting["votes_for_proposal_success"]
@next_goal_supports ||= next_goal&.required_supports || Setting["votes_for_proposal_success"]
end
def next_goal_progress
@@ -33,4 +33,8 @@ class Dashboard::BaseController < ApplicationController
proposal.community.participants.count
end
end
def next_goal
@next_goal ||= ProposalDashboardAction.next_goal_for(proposal)
end
end