app/helpers/decidim/proposals/proposal_cells_helper.rb in decidim-proposals-0.15.2 vs app/helpers/decidim/proposals/proposal_cells_helper.rb in decidim-proposals-0.16.0
- old
+ new
@@ -12,12 +12,18 @@
include Decidim::TranslationsHelper
include Decidim::ResourceReferenceHelper
include Decidim::TranslatableAttributes
include Decidim::CardHelper
- delegate :title, :state, :answered?, :withdrawn?, to: :model
+ delegate :title, :state, :answered?, :withdrawn?, :amendable?, :emendation?, to: :model
def has_actions?
+ return context[:has_actions] if context[:has_actions].present?
+ proposals_controller? && index_action? && current_settings.votes_enabled? && !model.draft?
+ end
+
+ def has_footer?
+ return context[:has_footer] if context[:has_footer].present?
proposals_controller? && index_action? && current_settings.votes_enabled? && !model.draft?
end
def proposals_controller?
context[:controller].class.to_s == "Decidim::Proposals::ProposalsController"