[Rt-commit] rt branch, 4.0/dashboard-email-html, created. rt-4.0.11-34-g74d7383
Thomas Sibley
trs at bestpractical.com
Tue Apr 9 20:20:13 EDT 2013
The branch, 4.0/dashboard-email-html has been created
at 74d73837f3089f58bfa39dc67f5a5c9c995f0d06 (commit)
- Log -----------------------------------------------------------------
commit 74d73837f3089f58bfa39dc67f5a5c9c995f0d06
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Apr 9 16:58:41 2013 -0700
Valid HTML for emailed dashboards
Commit b0ec8b3 added the opening <div> to satisfy the assumptions of
/Elements/Footer, but /Elements/Footer is not used when emailing the
dashboard due to RT::Dashboard::Mailer disabling Mason autohandlers.
This meant dashboard emails ended with the opening <div> and never
closed <body> or <html>.
Additionally the Footer and PageLayout *are* used when viewing
dashboards in the browser, so the extra opening <div> forced the footer
and remaining page content as a child of the "#body" div instead of a
sibling.
Fix this comedy of errors by properly closing the HTML document when in
email (with no footer) and letting the Footer close PageLayout's opened
"#body" div as expected when in the browser.
diff --git a/share/html/Dashboards/Render.html b/share/html/Dashboards/Render.html
index a99bf74..f1893b0 100644
--- a/share/html/Dashboards/Render.html
+++ b/share/html/Dashboards/Render.html
@@ -84,11 +84,13 @@
% my $edit = RT->Config->Get('WebPath') . '/Dashboards/Modify.html?id='.$id;
% my $subscription = RT->Config->Get('WebPath') . '/Dashboards/Subscription.html?id='.$id;
<p><&|/l, $edit, $subscription &>You <a href="[_1]">may edit this dashboard</a> and <a href="[_2]">your subscription</a> to it in RT.</&></p>
-% }
-%# Matches the closing div in /Elements/Footer that it expects
-%# from PageLayout (which we don't use here)
-<div>
+%# We disable autohandlers when mailing (!$Preview) so /Elements/Footer isn't
+%# run for us. Tidy up the end of the HTML. We don't use /Elements/Tabs (and
+%# hence PageLayout) so we don't need to close any other tags.
+ </body>
+</html>
+% }
<%INIT>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list