Sha256: 3cb10dd0aab8a22e7e451438df1af66fde5ce646eaf674e111f395901047c502

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 KB

Contents

<% if model.can_be_joined_by?(current_user) %>
  <% if model.has_registration_for? current_user %>
    <%= action_authorized_button_to(
      :join,
      meeting_registration_path(model),
      resource: model,
      method: :delete,
      class: "#{button_classes} active",
      data: { disable: true }
    ) do %>
      <%= icon("check", class: "icon--small") %>
      <%= t("going", scope: "decidim.meetings.meetings.show") %>
    <% end %>
  <% else %>
    <% if model.registration_form_enabled? %>
      <%= action_authorized_link_to(
        :join,
        i18n_join_text,
        join_meeting_registration_path(model),
        class: button_classes,
        disabled: !model.has_available_slots?,
      ) %>
    <% else %>
      <%= render :registration_confirm %>
      <%= action_authorized_button_to(
        :join,
        i18n_join_text,
        "#",
        class: button_classes,
        disabled: !model.has_available_slots?,
        data: { open: current_user.present? ? "meeting-registration-confirm-#{model.id}" : "loginModal" }
      ) %>
    <% end %>
  <% end %>
  <% if shows_remaining_slots? %>
    <span><%= t("remaining_slots", scope: "decidim.meetings.meetings.show", count: model.remaining_slots) %></span>
  <% end %>
<% elsif model.on_different_platform? %>
  <%= action_authorized_link_to(
    :join,
    i18n_join_text,
    model.registration_url,
    class: button_classes
  ) %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-meetings-0.24.3 app/cells/decidim/meetings/join_meeting_button/show.erb
decidim-meetings-0.24.2 app/cells/decidim/meetings/join_meeting_button/show.erb
decidim-meetings-0.24.1 app/cells/decidim/meetings/join_meeting_button/show.erb
decidim-meetings-0.24.0 app/cells/decidim/meetings/join_meeting_button/show.erb
decidim-meetings-0.24.0.rc2 app/cells/decidim/meetings/join_meeting_button/show.erb
decidim-meetings-0.24.0.rc1 app/cells/decidim/meetings/join_meeting_button/show.erb