-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78908fe
commit 723f0b3
Showing
12 changed files
with
238 additions
and
3 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,16 @@ | ||
|
||
module MembershipVerifyHelper | ||
|
||
def localized_logo_path | ||
"sac_logo_#{I18n.locale.downcase}.svg" | ||
end | ||
|
||
def localized_sac_sponsors_url | ||
{ | ||
de: 'https://www.sac-cas.ch/de/der-sac/unsere-partner/', | ||
fr: 'https://www.sac-cas.ch/fr/le-cas/nos-partenaires/', | ||
it: 'https://www.sac-cas.ch/it/il-cas/i-nostri-partner/' | ||
}[I18n.locale] | ||
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,63 @@ | ||
- title = t('verify_membership.title') | ||
|
||
%html{lang: I18n.locale} | ||
%head | ||
%meta{charset: 'utf-8'} | ||
%title= "#{Settings.application.name} - #{title}" | ||
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'} | ||
= stylesheet_pack_tag 'application' | ||
= javascript_pack_tag 'membership_verify' | ||
%body | ||
#membership-verify | ||
%header | ||
%div#logo | ||
- logo = Settings.application.membership_verify_logo | ||
- if logo | ||
= wagon_image_pack_tag(logo.image, alt: Settings.application.name) | ||
- else | ||
= image_pack_tag(localized_logo_path, alt: 'define logo in wagon settings (membership_verify_logo)') | ||
#details | ||
- if person | ||
#member-img | ||
= image_tag(upload_url(person, :picture)) | ||
#member-name | ||
= person.full_name | ||
#member-info | ||
%dl.dl-horizontal | ||
%div | ||
%strong=t('.membership_number', membership_number: person.membership_number) | ||
%div | ||
- membership_years = Person.where(id: person.id).with_membership_years.first.membership_years | ||
%strong=t('.membership_years', membership_years: membership_years) | ||
- if member? | ||
%div{:class => 'alert alert-success'} | ||
%span.fas.fa-check | ||
= t('verify_membership.status_valid') | ||
- else | ||
%div{:class => 'alert alert-danger'} | ||
%span.fas.fa-times-circle | ||
= t('verify_membership.status_invalid') | ||
|
||
#sections.mb-5 | ||
- main_section_role = person.roles.find_by(type: Group::SektionsMitglieder::Mitglied.sti_name) | ||
%div | ||
%div | ||
%strong= main_section_role.to_s | ||
%div | ||
%strong= main_section_role.group.layer_group.to_s | ||
- person.roles.where(type: Group::SektionsMitglieder::MitgliedZusatzsektion.sti_name).each do |secondary_role| | ||
%div | ||
%div= secondary_role.to_s | ||
%div= secondary_role.group.layer_group.to_s | ||
|
||
#logo-reciprocate | ||
= image_pack_tag('logo_gegenrecht.svg', alt: 'define logo in wagon settings (membership_verify_logo)') | ||
|
||
- else | ||
%div{:class => 'alert alert-danger'} | ||
%span.fas.fa-times-circle | ||
= t('verify_membership.not_found') | ||
#footer | ||
%a{href: localized_sac_sponsors_url, target: '_blank'} | ||
= image_pack_tag('membership_verify_partner_ad.jpg', alt: 'define logo in wagon settings (membership_verify_logo)') | ||
|
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
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