Add related content section on proposal dashboard

This commit is contained in:
decabeza
2019-06-06 16:37:24 +02:00
committed by Javi Martín
parent cb6539d170
commit abf04bea4c
9 changed files with 58 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
class DashboardController < Dashboard::BaseController
helper_method :dashboard_action, :active_resources, :course
before_action :set_done_and_pending_actions, only: [:recommended_actions, :progress]
before_action :authorize_dashboard, only: [:show, :progress, :community, :recommended_actions, :messages]
before_action :authorize_dashboard, except: :publish
def show
end
@@ -25,6 +25,10 @@ class DashboardController < Dashboard::BaseController
def messages
end
def related_content
@related_contents = Kaminari.paginate_array(proposal.relationed_contents).page(params[:page]).per(5)
end
private
def active_resources