From 53e6c9978041f722664d46c17fcb12a265da08df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20B=C3=B6hme?= Date: Thu, 31 Oct 2024 17:31:39 +0100 Subject: [PATCH] Use helper instead of partial for contact text --- app/helpers/home_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 31a19fa04..9857ab565 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -8,4 +8,12 @@ def next_event_date def localized_recurring_event_date Whitelabel[:localized_recurring] end + + def contact_text + ''.html_safe.tap do |out| + out << t('home.send_us_an_email', mail_to: mail_to(Whitelabel[:email], 'E-Mail', title: 'E-Mail')) + out << " #{t('home.or_message_on_twitter', twitter_link: link_to_twitter(Whitelabel[:twitter]))}" if Whitelabel[:twitter] + out << '.' + end + end end