]> git.pld-linux.org Git - packages/eventum.git/blame - eventum-email-notify-display.patch
- rel 5.133: use php(extension) virtuals
[packages/eventum.git] / eventum-email-notify-display.patch
CommitLineData
eb90e21e
ER
1--- eventum-20060830/include/class.notification.php 2006-08-30 20:17:25.074832296 +0300
2+++ eventum/include/class.notification.php 2006-09-21 20:59:32.125474606 +0300
3ec364a0 3@@ -853,6 +853,31 @@
4819a450
ER
4 }
5 }
6
7+ /**
8+ * Method used to get list of addresses that were email sent to.
9+ *
10+ * @access public
11+ * @param integer $issue_id The issue ID
12+ * @return array list of addresse
13+ */
358f6191 14+ function getLastNotifiedAddresses($issue_id = null)
4819a450 15+ {
4f45b210 16+ global $_EVENTUM_LAST_NOTIFIED_LIST;
4819a450 17+
eb90e21e
ER
18+ if (is_null($_EVENTUM_LAST_NOTIFIED_LIST)) {
19+ return null;
20+ }
21+
4819a450
ER
22+ if (is_null($issue_id)) {
23+ // return all addresses in flat view
3ec364a0
ER
24+ $ret = array_values($_EVENTUM_LAST_NOTIFIED_LIST);
25+ } else {
26+ // return address list for specific issue_id only.
27+ $ret = $_EVENTUM_LAST_NOTIFIED_LIST[$issue_id];
4819a450 28+ }
3ec364a0 29+ return array_unique($ret);
4819a450
ER
30+ }
31+
32
33 /**
34 * Method used to format and send the email notifications.
3ec364a0 35@@ -869,6 +894,8 @@
4819a450
ER
36 */
37 function notifySubscribers($issue_id, $emails, $type, $data, $subject, $internal_only, $type_id = false, $headers = false)
38 {
4f45b210 39+ global $_EVENTUM_LAST_NOTIFIED_LIST;
4819a450
ER
40+
41 // open text template
42 $tpl = new Template_API;
43 $tpl->setTemplate('notifications/' . $type . '.tpl.text');
3ec364a0 44@@ -954,6 +981,8 @@
4819a450
ER
45 $full_subject = "[#$issue_id] $subject: $extra_subject";
46 }
47 $mail->send($from, $emails[$i], $full_subject, TRUE, $issue_id, $final_type, $sender_usr_id, $type_id);
48+
4f45b210 49+ $_EVENTUM_LAST_NOTIFIED_LIST[$issue_id][] = $emails[$i];
4819a450
ER
50 }
51 }
52
53--- eventum-20060829/update.php 2006-08-30 00:46:19.047416365 +0300
54+++ eventum-20060830/update.php 2006-08-30 20:17:24.844826982 +0300
55@@ -111,6 +111,7 @@
56
57 $tpl->assign(array(
58 "subscribers" => Notification::getSubscribers($issue_id),
358f6191 59+ "notify_list" => Notification::getLastNotifiedAddresses($issue_id),
4819a450
ER
60 "categories" => Category::getAssocList($prj_id),
61 "priorities" => Priority::getAssocList($prj_id),
62 "status" => $statuses,
251a5da4
ER
63--- eventum/templates/update_form.tpl.html~ 2006-11-19 23:13:05.931183315 +0200
64+++ eventum/templates/update_form.tpl.html 2006-11-19 23:16:07.055242625 +0200
4819a450
ER
65@@ -10,12 +10,23 @@
66 {if $update_result == -1}
67 <b>{t}Sorry, an error happened while trying to run your query.{/t}</b>
68 {elseif $update_result == 1}
69- <b>{t}Thank you, issue #{$smarty.post.issue_id} was updated successfully.{/t}
70+ <b>{t}Thank you, issue #{$smarty.post.issue_id} was updated successfully.{/t}</b>
71 {if $has_duplicates == 'yes'}
251a5da4 72 <br />{t}Also, all issues that are marked as duplicates from this one were updated as well.{/t}
4819a450
ER
73 {/if}
74 <br /><br />
75+
76+ {if $notify_list|@count > 0}
77+ <b>{t}E-mail about issue update was sent to:{/t}</b><br />
78+ {foreach from=$notify_list item=email_address}
79+ &nbsp;&nbsp;{$email_address|escape:"html"}<br />
80+ {/foreach}
81+ <br />
82+ {/if}
83+
84+ <b>
85 <a href="view.php?id={$smarty.post.issue_id}" class="link">{t}Return to Issue{/t} #{$smarty.post.issue_id} {t}Details Page{/t}</a>
86+ </b>
87 {/if}
88 </td>
89 </tr>
15b3b275
ER
90--- eventum-20060830/close.php 2006-09-04 14:46:53.766630207 +0300
91+++ eventum-20060830/close.php 2006-09-04 13:57:56.000000000 +0300
92@@ -68,9 +68,12 @@
93 $tpl->assign("close_result", $res);
94 }
95
96-$tpl->assign("statuses", Status::getClosedAssocList($prj_id));
97-$tpl->assign("resolutions", Resolution::getAssocList());
98-$tpl->assign("time_categories", Time_Tracking::getAssocCategories());
99+$tpl->assign(array(
100+ "statuses" => Status::getClosedAssocList($prj_id),
101+ "resolutions" => Resolution::getAssocList(),
102+ "time_categories" => Time_Tracking::getAssocCategories(),
103+ "notify_list" => Notification::getLastNotifiedAddresses($issue_id),
104+));
105
106 if ((Customer::hasCustomerIntegration($prj_id)) && (Customer::hasPerIncidentContract($prj_id, Issue::getCustomerID($issue_id)))) {
107 $details = Issue::getDetails($issue_id);
108--- eventum-20060830/templates/close.tpl.html~ 2006-09-04 14:46:53.486623924 +0300
109+++ eventum-20060830/templates/close.tpl.html 2006-09-04 14:45:42.000000000 +0300
110@@ -12,7 +12,18 @@
111 {if $close_result == -1}
112 <b>{t}Sorry, an error happened while trying to run your query.{/t}</b>
113 {elseif $close_result == 1}
114- <b>{t}Thank you, the issue was closed successfully. Please choose from one of the options below:{/t}</b>
115+ <b>{t}Thank you, the issue was closed successfully.{/t}</b><br/>
116+
117+ {if $notify_list|@count > 0}
118+ <br/>
119+ <b>{t}E-mail about issue update was sent to:{/t}</b><br />
120+ {foreach from=$notify_list item=email_address}
121+ &nbsp;&nbsp;{$email_address|escape:"html"}<br />
122+ {/foreach}
123+ <br />
124+ {/if}
125+
126+ <b>{t}Please choose from one of the options below:{/t}</b>
127 <ul>
128 <li><a href="view.php?id={$smarty.post.issue_id}" class="link">{t}Open the Issue Details Page{/t}</a></li>
129 <li><a href="list.php" class="link">{t}Open the Issue Listing Page{/t}</a></li>
This page took 5.059054 seconds and 4 git commands to generate.