Skip to content

Commit 060f13e

Browse files
committed
Use helper instead of partial for contact text
1 parent 29220a0 commit 060f13e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

app/helpers/home_helper.rb

+8
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,12 @@ def next_event_date
88
def localized_recurring_event_date
99
Whitelabel[:localized_recurring]
1010
end
11+
12+
def contact_text
13+
capture do
14+
concat t('home.send_us_an_email', mail_to: mail_to(Whitelabel[:email], 'E-Mail', title: 'E-Mail')).html_safe
15+
concat " #{t('home.or_message_on_twitter', twitter_link: link_to_twitter(Whitelabel[:twitter]))}".html_safe if Whitelabel[:twitter]
16+
concat '.'
17+
end
18+
end
1119
end

app/views/events/show.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
small
1313
= I18n.tw("home.like_to_talk")
1414
br
15-
= render "home/contact_text"
15+
= contact_text

app/views/home/_topics.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= section_box :topics do
22
p
33
strong=> I18n.tw("home.like_to_talk")
4-
= render "home/contact_text"
4+
= contact_text
55
= render 'users/list', users: organizers
66
p== I18n.tw("home.engage")
77
= link_to t("home.add_topic"), new_topic_path, class: 'btn btn-primary'

0 commit comments

Comments
 (0)