Sha256: aad4bec6498efe4abe34289162c9f0aa380b700e2f536e8bf5a5e117865270f8
Contents?: true
Size: 818 Bytes
Versions: 10
Compression:
Stored size: 818 Bytes
Contents
# frozen_string_literal: true module Decidim module Meetings # This cell renders the meeting dates range and the map if enabled and # available class DatesAndMapCell < Decidim::ViewModel include Cell::ViewModel::Partial include Decidim::MapHelper alias meeting model delegate :start_time, :end_time, :maps_enabled?, :online?, to: :meeting delegate :snippets, to: :controller def static_map return render :static_map if display_map? end def year l model.start_time, format: "%Y" end private def same_month? start_time.month == end_time.month end def same_day? start_time.day == end_time.day end def display_map? maps_enabled? && !online? end end end end
Version data entries
10 entries across 10 versions & 1 rubygems