Commit 7cb036cec3ec11c2c6fc7fe94e28fd3ce130c600
1 parent
05c59221
Patch from Bryn Divey <brynmor@jamwarehouse.com>
Bryn Divey 2006-01-30 Fixed KTS-173 (Cancel is a link). Think I got them a...
Bryn Divey 2006-01-30 Fixed KTS-110 and KTS-206 (work around deleted doc...
Bryn Divey 2006-01-30 Fixed KTS-231, KTS-232 (discussion problems). Have...
Bryn Divey 2006-01-30 Fixed KTS-178 (checkout notification broken)
Bryn Divey 2006-01-30 KTS-209 (Adding <Please select document type> into...
Bryn Divey 2006-01-30 Completed KTS-97 (confirmation on user delete)
Bryn Divey 2006-01-30 Finished KTS-211 (disable document type)
Bryn Divey 2006-01-30 Merge
Bryn Divey 2006-01-27 Merge
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4710 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
21 changed files
with
176 additions
and
39 deletions
edit.php
| ... | ... | @@ -83,9 +83,18 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { |
| 83 | 83 | $this->addBreadcrumbs(); |
| 84 | 84 | $this->oPage->setBreadcrumbDetails(_('Change Document Type')); |
| 85 | 85 | |
| 86 | - $oDocumentType = DocumentType::get($oDocument->getDocumentTypeID()); | |
| 87 | 86 | $aDocTypes = DocumentType::getList(); |
| 88 | - | |
| 87 | + | |
| 88 | + | |
| 89 | + $aDocTypes = array(); | |
| 90 | + foreach (DocumentType::getList() as $oDocumentType) { | |
| 91 | + if(!$oDocumentType->getDisabled()) { | |
| 92 | + $aDocTypes[] = $oDocumentType; | |
| 93 | + } | |
| 94 | + } | |
| 95 | + | |
| 96 | + $oDocumentType = DocumentType::get($oDocument->getDocumentTypeID()); | |
| 97 | + | |
| 89 | 98 | $oTemplating =& KTTemplating::getSingleton(); |
| 90 | 99 | $oTemplate =& $oTemplating->loadTemplate("ktcore/document/change_type"); |
| 91 | 100 | $aTemplateData = array( | ... | ... |
lib/dashboard/Notification.inc.php
| ... | ... | @@ -201,6 +201,7 @@ class KTSubscriptionNotification extends KTNotificationHandler { |
| 201 | 201 | // resolve the object type based on the alert type. |
| 202 | 202 | function _getEventObject($sAlertType, $id) { |
| 203 | 203 | $t = KTUtil::arrayGet($this->_eventObjectMap, $sAlertType ,''); |
| 204 | + | |
| 204 | 205 | if ($t == 'document') { |
| 205 | 206 | $o = Document::get($id); |
| 206 | 207 | if (PEAR::isError($o) || ($o == false)) { return null; |
| ... | ... | @@ -283,6 +284,7 @@ class KTSubscriptionNotification extends KTNotificationHandler { |
| 283 | 284 | $info = $this->_getSubscriptionData($oKTNotification); |
| 284 | 285 | |
| 285 | 286 | $object_type = $this->_getEventObjectType($info['event_type']); |
| 287 | + | |
| 286 | 288 | if ($object_type == '') { |
| 287 | 289 | $_SESSION['KTErrorMessage'][] = 'This notification has no "target". Please report as a bug that this subscription should only have a clear action.' . $object_type; |
| 288 | 290 | exit(redirect(generateControllerLink('dashboard'))); | ... | ... |
lib/documentmanagement/DocumentType.inc
| ... | ... | @@ -30,10 +30,13 @@ class DocumentType extends KTEntity { |
| 30 | 30 | var $iId; |
| 31 | 31 | /** document type name */ |
| 32 | 32 | var $sName; |
| 33 | + /** disabled boolean */ | |
| 34 | + var $bDisabled; | |
| 33 | 35 | |
| 34 | 36 | var $_aFieldToSelect = array( |
| 35 | 37 | 'iId' => 'id', |
| 36 | 38 | 'sName' => 'name', |
| 39 | + 'bDisabled' => 'disabled' | |
| 37 | 40 | ); |
| 38 | 41 | |
| 39 | 42 | /** |
| ... | ... | @@ -47,6 +50,7 @@ class DocumentType extends KTEntity { |
| 47 | 50 | //object not created yet |
| 48 | 51 | $this->iId = -1; |
| 49 | 52 | $this->sName = $sNewName; |
| 53 | + $this->bDisabled = false; | |
| 50 | 54 | } |
| 51 | 55 | |
| 52 | 56 | /** |
| ... | ... | @@ -79,9 +83,36 @@ class DocumentType extends KTEntity { |
| 79 | 83 | $this->sName = $sNewValue; |
| 80 | 84 | } |
| 81 | 85 | |
| 86 | + | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * Get the document type's disabled status | |
| 90 | + * | |
| 91 | + * @return Boolean document type's disabled status | |
| 92 | + * | |
| 93 | + */ | |
| 94 | + function getDisabled() { | |
| 95 | + return $this->bDisabled; | |
| 96 | + } | |
| 97 | + | |
| 98 | + /** | |
| 99 | + * Set the document type's disabled status | |
| 100 | + * | |
| 101 | + * @param document type's new disabled status | |
| 102 | + * | |
| 103 | + */ | |
| 104 | + function setDisabled($bNewValue) { | |
| 105 | + $this->bDisabled = ($bNewValue) ? true : false; | |
| 106 | + } | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 82 | 112 | function _fieldValues () { |
| 83 | 113 | return array( |
| 84 | 114 | 'name' => $this->sName, |
| 115 | + 'disabled' => $this->bDisabled, | |
| 85 | 116 | ); |
| 86 | 117 | } |
| 87 | 118 | |
| ... | ... | @@ -155,6 +186,7 @@ class DocumentType extends KTEntity { |
| 155 | 186 | if ($sql->next_record()) { |
| 156 | 187 | $oDocumentType = & new DocumentType($sql->f("name")); |
| 157 | 188 | $oDocumentType->iId = $sql->f("id"); |
| 189 | + $oDocumentType->bDisabled = $sql->f("disabled"); | |
| 158 | 190 | return $oDocumentType; |
| 159 | 191 | } |
| 160 | 192 | $_SESSION["errorMessage"] = $lang_err_object_not_exist . "id = " . $iDocumentID . " table = document_types"; | ... | ... |
lib/subscriptions/subscriptions.inc.php
| ... | ... | @@ -291,7 +291,7 @@ class SubscriptionEvent { |
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | } |
| 294 | - function CheckinDocument($oModifiedDocument, $oParentFolder) { | |
| 294 | + function CheckInDocument($oModifiedDocument, $oParentFolder) { | |
| 295 | 295 | $content = new SubscriptionContent(); // needed for i18n |
| 296 | 296 | // OK: two actions: document registrants, folder registrants. |
| 297 | 297 | $aUsers = $this->_getSubscribers($oModifiedDocument->getId(), $this->subscriptionTypes["Document"]); |
| ... | ... | @@ -305,7 +305,7 @@ class SubscriptionEvent { |
| 305 | 305 | $aNotificationOptions['target_name'] = $oModifiedDocument->getName(); |
| 306 | 306 | $aNotificationOptions['location_name'] = $oParentFolder->getName(); |
| 307 | 307 | $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case. |
| 308 | - $aNotificationOptions['event_type'] = "CheckinDocument"; | |
| 308 | + $aNotificationOptions['event_type'] = "CheckInDocument"; | |
| 309 | 309 | $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions); |
| 310 | 310 | |
| 311 | 311 | // now the email content. |
| ... | ... | @@ -330,7 +330,7 @@ class SubscriptionEvent { |
| 330 | 330 | $aNotificationOptions['target_name'] = $oModifiedDocument->getName(); |
| 331 | 331 | $aNotificationOptions['location_name'] = $oParentFolder->getName(); |
| 332 | 332 | $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case. |
| 333 | - $aNotificationOptions['event_type'] = "CheckinDocument"; | |
| 333 | + $aNotificationOptions['event_type'] = "CheckInDocument"; | |
| 334 | 334 | $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions); |
| 335 | 335 | |
| 336 | 336 | // now the email content. |
| ... | ... | @@ -344,7 +344,7 @@ class SubscriptionEvent { |
| 344 | 344 | } |
| 345 | 345 | } |
| 346 | 346 | } |
| 347 | - function CheckoutDocument($oModifiedDocument, $oParentFolder) { | |
| 347 | + function CheckOutDocument($oModifiedDocument, $oParentFolder) { | |
| 348 | 348 | $content = new SubscriptionContent(); // needed for i18n |
| 349 | 349 | // OK: two actions: document registrants, folder registrants. |
| 350 | 350 | $aUsers = $this->_getSubscribers($oModifiedDocument->getId(), $this->subscriptionTypes["Document"]); |
| ... | ... | @@ -358,7 +358,7 @@ class SubscriptionEvent { |
| 358 | 358 | $aNotificationOptions['target_name'] = $oModifiedDocument->getName(); |
| 359 | 359 | $aNotificationOptions['location_name'] = $oParentFolder->getName(); |
| 360 | 360 | $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case. |
| 361 | - $aNotificationOptions['event_type'] = "CheckoutDocument"; | |
| 361 | + $aNotificationOptions['event_type'] = "CheckOutDocument"; | |
| 362 | 362 | $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions); |
| 363 | 363 | |
| 364 | 364 | // now the email content. |
| ... | ... | @@ -383,7 +383,7 @@ class SubscriptionEvent { |
| 383 | 383 | $aNotificationOptions['target_name'] = $oModifiedDocument->getName(); |
| 384 | 384 | $aNotificationOptions['location_name'] = $oParentFolder->getName(); |
| 385 | 385 | $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case. |
| 386 | - $aNotificationOptions['event_type'] = "CheckoutDocument"; | |
| 386 | + $aNotificationOptions['event_type'] = "CheckOutDocument"; | |
| 387 | 387 | $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions); |
| 388 | 388 | |
| 389 | 389 | // now the email content. | ... | ... |
lib/validation/dispatchervalidation.inc.php
| ... | ... | @@ -40,7 +40,8 @@ class KTDispatcherValidation { |
| 40 | 40 | $aFunc = array($entity_name, KTUtil::arrayGet($aOptions, 'method', 'get')); |
| 41 | 41 | $oEntity =& call_user_func($aFunc, $iId); |
| 42 | 42 | if (PEAR::isError($oEntity) || ($oEntity === false)) { |
| 43 | - $this->oDispatcher->errorPage(sprintf(_("Invalid identifier provided for: %s"), $entity_name)); | |
| 43 | + $aOptions['message'] = KTUtil::arrayGet($aOptions, 'message', sprintf(_("Invalid identifier provided for: %s"), $entity_name)); | |
| 44 | + $this->handleError($aOptions); | |
| 44 | 45 | } |
| 45 | 46 | return $oEntity; |
| 46 | 47 | } | ... | ... |
plugins/ktcore/admin/documentTypes.php
| ... | ... | @@ -62,6 +62,36 @@ class KTDocumentTypeDispatcher extends KTAdminDispatcher { |
| 62 | 62 | exit(0); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | + function do_disable() { | |
| 66 | + $oDocumentType =& DocumentType::get($_REQUEST['fDocumentTypeId']); | |
| 67 | + | |
| 68 | + $oDocumentType->setDisabled(true); | |
| 69 | + $res = $oDocumentType->update(); | |
| 70 | + | |
| 71 | + if (PEAR::isError($res) || ($res === false)) { | |
| 72 | + $this->errorRedirectTo('main', _('Could not disable document type'), 'fDocumentTypeId=' . $oDocumentType->getId()); | |
| 73 | + exit(0); | |
| 74 | + } | |
| 75 | + | |
| 76 | + $this->successRedirectToMain(_('Document type disabled')); | |
| 77 | + exit(0); | |
| 78 | + } | |
| 79 | + | |
| 80 | + function do_enable() { | |
| 81 | + $oDocumentType =& DocumentType::get($_REQUEST['fDocumentTypeId']); | |
| 82 | + | |
| 83 | + $oDocumentType->setDisabled(false); | |
| 84 | + $res = $oDocumentType->update(); | |
| 85 | + | |
| 86 | + if (PEAR::isError($res) || ($res === false)) { | |
| 87 | + $this->errorRedirectTo('main', _('Could not enable document type'), 'fDocumentTypeId=' . $oDocumentType->getId()); | |
| 88 | + exit(0); | |
| 89 | + } | |
| 90 | + | |
| 91 | + $this->successRedirectToMain(_('Document type enabled')); | |
| 92 | + exit(0); | |
| 93 | + } | |
| 94 | + | |
| 65 | 95 | function do_edit() { |
| 66 | 96 | |
| 67 | 97 | $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _('Document Type Management')); | ... | ... |
plugins/ktcore/folder/BulkImport.php
| ... | ... | @@ -25,10 +25,13 @@ class KTBulkImportFolderAction extends KTFolderAction { |
| 25 | 25 | $add_fields = array(); |
| 26 | 26 | $add_fields[] = new KTStringWidget(_('Path'), _('The path containing the documents to be added to the document management system.'), 'path', "", $this->oPage, true); |
| 27 | 27 | |
| 28 | - $aVocab = array(); | |
| 28 | + $aVocab = array('' => _('<Please select a document type>')); | |
| 29 | 29 | foreach (DocumentType::getList() as $oDocumentType) { |
| 30 | - $aVocab[$oDocumentType->getId()] = $oDocumentType->getName(); | |
| 30 | + if(!$oDocumentType->getDisabled()) { | |
| 31 | + $aVocab[$oDocumentType->getId()] = $oDocumentType->getName(); | |
| 32 | + } | |
| 31 | 33 | } |
| 34 | + | |
| 32 | 35 | $fieldOptions = array("vocab" => $aVocab); |
| 33 | 36 | $add_fields[] = new KTLookupWidget(_('Document Type'), 'FIXME', 'fDocumentTypeId', null, $this->oPage, true, "add-document-type", $fieldErrors, $fieldOptions); |
| 34 | 37 | ... | ... |
plugins/ktcore/folder/BulkUpload.php
| ... | ... | @@ -40,9 +40,11 @@ class KTBulkUploadFolderAction extends KTFolderAction { |
| 40 | 40 | $add_fields = array(); |
| 41 | 41 | $add_fields[] = new KTFileUploadWidget(_('Archive file'), _('The archive file containing the documents you wish to add to the document management system.'), 'file', "", $this->oPage, true); |
| 42 | 42 | |
| 43 | - $aVocab = array(); | |
| 43 | + $aVocab = array('' => _('<Please select a document type>')); | |
| 44 | 44 | foreach (DocumentType::getList() as $oDocumentType) { |
| 45 | - $aVocab[$oDocumentType->getId()] = $oDocumentType->getName(); | |
| 45 | + if(!$oDocumentType->getDisabled()) { | |
| 46 | + $aVocab[$oDocumentType->getId()] = $oDocumentType->getName(); | |
| 47 | + } | |
| 46 | 48 | } |
| 47 | 49 | $fieldOptions = array("vocab" => $aVocab); |
| 48 | 50 | $add_fields[] = new KTLookupWidget(_('Document Type'), 'FIXME', 'fDocumentTypeId', null, $this->oPage, true, "add-document-type", $fieldErrors, $fieldOptions); | ... | ... |
plugins/ktcore/folder/addDocument.php
| ... | ... | @@ -44,10 +44,13 @@ class KTFolderAddDocumentAction extends KTFolderAction { |
| 44 | 44 | $add_fields[] = new KTStringWidget(_('Title'), _('The document title is used as the main name of a document throughout KnowledgeTree.'), 'title', "", $this->oPage, true); |
| 45 | 45 | |
| 46 | 46 | |
| 47 | - $aVocab = array(); | |
| 47 | + $aVocab = array('' => _('<Please select a document type>')); | |
| 48 | 48 | foreach (DocumentType::getList() as $oDocumentType) { |
| 49 | - $aVocab[$oDocumentType->getId()] = $oDocumentType->getName(); | |
| 49 | + if(!$oDocumentType->getDisabled()) { | |
| 50 | + $aVocab[$oDocumentType->getId()] = $oDocumentType->getName(); | |
| 51 | + } | |
| 50 | 52 | } |
| 53 | + | |
| 51 | 54 | $fieldOptions = array("vocab" => $aVocab); |
| 52 | 55 | $add_fields[] = new KTLookupWidget(_('Document Type'), _('Document Types, defined by the administrator, are used to categorise documents. Please select a Document Type from the list below.'), 'fDocumentTypeId', null, $this->oPage, true, "add-document-type", $fieldErrors, $fieldOptions); |
| 53 | 56 | |
| ... | ... | @@ -96,7 +99,8 @@ class KTFolderAddDocumentAction extends KTFolderAction { |
| 96 | 99 | } |
| 97 | 100 | } |
| 98 | 101 | |
| 99 | - $this->oDocumentType = $this->oValidator->validateDocumentType($_REQUEST['fDocumentTypeId']); | |
| 102 | + $aErrorOptions['message'] = _("Please select a valid document type"); | |
| 103 | + $this->oDocumentType = $this->oValidator->validateDocumentType($_REQUEST['fDocumentTypeId'], $aErrorOptions); | |
| 100 | 104 | |
| 101 | 105 | $aOptions = array( |
| 102 | 106 | 'contents' => new KTFSFileLike($aFile['tmp_name']), | ... | ... |
plugins/ktstandard/KTDiscussion.php
| ... | ... | @@ -130,6 +130,7 @@ class KTDocumentDiscussionAction extends KTDocumentAction { |
| 130 | 130 | $iCommentId = $oThread->getFirstCommentId(); |
| 131 | 131 | $oComment = DiscussionComment::get($iCommentId); |
| 132 | 132 | |
| 133 | + // breadcrumbs... | |
| 133 | 134 | $this->aBreadcrumbs[] = array( |
| 134 | 135 | 'name' => _('discussion'), |
| 135 | 136 | 'url' => $_SERVER['PHP_SELF'] . sprintf('?fDocumentId=%d', $this->oDocument->getId()), |
| ... | ... | @@ -138,6 +139,7 @@ class KTDocumentDiscussionAction extends KTDocumentAction { |
| 138 | 139 | 'name' => $oComment->getSubject(), |
| 139 | 140 | ); |
| 140 | 141 | $this->oPage->setBreadcrumbDetails(_("viewing comments")); |
| 142 | + | |
| 141 | 143 | $oTemplate =& $this->oValidator->validateTemplate('ktstandard/action/discussion_thread'); |
| 142 | 144 | |
| 143 | 145 | // Fields for new thread creation |
| ... | ... | @@ -153,6 +155,10 @@ class KTDocumentDiscussionAction extends KTDocumentAction { |
| 153 | 155 | KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPermission, $this->oDocument)) { |
| 154 | 156 | $closeFields[] = new KTTextWidget(_("Reason"), _("Describe the reason for closing this thread"), "reason", "", $this->oPage, true, null, null, array("cols" => 50, "rows" => 5)); |
| 155 | 157 | } |
| 158 | + | |
| 159 | + // increment views | |
| 160 | + $oThread->incrementNumberOfViews(); | |
| 161 | + $oThread->update(); | |
| 156 | 162 | |
| 157 | 163 | $aTemplateData = array( |
| 158 | 164 | 'context' => &$this, |
| ... | ... | @@ -190,6 +196,7 @@ class KTDocumentDiscussionAction extends KTDocumentAction { |
| 190 | 196 | // Start the transaction comment creation |
| 191 | 197 | $this->startTransaction(); |
| 192 | 198 | |
| 199 | + // Create comment | |
| 193 | 200 | $oComment = DiscussionComment::createFromArray(array( |
| 194 | 201 | 'threadid' => $oThread->getId(), |
| 195 | 202 | 'userid' => $this->oUser->getId(), |
| ... | ... | @@ -199,11 +206,17 @@ class KTDocumentDiscussionAction extends KTDocumentAction { |
| 199 | 206 | $aErrorOptions['message'] = _("There was an error adding the comment to the thread"); |
| 200 | 207 | $this->oValidator->notError($oComment, $aErrorOptions); |
| 201 | 208 | |
| 209 | + // Update thread | |
| 202 | 210 | $oThread->setLastCommentId($oComment->getId()); |
| 211 | + $oThread->incrementNumberOfReplies(); | |
| 212 | + | |
| 203 | 213 | $res = $oThread->update(); |
| 214 | + | |
| 204 | 215 | $aErrorOptions['message'] = _("There was an error updating the thread with the new comment"); |
| 205 | 216 | $this->oValidator->notError($res, $aErrorOptions); |
| 206 | 217 | |
| 218 | + | |
| 219 | + | |
| 207 | 220 | // Thread and comment created correctly, commit to database |
| 208 | 221 | $this->commitTransaction(); |
| 209 | 222 | ... | ... |
resources/css/kt-framing.css
| ... | ... | @@ -341,6 +341,24 @@ a.main_nav_item { |
| 341 | 341 | font-weight: normal; |
| 342 | 342 | } |
| 343 | 343 | |
| 344 | +#content a.ktCancelLink { | |
| 345 | + border: 1px solid #888; | |
| 346 | + background: #eee; | |
| 347 | + color: black; | |
| 348 | + font-weight: normal; | |
| 349 | + font-size: 90%; | |
| 350 | + padding: 2px 0.65em 1px 0.65em; | |
| 351 | + text-transform: lowercase; | |
| 352 | + text-decoration: none; | |
| 353 | +} | |
| 354 | + | |
| 355 | +#content a.ktCancelLink:hover { | |
| 356 | + color: black; | |
| 357 | + text-decoration: none; | |
| 358 | + border: 1px solid #888; | |
| 359 | + cursor: default; | |
| 360 | +} | |
| 361 | + | |
| 344 | 362 | #content .field |
| 345 | 363 | { |
| 346 | 364 | margin-bottom: 1.5em; |
| ... | ... | @@ -656,7 +674,8 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes |
| 656 | 674 | width: 16px; |
| 657 | 675 | cursor: pointer; |
| 658 | 676 | } |
| 659 | - | |
| 677 | + | |
| 678 | + | |
| 660 | 679 | /* FIXME when available icon-naming-conformant sets have better coverage, make these more accurate. */ |
| 661 | 680 | .ktAction.ktDelete { background: transparent url(../../thirdparty/icon-theme/16x16/mimetypes/x-directory-trash.png) top left no-repeat; } |
| 662 | 681 | .ktAction.ktEdit { background: transparent url(../../thirdparty/icon-theme/16x16/actions/document-properties.png) top left no-repeat; } | ... | ... |
sql/mysql/install/structure.sql
| ... | ... | @@ -414,6 +414,7 @@ CREATE TABLE `document_type_fieldsets_link` ( |
| 414 | 414 | CREATE TABLE `document_types_lookup` ( |
| 415 | 415 | `id` int(11) NOT NULL default '0', |
| 416 | 416 | `name` char(100) default NULL, |
| 417 | + `disabled` int(1) NOT NULL default '0', | |
| 417 | 418 | UNIQUE KEY `id` (`id`), |
| 418 | 419 | UNIQUE KEY `name` (`name`) |
| 419 | 420 | ) TYPE=InnoDB; | ... | ... |
templates/kt3/notifications/subscriptions.CheckinDocument.smarty renamed to templates/kt3/notifications/subscriptions.CheckInDocument.smarty
templates/kt3/notifications/subscriptions.CheckoutDocument.smarty renamed to templates/kt3/notifications/subscriptions.CheckOutDocument.smarty
templates/ktcore/document/admin/deletedlist.smarty
| 1 | +{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Base.js')} | |
| 2 | +{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Iter.js')} | |
| 3 | +{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/DOM.js')} | |
| 4 | + | |
| 5 | +{$context->oPage->requireJSResource('resources/js/toggleselect.js')} | |
| 6 | + | |
| 1 | 7 | <h2>{i18n}Deleted Documents{/i18n}</h2> |
| 2 | 8 | |
| 3 | 9 | <p class="descriptiveText">{i18n}Documents which are deleted by users are hidden from view |
| ... | ... | @@ -5,10 +11,6 @@ but still available for restoration. Since "soft deletes" consume system resour |
| 5 | 11 | is possible to <strong>expunge</strong> these documents. Alternatively, you |
| 6 | 12 | can <strong>restore</strong> them as necessary.{/i18n}</p> |
| 7 | 13 | |
| 8 | -<p class="descriptiveText"><strong>FIXME</strong> its probably very useful to add | |
| 9 | -more information about the documents below - e.g. when was it deleted (last modified?)</p> | |
| 10 | - | |
| 11 | -<p class="descriptiveText"><strong>FIXME</strong> Have a "select all" toggler here.</p> | |
| 12 | 14 | |
| 13 | 15 | {if (!empty($documents))} |
| 14 | 16 | |
| ... | ... | @@ -16,18 +18,20 @@ more information about the documents below - e.g. when was it deleted (last modi |
| 16 | 18 | |
| 17 | 19 | <input type="hidden" name="action" value="branchConfirm" /> |
| 18 | 20 | |
| 19 | -<table class="listing"> | |
| 21 | +<table class="kt_collection"> | |
| 20 | 22 | <thead> |
| 21 | 23 | <tr> |
| 22 | - <th> </th> | |
| 24 | + <th style="width:2em"><input type="checkbox" onclick="toggleSelectFor(this, 'selected_docs')" title="toggle all"/></th> | |
| 23 | 25 | <th>{i18n}Document Name{/i18n}</th> |
| 26 | + <th>{i18n}Last Modification{/i18n}</th> | |
| 24 | 27 | </tr> |
| 25 | - </thead> | |
| 28 | + </thead> | |
| 26 | 29 | <tbody> |
| 27 | 30 | {foreach item=oDoc from=$documents} |
| 28 | 31 | <tr> |
| 29 | 32 | <td><input type="checkbox" name="selected_docs[]" value="{$oDoc->getId()}"/></td> |
| 30 | 33 | <td>{$oDoc->getName()}</td> |
| 34 | + <td>{$oDoc->getLastModifiedDate()}</td> | |
| 31 | 35 | </tr> |
| 32 | 36 | {/foreach} |
| 33 | 37 | </tbody> | ... | ... |
templates/ktcore/document/admin/force_checkin_confirm.smarty
| ... | ... | @@ -30,6 +30,6 @@ |
| 30 | 30 | <div class="form_actions"> |
| 31 | 31 | <input type="submit" value="{i18n}Force Checkin{/i18n}" /> |
| 32 | 32 | <!-- FIXME separate this even further. --> |
| 33 | - <p><a href="?action=main">{i18n}Cancel{/i18n}</a></p> | |
| 33 | + <p><a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a></p> | |
| 34 | 34 | </div> |
| 35 | 35 | </form> | ... | ... |
templates/ktcore/document/change_type.smarty
| ... | ... | @@ -13,6 +13,7 @@ is incorrect, you can change it here.{/i18n}</p> |
| 13 | 13 | <option value="{$oDocType->getId()}" {if ($oDocType->getId() == $document_type->getId())}selected="true"{/if}>{$oDocType->getName()}</option> |
| 14 | 14 | {/foreach} |
| 15 | 15 | </select> |
| 16 | + | |
| 16 | 17 | <div class="form_actions"> |
| 17 | 18 | <input type="submit" name="submit" value="{i18n}Change Document Type{/i18n}" /> |
| 18 | 19 | </div> | ... | ... |
templates/ktcore/documenttypes/list.smarty
| ... | ... | @@ -28,24 +28,37 @@ its details, or click on the delete button to remove it from the |
| 28 | 28 | system.{/i18n}</p> |
| 29 | 29 | |
| 30 | 30 | <table class="listing" cellspacing="0" cellpadding="0"> |
| 31 | + | |
| 31 | 32 | <thead> |
| 32 | 33 | <tr> |
| 33 | - <th colspan="2">{i18n}Document Type{/i18n}</th> | |
| 34 | + <th colspan="3">{i18n}Document Type{/i18n}</th> | |
| 34 | 35 | </tr> |
| 35 | 36 | </thead> |
| 37 | + | |
| 36 | 38 | <tbody> |
| 39 | + | |
| 37 | 40 | {foreach from=$document_types item=oDocumentType} |
| 38 | -<tr><td> | |
| 39 | -{ if $oDocumentType->isUsed() } | |
| 40 | - | |
| 41 | -{ else } | |
| 42 | -<a href="?action=delete&fDocumentTypeId={$oDocumentType->getId()}" class="ktAction ktDelete">{i18n}Delete Type{/i18n}</a> | |
| 43 | -{/if} | |
| 41 | +<tr> | |
| 42 | + | |
| 43 | +<td> | |
| 44 | + { $oDocumentType->getName() } | |
| 45 | + </a> | |
| 44 | 46 | </td> |
| 47 | + | |
| 45 | 48 | <td> |
| 46 | -<a href="?action=edit&fDocumentTypeId={$oDocumentType->getId()}"> { $oDocumentType->getName() } | |
| 47 | -</a> | |
| 48 | -</td></tr> | |
| 49 | + <a href="?action=edit&fDocumentTypeId={$oDocumentType->getId()}">Edit</a> | |
| 50 | +</td> | |
| 51 | + | |
| 52 | +<td> | |
| 53 | +{if $oDocumentType->getDisabled()} | |
| 54 | + <a href="?action=enable&fDocumentTypeId={$oDocumentType->getId()}">{i18n}Enable{/i18n}</a> | |
| 55 | +{else} | |
| 56 | + <a href="?action=disable&fDocumentTypeId={$oDocumentType->getId()}">{i18n}Disable{/i18n}</a> | |
| 57 | +{/if} | |
| 58 | +</td> | |
| 59 | + | |
| 60 | + | |
| 61 | +</tr> | |
| 49 | 62 | </tbody> |
| 50 | 63 | {/foreach} |
| 51 | 64 | </table> | ... | ... |
templates/ktcore/principals/roleadmin.smarty
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | |
| 36 | 36 | <div class="form_actions"> |
| 37 | 37 | <input type="submit" value="{i18n}update role information{/i18n}" /> |
| 38 | - <a href="?action=main" class="ktAction ktCancel">{i18n}Cancel{/i18n}</a> | |
| 38 | + <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | |
| 39 | 39 | </div class="form_actions"> |
| 40 | 40 | </fieldset> |
| 41 | 41 | </form> | ... | ... |
templates/ktcore/principals/useradmin.smarty
| ... | ... | @@ -53,7 +53,7 @@ very slow if you have many users.{/i18n}</p> |
| 53 | 53 | <td>{$oUser->getName()}</td> |
| 54 | 54 | <td>{$oUser->getUsername()}</td> |
| 55 | 55 | <td><a href="?action=editUser&user_id={$oUser->getId()}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> |
| 56 | - <td><a href="?action=deleteuser&user_id={$oUser->getId()}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | |
| 56 | + <td><a onclick="javascript:return confirm('{i18n}Are you sure you wish to delete this user?{/i18n}');" href="?action=deleteuser&user_id={$oUser->getId()}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | |
| 57 | 57 | <td><a href="?action=editgroups&user_id={$oUser->getId()}">{i18n}Groups{/i18n}</a></td> |
| 58 | 58 | </tr> |
| 59 | 59 | {/foreach} | ... | ... |
templates/ktstandard/action/discussion_comment_list_item.smarty
| ... | ... | @@ -11,12 +11,15 @@ dl.kt-discussion-comment > dt { |
| 11 | 11 | |
| 12 | 12 | <dl class="kt-discussion-comment"> |
| 13 | 13 | <dt>{i18n}Posted{/i18n}</dt> |
| 14 | - {capture name=$name} | |
| 14 | + | |
| 15 | + {capture assign=name} | |
| 15 | 16 | {$creator->getName()} |
| 16 | 17 | {/capture} |
| 17 | - {capture name=$date} | |
| 18 | + | |
| 19 | + {capture assign=date} | |
| 18 | 20 | {$comment->getDate()} |
| 19 | 21 | {/capture} |
| 22 | + | |
| 20 | 23 | <dd>{i18n arg_name=$name arg_date=$date}by #name# at #date#{/i18n}</dd> |
| 21 | 24 | <dt>Subject</dt> |
| 22 | 25 | <dd>{$comment->getSubject()}</dd> | ... | ... |