-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add manager also to participation aside (hitobito_jubla#78)
- Loading branch information
1 parent
ea38fff
commit 9e540f4
Showing
5 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (c) 2012-2013, Jungwacht Blauring Schweiz. This file is part of | ||
# hitobito 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. | ||
|
||
module Youth::Export::Pdf | ||
module Participation | ||
class PersonAndEvent < Export::Pdf::Participation::PersonAndEvent | ||
class Person < Export::Pdf::Participation::PersonAndEvent::Person | ||
def render | ||
super | ||
render_people_managers | ||
end | ||
|
||
def render_people_managers | ||
return unless FeatureGate.enabled?('people.people_managers') | ||
|
||
person.people_managers&.each do |manager| | ||
labeled_attr(manager, :manager) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- # frozen_string_literal: true | ||
- | ||
- # Copyright (c) 2024, Schweizer Alpen-Club. This file is part of | ||
- # hitobito 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. | ||
|
||
|
||
= render 'people_managers' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- # frozen_string_literal: true | ||
- | ||
- # Copyright (c) 2024, Schweizer Alpen-Club. This file is part of | ||
- # hitobito 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. | ||
|
||
|
||
- FeatureGate.if('people.people_managers') do | ||
- if entry.person.people_managers.any? | ||
%section | ||
= render 'person/managers/list', person: entry.person |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters