app/helpers/decidim/meetings/meetings_helper.rb in decidim-meetings-0.15.2 vs app/helpers/decidim/meetings/meetings_helper.rb in decidim-meetings-0.16.0
- old
+ new
@@ -85,8 +85,26 @@
if agenda_item_id == agenda_items_times[index][:agenda_item_id]
html += "[ #{agenda_items_times[index][:start_time].strftime("%H:%M")} - #{agenda_items_times[index][:end_time].strftime("%H:%M")}]"
end
html.html_safe
end
+
+ def registration
+ @registration ||= Decidim::Meetings::Registration
+ .where(decidim_user_id: current_user)
+ .find_by(decidim_meeting_id: @meeting.id)
+ end
+
+ def registration_code_help_text
+ t("registration_code_help_text", scope: "decidim.meetings.meetings.show")
+ end
+
+ def registration_validation_state
+ if @registration.validated_at
+ t("validated", scope: "decidim.meetings.meetings.show.registration_state")
+ else
+ t("validation_pending", scope: "decidim.meetings.meetings.show.registration_state")
+ end
+ end
end
end
end