Les mails envoyés n'ont plus de html, et sont wrappés à la colonne 80
This commit is contained in:
parent
0e73eb6c41
commit
2f23fd6914
@ -23,4 +23,8 @@ module EventsHelper
|
||||
+ "#{@event.related_city.try :longitude}"
|
||||
}
|
||||
end
|
||||
|
||||
def wrap(s, width = 78)
|
||||
s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n")
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Sending mails related to events life cycle
|
||||
class EventMailer < ActionMailer::Base
|
||||
helper :events
|
||||
|
||||
def create(event)
|
||||
@event = event
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Sending mails related to events' moderation
|
||||
class ModerationMailer < ActionMailer::Base
|
||||
helper :events
|
||||
|
||||
def create(event)
|
||||
@event = event
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Sending mails related to events' notes
|
||||
class NoteMailer < ActionMailer::Base
|
||||
helper :events
|
||||
|
||||
def notify(note)
|
||||
@note = note
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
=====================================================
|
||||
#{Event.human_attribute_name :title}: #{@event.title}
|
||||
#{Event.human_attribute_name :start_time}: #{l @event.start_time, format: :at}
|
||||
#{Event.human_attribute_name :end_time}: #{l @event.end_time, format: :at}
|
||||
#{Event.human_attribute_name :region}: #{@event.related_region}
|
||||
#{Event.human_attribute_name :city}: #{@event.city}
|
||||
#{Event.human_attribute_name :url}: #{@event.url}
|
||||
#{Event.human_attribute_name :contact}: #{@event.contact}
|
||||
#{Event.human_attribute_name :submitter}: #{@event.submitter}
|
||||
#{Event.human_attribute_name :tags}: #{@event.tags}
|
||||
#{Event.human_attribute_name :description}: #{raw @event.description}
|
||||
#{Event.human_attribute_name(:title).concat(':').ljust 12 } #{@event.title}
|
||||
#{Event.human_attribute_name(:start_time).concat(':').ljust 12 } #{l @event.start_time, format: :at}
|
||||
#{Event.human_attribute_name(:end_time).concat(':').ljust 12 } #{l @event.end_time, format: :at}
|
||||
#{Event.human_attribute_name(:region).concat(':').ljust 12 } #{@event.related_region}
|
||||
#{Event.human_attribute_name(:city).concat(':').ljust 12 } #{@event.city}
|
||||
#{Event.human_attribute_name(:url).concat(':').ljust 12 } #{@event.url}
|
||||
#{Event.human_attribute_name(:contact).concat(':').ljust 12 } #{@event.contact}
|
||||
#{Event.human_attribute_name(:submitter).concat(':').ljust 12 } #{@event.submitter}
|
||||
#{Event.human_attribute_name(:tags).concat(':').ljust 12 } #{@event.tags}
|
||||
#{Event.human_attribute_name(:description).concat(':').ljust 12}
|
||||
= wrap(strip_tags(@event.description)).gsub(/$/, ' ').gsub /^/, ' '
|
||||
=====================================================
|
||||
|
@ -4,4 +4,7 @@
|
||||
\
|
||||
= render file: '/events/show'
|
||||
\
|
||||
=t '.access'
|
||||
= event_url @event
|
||||
\
|
||||
=t '.signature'
|
||||
|
@ -353,6 +353,7 @@ pouvez éditer votre événement à l'adresse:"
|
||||
subject: "[Agenda du Libre] Événement '%{subject}' modéré"
|
||||
title: Bonjour,
|
||||
body: L'événement a été modéré par %{author}.
|
||||
access: "Vous pouvez le consulter ici:"
|
||||
signature: "-- \nL'équipe de modération"
|
||||
destroy:
|
||||
subject: "[Agenda du Libre] Événement '%{subject}' refusé"
|
||||
|
Loading…
Reference in New Issue
Block a user