2017-12-14 17:10:13 +01:00
|
|
|
module CommentaireHelper
|
2018-09-11 18:35:29 +02:00
|
|
|
def commentaire_is_from_me_class(commentaire, connected_user)
|
2019-07-01 18:14:02 +02:00
|
|
|
if commentaire.sent_by?(connected_user)
|
2017-12-14 17:10:13 +01:00
|
|
|
"from-me"
|
|
|
|
end
|
|
|
|
end
|
2018-09-06 15:04:43 +02:00
|
|
|
|
2018-09-11 18:40:10 +02:00
|
|
|
def commentaire_answer_action(commentaire, connected_user)
|
2019-07-01 18:14:02 +02:00
|
|
|
if commentaire.sent_by?(connected_user)
|
2021-04-17 18:49:00 +02:00
|
|
|
I18n.t('helpers.commentaire.send_message_to_instructeur')
|
2018-09-11 18:40:10 +02:00
|
|
|
else
|
2021-04-17 18:49:00 +02:00
|
|
|
I18n.t('helpers.commentaire.reply_in_mailbox')
|
2018-09-11 18:40:10 +02:00
|
|
|
end
|
|
|
|
end
|
2017-12-14 17:10:13 +01:00
|
|
|
end
|