]> git.openstreetmap.org Git - rails.git/blob - app/helpers/notifier_helper.rb
Make test for a "zero hour" block more robust
[rails.git] / app / helpers / notifier_helper.rb
1 module NotifierHelper
2   def fp(text)
3     format_paragraph(text, 72, 0)
4   end
5
6   def link_to_user(display_name)
7     link_to(
8       display_name,
9       user_url(display_name, :host => SERVER_URL),
10       :target => "_blank",
11       :style => "text-decoration: none; color: #222; font-weight: bold"
12     )
13   end
14
15   def message_body(&block)
16     render(
17       :partial => "message_body",
18       :locals => { :body => capture(&block) }
19     )
20   end
21
22   def style_message(html)
23     html.gsub /<p>/, '<p style="color: black; margin: 0.75em 0">'
24   end
25 end