Skip to content

Commit

Permalink
Use helper instead of view to define table attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
njaeggi committed Oct 10, 2024
1 parent 8ec2faa commit 80b4610
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 7 additions & 1 deletion app/helpers/pbs/event_participations_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2012-2023, Pfadibewegung Schweiz. This file is part of
# Copyright (c) 2012-2024, Pfadibewegung Schweiz. This file is part of
# hitobito_pbs and licensed under the Affero General Public License version 3
# or later. See the COPYING file at the top-level directory or at
# https://github.com/hitobito/hitobito_pbs.
Expand All @@ -19,5 +19,11 @@ def js_data_sharing_help_text(participation, for_someone_else)

CustomContent.get(content_key).body
end

def event_participation_table_options(t, event)
if @event.is_a?(Event::Camp)
table.col(Event::Participation.human_attribute_name(:state)) { |p| t("activerecord.attributes.event/camp.participation_states.#{p.state}") }
end
end
end
end
2 changes: 0 additions & 2 deletions app/views/event/participations/_list_pbs.html.haml

This file was deleted.

0 comments on commit 80b4610

Please sign in to comment.