Sha256: 6dec2065e8f4157c2ed0245b35259dab2c8a0784485daa961d87830037d434c8
Contents?: true
Size: 764 Bytes
Versions: 10
Compression:
Stored size: 764 Bytes
Contents
# frozen_string_literal: true module Decidim module Meetings module ContentBlocks class HighlightedMeetingsCell < Decidim::ContentBlocks::HighlightedElementsCell def base_relation Decidim::Meetings::Meeting .except_withdrawn .published .not_hidden .upcoming .visible_meeting_for(current_user) .where(component: published_components) end def elements @elements ||= base_relation.order(start_time: :asc).limit(limit) end def geolocation_enabled? Decidim::Map.available?(:geocoding) end private def limit geolocation_enabled? ? 4 : 8 end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems