[Isocial-svn] SF.net SVN: isocial: [73] app
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <di...@us...> - 2008-03-13 14:22:34
|
Revision: 73 http://isocial.svn.sourceforge.net/isocial/?rev=73&view=rev Author: dim0s77 Date: 2008-03-13 07:22:40 -0700 (Thu, 13 Mar 2008) Log Message: ----------- send email after messaging Modified Paths: -------------- app/controllers/message_controller.php app/locales/message/ru.php Added Paths: ----------- app/views/message/email/ app/views/message/email/send.tpl Modified: app/controllers/message_controller.php =================================================================== --- app/controllers/message_controller.php 2008-03-13 13:29:50 UTC (rev 72) +++ app/controllers/message_controller.php 2008-03-13 14:22:40 UTC (rev 73) @@ -46,12 +46,12 @@ if (!$message->thread_id) { $message->thread_id = $message->getId(); if ($message->save()) { + $this->message = $message; + $this->sendMail( $recipient->email ); $this->redirectTo(array('action' => 'send_successfully')); return; } } - $this->redirectTo(array('action' => 'send_successfully')); - return; } } $this->addError('_common', 'Sending message error', 'please, try again'); @@ -66,6 +66,8 @@ $message->recipient->assign($recipient); $message->setAttributes($this->params['message']); if ($message->save()) { + $this->message = $message; + $this->sendMail( $recipient->email, 'email/send' ); $thread_id = $this->params['message']['thread_id']; $thread = $this->Message->findFirst(array('thread_id' => $thread_id )); $user_id = $this->current_user->getId(); Modified: app/locales/message/ru.php =================================================================== --- app/locales/message/ru.php 2008-03-13 13:29:50 UTC (rev 72) +++ app/locales/message/ru.php 2008-03-13 14:22:40 UTC (rev 73) @@ -31,5 +31,8 @@ $dictionary['Back to'] = 'Обратно во'; $dictionary['Delete Thread'] = 'Удалить нить сообщений'; $dictionary['Are you sure you want to delete this thread'] = 'Вы уверены, что хотите удалить эту нить сообщений'; +$dictionary['sent you a message'] = 'прислал(а) Вам сообщение'; +$dictionary['on'] = 'на'; +$dictionary['To reply to this message, follow the link below'] = 'Чтобы ответить на это сообщение, следуйте по ссылке ниже'; ?> Added: app/views/message/email/send.tpl =================================================================== --- app/views/message/email/send.tpl (rev 0) +++ app/views/message/email/send.tpl 2008-03-13 14:22:40 UTC (rev 73) @@ -0,0 +1,13 @@ +Subject: <?= $controller->current_user->name ?> _{sent you a message} _{on} iSocial... +From: iSocial <no-...@ma...> + +<?= $controller->current_user->name ?> _{sent you a message}. + +<p>{message.subject}</p> +<p>"{message.body}"</p> + +<p>_{To reply to this message, follow the link below}:<br> +<? $link = AK_SITE_URL . "message/show?t=" . $message->thread_id ?> +<a href="{link}">{link}</a>.</p> + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |