theme tweaks

This commit is contained in:
2017-06-29 11:22:37 +10:00
parent 977ba0769b
commit d6f6b78f24
2 changed files with 44 additions and 50 deletions

View File

@@ -824,20 +824,23 @@ function booking_node_access($node, $op, $account) {
* Implementation of hook_theme().
*/
function booking_theme($existing, $type, $theme, $path) {
if($type == 'module')
{
if($type == 'module') {
$theme_path = drupal_get_path('module', 'booking'). '/theme';
// if our more heavily customised template exists, use that, otherwise fall back to the generic one
$template_file = is_file($theme_path . '/mimemail-message-registration_mail.tpl.php') ? '/mimemail-message-registration_mail' : '/mimemail-message';
return array(
'booking_details' => array('arguments' => array('node' => NULL)),
'booking_details' => array('arguments' => array('node' => NULL)),
'booking_htmlmail_template' => array(
'variables' => array('module' => NULL, 'key' => NULL, 'css' => NULL, 'recipient' => NULL, 'subject' => NULL, 'body' => NULL, 'message' => array()),
'path' => drupal_get_path('module', 'booking'). '/theme',
'path' => $theme_path,
'template' => 'mimemail-message' // extension of .tpl.php automatically added
),
'booking_htmlmail_registration_mail' => array(
'variables' => array('subject' => NULL, 'body' => NULL),
'path' => drupal_get_path('module', 'booking'). '/theme',
'path' => $theme_path,
'image_path' => drupal_get_path('module', 'booking'). '/images',
'template' => 'mimemail-message-registration_mail' // extension of .tpl.php automatically added
'template' => $template_file,
),
);
}

View File

@@ -1,22 +1,3 @@
<?php
/**
* @file
* Theme implementation for study week registration email, built using https://beefree.io
*
*
* Required variables:
* - $subject: The message subject
* - $body: The message body
*
src="<?php
// First get your image
$image = drupal_get_path('module', 'booking'). '/images/Final_Logo.png';
print 'data:image/png;base64,' . base64_encode(file_get_contents($image));
?>"
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
@@ -30,7 +11,6 @@
<title></title>
<!--[if !mso]><!-- -->
<link href="https://fonts.googleapis.com/css?family=Droid+Serif" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Bitter" rel="stylesheet" type="text/css">
<!--<![endif]-->
<style type="text/css" id="media-query">
@@ -157,7 +137,7 @@ a[x-apple-data-detectors=true] {
img.fullwidth {
max-width: 100% !important; } }
</style>
</style>
</head>
<body class="clean-body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #555555">
@@ -179,7 +159,7 @@ a[x-apple-data-detectors=true] {
<div style="padding-right: 5px; padding-left: 5px; padding-top: 0px; padding-bottom: 0px;">
<!--[if (mso)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 5px;padding-left: 5px; padding-top: 0px; padding-bottom: 0px;"><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
<div align="center"><div style="border-top: 0px solid transparent; width:100%; line-height:0px; height:0px; font-size:0px;">&nbsp;</div></div>
<div align="center"><div style="border-top: 0px solid transparent; width:100%; line-height:0px; height:0px; font-size:0px;">&#160;</div></div>
<!--[if (mso)]></td></tr></table></td></tr></table><![endif]-->
</div>
@@ -199,10 +179,12 @@ a[x-apple-data-detectors=true] {
<div class="col num12" style="min-width: 320px;max-width: 700px;width: 700px;width: calc(38000% - 265300px);background-color: #FFFFFF;">
<div style="background-color: transparent; width: 100% !important;">
<!--[if (!mso)&(!IE)]><!--><div style="border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent; padding-top:5px; padding-bottom:5px; padding-right: 0px; padding-left: 0px;"><!--<![endif]-->
<div align="center" class="img-container center fullwidth" style="padding-right: 0px; padding-left: 0px;">
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px;" align="center"><![endif]-->
<div style="line-height:15px;font-size:1px">&nbsp;</div> <img class="center fullwidth" align="center" border="0" src="<?php echo $GLOBALS['base_url']; ?>/sites/all/modules/booking/images/Final_Logo.png" alt="Image" title="Image" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: 0;height: auto;float: none;width: 100%;max-width: 700px" width="700">
<div style="line-height:15px;font-size:1px">&nbsp;</div><!--[if mso]></td></tr></table><![endif]-->
<div style="line-height:15px;font-size:1px">&#160;</div> <img class="center fullwidth" align="center" border="0" src="<?php echo $GLOBALS['base_url']; ?>/sites/all/modules/booking/images/Final_Logo.png" alt="Image" title="Image" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: 0;height: auto;float: none;width: 100%;max-width: 700px" width="700">
<div style="line-height:15px;font-size:1px">&#160;</div><!--[if mso]></td></tr></table><![endif]-->
</div>
@@ -246,7 +228,7 @@ a[x-apple-data-detectors=true] {
<div align="center" class="button-container center" style="padding-right: 0px; padding-left: 0px; padding-top:0px; padding-bottom:0px;">
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;"><tr><td style="padding-right: 0px; padding-left: 0px; padding-top:0px; padding-bottom:0px;" align="center"><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://www.studyweek.net/studynotes" style="height:46px; v-text-anchor:middle; width:191px;" arcsize="9%" strokecolor="transparent" fillcolor="transparent"><w:anchorlock/><center style="color:#F5F5F5; font-family:Verdana, Geneva, sans-serif; font-size:18px;"><![endif]-->
<a href="https://www.studyweek.net/studynotes" target="_blank" style="display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #F5F5F5;background-color: transparent;border-radius: 4px;-webkit-border-radius: 4px;-moz-border-radius: 4px;max-width: 171px;width: auto;border-top: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-left: 0px solid transparent;padding-top: 5px;padding-right: 20px;padding-bottom: 5px;padding-left: 20px;font-family: Verdana, Geneva, sans-serif;mso-border-alt: none">
<span style="font-size:12px;line-height:24px;"><strong><span style="font-size: 18px; line-height: 36px;" data-mce-style="font-size: 18px; line-height: 36px;">Resources</span></strong></span>
<span style="font-size: 18px; line-height: 36px;" data-mce-style="font-size: 18px; line-height: 36px;"><strong>Resources</strong></span>
</a>
<!--[if mso]></center></v:roundrect></td></tr></table><![endif]-->
</div>
@@ -265,7 +247,7 @@ a[x-apple-data-detectors=true] {
<div align="center" class="button-container center" style="padding-right: 0px; padding-left: 0px; padding-top:0px; padding-bottom:0px;">
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;"><tr><td style="padding-right: 0px; padding-left: 0px; padding-top:0px; padding-bottom:0px;" align="center"><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://www.studyweek.net/coming" style="height:46px; v-text-anchor:middle; width:231px;" arcsize="9%" strokecolor="transparent" fillcolor="transparent"><w:anchorlock/><center style="color:#F5F5F5; font-family:Verdana, Geneva, sans-serif; font-size:18px;"><![endif]-->
<a href="https://www.studyweek.net/coming" target="_blank" style="display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #F5F5F5;background-color: transparent;border-radius: 4px;-webkit-border-radius: 4px;-moz-border-radius: 4px;max-width: 211px;width: auto;border-top: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-left: 0px solid transparent;padding-top: 5px;padding-right: 20px;padding-bottom: 5px;padding-left: 20px;font-family: Verdana, Geneva, sans-serif;mso-border-alt: none">
<span style="font-size:12px;line-height:24px;"><strong><span style="font-size: 18px; line-height: 36px;" data-mce-style="font-size: 18px; line-height: 36px;">Who<span style="line-height: 36px; font-size: 18px;" data-mce-style="line-height: 36px; font-size: 18px;">'</span>s Coming</span></strong></span>
<span style="font-size: 18px; line-height: 36px;" data-mce-style="font-size: 18px; line-height: 36px;"><strong>Who's Coming</strong></span>
</a>
<!--[if mso]></center></v:roundrect></td></tr></table><![endif]-->
</div>
@@ -290,7 +272,7 @@ a[x-apple-data-detectors=true] {
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 20px; padding-bottom: 10px;"><![endif]-->
<div style="font-family:Verdana, Geneva, sans-serif;line-height:120%;color:#0068A5; padding-right: 10px; padding-left: 10px; padding-top: 20px; padding-bottom: 10px;">
<div><p style="margin: 0;text-align: center"><strong><span style="line-height: 43px; font-size: 36px;"><?php print $subject ?></span></strong></p></div>
<div style="font-size:12px;line-height:14px;font-family:Verdana, Geneva, sans-serif;color:#0068A5;text-align:left;"><p style="margin: 0;font-size: 14px;line-height: 17px;text-align: center"><span style="font-size: 18px; line-height: 36px;" data-mce-style="font-size: 18px; line-height: 36px;"><strong><?php print $subject ?></strong></span></p></div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
@@ -306,15 +288,15 @@ a[x-apple-data-detectors=true] {
<div style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;">
<!--[if (mso)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px;padding-left: 10px; padding-top: 10px; padding-bottom: 10px;"><table width="90%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
<div align="center"><div style="border-top: 2px dotted #DAD8D8; width:90%; line-height:2px; height:2px; font-size:2px;">&nbsp;</div></div>
<div align="center"><div style="border-top: 2px dotted #DAD8D8; width:90%; line-height:2px; height:2px; font-size:2px;">&#160;</div></div>
<!--[if (mso)]></td></tr></table></td></tr></table><![endif]-->
</div>
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 25px;"><![endif]-->
<div style="font-family:'Bitter', Georgia, Times, 'Times New Roman', serif;line-height:120%;color:#C4C4C4; padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 25px;">
<div><p style="margin: 0;font-size: 12px;line-height: 14px">Our preferred method of contact is via email.<br><a style="color:#769FBB;text-decoration: underline;" title="info@studyweek.net" href="mailto:info@studyweek.net">info@studyweek.net</a><br></p><p style="margin: 0;font-size: 12px;line-height: 14px">&nbsp;<br></p><p style="margin: 0;font-size: 12px;line-height: 14px">If you have an enquiry regarding your booking.<br><a style="color:#769FBB;color:#769FBB;color:#769FBB;text-decoration: underline;" title="bookings@studyweek.net" href="mailto:bookings@studyweek.net">bookings@studyweek.net</a><br></p><p style="margin: 0;font-size: 12px;line-height: 14px">&nbsp;<br></p><p style="margin: 0;font-size: 12px;line-height: 14px">Need to speak to the right person?<br>Speak to our bookings coordinator - <a style="color:#769FBB;color:#769FBB;color:#769FBB;color:#769FBB;color:#769FBB;text-decoration: underline;" title="tel:0423637024" href="tel:0423637024">0423 637 024</a></p></div>
<div style="font-family:Verdana, Geneva, sans-serif;line-height:120%;color:#C4C4C4; padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 25px;">
<div style="font-size:12px;line-height:14px;font-family:Verdana, Geneva, sans-serif;color:#C4C4C4;text-align:left;"><p style="margin: 0;font-size: 12px;line-height: 14px">Our preferred method of contact is via email.<br><a style="color:#769FBB;text-decoration: underline;" title="info@studyweek.net" href="mailto:info@studyweek.net">info@studyweek.net</a><br></p><p style="margin: 0;font-size: 12px;line-height: 14px">&#160;<br></p><p style="margin: 0;font-size: 12px;line-height: 14px">If you have an enquiry regarding your booking.<br><a style="color:#769FBB;color:#769FBB;color:#769FBB;text-decoration: underline;" title="bookings@studyweek.net" href="mailto:bookings@studyweek.net">bookings@studyweek.net</a><br></p><p style="margin: 0;font-size: 12px;line-height: 14px">&#160;<br></p><p style="margin: 0;font-size: 12px;line-height: 14px">Need to speak to the right person?<br>Speak to our bookings coordinator - <a style="color:#769FBB;color:#769FBB;color:#769FBB;color:#769FBB;color:#769FBB;text-decoration: underline;" title="tel:0423637024" href="tel:0423637024">0423 637 024</a></p></div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
@@ -322,33 +304,42 @@ a[x-apple-data-detectors=true] {
<div align="center" style="padding-right: 10px; padding-left: 10px; padding-bottom: 10px;">
<div style="line-height:10px;font-size:1px">&nbsp;</div>
<div style="display: table; max-width:151;">
<!--[if (mso)|(IE)]><table width="131" cellpadding="0" cellspacing="0" border="0"><tr><td style="border-collapse:collapse; padding-right: 10px; padding-left: 10px; padding-bottom: 10px;" align="center"><table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; mso-table-lspace: 0pt;mso-table-rspace: 0pt; width:131px;"><tr><td width="32" style="width:32px; padding-right: 5px;" valign="top"><![endif]-->
<table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;Margin-right: 5px">
<div style="line-height:10px;font-size:1px">&#160;</div>
<div style="display: table; max-width:218;">
<!--[if (mso)|(IE)]><table width="198" cellpadding="0" cellspacing="0" border="0"><tr><td style="border-collapse:collapse; padding-right: 10px; padding-left: 10px; padding-bottom: 10px;" align="center"><table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; mso-table-lspace: 0pt;mso-table-rspace: 0pt; width:198px;"><tr><td width="32" style="width:32px; padding-right: 15px;" valign="top"><![endif]-->
<table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;Margin-right: 15px">
<tbody><tr style="vertical-align: top"><td align="left" valign="middle" style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
<a href="https://www.facebook.com/" title="Facebook" target="_blank">
<a href="https://www.facebook.com/studyweek2016" title="Facebook" target="_blank">
<img src="<?php echo $GLOBALS['base_url']; ?>/sites/all/modules/booking/images/facebook@2x.png" alt="Facebook" title="Facebook" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important">
</a>
<div style="line-height:5px;font-size:1px">&nbsp;</div>
<div style="line-height:5px;font-size:1px">&#160;</div>
</td></tr>
</tbody></table>
<!--[if (mso)|(IE)]></td><td width="32" style="width:32px; padding-right: 5px;" valign="top"><![endif]-->
<table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;Margin-right: 5px">
<!--[if (mso)|(IE)]></td><td width="32" style="width:32px; padding-right: 15px;" valign="top"><![endif]-->
<table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;Margin-right: 15px">
<tbody><tr style="vertical-align: top"><td align="left" valign="middle" style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
<a href="https://twitter.com/" title="Twitter" target="_blank">
<a href="https://twitter.com/studyweek" title="Twitter" target="_blank">
<img src="<?php echo $GLOBALS['base_url']; ?>/sites/all/modules/booking/images/twitter@2x.png" alt="Twitter" title="Twitter" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important">
</a>
<div style="line-height:5px;font-size:1px">&nbsp;</div>
<div style="line-height:5px;font-size:1px">&#160;</div>
</td></tr>
</tbody></table>
<!--[if (mso)|(IE)]></td><td width="32" style="width:32px; padding-right: 15px;" valign="top"><![endif]-->
<table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;Margin-right: 15px">
<tbody><tr style="vertical-align: top"><td align="left" valign="middle" style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
<a href="https://instagram.com/study_week_2016/" title="Instagram" target="_blank">
<img src="<?php echo $GLOBALS['base_url']; ?>/sites/all/modules/booking/images/instagram@2x.png" alt="Instagram" title="Instagram" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important">
</a>
<div style="line-height:5px;font-size:1px">&#160;</div>
</td></tr>
</tbody></table>
<!--[if (mso)|(IE)]></td><td width="32" style="width:32px; padding-right: 0;" valign="top"><![endif]-->
<table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;Margin-right: 0">
<tbody><tr style="vertical-align: top"><td align="left" valign="middle" style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
<a href="https://plus.google.com/" title="Google+" target="_blank">
<img src="<?php echo $GLOBALS['base_url']; ?>/sites/all/modules/booking/images/googleplus@2x.png" alt="Google+" title="Google+" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important">
<a href="http://youtube.com/sydneycyc" title="YouTube" target="_blank">
<img src="<?php echo $GLOBALS['base_url']; ?>/sites/all/modules/booking/images/youtube@2x.png" alt="YouTube" title="YouTube" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important">
</a>
<div style="line-height:5px;font-size:1px">&nbsp;</div>
<div style="line-height:5px;font-size:1px">&#160;</div>
</td></tr>
</tbody></table>
<!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->
@@ -359,7 +350,7 @@ a[x-apple-data-detectors=true] {
<div style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;">
<!--[if (mso)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px;padding-left: 10px; padding-top: 10px; padding-bottom: 10px;"><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
<div align="center"><div style="border-top: 1px solid #BBBBBB; width:100%; line-height:1px; height:1px; font-size:1px;">&nbsp;</div></div>
<div align="center"><div style="border-top: 1px solid #BBBBBB; width:100%; line-height:1px; height:1px; font-size:1px;">&#160;</div></div>
<!--[if (mso)]></td></tr></table></td></tr></table><![endif]-->
</div>