mvhub-dev team mailing list archive
-
mvhub-dev team
-
Mailing list archive
-
Message #00063
[Branch ~mvhub-dev/mvhub/trunk] Rev 359: commited add_text_wrap_to_reminders
Merge authors:
Dan MacNeil (omacneil)
Lee Goodrich (leegoodrich)
Related merge proposals:
https://code.launchpad.net/~leegoodrich/mvhub/add_text_wrap_to_reminders/+merge/22721
proposed by: Lee Goodrich (leegoodrich)
https://code.launchpad.net/~omacneil/mvhub/add_text_wrap_to_reminders/+merge/22676
proposed by: Dan MacNeil (omacneil)
------------------------------------------------------------
revno: 359 [merge]
committer: Dan MacNeil <dan@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-04-03 14:35:15 -0400
message:
commited add_text_wrap_to_reminders
modified:
app-mvhub/conf/templates/text/reminder_email_01.tmpl
app-mvhub/conf/templates/text/reminder_email_02.tmpl
app-mvhub/conf/templates/text/reminder_email_03.tmpl
app-mvhub/conf/templates/text/reminder_email_04.tmpl
app-mvhub/conf/templates/text/reminder_email_05.tmpl
lib-mvhub/lib/MVHub/Notifications.pm
--
lp:mvhub
https://code.launchpad.net/~mvhub-dev/mvhub/trunk
Your team mvhub-dev is subscribed to branch lp:mvhub.
To unsubscribe from this branch go to https://code.launchpad.net/~mvhub-dev/mvhub/trunk/+edit-subscription
=== modified file 'app-mvhub/conf/templates/text/reminder_email_01.tmpl'
--- app-mvhub/conf/templates/text/reminder_email_01.tmpl 2010-04-01 20:28:19 +0000
+++ app-mvhub/conf/templates/text/reminder_email_01.tmpl 2010-04-03 18:12:58 +0000
@@ -3,8 +3,6 @@
I write to ask you to update your <!--TMPL_VAR name="agency_name"--> listing
at <!--TMPL_VAR name="website_name"-->. So people trust your listing,
even if you know that nothing needs to be changed, please login and
-
-
make changes by clicking on:
<!--TMPL_VAR name="quick_login_url"-->
@@ -31,11 +29,10 @@
or any of its programs, let us know and we will stop emailing you.
You can reach us at:
- <!--TMPL_VAR name="contact_us_email"-->
- <!--TMPL_VAR name="contact_us_phone"-->
+<!--TMPL_VAR name="contact_info"-->
Please let us know if you have any other questions or concerns.
Thanks so much,
-<!--TMPL_VAR name="signer"-->
-<!--TMPL_VAR name="team_name"-->
+<!--TMPL_VAR name="signature"-->
+
=== modified file 'app-mvhub/conf/templates/text/reminder_email_02.tmpl'
--- app-mvhub/conf/templates/text/reminder_email_02.tmpl 2010-04-01 19:52:07 +0000
+++ app-mvhub/conf/templates/text/reminder_email_02.tmpl 2010-04-03 18:10:42 +0000
@@ -19,11 +19,10 @@
of its programs, let us know and we will stop emailing you.
You can reach us at:
- <!--TMPL_VAR name="contact_us_email"-->
- <!--TMPL_VAR name="contact_us_phone"-->
+<!--TMPL_VAR name="contact_info"-->
Please let us know if you have questions or concerns.
-Thank you.
-<!--TMPL_VAR name="signer"-->
-<!--TMPL_VAR name="team_name"-->
+
+Thank you very much.
+<!--TMPL_VAR name="signature"-->
=== modified file 'app-mvhub/conf/templates/text/reminder_email_03.tmpl'
--- app-mvhub/conf/templates/text/reminder_email_03.tmpl 2010-04-02 19:16:27 +0000
+++ app-mvhub/conf/templates/text/reminder_email_03.tmpl 2010-04-03 18:10:42 +0000
@@ -18,13 +18,12 @@
of its programs, let us know and we will stop emailing you.
You can reach us at:
- <!--TMPL_VAR name="contact_us_email"-->
- <!--TMPL_VAR name="contact_us_phone"-->
+<!--TMPL_VAR name="contact_info"-->
<!--TMPL_VAR name="website_name"--> is a web based directory of social services that costs nothing for you and costs nothing for people looking for social services.
Please let us know if you have any other questions or concerns.
Thanks,
-<!--TMPL_VAR name="signer"-->
-<!--TMPL_VAR name="team_name"-->
+<!--TMPL_VAR name="signature"-->
+
=== modified file 'app-mvhub/conf/templates/text/reminder_email_04.tmpl'
--- app-mvhub/conf/templates/text/reminder_email_04.tmpl 2010-04-02 19:16:27 +0000
+++ app-mvhub/conf/templates/text/reminder_email_04.tmpl 2010-04-03 18:10:42 +0000
@@ -26,11 +26,10 @@
of its programs, let us know and we will stop emailing you.
You can reach us at:
- <!--TMPL_VAR name="contact_us_email"-->
- <!--TMPL_VAR name="contact_us_phone"-->
+<!--TMPL_VAR name="contact_info"-->
Please let us know if you have any other questions or concerns.
Thank you,
-<!--TMPL_VAR name="signer"-->
-<!--TMPL_VAR name="team_name"-->
+<!--TMPL_VAR name="signature"-->
+
=== modified file 'app-mvhub/conf/templates/text/reminder_email_05.tmpl'
--- app-mvhub/conf/templates/text/reminder_email_05.tmpl 2010-04-02 19:16:27 +0000
+++ app-mvhub/conf/templates/text/reminder_email_05.tmpl 2010-04-03 18:10:42 +0000
@@ -19,13 +19,11 @@
If you are receiving this email in error, let us know and we
will stop emailing you. You can reach us at:
- <!--TMPL_VAR name="contact_us_email"-->
- <!--TMPL_VAR name="contact_us_phone"-->
+<!--TMPL_VAR name="contact_info"-->
<!--TMPL_VAR name="website_name"--> is a web based directory of social services that costs nothing for you and costs nothing for people looking for social services.
Please let us know if you have any other questions or concerns.
Thanks so much,
-<!--TMPL_VAR name="signer"-->
-<!--TMPL_VAR name="team_name"-->
+<!--TMPL_VAR name="signature"-->
=== modified file 'lib-mvhub/lib/MVHub/Notifications.pm'
--- lib-mvhub/lib/MVHub/Notifications.pm 2010-03-30 21:00:29 +0000
+++ lib-mvhub/lib/MVHub/Notifications.pm 2010-04-03 18:33:59 +0000
@@ -10,6 +10,7 @@
use MVHub::Utils::DB qw/get_sql_select_statement get_sql_update_statement/;
use HTML::Template;
+use Text::Wrap qw/ fill $columns/;
our ($VERSION) = '$Revision: 1334 $' =~ /([.\d]+)/;
@@ -42,24 +43,43 @@
my $notice_href = shift;
my $tmpl = HTML::Template->new( filename => $template_file );
-
my $quick_login_url
= MVHub::Utils::generate_quick_login_url(
$email_constants_href->{website_name},
$notice_href->{agency_id} );
+
+ $tmpl->param(
+ first_name => $notice_href->{contact_first_name},
+ agency_name => $notice_href->{agency_name},
+ contact_info => '<!--TMPL_VAR name="contact_info"-->',
+ signature => '<!--TMPL_VAR name="signature"-->',
+ expired_records => '<!--TMPL_VAR name="expired_records"-->',
+ website_name => $email_constants_href->{website_name},
+ quick_login_url => $quick_login_url,
+ );
+
+ # wrap text to 75 columns
+ $Text::Wrap::columns = 75;
+ $Text::Wrap::huge = 'overflow';
+ my @paragraphs = split /\n/, $tmpl->output();
+ my @text = Text::Wrap::fill( '', '', @paragraphs );
+ my $text = join "\n", @text;
+
+ # we jump through these hoop because we
+ # we don't want to Text::Wrap various things
+ $tmpl = HTML::Template->new( scalarref => \$text );
my $expired_records
= _format_expired_record_list( $notice_href->{expired_record_list} );
+ my $contact_info
+ = " $email_constants_href->{admin_email}\n $email_constants_href->{admin_phone}";
+ my $signature
+ = "\n$email_constants_href->{admin_name}\n$email_constants_href->{team_name}";
+
$tmpl->param(
- first_name => $notice_href->{contact_first_name},
- agency_name => $notice_href->{agency_name},
- contact_us_email => $email_constants_href->{admin_email},
- contact_us_phone => $email_constants_href->{admin_phone},
- expired_records => $expired_records,
- signer => $email_constants_href->{admin_name},
- team_name => $email_constants_href->{team_name},
- website_name => $email_constants_href->{website_name},
- quick_login_url => $quick_login_url,
+ expired_records => $expired_records,
+ contact_info => $contact_info,
+ signature => $signature,
);
return $tmpl->output();