Class: Decidim::Meetings::CreateMeetingEvent

Inherits:
Events::SimpleEvent
  • Object
show all
Includes:
MeetingEvent
Defined in:
app/events/decidim/meetings/create_meeting_event.rb

Instance Method Summary collapse

Instance Method Details

#button_textObject



10
11
12
# File 'app/events/decidim/meetings/create_meeting_event.rb', line 10

def button_text
  I18n.t("meeting_created.button_text", scope: "decidim.events.meetings") if resource.can_be_joined_by?(user)
end

#button_urlObject



14
15
16
17
18
19
20
21
22
# File 'app/events/decidim/meetings/create_meeting_event.rb', line 14

def button_url
  if resource.can_be_joined_by?(user)
    if resource.registration_form_enabled?
      Decidim::EngineRouter.main_proxy(component).join_meeting_registration_url(meeting_id: resource.id, host: organization.host)
    else
      Decidim::EngineRouter.main_proxy(component).meeting_url(id: resource.id, host: organization.host)
    end
  end
end