Commit b31f08aff136f8726e4e933565649f3292d750b7

Authored by megan_w
1 parent b23cac32

KTS-1447

"Add a delete "bin" icon to "Items that require your attention..." Dashboard item and don't delete the item automatically"
Fixed. Removed the delete call on viewing the document/folder/etc. Added the standard delete icon next the the 'Clear Alert' link.

Committed by: Megan Watson
Reviewed by: Jonathan Byrne



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7600 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/dashboard/Notification.inc.php
... ... @@ -5,32 +5,32 @@
5 5 * KnowledgeTree Open Source Edition
6 6 * Document Management Made Simple
7 7 * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
8   - *
  8 + *
9 9 * This program is free software; you can redistribute it and/or modify it under
10 10 * the terms of the GNU General Public License version 3 as published by the
11 11 * Free Software Foundation.
12   - *
  12 + *
13 13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 16 * details.
17   - *
  17 + *
18 18 * You should have received a copy of the GNU General Public License
19 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20   - *
  20 + *
21 21 * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
22 22 * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
23   - *
  23 + *
24 24 * The interactive user interfaces in modified source and object code versions
25 25 * of this program must display Appropriate Legal Notices, as required under
26 26 * Section 5 of the GNU General Public License version 3.
27   - *
  27 + *
28 28 * In accordance with Section 7(b) of the GNU General Public License version 3,
29 29 * these Appropriate Legal Notices must retain the display of the "Powered by
30   - * KnowledgeTree" logo and retain the original copyright notice. If the display of the
  30 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
31 31 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
32   - * must display the words "Powered by KnowledgeTree" and retain the original
33   - * copyright notice.
  32 + * must display the words "Powered by KnowledgeTree" and retain the original
  33 + * copyright notice.
34 34 * Contributor( s): ______________________________________
35 35 *
36 36 */
... ... @@ -58,7 +58,7 @@ class KTNotification extends KTEntity {
58 58 /** primary key value */
59 59 var $iId = -1;
60 60 var $iUserId;
61   -
  61 +
62 62 // sType and sLabel provide the title of the dashboard alert.
63 63 var $sLabel; // a simple label - e.g. the document's title, or so forth.
64 64 var $sType; // namespaced item type. (e.g. ktcore/subscriptions, word/officeupload)
... ... @@ -73,34 +73,34 @@ class KTNotification extends KTEntity {
73 73 var $iData2;
74 74 // sData1 and sData2 are 255-length character fields
75 75 var $sData1;
76   - var $sData2;
  76 + var $sData2;
77 77 // sText1 is a 65535-length text field
78   - var $sText1;
79   -
  78 + var $sText1;
  79 +
80 80 var $_bUsePearError = true;
81   -
  81 +
82 82 function getId() { return $this->iId; }
83   -
84   - function getLabel() { return $this->sLabel; }
  83 +
  84 + function getLabel() { return $this->sLabel; }
85 85 function setLabel($sLabel) { $this->sLabel = $sLabel; }
86   - function getType() { return $this->sType; }
  86 + function getType() { return $this->sType; }
87 87 function setType($sType) { $this->sType = $sType; }
88   -
89   - function getIntData1() { return $this->iData1; }
  88 +
  89 + function getIntData1() { return $this->iData1; }
90 90 function setIntData1($iData1) { $this->iData1 = $iData1; }
91   - function getIntData2() { return $this->iData2; }
  91 + function getIntData2() { return $this->iData2; }
92 92 function setIntData2($iData2) { $this->iData2 = $iData2; }
93   - function getStrData1() { return $this->sData1; }
  93 + function getStrData1() { return $this->sData1; }
94 94 function setStrData1($sData1) { $this->sData1 = $sData1; }
95   - function getStrData2() { return $this->sData2; }
96   - function setStrData2($sData2) { $this->sData2 = $sData2; }
97   - function getTextData1() { return $this->sText1; }
98   - function setTextData1($mValue) { $this->sText1 = $mValue; }
  95 + function getStrData2() { return $this->sData2; }
  96 + function setStrData2($sData2) { $this->sData2 = $sData2; }
  97 + function getTextData1() { return $this->sText1; }
  98 + function setTextData1($mValue) { $this->sText1 = $mValue; }
99 99  
100 100 var $_aFieldToSelect = array(
101 101 "iId" => "id",
102 102 "iUserId" => "user_id",
103   - "sLabel" => "label",
  103 + "sLabel" => "label",
104 104 "sType" => "type",
105 105 "dCreationDate" => "creation_date",
106 106 "iData1" => "data_int_1",
... ... @@ -109,7 +109,7 @@ class KTNotification extends KTEntity {
109 109 "sData2" => "data_str_2",
110 110 "sText1" => "data_text_1",
111 111 );
112   -
  112 +
113 113 function _table () {
114 114 return KTUtil::getTableName('notifications');
115 115 }
... ... @@ -118,11 +118,11 @@ class KTNotification extends KTEntity {
118 118 $notificationRegistry =& KTNotificationRegistry::getSingleton();
119 119 $handler = $notificationRegistry->getHandler($this->sType);
120 120  
121   - if (is_null($handler)) { return null; }
122   -
  121 + if (is_null($handler)) { return null; }
  122 +
123 123 return $handler->handleNotification($this);
124 124 }
125   -
  125 +
126 126 function &getHandler() {
127 127 $notificationRegistry =& KTNotificationRegistry::getSingleton();
128 128 $handler =& $notificationRegistry->getHandler($this->sType);
... ... @@ -131,10 +131,10 @@ class KTNotification extends KTEntity {
131 131  
132 132 // Static function
133 133 function &get($iId) { return KTEntityUtil::get('KTNotification', $iId); }
134   - function &getList($sWhereClause = null, $aOptions = null ) {
  134 + function &getList($sWhereClause = null, $aOptions = null ) {
135 135 if(!is_array($aOptions)) $aOptions = array($aOptions);
136 136 $aOptions['orderby'] = KTUtil::arrayGet($aOptions, 'orderby', 'creation_date DESC');
137   - return KTEntityUtil::getList2('KTNotification', $sWhereClause, $aOptions);
  137 + return KTEntityUtil::getList2('KTNotification', $sWhereClause, $aOptions);
138 138 }
139 139  
140 140 function &createFromArray($aOptions) { return KTEntityUtil::createFromArray('KTNotification', $aOptions); }
... ... @@ -151,14 +151,15 @@ class KTNotificationHandler extends KTStandardDispatcher {
151 151 function handleNotification($oKTNotification) {
152 152 $oTemplating =& KTTemplating::getSingleton();
153 153 $oTemplate = $oTemplating->loadTemplate("kt3/notifications/generic");
154   - $aTemplateData = array("context" => $oKTNotification,);
  154 +
  155 + $aTemplateData = array("context" => $oKTNotification, "oKTConfig" => $oKTConfig);
155 156 return $oTemplate->render($aTemplateData);
156 157 }
157 158  
158 159 function do_main() {
159 160 $this->resolveNotification($this->notification);
160 161 }
161   -
  162 +
162 163 // called to resolve the notification (typically from /notify.php?id=xxxxx
163 164 function resolveNotification($oKTNotification) {
164 165 $_SESSION['KTErrorMessage'][] = _kt("This notification handler does not support publication.");
... ... @@ -172,10 +173,10 @@ class KTSubscriptionNotification extends KTNotificationHandler {
172 173 /* Subscription Notifications
173 174 *
174 175 * Subscriptions are a large part of the notification volume.
175   - * That said, notifications cater to a larger group, so there is some
  176 + * That said, notifications cater to a larger group, so there is some
176 177 * degree of mismatch between the two.
177 178 *
178   - * Mapping the needs of subscriptions onto the provisions of notifications
  179 + * Mapping the needs of subscriptions onto the provisions of notifications
179 180 * works as:
180 181 *
181 182 * $oKTN->label: object name [e.g. Document Name]
... ... @@ -183,9 +184,9 @@ class KTSubscriptionNotification extends KTNotificationHandler {
183 184 * $oKTN->strData2: _location_ name. (e.g. folder of the subscription.)
184 185 * $oKTN->intData1: object id (e.g. document_id, folder_id)
185 186 * $oKTN->intData2: actor id (e.g. user_id)
186   - *
  187 + *
187 188 */
188   -
  189 +
189 190 var $notificationType = 'ktcore/subscriptions';
190 191  
191 192 var $_eventObjectMap = array(
... ... @@ -202,7 +203,7 @@ class KTSubscriptionNotification extends KTNotificationHandler {
202 203 "ArchivedDocument" => 'document', // can go through and request un-archival (?)
203 204 "RestoredArchivedDocument" => 'document',
204 205 "DiscussDocument" => 'document',
205   - );
  206 + );
206 207  
207 208 function KTSubscriptionNotification() {
208 209 $this->_eventTypeNames = array(
... ... @@ -218,7 +219,7 @@ class KTSubscriptionNotification extends KTNotificationHandler {
218 219 "MovedDocument" => _kt('Document moved'),
219 220 "ArchivedDocument" => _kt('Document archived'), // can go through and request un-archival (?)
220 221 "RestoredArchivedDocument" => _kt('Document restored'),
221   - "DiscussDocument" => _kt('Document Discussions updated'),
  222 + "DiscussDocument" => _kt('Document Discussions updated'),
222 223 );
223 224 //parent::KTNotificationHandler();
224 225 }
... ... @@ -233,9 +234,9 @@ class KTSubscriptionNotification extends KTNotificationHandler {
233 234 'has_actor' => false,
234 235 'notify_id' => $oKTNotification->getId(),
235 236 );
236   -
  237 +
237 238 $info['title'] = KTUtil::arrayGet($this->_eventTypeNames, $info['event_type'], 'Subscription alert:') .': ' . $info['object_name'];
238   -
  239 +
239 240 if ($info['actor_id'] !== null) {
240 241 $oTempUser = User::get($info['actor_id']);
241 242 if (PEAR::isError($oTempUser) || ($oTempUser == false)) {
... ... @@ -246,31 +247,31 @@ class KTSubscriptionNotification extends KTNotificationHandler {
246 247 $info['has_actor'] = true;
247 248 }
248 249 }
249   -
  250 +
250 251 if ($info['object_id'] !== null) {
251 252 $info['object'] = $this->_getEventObject($info['event_type'], $info['object_id']);
252 253 }
253   -
  254 +
254 255 return $info;
255 256 }
256   -
  257 +
257 258 // resolve the object type based on the alert type.
258 259 function _getEventObject($sAlertType, $id) {
259 260 $t = KTUtil::arrayGet($this->_eventObjectMap, $sAlertType ,'');
260   -
  261 +
261 262 if ($t == 'document') {
262 263 $o = Document::get($id);
263   - if (PEAR::isError($o) || ($o == false)) { return null;
  264 + if (PEAR::isError($o) || ($o == false)) { return null;
264 265 } else { return $o; }
265 266 } else if ($t == 'folder') {
266 267 $o = Folder::get($id);
267   - if (PEAR::isError($o) || ($o == false)) { return null;
  268 + if (PEAR::isError($o) || ($o == false)) { return null;
268 269 } else { return $o; }
269 270 } else {
270 271 return null;
271 272 }
272 273 }
273   -
  274 +
274 275 function _getEventObjectType($sAlertType) {
275 276 return KTUtil::arrayGet($this->_eventObjectMap, $sAlertType ,'');
276 277 }
... ... @@ -286,21 +287,21 @@ class KTSubscriptionNotification extends KTNotificationHandler {
286 287 /*
287 288 "iId" => "id",
288 289 "iUserId" => "user_id",
289   - "sLabel" => "label",
  290 + "sLabel" => "label",
290 291 "sType" => "type",
291 292 "dCreationDate" => "creation_date",
292 293 "iData1" => "data_int_1",
293 294 "iData2" => "data_int_2",
294 295 "sData1" => "data_str_1",
295 296 "sData2" => "data_str_2",
296   -
  297 +
297 298 'object_name' => $oKTNotification->getLabel(),
298 299 'event_type' => $oKTNotification->getStrData1(),
299 300 'location_name' => $oKTNotification->getStrData2(),
300 301 'object_id' => $oKTNotification->getIntData1(),
301 302 'actor_id' => $oKTNotification->getIntData2(),
302   - 'has_actor' => false,
303   -
  303 + 'has_actor' => false,
  304 +
304 305 */
305 306 $creationInfo['sLabel'] = $aOptions['target_name'];
306 307 $creationInfo['sData1'] = $aOptions['event_type'];
... ... @@ -312,20 +313,23 @@ class KTSubscriptionNotification extends KTNotificationHandler {
312 313 $creationInfo['dCreationDate'] = getCurrentDateTime(); // erk.
313 314  
314 315 global $default;
315   -
  316 +
316 317 //$default->log->debug('subscription notification: from ' . print_r($aOptions, true));
317 318 $default->log->debug('subscription notification: using ' . print_r($creationInfo, true));
318   -
  319 +
319 320 $oNotification =& KTNotification::createFromArray($creationInfo);
320   -
321   -
  321 +
  322 +
322 323 $default->log->debug('subscription notification: created ' . print_r($oNotification, true));
323   -
  324 +
324 325 return $oNotification; // $res.
325 326 }
326   -
327   -
328   -
  327 +
  328 + /**
  329 + * View the notification, and clear if requested
  330 + *
  331 + * @param unknown_type $oKTNotification
  332 + */
329 333 function resolveNotification($oKTNotification) {
330 334 $notify_action = KTUtil::arrayGet($_REQUEST, 'notify_action', null);
331 335 if ($notify_action == 'clear') {
... ... @@ -333,38 +337,38 @@ class KTSubscriptionNotification extends KTNotificationHandler {
333 337 $oKTNotification->delete();
334 338 exit(redirect(generateControllerLink('dashboard')));
335 339 }
336   -
  340 +
337 341 // otherwise, we want to redirect the to object represented by the item.
338 342 // - viewDocument and viewFolder are the appropriate items.
339   - // - object_id
  343 + // - object_id
340 344 $info = $this->_getSubscriptionData($oKTNotification);
341   -
  345 +
342 346 $object_type = $this->_getEventObjectType($info['event_type']);
343   -
  347 +
344 348 if ($object_type == '') {
345   - $_SESSION['KTErrorMessage'][] = 'This notification has no "target". Please report as a bug that this subscription should only have a clear action.' . $object_type;
  349 + $_SESSION['KTErrorMessage'][] = 'This notification has no "target". Please report as a bug that this subscription should only have a clear action.' . $object_type;
346 350 exit(redirect(generateControllerLink('dashboard')));
347   - }
348   -
  351 + }
  352 +
349 353 if ($object_type == 'document') {
350 354 if ($info['object_id'] !== null) { // fails and generates an error with no doc-id.
351 355 $params = 'fDocumentId=' . $info['object_id'];
352 356 $url = generateControllerLink('viewDocument', $params);
353   - $oKTNotification->delete(); // clear the alert.
  357 + //$oKTNotification->delete(); // clear the alert.
354 358 exit(redirect($url));
355   - }
  359 + }
356 360 } else if ($object_type == 'folder') {
357 361 if ($info['object_id'] !== null) { // fails and generates an error with no doc-id.
358 362 $params = 'fFolderId=' . $info['object_id'];
359 363 $url = generateControllerLink('browse', $params);
360   - $oKTNotification->delete(); // clear the alert.
  364 + //$oKTNotification->delete(); // clear the alert.
361 365 exit(redirect($url));
362   - }
  366 + }
363 367 }
364   - $_SESSION['KTErrorMessage'][] = sprintf('This notification has no "target". Please inform the %s developers that there is a target bug with type: ' . $info['event_type'], APP_NAME);
  368 + $_SESSION['KTErrorMessage'][] = sprintf('This notification has no "target". Please inform the %s developers that there is a target bug with type: ' . $info['event_type'], APP_NAME);
365 369 exit(redirect(generateControllerLink('dashboard')));
366 370 }
367   -
  371 +
368 372 }
369 373  
370 374 class KTWorkflowNotification extends KTNotificationHandler {
... ... @@ -374,41 +378,41 @@ class KTWorkflowNotification extends KTNotificationHandler {
374 378 foreach ($aNotifications as $oNotification) {
375 379 $oNotification->delete();
376 380 }
377   -
  381 +
378 382 }
379 383  
380   - function & newNotificationForDocument($oDocument, $oUser, $oState, $oActor, $sComments) {
381   - $aInfo = array();
  384 + function & newNotificationForDocument($oDocument, $oUser, $oState, $oActor, $sComments) {
  385 + $aInfo = array();
382 386 $aInfo['sData1'] = $oState->getName();
383 387 $aInfo['sData2'] = $sComments;
384 388 $aInfo['iData1'] = $oDocument->getId();
385 389 $aInfo['iData2'] = $oActor->getId();
386 390 $aInfo['sType'] = 'ktcore/workflow';
387   - $aInfo['dCreationDate'] = getCurrentDateTime();
  391 + $aInfo['dCreationDate'] = getCurrentDateTime();
388 392 $aInfo['iUserId'] = $oUser->getId();
389 393 $aInfo['sLabel'] = $oDocument->getName();
390   -
  394 +
391 395 $oNotification = KTNotification::createFromArray($aInfo);
392   -
  396 +
393 397 $handler = new KTWorkflowNotification();
394   -
  398 +
395 399 if ($oUser->getEmailNotification() && (strlen($oUser->getEmail()) > 0)) {
396 400 $emailContent = $handler->handleNotification($oNotification);
397 401 $emailSubject = sprintf(_kt('Workflow Notification: %s'), $oDocument->getName());
398 402 $oEmail = new EmailAlert($oUser->getEmail(), $emailSubject, $emailContent);
399 403 $oEmail->send();
400 404 }
401   -
  405 +
402 406 return $oNotification;
403 407 }
404 408  
405   - function handleNotification($oKTNotification) {
  409 + function handleNotification($oKTNotification) {
406 410 $oTemplating =& KTTemplating::getSingleton();
407 411 $oTemplate =& $oTemplating->loadTemplate('ktcore/workflow/workflow_notification');
408   -
  412 +
409 413 $oDoc = Document::get($oKTNotification->getIntData1());
410 414 $isBroken = (PEAR::isError($oDoc) || ($oDoc->getStatusID() != LIVE));
411   -
  415 +
412 416 $oTemplate->setData(array(
413 417 'context' => $this,
414 418 'document_id' => $oKTNotification->getIntData1(),
... ... @@ -421,7 +425,7 @@ class KTWorkflowNotification extends KTNotificationHandler {
421 425 ));
422 426 return $oTemplate->render();
423 427 }
424   -
  428 +
425 429 function resolveNotification($oKTNotification) {
426 430 $notify_action = KTUtil::arrayGet($_REQUEST, 'notify_action', null);
427 431 if ($notify_action == 'clear') {
... ... @@ -429,10 +433,10 @@ class KTWorkflowNotification extends KTNotificationHandler {
429 433 $oKTNotification->delete();
430 434 exit(redirect(generateControllerLink('dashboard')));
431 435 }
432   -
  436 +
433 437 $params = 'fDocumentId=' . $oKTNotification->getIntData1();
434 438 $url = generateControllerLink('viewDocument', $params);
435   - $oKTNotification->delete(); // clear the alert.
  439 + //$oKTNotification->delete(); // clear the alert.
436 440 exit(redirect($url));
437 441 }
438 442 }
... ...
templates/kt3/notifications/subscriptions.AddDocument.smarty
1 1 <dt class="actionitem subscription">{$info.title|sanitize}</dt>
2 2 <dd class="actionmessage">
  3 +
3 4 <!-- could break this up. -->
4 5 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#" was added{/i18n}{if ($info.location_name !== null)} {i18n arg_location_name=$info.location_name}to "#location_name#"{/i18n}{/if}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 6 <div class="actionoptions">
6   - {if !$is_broken}
7   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
8   - {else}
9   - <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
10   - {/if}
11   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  7 + <div style="float:left; position: relative;">
  8 + {if !$is_broken}
  9 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
  10 + {else}
  11 + <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
  12 + {/if}
  13 +
  14 + &nbsp;|&nbsp;
  15 +
  16 + </div>
  17 + <div>
  18 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  19 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  20 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  21 +
  22 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  23 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
  24 + </div>
12 25 </div>
13 26 </dd>
... ...
templates/kt3/notifications/subscriptions.AddFolder.smarty
... ... @@ -3,11 +3,22 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The folder "#object_name#" was added{/i18n}{if ($info.location_name !== null)} {i18n arg_location_name=$info.location_name}to "#location_name#"{/i18n}{/if}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 5 <div class="actionoptions">
  6 + <div style="float:left; position: relative;">
6 7 {if !$is_broken}
7   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Folder{/i18n}</a>
8   - {else}
9   - <span class="descriptiveText">{i18n}Folder is no longer available{/i18n}</span>
10   - {/if}
11   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  8 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Folder{/i18n}</a>
  9 + {else}
  10 + <span class="descriptiveText">{i18n}Folder is no longer available{/i18n}</span>
  11 + {/if}
  12 + &nbsp;|&nbsp;
  13 +
  14 + </div>
  15 + <div>
  16 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  17 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  18 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  19 +
  20 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  21 + </div>
  22 +
12 23 </div>
13 24 </dd>
... ...
templates/kt3/notifications/subscriptions.ArchivedDocument.smarty
... ... @@ -3,6 +3,9 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#"{/i18n}{if ($info.location_name !== null)} {i18n arg_location_name=$info.location_name}from "#location_name#"{/i18n}{/if} {i18n}was archived{/i18n}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 5 <div class="actionoptions">
  6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  7 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  8 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
6 9 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
7 10 </div>
8 11 </dd>
... ...
templates/kt3/notifications/subscriptions.CheckInDocument.smarty
... ... @@ -3,11 +3,18 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#" has been checked in{/i18n}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}{if ($info.location_name !== null)}, {i18n arg_location_name=$info.location_name}in the folder "#location_name#"{/i18n}{/if}.
5 5 <div class="actionoptions">
6   - {if !$is_broken}
7   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
8   - {else}
9   - <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
10   - {/if}
11   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  6 + <div style="float:left; position: relative;">
  7 + {if !$is_broken}
  8 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
  9 + {else}
  10 + <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
  11 + {/if}
  12 + &nbsp;|&nbsp;
  13 + </div>
  14 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  15 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  16 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  17 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  18 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
12 19 </div>
13 20 </dd>
... ...
templates/kt3/notifications/subscriptions.CheckOutDocument.smarty
... ... @@ -3,11 +3,18 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#" has been checked out{/i18n}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}{if ($info.location_name !== null)}, {i18n arg_location_name=$info.location_name}from the folder "#location_name#"{/i18n}{/if}.
5 5 <div class="actionoptions">
6   - {if !$is_broken}
7   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
8   - {else}
9   - <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
10   - {/if}
11   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  6 + <div style="float:left; position: relative;">
  7 + {if !$is_broken}
  8 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
  9 + {else}
  10 + <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
  11 + {/if}
  12 + &nbsp;|&nbsp;
  13 + </div>
  14 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  15 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  16 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  17 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  18 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
12 19 </div>
13 20 </dd>
... ...
templates/kt3/notifications/subscriptions.DiscussDocument.smarty
... ... @@ -7,11 +7,20 @@
7 7 The discussion around document "{$info.object_name|sanitize}" has been updated.
8 8 {/if}
9 9 <div class="actionoptions">
10   - {if !$is_broken}
11   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
12   - {else}
13   - <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
14   - {/if}
15   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  10 + <div style="float:left; position: relative;">
  11 + {if !$is_broken}
  12 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
  13 + {else}
  14 + <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
  15 + {/if}
  16 + &nbsp;|&nbsp;
  17 + </div>
  18 +
  19 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  20 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  21 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  22 +
  23 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  24 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
16 25 </div>
17 26 </dd>
... ...
templates/kt3/notifications/subscriptions.ModifyDocument.smarty
... ... @@ -3,11 +3,20 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#" has been changed{/i18n}{if ($info.location_name !== null)} {i18n arg_location_name=$info.location_name}in the folder "#location_name#"{/i18n}{/if}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 5 <div class="actionoptions">
6   - {if !$is_broken}
7   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
8   - {else}
9   - <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
10   - {/if}
11   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  6 + <div style="float:left; position: relative;">
  7 + {if !$is_broken}
  8 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
  9 + {else}
  10 + <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
  11 + {/if}
  12 + &nbsp;|&nbsp;
  13 + </div>
  14 +
  15 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  16 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  17 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  18 +
  19 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  20 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
12 21 </div>
13 22 </dd>
... ...
templates/kt3/notifications/subscriptions.MoveDocument.smarty
... ... @@ -3,12 +3,21 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#" has been moved{/i18n}{if ($info.location_name !== null)} {i18n arg_location_name=$info.location_name}to the folder "#location_name#"{/i18n}{/if}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 5 <div class="actionoptions">
6   - {if !$is_broken}
7   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Location{/i18n}</a>
8   - {else}
9   - <span class="descriptiveText">{i18n}Location is no longer available{/i18n}</span>
10   - {/if}
  6 + <div style="float:left; position: relative;">
  7 + {if !$is_broken}
  8 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Location{/i18n}</a>
  9 + {else}
  10 + <span class="descriptiveText">{i18n}Location is no longer available{/i18n}</span>
  11 + {/if}
11 12  
12   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  13 + &nbsp;|&nbsp;
  14 + </div>
  15 +
  16 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  17 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  18 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  19 +
  20 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  21 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
13 22 </div>
14 23 </dd>
... ...
templates/kt3/notifications/subscriptions.RemoveChildDocument.smarty
... ... @@ -3,11 +3,20 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#" has been removed{/i18n}{if ($info.location_name !== null)} {i18n arg_location_name=$info.location_name}from the folder "#location_name#"{/i18n} ({i18n}to which you are subscribed{/i18n}){/if}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 5 <div class="actionoptions">
6   - {if !$is_broken}
7   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Folder{/i18n}</a>
8   - {else}
9   - <span class="descriptiveText">{i18n}Folder is no longer available{/i18n}</span>
10   - {/if}
11   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  6 + <div style="float:left; position: relative;">
  7 + {if !$is_broken}
  8 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Folder{/i18n}</a>
  9 + {else}
  10 + <span class="descriptiveText">{i18n}Folder is no longer available{/i18n}</span>
  11 + {/if}
  12 + &nbsp;|&nbsp;
  13 + </div>
  14 +
  15 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  16 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  17 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  18 +
  19 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  20 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
12 21 </div>
13 22 </dd>
... ...
templates/kt3/notifications/subscriptions.RemoveChildFolder.smarty
... ... @@ -3,12 +3,21 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The folder "#object_name#" has been removed{/i18n}{if ($info.location_name !== null)} {i18n arg_location_name=$info.location_name}from "#location_name#"{/i18n}{/if}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 5 <div class="actionoptions">
6   - {if !$is_broken}
7   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Folder{/i18n}</a>
8   - {else}
9   - <span class="descriptiveText">{i18n}Location is no longer available{/i18n}</span>
10   - {/if}
  6 + <div style="float:left; position: relative;">
  7 + {if !$is_broken}
  8 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Folder{/i18n}</a>
  9 + {else}
  10 + <span class="descriptiveText">{i18n}Location is no longer available{/i18n}</span>
  11 + {/if}
11 12  
12   - | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  13 + &nbsp;|&nbsp;
  14 + <div>
  15 +
  16 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  17 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  18 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  19 +
  20 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  21 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
13 22 </div>
14 23 </dd>
... ...
templates/kt3/notifications/subscriptions.RemoveSubscribedDocument.smarty
... ... @@ -3,6 +3,12 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#" to which you were subscribed, has been removed{/i18n}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 5 <div class="actionoptions">
6   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  6 +
  7 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  8 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  9 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  10 +
  11 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  12 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
7 13 </div>
8 14 </dd>
... ...
templates/kt3/notifications/subscriptions.RemoveSubscribedFolder.smarty
... ... @@ -3,6 +3,12 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The folder "#object_name#" to which you were subscribed, has been removed{/i18n}{if ($info.has_actor)} {i18n arg_actor_name=$info.actor_name}by #actor_name#{/i18n}{/if}.
5 5 <div class="actionoptions">
6   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  6 +
  7 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  8 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  9 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  10 +
  11 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  12 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
7 13 </div>
8 14 </dd>
... ...
templates/kt3/notifications/subscriptions.RestoreDocument.smarty
... ... @@ -3,6 +3,12 @@
3 3 <!-- could break this up. -->
4 4 {i18n arg_object_name=$info.object_name|sanitize}The document "#object_name#" has been restored by an administrator.{/i18n}
5 5 <div class="actionoptions">
6   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  7 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  8 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  9 +
  10 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  11 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
  12 +
7 13 </div>
8 14 </dd>
... ...
templates/kt3/notifications/subscriptions.generic.smarty
1 1 <dt class="actionitem subscription">{$info.title|sanitize}</dt>
2 2 <dd class="actionmessage">
3 3 <div class="actionoptions">
4   - <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  4 +
  5 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  6 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  7 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  8 +
  9 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}"
  10 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}">{i18n}Clear Alert{/i18n}</a>
5 11 </div>
6 12 </dd>
... ...
templates/ktcore/assist/assist_notification.smarty
... ... @@ -4,11 +4,20 @@
4 4 user, <b>#user#</b>, has requested help on the document <b>#name#</b>, and you are
5 5 the owner or an admin of this document.{/i18n}
6 6 <div class="actionoptions">
7   - {if !$is_broken}
8   - <a href="{ktLink base="notify.php" query="id=`$notify_id`"}">{i18n}View Help Request{/i18n}</a>
9   - {else}
10   - <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
11   - {/if}
12   - | <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  7 + <div style="float:left; position: relative;">
  8 + {if !$is_broken}
  9 + <a href="{ktLink base="notify.php" query="id=`$notify_id`"}">{i18n}View Help Request{/i18n}</a>
  10 + {else}
  11 + <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
  12 + {/if}
  13 + &nbsp;|&nbsp;
  14 + </div>
  15 +
  16 + <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=clear"}
  17 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  18 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  19 +
  20 + <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=clear"}
  21 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"">{i18n}Clear Alert{/i18n}</a>
13 22 </div>
14 23 </dd>
... ...
templates/ktcore/assist/assist_notification_details.smarty
... ... @@ -12,7 +12,16 @@
12 12 </dl>
13 13  
14 14 <div class="actionoptions">
15   - <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=view"}">{i18n}View Document{/i18n}</a>
16   - | <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  15 + <div style="float:left; position: relative;">
  16 + <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=view"}">{i18n}View Document{/i18n}</a>
  17 + &nbsp;|&nbsp;
  18 + </div>
  19 +
  20 + <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=clear"}
  21 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"
  22 + class="ktAction ktInline ktDelete" style="position: relative;" >{i18n}Clear Alert{/i18n}</a>
  23 +
  24 + <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=clear"}
  25 + kt:deleteMessage="{i18n}Are you sure you wish to clear the notification?{/i18n}"">{i18n}Clear Alert{/i18n}</a>
17 26 </div>
18 27  
... ...