Commit d6f0d1fa19a48fa7e7ce4e473e1d249c1d6a2075
1 parent
4d4e3158
5 Brad Shuttleworth <brad@jamwarehouse.com> Fri 2005-11-18 15:55:21 +0200
merge up: 2005-11-18 15:55
4 Brad Shuttleworth <brad@jamwarehouse.com> Fri 2005-11-18 15:47:16 +0200
merge in admin first-pass update.
3 Brad Shuttleworth <brad@jamwarehouse.com> Fri 2005-11-18 13:18:04 +0200
merged in the dispatcher / templating changes to correctly handle info and error messages.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4039 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
20 changed files
with
391 additions
and
271 deletions
config/siteMap.inc
| ... | ... | @@ -105,7 +105,7 @@ $default->siteMap->addPage("unitManagement", "/presentation/lookAndFeel/knowledg |
| 105 | 105 | $default->siteMap->addPage("orgManagement", "/presentation/lookAndFeel/knowledgeTree/administration/orgmanagement/listOrgBL.php", "Administration", SysAdmin, _("Organisation Management"), true, 4); |
| 106 | 106 | |
| 107 | 107 | $default->siteMap->addPage("doctype", "presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/documentTypes.php", "Administration", SysAdmin, _("Document Type Management"), true, 5); |
| 108 | -$default->siteMap->addPage("docfield", "/presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/documentFields.php", "Administration", SysAdmin, _("Document Field Management"), true, 6); | |
| 108 | +$default->siteMap->addPage("docfield", "/presentation/lookAndFeel/knowledgeTree/administration/admin.php/documents/fieldmanagement", "Administration", SysAdmin, _("Document Field Management"), true, 6); | |
| 109 | 109 | |
| 110 | 110 | $default->siteMap->addPage("archivedDocuments", "/presentation/lookAndFeel/knowledgeTree/administration/documentmanagement/manageArchivedDocumentsBL.php", "Administration", UnitAdmin, _("Restore Archived Documents"), true, 7); |
| 111 | 111 | $default->siteMap->addPage("deletedDocuments", "/presentation/lookAndFeel/knowledgeTree/administration/documentmanagement/listDeletedDocumentsBL.php", "Administration", UnitAdmin, _("Deleted Documents"), true, 8); | ... | ... |
lib/dispatcher.inc.php
| ... | ... | @@ -179,6 +179,23 @@ class KTStandardDispatcher extends KTDispatcher { |
| 179 | 179 | $this->oPage->setPageContents($data); |
| 180 | 180 | $this->oPage->setUser($this->oUser); |
| 181 | 181 | |
| 182 | + // handle errors that were set using KTErrorMessage. | |
| 183 | + $errors = KTUtil::arrayGet($_SESSION, 'KTErrorMessage', array()); | |
| 184 | + if (!empty($errors)) { | |
| 185 | + foreach ($errors as $sError) { | |
| 186 | + $this->oPage->addError($sError); | |
| 187 | + } | |
| 188 | + $_SESSION['KTErrorMessage'] = array(); // clean it out. | |
| 189 | + } | |
| 190 | + | |
| 191 | + // handle notices that were set using KTInfoMessage. | |
| 192 | + $info = KTUtil::arrayGet($_SESSION, 'KTInfoMessage', array()); | |
| 193 | + if (!empty($info)) { | |
| 194 | + foreach ($info as $sInfo) { | |
| 195 | + $this->oPage->addInfo($sInfo); | |
| 196 | + } | |
| 197 | + $_SESSION['KTInfoMessage'] = array(); // clean it out. | |
| 198 | + } | |
| 182 | 199 | |
| 183 | 200 | // add last, standard portlets |
| 184 | 201 | $this->oPage->addPortlet(new KTSearchPortlet()); | ... | ... |
lib/documentmanagement/Document.inc
| ... | ... | @@ -531,7 +531,7 @@ class Document extends KTEntity { |
| 531 | 531 | $sFolderPath = Folder::getFolderDisplayPath($this->iFolderID); |
| 532 | 532 | // #3425 for consistency |
| 533 | 533 | return ($bDisplayIcon ? $this->getIcon() : "") . |
| 534 | - ($sFolderPath == "" ? "Deleted Folder" : $sFolderPath) . " > " . $this->sFileName; | |
| 534 | + ($sFolderPath == "" ? "Deleted Folder" : $sFolderPath) . " » " . $this->sFileName; | |
| 535 | 535 | } |
| 536 | 536 | // }}} |
| 537 | 537 | ... | ... |
lib/foldermanagement/Folder.inc
| ... | ... | @@ -421,7 +421,7 @@ class Folder extends KTEntity { |
| 421 | 421 | global $default; |
| 422 | 422 | $aPathNamesArray = Folder::getFolderPathNamesAsArray($iFolderID); |
| 423 | 423 | if (count($aPathNamesArray) > 0) { |
| 424 | - return implode(" > ", $aPathNamesArray); | |
| 424 | + return implode(" » ", $aPathNamesArray); | |
| 425 | 425 | } else { |
| 426 | 426 | return ""; |
| 427 | 427 | } | ... | ... |
lib/templating/kt3template.inc.php
| ... | ... | @@ -21,6 +21,7 @@ class KTPage { |
| 21 | 21 | |
| 22 | 22 | /** context-relevant information */ |
| 23 | 23 | var $errStack = Array(); |
| 24 | + var $infoStack = Array(); | |
| 24 | 25 | var $portlets = Array(); |
| 25 | 26 | |
| 26 | 27 | /** miscellaneous items */ |
| ... | ... | @@ -167,6 +168,7 @@ class KTPage { |
| 167 | 168 | } |
| 168 | 169 | |
| 169 | 170 | function addError($sError) { array_push($this->errStack, $sError); } |
| 171 | + function addInfo($sInfo) { array_push($this->infoStack, $sInfo); } | |
| 170 | 172 | |
| 171 | 173 | /** no-one cares what a portlet is, but it should be renderable, and have its ->title member set. */ |
| 172 | 174 | function addPortlet($oPortlet) { | ... | ... |
plugins/ktcore/KTAdminNavigation.php
| ... | ... | @@ -18,14 +18,16 @@ class KTAdminNavigationRegistry { |
| 18 | 18 | // namespace, class, category, title, description |
| 19 | 19 | // if category is specified, it looks for an item with THAT NAME for its details. |
| 20 | 20 | function registerLocation($sName, $sClass, $sCategory, $sTitle, $sDescription, $sDispatcherFilePath = null, $sURL = null) { |
| 21 | + $sFullname = $sCategory . '/' . $sName; | |
| 21 | 22 | $aInfo = array( |
| 22 | 23 | "name" => $sName, |
| 23 | 24 | "class" => $sClass, |
| 24 | 25 | "title" => $sTitle, |
| 25 | 26 | "description"=> $sDescription, |
| 26 | 27 | "filepath" => $sDispatcherFilePath, |
| 27 | - "url" => $sURL); | |
| 28 | - $this->aResources[$sName] = $aInfo; | |
| 28 | + "url" => $sURL, | |
| 29 | + "fullname" => $sFullname); | |
| 30 | + $this->aResources[$sFullname] = $aInfo; | |
| 29 | 31 | // is this a toplevel item? |
| 30 | 32 | if ($sCategory != null) { |
| 31 | 33 | if (!array_key_exists($sCategory, $this->aCategories)) { | ... | ... |
plugins/ktcore/KTAdminPlugins.php
| ... | ... | @@ -7,7 +7,7 @@ $oAdminRegistry =& KTAdminNavigationRegistry::getSingleton(); |
| 7 | 7 | // set up the categories. |
| 8 | 8 | $oAdminRegistry->registerCategory("principals", "Users and Groups", " Control which users can log in, and are part of which groups and organisational units from these management panels."); |
| 9 | 9 | $oAdminRegistry->registerCategory("security", "Security Management", " Assign permissions to users and groups, and specify which permissions are required to interact with various parts of the Document Management System."); |
| 10 | -$oAdminRegistry->registerCategory("storage", "Document Storage", "Manage how and where the actual documents will be stored, and work with document archives."); | |
| 10 | +$oAdminRegistry->registerCategory("storage", "Document Storage", "Manage how and where the actual documents will be stored, work with document archives and deal with other document related problems."); | |
| 11 | 11 | $oAdminRegistry->registerCategory("documents", "Document Type Configuration", "Configure the information that needs to be collected about different kinds of documents."); |
| 12 | 12 | $oAdminRegistry->registerCategory("collections", "Collections", "Specify how groups of documents are displayed in browse and search mode."); |
| 13 | 13 | |
| ... | ... | @@ -25,8 +25,15 @@ $oAdminRegistry->registerCategory("collections", "Collections", "Specify how gro |
| 25 | 25 | // FIXME url traversal DOESN'T WORK |
| 26 | 26 | |
| 27 | 27 | // users and groups |
| 28 | -$oAdminRegistry->registerLocation("principals/admin",null,"principals", "Add/Remove Users","Add or remove users from the system.",null, "/control.php?action=userManagement") | |
| 28 | +$oAdminRegistry->registerLocation("admin",null,"principals", "Add/Remove Users","Add or remove users from the system.",null, "/control.php?action=userManagement"); | |
| 29 | 29 | |
| 30 | 30 | |
| 31 | +// documents | |
| 32 | +$oAdminRegistry->registerLocation("fieldmanagement",'KTDocumentFieldDispatcher','documents', 'Document Fieldsets','Control which kinds of documents have which sets of information associated with them.', KT_DIR . '/presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/documentFields.php', null); | |
| 33 | + | |
| 34 | + | |
| 35 | +// storage | |
| 36 | +$oAdminRegistry->registerLocation("checkout",'KTCheckoutAdminDispatcher','storage', 'Checked Out Document Control','Override the checked-out status of documents if a user has failed to do so.', KT_DIR . '/presentation/lookAndFeel/knowledgeTree/administration/doccheckoutmanagement/documentCheckout.php', null); | |
| 37 | + | |
| 31 | 38 | |
| 32 | 39 | ?> |
| 33 | 40 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/admin.php
| ... | ... | @@ -10,53 +10,62 @@ require_once(KT_DIR . "/plugins/ktcore/KTAdminNavigation.php"); |
| 10 | 10 | require_once(KT_DIR . "/plugins/ktcore/KTAdminPlugins.php"); |
| 11 | 11 | |
| 12 | 12 | class AdminSplashDispatcher extends KTAdminDispatcher { |
| 13 | - var $sub_url = ''; | |
| 14 | - | |
| 15 | - var $aBreadcrumbs = array( | |
| 13 | + var $category = ''; | |
| 14 | + | |
| 15 | + var $aBreadcrumbs = array( | |
| 16 | 16 | array('action' => 'administration', 'name' => 'Administration'), |
| 17 | 17 | ); |
| 18 | - | |
| 18 | + | |
| 19 | 19 | function AdminSplashDispatcher() { |
| 20 | - parent::KTAdminDispatcher(); | |
| 21 | - } | |
| 20 | + parent::KTAdminDispatcher(); | |
| 21 | + } | |
| 22 | 22 | |
| 23 | - function do_main() { | |
| 24 | - // are we categorised, or not? | |
| 25 | - $oRegistry =& KTAdminNavigationRegistry::getSingleton(); | |
| 26 | - $categories = $oRegistry->getCategories(); | |
| 27 | - | |
| 28 | - $this->oPage->title = "DMS Administration: "; | |
| 23 | + function do_main() { | |
| 24 | + if ($this->category !== '') { | |
| 25 | + return $this->do_viewCategory(); | |
| 26 | + }; | |
| 27 | + | |
| 28 | + | |
| 29 | + // are we categorised, or not? | |
| 30 | + $oRegistry =& KTAdminNavigationRegistry::getSingleton(); | |
| 31 | + $categories = $oRegistry->getCategories(); | |
| 32 | + | |
| 33 | + // we need to investigate sub_url solutions. | |
| 34 | + | |
| 35 | + $this->oPage->title = "DMS Administration: "; | |
| 29 | 36 | $oTemplating = new KTTemplating; |
| 30 | - $oTemplate = $oTemplating->loadTemplate("kt3/admin_categories"); | |
| 31 | - $aTemplateData = array( | |
| 37 | + $oTemplate = $oTemplating->loadTemplate("kt3/admin_categories"); | |
| 38 | + $aTemplateData = array( | |
| 32 | 39 | "context" => $this, |
| 33 | - "categories" => $categories, | |
| 34 | - ); | |
| 35 | - return $oTemplate->render($aTemplateData); | |
| 36 | - } | |
| 40 | + "categories" => $categories, | |
| 41 | + "baseurl" => KTUtil::getRequestScriptName($_SERVER), | |
| 42 | + ); | |
| 43 | + return $oTemplate->render($aTemplateData); | |
| 44 | + } | |
| 37 | 45 | |
| 38 | 46 | function do_viewCategory() { |
| 39 | - // are we categorised, or not? | |
| 40 | - | |
| 41 | - $category = KTUtil::arrayGet($_REQUEST, "fCategory"); | |
| 42 | - | |
| 43 | - $oRegistry =& KTAdminNavigationRegistry::getSingleton(); | |
| 44 | - $aCategory = $oRegistry->getCategory($category); | |
| 45 | - | |
| 46 | - $aItems = $oRegistry->getItemsForCategory($category); | |
| 47 | - $this->aBreadcrumbs[] = array("name" => $aCategory["title"]); | |
| 47 | + // are we categorised, or not? | |
| 48 | + | |
| 49 | + $category = KTUtil::arrayGet($_REQUEST, "fCategory", $this->category); | |
| 50 | + | |
| 51 | + $oRegistry =& KTAdminNavigationRegistry::getSingleton(); | |
| 52 | + $aCategory = $oRegistry->getCategory($category); | |
| 53 | + | |
| 54 | + $aItems = $oRegistry->getItemsForCategory($category); | |
| 55 | + $this->aBreadcrumbs[] = array("name" => $aCategory["title"]); | |
| 48 | 56 | |
| 49 | - | |
| 50 | - $this->oPage->title = "DMS Administration: " . $aCategory["title"]; | |
| 57 | + | |
| 58 | + $this->oPage->title = "DMS Administration: " . $aCategory["title"]; | |
| 51 | 59 | $oTemplating = new KTTemplating; |
| 52 | - $oTemplate = $oTemplating->loadTemplate("kt3/admin_items"); | |
| 53 | - $aTemplateData = array( | |
| 60 | + $oTemplate = $oTemplating->loadTemplate("kt3/admin_items"); | |
| 61 | + $aTemplateData = array( | |
| 54 | 62 | "context" => $this, |
| 55 | - "category" => $aCategory, | |
| 56 | - "items" => $aItems, | |
| 57 | - ); | |
| 58 | - return $oTemplate->render($aTemplateData); | |
| 59 | - } | |
| 63 | + "category" => $aCategory, | |
| 64 | + "items" => $aItems, | |
| 65 | + "baseurl" => KTUtil::getRequestScriptName($_SERVER), | |
| 66 | + ); | |
| 67 | + return $oTemplate->render($aTemplateData); | |
| 68 | + } | |
| 60 | 69 | } |
| 61 | 70 | |
| 62 | 71 | $sub_url = KTUtil::arrayGet($_SERVER, 'PATH_INFO'); |
| ... | ... | @@ -69,10 +78,18 @@ if (empty($sub_url)) { |
| 69 | 78 | $oRegistry =& KTAdminNavigationRegistry::getSingleton(); |
| 70 | 79 | if ($oRegistry->isRegistered($sub_url)) { |
| 71 | 80 | $oDispatcher = $oRegistry->getDispatcher($sub_url); |
| 72 | - } else { | |
| 73 | - // FIXME (minor) redirect to no-suburl? | |
| 74 | - $oDispatcher = new AdminSplashDispatcher(); | |
| 75 | - } | |
| 81 | + | |
| 82 | + $aParts = explode('/',$sub_url); | |
| 83 | + | |
| 84 | + $oRegistry =& KTAdminNavigationRegistry::getSingleton(); | |
| 85 | + $aCategory = $oRegistry->getCategory($aParts[0]); | |
| 86 | + | |
| 87 | + $oDispatcher->aBreadcrumbs[] = array("name" => $aCategory['title'], "url" => KTUtil::getRequestScriptName($_SERVER) . '/' . $aParts[0]); | |
| 88 | + } else { | |
| 89 | + // FIXME (minor) redirect to no-suburl? | |
| 90 | + $oDispatcher = new AdminSplashDispatcher(); | |
| 91 | + $oDispatcher->category = $sub_url; | |
| 92 | + } | |
| 76 | 93 | } |
| 77 | 94 | |
| 78 | 95 | $oDispatcher->dispatch(); // we _may_ be redirected at this point (see KTAdminNavigation) | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doccheckoutmanagement/documentCheckout.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +/* | |
| 4 | + * Document Checkout Administration | |
| 5 | + * | |
| 6 | + * Copyright (c) 2003 Jam Warehouse http://www.jamwarehouse.com | |
| 7 | + * | |
| 8 | + * This program is free software; you can redistribute it and/or modify | |
| 9 | + * it under the terms of the GNU General Public License as published by | |
| 10 | + * the Free Software Foundation; either version 2 of the License, or | |
| 11 | + * (at your option) any later version. | |
| 12 | + * | |
| 13 | + * This program is distributed in the hope that it will be useful, | |
| 14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | + * GNU General Public License for more details. | |
| 17 | + * | |
| 18 | + * You should have received a copy of the GNU General Public License | |
| 19 | + * along with this program; if not, write to the Free Software | |
| 20 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 | + * | |
| 22 | + * @version $Revision$ | |
| 23 | + * @author Brad Shuttleworth <brad@jamwarehouse.com>, Jam Warehouse (Pty) Ltd, South Africa | |
| 24 | + * @package documentmanagement | |
| 25 | + */ | |
| 26 | + | |
| 27 | +/* boilerplate */ | |
| 28 | + | |
| 29 | + | |
| 30 | +require_once(KT_LIB_DIR . '/dispatcher.inc.php'); | |
| 31 | +require_once(KT_LIB_DIR . '/templating/kt3template.inc.php'); | |
| 32 | + | |
| 33 | + | |
| 34 | +class KTCheckoutAdminDispatcher extends KTAdminDispatcher { | |
| 35 | + | |
| 36 | + // Breadcrumbs base - added to in methods | |
| 37 | + var $aBreadcrumbs = array( | |
| 38 | + array('action' => 'administration', 'name' => 'Administration'), | |
| 39 | + ); | |
| 40 | + | |
| 41 | + function check() { | |
| 42 | + return true; | |
| 43 | + } | |
| 44 | + | |
| 45 | + function do_main() { | |
| 46 | + $this->aBreadcrumbs[] = array('name' => 'Document Checkout'); | |
| 47 | + $this->oPage->setBreadcrumbDetails("list checked out documents"); | |
| 48 | + | |
| 49 | + $aDocuments = Document::getList("is_checked_out = 1"); | |
| 50 | + | |
| 51 | + $oTemplating =& KTTemplating::getSingleton(); | |
| 52 | + $oTemplate = $oTemplating->loadTemplate('ktcore/document/admin/checkoutlisting'); | |
| 53 | + $oTemplate->setData(array( | |
| 54 | + "context" => $this, | |
| 55 | + "documents" => $aDocuments, | |
| 56 | + )); | |
| 57 | + return $oTemplate; | |
| 58 | + } | |
| 59 | + | |
| 60 | + | |
| 61 | + function do_confirm() { | |
| 62 | + $this->aBreadcrumbs[] = array('name' => 'Document Checkout'); | |
| 63 | + $this->oPage->setBreadcrumbDetails("confirm forced check-in"); | |
| 64 | + | |
| 65 | + $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); | |
| 66 | + if (empty($document_id)) { | |
| 67 | + return $this->errorRedirectToMain('You must select a document to check in first.'); | |
| 68 | + } | |
| 69 | + | |
| 70 | + $oDocument = Document::get($document_id); | |
| 71 | + if (PEAR::isError($oDocument)) { | |
| 72 | + return $this->errorRedirectToMain('The document you specified appears to be invalid.'); | |
| 73 | + } | |
| 74 | + | |
| 75 | + $oUser = User::get($oDocument->getCheckedOutUserID()); | |
| 76 | + // unusually, we could well have an error here: the user may have checked out and then | |
| 77 | + // been deleted. | |
| 78 | + if (PEAR::isError($oUser) || ($oUser === false)) { | |
| 79 | + $oUser = null; | |
| 80 | + } | |
| 81 | + | |
| 82 | + $oTemplating =& KTTemplating::getSingleton(); | |
| 83 | + $oTemplate = $oTemplating->loadTemplate('ktcore/document/admin/force_checkin_confirm'); | |
| 84 | + $oTemplate->setData(array( | |
| 85 | + "context" => $this, | |
| 86 | + "document" => $oDocument, | |
| 87 | + "checkout_user" => $oUser, | |
| 88 | + )); | |
| 89 | + return $oTemplate; | |
| 90 | + | |
| 91 | + } | |
| 92 | + | |
| 93 | + function do_checkin() { | |
| 94 | + global $default; | |
| 95 | + | |
| 96 | + $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); | |
| 97 | + if (empty($document_id)) { | |
| 98 | + return $this->errorRedirectToMain('You must select a document to check in first.'); | |
| 99 | + } | |
| 100 | + | |
| 101 | + $oDocument = Document::get($document_id); | |
| 102 | + if (PEAR::isError($oDocument)) { | |
| 103 | + return $this->errorRedirectToMain('The document you specified appears to be invalid.'); | |
| 104 | + } | |
| 105 | + | |
| 106 | + $this->startTransaction(); | |
| 107 | + // actually do the checkin. | |
| 108 | + $oDocument->setIsCheckedOut(0); | |
| 109 | + $oDocument->setCheckedOutUserID(-1); | |
| 110 | + if (!$oDocument->update()) { | |
| 111 | + $this->rollbackTransaction(); | |
| 112 | + return $this->errorRedirectToMain('Failed to force the document\'s checkin.'); | |
| 113 | + } | |
| 114 | + | |
| 115 | + // checkout cancelled transaction | |
| 116 | + $oDocumentTransaction = & new DocumentTransaction($oDocument->getID(), "Document checked out cancelled", FORCE_CHECKIN); | |
| 117 | + if ($oDocumentTransaction->create()) { | |
| 118 | + $default->log->debug("editDocCheckoutBL.php created forced checkin document transaction for document ID=" . $oDocument->getID()); | |
| 119 | + } else { | |
| 120 | + $default->log->error("editDocCheckoutBL.php couldn't create create document transaction for document ID=" . $oDocument->getID()); | |
| 121 | + } | |
| 122 | + $this->commitTransaction(); // FIXME do we want to do this if we can't created the document-transaction? | |
| 123 | + return $this->successRedirectToMain('Successfully forced "'. $oDocument->getName() .'" to be checked in.'); | |
| 124 | + } | |
| 125 | + | |
| 126 | + | |
| 127 | +} | |
| 128 | + | |
| 129 | +// use the new admin framework. | |
| 130 | +//$d = new KTCheckoutAdminDispatcher(); | |
| 131 | +//$d->dispatch(); | |
| 132 | + | |
| 133 | +?> | |
| 0 | 134 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doccheckoutmanagement/editDocCheckoutBL.php deleted
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * $Id$ | |
| 4 | - * | |
| 5 | - * Edit Document CheckOut Status. | |
| 6 | - * | |
| 7 | - * Copyright (c) 2003 Jam Warehouse http://www.jamwarehouse.com | |
| 8 | - * | |
| 9 | - * This program is free software; you can redistribute it and/or modify | |
| 10 | - * it under the terms of the GNU General Public License as published by | |
| 11 | - * the Free Software Foundation; either version 2 of the License, or | |
| 12 | - * (at your option) any later version. | |
| 13 | - * | |
| 14 | - * This program is distributed in the hope that it will be useful, | |
| 15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | - * GNU General Public License for more details. | |
| 18 | - * | |
| 19 | - * You should have received a copy of the GNU General Public License | |
| 20 | - * along with this program; if not, write to the Free Software | |
| 21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | - * | |
| 23 | - * @version $Revision$ | |
| 24 | - * @author Mukhtar Dharsey, Jam Warehouse (Pty) Ltd, South Africa | |
| 25 | - * @package administration.doccheckoutmanagement | |
| 26 | - */ | |
| 27 | -require_once("../../../../../config/dmsDefaults.php"); | |
| 28 | - | |
| 29 | -KTUtil::extractGPC('fDocumentID', 'fUpdate'); | |
| 30 | - | |
| 31 | -if (checkSession()) { | |
| 32 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 33 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableListFromQuery.inc"); | |
| 34 | - require_once("editDocCheckoutUI.inc"); | |
| 35 | - require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); | |
| 36 | - require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc"); | |
| 37 | - require_once("$default->fileSystemRoot/lib/security/Permission.inc"); | |
| 38 | - require_once("$default->fileSystemRoot/lib/links/Link.inc"); | |
| 39 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 40 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 41 | - require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 42 | - require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 43 | - require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 44 | - | |
| 45 | - global $default; | |
| 46 | - $oPatternCustom = & new PatternCustom(); | |
| 47 | - | |
| 48 | - if (isset($fDocumentID)) { | |
| 49 | - if (isset($fUpdate)) { | |
| 50 | - $oDocument = Document::get($fDocumentID); | |
| 51 | - $oDocument->setIsCheckedOut(0); | |
| 52 | - $oDocument->setCheckedOutUserID(-1); | |
| 53 | - if ($oDocument->update()) { | |
| 54 | - // checkout cancelled transaction | |
| 55 | - $oDocumentTransaction = & new DocumentTransaction($oDocument->getID(), "Document checked out cancelled", FORCE_CHECKIN); | |
| 56 | - if ($oDocumentTransaction->create()) { | |
| 57 | - $default->log->debug("editDocCheckoutBL.php created forced checkin document transaction for document ID=" . $oDocument->getID()); | |
| 58 | - } else { | |
| 59 | - $default->log->error("editDocCheckoutBL.php couldn't create create document transaction for document ID=" . $oDocument->getID()); | |
| 60 | - } | |
| 61 | - $oPatternCustom->setHtml(getEditCheckoutSuccessPage()); | |
| 62 | - } else { | |
| 63 | - $oPatternCustom->setHtml(getErrorPage(_("Error while trying to update the document checkout."))); | |
| 64 | - } | |
| 65 | - } else { | |
| 66 | - $oPatternCustom->addHtml(getEditCheckoutPage($fDocumentID)); | |
| 67 | - $main->setFormAction($_SERVER["PHP_SELF"]); | |
| 68 | - } | |
| 69 | - } else { | |
| 70 | - // no document selected | |
| 71 | - $oPatternCustom->setHtml(getErrorPage(_("No document selected to check back in"))); | |
| 72 | - } | |
| 73 | - //render the page | |
| 74 | - $main->setCentralPayload($oPatternCustom); | |
| 75 | - $main->setHasRequiredFields(true); | |
| 76 | - $main->render(); | |
| 77 | -} | |
| 78 | -?> |
presentation/lookAndFeel/knowledgeTree/administration/doccheckoutmanagement/editDocCheckoutUI.inc deleted
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * $Id$ | |
| 4 | - * | |
| 5 | - * Edit Document CheckOut Status UI Functions. | |
| 6 | - * | |
| 7 | - * Copyright (c) 2003 Jam Warehouse http://www.jamwarehouse.com | |
| 8 | - * | |
| 9 | - * This program is free software; you can redistribute it and/or modify | |
| 10 | - * it under the terms of the GNU General Public License as published by | |
| 11 | - * the Free Software Foundation; either version 2 of the License, or | |
| 12 | - * (at your option) any later version. | |
| 13 | - * | |
| 14 | - * This program is distributed in the hope that it will be useful, | |
| 15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | - * GNU General Public License for more details. | |
| 18 | - * | |
| 19 | - * You should have received a copy of the GNU General Public License | |
| 20 | - * along with this program; if not, write to the Free Software | |
| 21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | - * | |
| 23 | - * @version $Revision$ | |
| 24 | - * @author Mukhtar Dharsey, Jam Warehouse (Pty) Ltd, South Africa | |
| 25 | - * @package administration.doccheckoutmanagement | |
| 26 | - */ | |
| 27 | - | |
| 28 | -function getEditCheckoutSuccessPage(){ | |
| 29 | - global $default; | |
| 30 | - return statusPage(_("Edit Document Checkout"), _("Succesfully updated document checkout."), "", "listDocs"); | |
| 31 | -} | |
| 32 | - | |
| 33 | -function getErrorPage($sMessage) { | |
| 34 | - return statusPage(_("Edit Document Checkout"), _("Error checking in document"), $sMessage, "listDocs"); | |
| 35 | -} | |
| 36 | - | |
| 37 | -function getEditCheckoutPage($iDocumentID){ | |
| 38 | - global $default; | |
| 39 | - | |
| 40 | - $oDocument = Document::get($iDocumentID); | |
| 41 | - $oUser = User::get($oDocument->getCheckedOutUserID()); | |
| 42 | - $sToRender .= renderHeading(_("Edit Document Checkout")); | |
| 43 | - $sToRender .= "<table>\n"; | |
| 44 | - $sToRender .= "<tr><td colspan=\"2\">" . _("Are you sure you want to Check In the document:") . "</tr></td>"; | |
| 45 | - $sToRender .= "<tr><td width=\"20%\">" . _("Path") . "</td><td><b>" . $oDocument->getDisplayPath() . "</b></td></tr>"; | |
| 46 | - $sToRender .= "<tr><td>" . _("Checked Out By") . "</td><td><b>" . ($oUser ? $oUser->getName() : _("Unknown")) . "</b></td></tr>"; | |
| 47 | - $sToRender .= "<input type=\"hidden\" name=\"fUpdate\" value=\"1\">\n"; | |
| 48 | - $sToRender .= "<input type=\"hidden\" name=\"fDocumentID\" value=\"$iDocumentID\">\n"; | |
| 49 | - $sToRender .= "<tr>\n"; | |
| 50 | - $sToRender .= "<td colspan=\"2\" align=right>\n"; | |
| 51 | - $sToRender .= getUpdateButton(); | |
| 52 | - $sToRender .= getCancelButton(); | |
| 53 | - $sToRender .= "</td>\n"; | |
| 54 | - $sToRender .= "</tr>\n"; | |
| 55 | - $sToRender .= "</table>\n"; | |
| 56 | - return $sToRender; | |
| 57 | -} | |
| 58 | - | |
| 59 | -// gets the updatebutton when a unit is selected | |
| 60 | -function getUpdateButton() { | |
| 61 | - global $default; | |
| 62 | - return "<input type=\"image\" src =\"" . KTHtml::getUpdateButton() . "\" value=\"submit\" border=\"0\"/>\n"; | |
| 63 | -} | |
| 64 | - | |
| 65 | -// gets the cancel button when a unit is selected | |
| 66 | -function getCancelButton() { | |
| 67 | - global $default; | |
| 68 | - return "<a href=\"$default->rootUrl/control.php?action=listDocs\"><img src =\"" . KTHtml::getCancelButton() . "\" border=\"0\" /></a>\n"; | |
| 69 | -} | |
| 70 | - | |
| 71 | -?> |
presentation/lookAndFeel/knowledgeTree/administration/doccheckoutmanagement/listDocumentsBL.php deleted
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * $Id$ | |
| 4 | - * | |
| 5 | - * List checked out documents. | |
| 6 | - * | |
| 7 | - * Copyright (c) 2003 Jam Warehouse http://www.jamwarehouse.com | |
| 8 | - * | |
| 9 | - * This program is free software; you can redistribute it and/or modify | |
| 10 | - * it under the terms of the GNU General Public License as published by | |
| 11 | - * the Free Software Foundation; either version 2 of the License, or | |
| 12 | - * (at your option) any later version. | |
| 13 | - * | |
| 14 | - * This program is distributed in the hope that it will be useful, | |
| 15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | - * GNU General Public License for more details. | |
| 18 | - * | |
| 19 | - * You should have received a copy of the GNU General Public License | |
| 20 | - * along with this program; if not, write to the Free Software | |
| 21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | - * | |
| 23 | - * @version $Revision$ | |
| 24 | - * @author Omar Rahbeeni, Jam Warehouse (Pty) Ltd, South Africa | |
| 25 | - * @package administration.doccheckoutmanagement | |
| 26 | - */ | |
| 27 | - | |
| 28 | -require_once("../../../../../config/dmsDefaults.php"); | |
| 29 | -require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); | |
| 30 | -require_once("$default->fileSystemRoot/lib/users/User.inc"); | |
| 31 | -require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 32 | -require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); | |
| 33 | -require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 34 | - | |
| 35 | -if (checkSession()) { | |
| 36 | - | |
| 37 | - $oPatternCustom = & new PatternCustom(); | |
| 38 | - $aDocuments = Document::getList("is_checked_out = 1");/*ok*/ | |
| 39 | - $sToRender .= renderHeading(_("Document Checkout Management")); | |
| 40 | - $sToRender .= "<table><tr/>"; | |
| 41 | - if (count($aDocuments) > 0) { | |
| 42 | - for ($i=0; $i<count($aDocuments); $i++) { | |
| 43 | - if ($aDocuments[$i]) { | |
| 44 | - $sToRender .= "<tr bgcolor=\"" . getColour($i) . "\"><td width=\"80%\">" . $aDocuments[$i]->getDisplayPath() . "</td>"; | |
| 45 | - $sToRender .= "<td align=\"right\">" . generateControllerLink("editDocCheckout", "fDocumentID=" . $aDocuments[$i]->getID(), _("Check In") . "</td></tr>"); | |
| 46 | - } | |
| 47 | - } | |
| 48 | - } else { | |
| 49 | - $sToRender .= "<tr><td colspan=\"3\">" . _("There are no checked out documents") . "</td></tr>"; | |
| 50 | - } | |
| 51 | - $sToRender .= "</table>"; | |
| 52 | - | |
| 53 | - $oPatternCustom->setHtml($sToRender); | |
| 54 | - | |
| 55 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 56 | - $main->setCentralPayload($oPatternCustom); | |
| 57 | - $main->setFormAction($_SERVER['PHP_SELF']); | |
| 58 | - $main->render(); | |
| 59 | -} | |
| 60 | -?> |
presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/documentFields.php
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require_once('../../../../../config/dmsDefaults.php'); | |
| 3 | +//require_once('../../../../../config/dmsDefaults.php'); | |
| 4 | 4 | require_once(KT_LIB_DIR . '/dispatcher.inc.php'); |
| 5 | 5 | require_once(KT_LIB_DIR . '/templating/templating.inc.php'); |
| 6 | +require_once(KT_LIB_DIR . '/templating/kt3template.inc.php'); | |
| 6 | 7 | |
| 7 | 8 | require_once(KT_LIB_DIR . '/documentmanagement/DocumentField.inc'); |
| 8 | 9 | require_once(KT_LIB_DIR . '/metadata/fieldset.inc.php'); |
| 9 | 10 | require_once(KT_LIB_DIR . '/metadata/metadatautil.inc.php'); |
| 10 | 11 | |
| 12 | + | |
| 13 | +// FIXME shouldn't this inherit from AdminDispatcher? | |
| 11 | 14 | class KTDocumentFieldDispatcher extends KTStandardDispatcher { |
| 12 | 15 | var $bAutomaticTransaction = true; |
| 13 | 16 | |
| 14 | 17 | // Breadcrumbs base - added to in methods |
| 15 | 18 | var $aBreadcrumbs = array( |
| 16 | 19 | array('action' => 'administration', 'name' => 'Administration'), |
| 17 | - array('action' => 'docfield', 'name' => 'Document Field Management'), | |
| 18 | 20 | ); |
| 19 | 21 | |
| 20 | 22 | // {{{ do_main |
| 21 | 23 | function do_main () { |
| 24 | + $this->aBreadcrumbs[] = array('action' => 'docfield', 'name' => 'Document Field Management'); | |
| 25 | + $this->oPage->setBreadcrumbDetails("view fieldsets"); | |
| 26 | + | |
| 22 | 27 | $oTemplating =& KTTemplating::getSingleton(); |
| 23 | 28 | $oTemplate =& $oTemplating->loadTemplate('ktcore/metadata/listFieldsets'); |
| 24 | 29 | $oTemplate->setData(array( |
| ... | ... | @@ -487,7 +492,8 @@ class KTDocumentFieldDispatcher extends KTStandardDispatcher { |
| 487 | 492 | // }}} |
| 488 | 493 | } |
| 489 | 494 | |
| 490 | -$d =& new KTDocumentFieldDispatcher; | |
| 491 | -$d->dispatch(); | |
| 495 | +// use the admin dispatch mechanisms. | |
| 496 | +//$d =& new KTDocumentFieldDispatcher; | |
| 497 | +//$d->dispatch(); | |
| 492 | 498 | |
| 493 | 499 | ?> | ... | ... |
resources/css/kt-framing.css
| ... | ... | @@ -536,14 +536,34 @@ a.main_nav_item { |
| 536 | 536 | color: #db9d09; |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | +/* block level. */ | |
| 539 | 540 | .ktError |
| 540 | 541 | { |
| 541 | - padding: 0.5em 1em; | |
| 542 | + padding: 0 1em; | |
| 542 | 543 | border: 1px solid #ffc21e; |
| 543 | 544 | margin: 0.5em 0; |
| 544 | 545 | background: #ffdd80; |
| 545 | 546 | } |
| 546 | 547 | |
| 548 | +.ktError p { | |
| 549 | + padding-left: 25px; | |
| 550 | + background: transparent url(/thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; | |
| 551 | +} | |
| 552 | + | |
| 553 | +/* block level. */ | |
| 554 | +.ktInfo | |
| 555 | +{ | |
| 556 | + padding: 0 1em; | |
| 557 | + border: 1px solid #ffc21e; | |
| 558 | + margin: 0.5em 0; | |
| 559 | + background: #ffdd80; | |
| 560 | +} | |
| 561 | + | |
| 562 | +.ktInfo p { | |
| 563 | + padding-left: 25px; | |
| 564 | + background: transparent url(/thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat; | |
| 565 | +} | |
| 566 | + | |
| 547 | 567 | |
| 548 | 568 | /** portlet stuff. */ |
| 549 | 569 | #portlet-search-text { |
| ... | ... | @@ -557,4 +577,46 @@ a.main_nav_item { |
| 557 | 577 | .searchbutton { |
| 558 | 578 | border: 1px solid black; |
| 559 | 579 | margin: 0.5em; |
| 560 | -} | |
| 561 | 580 | \ No newline at end of file |
| 581 | +} | |
| 582 | + | |
| 583 | + | |
| 584 | +/* ========== kt actions | |
| 585 | + | |
| 586 | +These are used to mark up various different "actions" (e.g. cut, copy, delete). | |
| 587 | +Use them as follows: | |
| 588 | + | |
| 589 | +<a class="ktAction ktDelete">Delete</a> | |
| 590 | + | |
| 591 | +The text will be hidden for screen view. The generic fahrner-ish approach comes from Plone | |
| 592 | + | |
| 593 | + */ | |
| 594 | + | |
| 595 | + | |
| 596 | +.ktAction { | |
| 597 | + display: block; | |
| 598 | + text-decoration: none; | |
| 599 | + overflow: hidden; | |
| 600 | + border: 0 !important; | |
| 601 | + margin: 0; | |
| 602 | + padding: 0; | |
| 603 | + padding-top: 16px; | |
| 604 | + height: 0px !important; | |
| 605 | + height /**/: 16px; | |
| 606 | + width: 16px; | |
| 607 | + cursor: pointer; | |
| 608 | +} | |
| 609 | + | |
| 610 | +/* FIXME when available icon-naming-conformant sets have better coverage, make these more accurate. */ | |
| 611 | +.ktAction.ktDelete { background: transparent url(/thirdparty/icon-theme/16x16/mimetypes/x-directory-trash.png) top left no-repeat; } | |
| 612 | + | |
| 613 | +/* =========== standard listings. */ | |
| 614 | + | |
| 615 | +.listing td { | |
| 616 | + padding: 0.5em; | |
| 617 | +} | |
| 618 | + | |
| 619 | +.listing thead th { | |
| 620 | + border-bottom: 1px solid #888; | |
| 621 | + text-align: left; | |
| 622 | +} | |
| 623 | + | ... | ... |
templates/kt3/admin_items.smarty
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | {else} |
| 6 | 6 | <dl class="panel_menu"> |
| 7 | 7 | {foreach item=aItem from=$items} |
| 8 | - <dt><a href="{$smarty.server.PHP_SELF}/{$aItem.name}">{$aItem.title}</a></dt> | |
| 8 | + <dt><a href="{$baseurl}/{$aItem.fullname}">{$aItem.title}</a></dt> | |
| 9 | 9 | <dd class="descriptiveText">{$aItem.description}</dd> |
| 10 | 10 | {/foreach} |
| 11 | 11 | </dl> | ... | ... |
templates/kt3/standard_page.smarty
| ... | ... | @@ -103,11 +103,21 @@ |
| 103 | 103 | <h1 class="{$page->componentClass}"><span class="fahrner">{$page->componentLabel}</span></h1> |
| 104 | 104 | |
| 105 | 105 | <!-- any status / error messages get added here. --> |
| 106 | - | |
| 106 | +{if (!empty($page->errStack))} | |
| 107 | +<div class="ktError"> | |
| 107 | 108 | {foreach item=sError from=$page->errStack} |
| 108 | - <div class="ktError">{$sError}</div> | |
| 109 | + <p>{$sError}</p> | |
| 109 | 110 | {/foreach} |
| 111 | +</div> | |
| 112 | +{/if} | |
| 110 | 113 | |
| 114 | +{if (!empty($page->errStack))} | |
| 115 | +<div class="ktInfo"> | |
| 116 | + {foreach item=sInfo from=$page->infoStack} | |
| 117 | + <p>{$sInfo}</p> | |
| 118 | + {/foreach} | |
| 119 | +</div> | |
| 120 | +{/if} | |
| 111 | 121 | <!-- and finally, the content. --> |
| 112 | 122 | |
| 113 | 123 | {$page->contents} | ... | ... |
templates/ktcore/document/admin/checkoutlisting.smarty
0 → 100644
| 1 | +<h2>Checked Out Documents</h2> | |
| 2 | +<p class="descriptiveText">If a checked-out document has been lost, or the user | |
| 3 | +who checked a document out has not checked it back in, it may be necessary | |
| 4 | +to override the "checked-out" status of a document. Use the <strong>force checkin</strong> | |
| 5 | +action in the listing below to override the checked-out status.</p> | |
| 6 | +<!-- FIXME set classes here for listing. --> | |
| 7 | +{if (count($documents) !== 0)} | |
| 8 | +<table class="listing" cellspacing="5px"> | |
| 9 | + <thead> | |
| 10 | + <tr> | |
| 11 | + <th>Document</th> | |
| 12 | + <th>Location</th> | |
| 13 | + <th> </th> | |
| 14 | + </tr> | |
| 15 | + </thead> | |
| 16 | + <tbody> | |
| 17 | + | |
| 18 | + {foreach item=oDocument from=$documents} | |
| 19 | + <tr class="{cycle values=even,odd}"> | |
| 20 | + <td>{$oDocument->getName()}</td> | |
| 21 | + <td class="descriptiveText">{$oDocument->getDisplayPath()}</td> | |
| 22 | + <td><a href="?action=confirm&fDocumentId={$oDocument->getId()}">force checkin</a></td> | |
| 23 | + </tr> | |
| 24 | + {/foreach} | |
| 25 | + </tbody> | |
| 26 | + <!-- FIXME do we want batching? --> | |
| 27 | +</table> | |
| 28 | +{else} | |
| 29 | + <div class="ktInfo"> | |
| 30 | + <p>No documents are currently checked out.</p> | |
| 31 | + </div> | |
| 32 | +{/if} | ... | ... |
templates/ktcore/document/admin/force_checkin_confirm.smarty
0 → 100644
| 1 | +<h2>Confirm Forced Check-in</h2> | |
| 2 | +<p class="descriptiveText">Please confirm that this is the document that you wish to checkin.</p> | |
| 3 | + | |
| 4 | +<div class="document_details"> | |
| 5 | +<h3>Document Details</h3> | |
| 6 | +<dl class="metadata"> | |
| 7 | + <dt>Document Name</dt> | |
| 8 | + <dd>{$document->getName()}</dd> | |
| 9 | + | |
| 10 | + <dt>Location</dt> | |
| 11 | + <dd>{$document->getDisplayPath()}</dd> | |
| 12 | + | |
| 13 | + <dt>Checked out by</dt> | |
| 14 | + {if ($checkout_user !== null)} | |
| 15 | + <dd> | |
| 16 | + {$checkout_user->getName()} | |
| 17 | + </dd> | |
| 18 | + {else} | |
| 19 | + <dd class="ktError"> | |
| 20 | + The user who checked this document out is no longer valid. | |
| 21 | + </dd> | |
| 22 | + {/if} | |
| 23 | + </dd> | |
| 24 | +</dl> | |
| 25 | +</div> | |
| 26 | + | |
| 27 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | |
| 28 | + <input type="hidden" name="action" value="checkin"> | |
| 29 | + <input type="hidden" name="fDocumentId" value="{$document->getId()}"> | |
| 30 | + <div class="form_actions"> | |
| 31 | + <input type="submit" value="Force Checkin" /> | |
| 32 | + <!-- FIXME separate this even further. --> | |
| 33 | + <p><a href="?action=main">Cancel</a></p> | |
| 34 | + </div> | |
| 35 | +</form> | |
| 0 | 36 | \ No newline at end of file | ... | ... |
templates/ktcore/fields/list.smarty
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | <table class="pretty" cellspacing="0" cellpadding="0"> |
| 7 | 7 | <thead> |
| 8 | 8 | <tr> |
| 9 | - <th>Name</th> | |
| 9 | + <th colspan="2">Name</th> | |
| 10 | 10 | <th>Generic</th> |
| 11 | 11 | <th>Fields</th> |
| 12 | 12 | </tr> |
| ... | ... | @@ -14,8 +14,13 @@ |
| 14 | 14 | <tbody> |
| 15 | 15 | {foreach from=$fieldsets item=oFieldset} |
| 16 | 16 | <tr> |
| 17 | + <td> | |
| 18 | + <a href="?action=edit&fFieldsetId={$oFieldset->getId()}" class="ktAction ktDelete">Delete</a> | |
| 19 | + </td> | |
| 17 | 20 | <td> |
| 18 | - <a href="?action=edit&fFieldsetId={$oFieldset->getId()}"> { $oFieldset->getName() } | |
| 21 | + | |
| 22 | + <a href="?action=edit&fFieldsetId={$oFieldset->getId()}"> | |
| 23 | + { $oFieldset->getName() } | |
| 19 | 24 | </a> |
| 20 | 25 | </td> |
| 21 | 26 | <td> | ... | ... |
templates/ktcore/metadata/listFieldsets.smarty
| ... | ... | @@ -3,10 +3,10 @@ |
| 3 | 3 | { if $fieldsets} |
| 4 | 4 | <h3>Existing document fieldsets</h3> |
| 5 | 5 | |
| 6 | -<table class="pretty" cellspacing="0" cellpadding="0"> | |
| 6 | +<table class="listing" cellpadding="1.5em" cellspacing="0"> | |
| 7 | 7 | <thead> |
| 8 | 8 | <tr> |
| 9 | - <th>Name</th> | |
| 9 | + <th colspan="2">Name</th> | |
| 10 | 10 | <th>Generic</th> |
| 11 | 11 | <th>Fields</th> |
| 12 | 12 | </tr> |
| ... | ... | @@ -14,9 +14,10 @@ |
| 14 | 14 | <tbody> |
| 15 | 15 | {foreach from=$fieldsets item=oFieldset} |
| 16 | 16 | <tr> |
| 17 | + <td> | |
| 18 | + <a href="?action=delete&fFieldsetId={$oFieldset->getId()}"class="ktAction ktDelete">Delete</a> | |
| 19 | + </td> | |
| 17 | 20 | <td> |
| 18 | - <a href="?action=delete&fFieldsetId={$oFieldset->getId()}"><img | |
| 19 | -border="0" src="{"icons/delete.png"|imgSrc}" title="Delete fieldset" /></a> | |
| 20 | 21 | <a href="?action=edit&fFieldsetId={$oFieldset->getId()}"> { $oFieldset->getName() } |
| 21 | 22 | </a> |
| 22 | 23 | </td> | ... | ... |