diff --git a/booking.emails.inc b/booking.emails.inc index 6644ab1..260f22c 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -54,7 +54,8 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) { 'key' => 'registration_mail', 'body' => _booking_registration_email_generate($node, $tokens, $waiting_list, $balance_payment, $manual), 'subject' => $subject, - 'footer' => $message_footer, + 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -132,6 +133,7 @@ function _booking_regn_notifyonly_email($node, $balance_payment) { 'body' => $body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -254,6 +256,7 @@ function _booking_balance_payment_email($nid) { 'body' => $message_body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -322,6 +325,7 @@ function _booking_partialbalance_payment_email($nid) { 'body' => $body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -401,6 +405,7 @@ function _booking_custom_email($nid, $email_type, $sender = 'contact') { 'body' => $message_body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -472,6 +477,7 @@ function _booking_promoted_from_waitinglist_email($nid) { 'body' => $body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -546,6 +552,7 @@ function _booking_demoted_to_notcoming_email($nid) { 'body' => $body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -616,6 +623,7 @@ function _booking_missedpayment_email($nid) { 'body' => $body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -687,6 +695,7 @@ function _booking_travelform_initial_request_email($nid) { 'body' => $body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -759,6 +768,7 @@ function _booking_travelform_reminder_request_email($nid) { 'body' => $body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; @@ -834,6 +844,7 @@ function _booking_travelform_confirmation_email($nid) { 'body' => $body, 'subject' => $subject, 'footer' => $message_footer, + 'links' => _booking_html_emails_links(), )); //watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; diff --git a/booking.helper.inc b/booking.helper.inc index 49ac41c..91350c5 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -87,6 +87,17 @@ function _booking_ucname($string) { return $string; } +/** + * Helper function to generate associative array of 3 email links supported by html email template + */ +function _booking_html_emails_links() { + return array( + 'The Week' => 'https://www.studyweek.net/the-week/whats-happening', + 'Resources' => 'https://www.studyweek.net/studynotes', + 'Who\'s Coming' => 'https://www.studyweek.net/coming', + ); +} + /** * Helper function to perform some validity checking of email addresses diff --git a/booking.module b/booking.module index 71bda57..59d09ab 100644 --- a/booking.module +++ b/booking.module @@ -882,7 +882,7 @@ function booking_theme($existing, $type, $theme, $path) { 'template' => 'mimemail-message' // extension of .tpl.php automatically added ), 'booking_htmlmail_registration_mail' => array( - 'variables' => array('subject' => NULL, 'body' => NULL, 'footer' => NULL), + 'variables' => array('subject' => NULL, 'body' => NULL, 'footer' => NULL, 'links' => NULL), 'path' => $theme_path, 'image_path' => drupal_get_path('module', 'booking'). '/images', 'template' => $template_file, diff --git a/theme/mimemail-message-registration_mail.tpl.php b/theme/mimemail-message-registration_mail.tpl.php index b5d231a..b57bd45 100644 --- a/theme/mimemail-message-registration_mail.tpl.php +++ b/theme/mimemail-message-registration_mail.tpl.php @@ -171,155 +171,110 @@ max-width: 100% !important; } }
-
-
- - -
- -
 
- -
- - +
+
+ +
+
 
+
+ +
-
+
+ + +
- - +
- - -
- -
 
Image -
 
-
- - +
+ +
 
+ + Image + +
 
+
-
+
+ +
- + $link) : ?> +
-
- - - - - - -
+
+
+ + + + + +
+
- -
-
-
+ - - - - - -
-
-
- -
-
-
- - - - - - -
-
-
-
+
+ +
- - +
- - - -
-

- - - - - - -
- -
- - - - -
- -
 
- -
- - - - -
-
-
- + + +
+

+
+ + + +
+ +
+ +
+ +
+
 
+
+ +
+ + +
+
+
+