From b493a534f2966e23eb0244654e8929320721da8e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 4 Mar 2009 06:25:55 +0000 Subject: A variety of cleanups: * Allow for the "movie" type in all of our text * Try to follow the pattern of mainly only passing ORM objects to the view and let it generate its own text (this becomes even more important when 3rd parties want to customize notification messages) * Rename _send_message to be _notify_subscribers to be more acccurate and have it explicitly take a subject in the API * Use Item_Model::url() in the views instead of hand crafting URLs * Reformat HTML in views * Use $comment->author_xxx() functions instead of replicating that code * Fix several places where we were encoding data by doing ucfirst($item->type) with conditionals where we form the text properly. We should *never* be showing data types to the end user! This is not localizable! Note that this probably breaks the existing batch processing code. I am going to redo that in a subsequent pass. --- .../notification/views/comment_published.html.php | 44 +++++++++------ modules/notification/views/item_added.html.php | 44 +++++++-------- modules/notification/views/item_deleted.html.php | 33 ++++++------ modules/notification/views/item_updated.html.php | 63 +++++++++++----------- 4 files changed, 99 insertions(+), 85 deletions(-) (limited to 'modules/notification/views') diff --git a/modules/notification/views/comment_published.html.php b/modules/notification/views/comment_published.html.php index 4a7936e6..23588c72 100644 --- a/modules/notification/views/comment_published.html.php +++ b/modules/notification/views/comment_published.html.php @@ -1,19 +1,31 @@ - - <?= $subject ?> - - -

- - - - - - - - - -
- + + <?= $subject ?> + + +

+ + + + + + + + + + + + + + + + + + + + + +
text ?>
author_name() ?>
author_email() ?>
author_url() ?>
item()->url(array(), true) ?>#comments
+ diff --git a/modules/notification/views/item_added.html.php b/modules/notification/views/item_added.html.php index 1832fb39..b67b9f38 100644 --- a/modules/notification/views/item_added.html.php +++ b/modules/notification/views/item_added.html.php @@ -1,25 +1,25 @@ - - <?= $subject ?> - - -

- - - - - - - - - - - - - - - -
- + + <?= $subject ?> + + +

+ + + + + + + + + + description): ?> + + + + + +
title ?>
url(array(), true) ?>
description ?>
+ diff --git a/modules/notification/views/item_deleted.html.php b/modules/notification/views/item_deleted.html.php index f3e098da..ac9ab594 100644 --- a/modules/notification/views/item_deleted.html.php +++ b/modules/notification/views/item_deleted.html.php @@ -1,18 +1,21 @@ - - <?= $subject ?> - - -

- - - - - - - - -
- + + <?= $subject ?> + + +

+ + + + + + + + +
+ $item->parent()->title)) ?> +
parent()->url(array(), true) ?>
+ diff --git a/modules/notification/views/item_updated.html.php b/modules/notification/views/item_updated.html.php index 126bd5cc..cba522e8 100644 --- a/modules/notification/views/item_updated.html.php +++ b/modules/notification/views/item_updated.html.php @@ -1,36 +1,35 @@ - - <?= $subject ?> - - -

- - - - - - - - + + <?= $subject ?> + + +

+
+ + title != $new->title): ?> + + + + + + + + + + + + description != $new->description): ?> + + + + + description)): ?> + + + + - - - - - - - - - - - - - - - - - -
title ?>title ?>
url(array(), true) ?>
description ?>
description ?>
- + + -- cgit v1.2.3