Commit 82e3b2e0246622156bf84d52e81e896030aee157
1 parent
3506ac6a
Brad Shuttleworth 2006-01-20 KTS-106: Saved Searches cannot be deleted als...
Brad Shuttleworth 2006-01-20 KTS-153: Complex conditionals edit page ca...
Brad Shuttleworth 2006-01-20 if there are no permission descriptors, the...
Brad Shuttleworth 2006-01-20 KTS-96: username incorrectly filled in by ...
Brad Shuttleworth 2006-01-20 KTS-111: extra helptext on default provider.
Brad Shuttleworth 2006-01-20 fix for KTS-111
Brad Shuttleworth 2006-01-20 KTS-139: remove comment about fieldset-crea...
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4616 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
21 changed files
with
208 additions
and
71 deletions
browse.php
| @@ -171,6 +171,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -171,6 +171,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 171 | "context" => $this, | 171 | "context" => $this, |
| 172 | "collection" => $collection, | 172 | "collection" => $collection, |
| 173 | 'browse_mode' => $this->browse_mode, | 173 | 'browse_mode' => $this->browse_mode, |
| 174 | + 'isEditable' => true, | ||
| 174 | ); | 175 | ); |
| 175 | return $oTemplate->render($aTemplateData); | 176 | return $oTemplate->render($aTemplateData); |
| 176 | } | 177 | } |
lib/browse/PartialQuery.inc.php
| @@ -57,8 +57,11 @@ class BrowseQuery extends PartialQuery{ | @@ -57,8 +57,11 @@ class BrowseQuery extends PartialQuery{ | ||
| 57 | 57 | ||
| 58 | function _getDocumentQuery($aOptions = null) { | 58 | function _getDocumentQuery($aOptions = null) { |
| 59 | $oUser = User::get($_SESSION['userID']); | 59 | $oUser = User::get($_SESSION['userID']); |
| 60 | - list($sPermissionString, $aPermissionParams, $sPermissionJoin) = KTSearchUtil::permissionToSQL($oUser, $this->sPermissionName); | ||
| 61 | - | 60 | + $res = KTSearchUtil::permissionToSQL($oUser, $this->sPermissionName); |
| 61 | + if (PEAR::isError($res)) { | ||
| 62 | + return $res; | ||
| 63 | + } | ||
| 64 | + list($sPermissionString, $aPermissionParams, $sPermissionJoin) = $res; | ||
| 62 | $aPotentialWhere = array($sPermissionString, 'D.folder_id = ?', 'D.status_id = 1'); | 65 | $aPotentialWhere = array($sPermissionString, 'D.folder_id = ?', 'D.status_id = 1'); |
| 63 | $aWhere = array(); | 66 | $aWhere = array(); |
| 64 | foreach ($aPotentialWhere as $sWhere) { | 67 | foreach ($aPotentialWhere as $sWhere) { |
| @@ -86,7 +89,11 @@ class BrowseQuery extends PartialQuery{ | @@ -86,7 +89,11 @@ class BrowseQuery extends PartialQuery{ | ||
| 86 | 89 | ||
| 87 | function _getFolderQuery($aOptions = null) { | 90 | function _getFolderQuery($aOptions = null) { |
| 88 | $oUser = User::get($_SESSION['userID']); | 91 | $oUser = User::get($_SESSION['userID']); |
| 89 | - list($sPermissionString, $aPermissionParams, $sPermissionJoin) = KTSearchUtil::permissionToSQL($oUser, $this->sPermissionName, "F"); | 92 | + $res = KTSearchUtil::permissionToSQL($oUser, $this->sPermissionName, "F"); |
| 93 | + if (PEAR::isError($res)) { | ||
| 94 | + return $res; | ||
| 95 | + } | ||
| 96 | + list($sPermissionString, $aPermissionParams, $sPermissionJoin) = $res; | ||
| 90 | 97 | ||
| 91 | $aPotentialWhere = array($sPermissionString, 'F.parent_id = ?'); | 98 | $aPotentialWhere = array($sPermissionString, 'F.parent_id = ?'); |
| 92 | $aWhere = array(); | 99 | $aWhere = array(); |
| @@ -118,6 +125,7 @@ class BrowseQuery extends PartialQuery{ | @@ -118,6 +125,7 @@ class BrowseQuery extends PartialQuery{ | ||
| 118 | 'select' => 'count(F.id) AS cnt', | 125 | 'select' => 'count(F.id) AS cnt', |
| 119 | ); | 126 | ); |
| 120 | $aQuery = $this->_getFolderQuery($aOptions); | 127 | $aQuery = $this->_getFolderQuery($aOptions); |
| 128 | + if (PEAR::isError($aQuery)) { return 0; } | ||
| 121 | $iRet = DBUtil::getOneResultKey($aQuery, 'cnt'); | 129 | $iRet = DBUtil::getOneResultKey($aQuery, 'cnt'); |
| 122 | return $iRet; | 130 | return $iRet; |
| 123 | } | 131 | } |
| @@ -127,12 +135,15 @@ class BrowseQuery extends PartialQuery{ | @@ -127,12 +135,15 @@ class BrowseQuery extends PartialQuery{ | ||
| 127 | 'select' => 'count(D.id) AS cnt', | 135 | 'select' => 'count(D.id) AS cnt', |
| 128 | ); | 136 | ); |
| 129 | $aQuery = $this->_getDocumentQuery($aOptions); | 137 | $aQuery = $this->_getDocumentQuery($aOptions); |
| 138 | + if (PEAR::isError($aQuery)) { return 0; } | ||
| 130 | $iRet = DBUtil::getOneResultKey($aQuery, 'cnt'); | 139 | $iRet = DBUtil::getOneResultKey($aQuery, 'cnt'); |
| 131 | return $iRet; | 140 | return $iRet; |
| 132 | } | 141 | } |
| 133 | 142 | ||
| 134 | function getFolders($iBatchSize, $iBatchStart, $sSortColumn, $sSortOrder, $sJoinClause = null, $aJoinParams = null) { | 143 | function getFolders($iBatchSize, $iBatchStart, $sSortColumn, $sSortOrder, $sJoinClause = null, $aJoinParams = null) { |
| 135 | - list($sQuery, $aParams) = $this->_getFolderQuery(); | 144 | + $res = $this->_getFolderQuery(); |
| 145 | + if (PEAR::isError($res)) { return array(); } | ||
| 146 | + list($sQuery, $aParams) = $res; | ||
| 136 | $sQuery .= " ORDER BY " . $sSortColumn . " " . $sSortOrder . " "; | 147 | $sQuery .= " ORDER BY " . $sSortColumn . " " . $sSortOrder . " "; |
| 137 | 148 | ||
| 138 | $sQuery .= " LIMIT ?, ?"; | 149 | $sQuery .= " LIMIT ?, ?"; |
| @@ -147,7 +158,9 @@ class BrowseQuery extends PartialQuery{ | @@ -147,7 +158,9 @@ class BrowseQuery extends PartialQuery{ | ||
| 147 | } | 158 | } |
| 148 | 159 | ||
| 149 | function getDocuments($iBatchSize, $iBatchStart, $sSortColumn, $sSortOrder, $sJoinClause = null, $aJoinParams = null) { | 160 | function getDocuments($iBatchSize, $iBatchStart, $sSortColumn, $sSortOrder, $sJoinClause = null, $aJoinParams = null) { |
| 150 | - list($sQuery, $aParams) = $this->_getDocumentQuery(); | 161 | + $res = $this->_getDocumentQuery(); |
| 162 | + if (PEAR::isError($res)) { return array(); } // no permissions | ||
| 163 | + list($sQuery, $aParams) = $res; | ||
| 151 | $sQuery .= " ORDER BY " . $sSortColumn . " " . $sSortOrder . " "; | 164 | $sQuery .= " ORDER BY " . $sSortColumn . " " . $sSortOrder . " "; |
| 152 | 165 | ||
| 153 | $sQuery .= " LIMIT ?, ?"; | 166 | $sQuery .= " LIMIT ?, ?"; |
| @@ -225,6 +238,7 @@ class SimpleSearchQuery extends PartialQuery { | @@ -225,6 +238,7 @@ class SimpleSearchQuery extends PartialQuery { | ||
| 225 | 'select' => 'count(DISTINCT D.id) AS cnt', | 238 | 'select' => 'count(DISTINCT D.id) AS cnt', |
| 226 | ); | 239 | ); |
| 227 | $aQuery = $this->getQuery($aOptions); | 240 | $aQuery = $this->getQuery($aOptions); |
| 241 | + if (PEAR::isError($aQuery)) { return 0; } | ||
| 228 | $iRet = DBUtil::getOneResultKey($aQuery, 'cnt'); | 242 | $iRet = DBUtil::getOneResultKey($aQuery, 'cnt'); |
| 229 | return $iRet; | 243 | return $iRet; |
| 230 | } | 244 | } |
| @@ -238,8 +252,9 @@ class SimpleSearchQuery extends PartialQuery { | @@ -238,8 +252,9 @@ class SimpleSearchQuery extends PartialQuery { | ||
| 238 | $aOptions = array( | 252 | $aOptions = array( |
| 239 | 'select' => 'DISTINCT D.id AS id', | 253 | 'select' => 'DISTINCT D.id AS id', |
| 240 | ); | 254 | ); |
| 241 | - list($sQuery, $aParams) = $this->getQuery($aOptions); | ||
| 242 | - | 255 | + $res = $this->getQuery($aOptions); |
| 256 | + if (PEAR::isError($res)) { return array(); } | ||
| 257 | + list($sQuery, $aParams) = $res; | ||
| 243 | $sQuery .= " ORDER BY " . $sSortColumn . " " . $sSortOrder . " "; | 258 | $sQuery .= " ORDER BY " . $sSortColumn . " " . $sSortOrder . " "; |
| 244 | $sQuery .= " LIMIT ?, ?"; | 259 | $sQuery .= " LIMIT ?, ?"; |
| 245 | 260 | ||
| @@ -302,6 +317,7 @@ class BooleanSearchQuery extends PartialQuery { | @@ -302,6 +317,7 @@ class BooleanSearchQuery extends PartialQuery { | ||
| 302 | 'select' => 'count(DISTINCT D.id) AS cnt', | 317 | 'select' => 'count(DISTINCT D.id) AS cnt', |
| 303 | ); | 318 | ); |
| 304 | $aQuery = $this->getQuery($aOptions); | 319 | $aQuery = $this->getQuery($aOptions); |
| 320 | + if (PEAR::isError($aQuery)) { return 0; } | ||
| 305 | $iRet = DBUtil::getOneResultKey($aQuery, 'cnt'); | 321 | $iRet = DBUtil::getOneResultKey($aQuery, 'cnt'); |
| 306 | return $iRet; | 322 | return $iRet; |
| 307 | } | 323 | } |
| @@ -315,8 +331,9 @@ class BooleanSearchQuery extends PartialQuery { | @@ -315,8 +331,9 @@ class BooleanSearchQuery extends PartialQuery { | ||
| 315 | $aOptions = array( | 331 | $aOptions = array( |
| 316 | 'select' => 'DISTINCT D.id AS id', | 332 | 'select' => 'DISTINCT D.id AS id', |
| 317 | ); | 333 | ); |
| 318 | - list($sQuery, $aParams) = $this->getQuery($aOptions); | ||
| 319 | - | 334 | + $res = $this->getQuery($aOptions); |
| 335 | + if (PEAR::isError($res)) { return array(); } | ||
| 336 | + list($sQuery, $aParams) = $res; | ||
| 320 | $sQuery .= " ORDER BY " . $sSortColumn . " " . $sSortOrder . " "; | 337 | $sQuery .= " ORDER BY " . $sSortColumn . " " . $sSortOrder . " "; |
| 321 | $sQuery .= " LIMIT ?, ?"; | 338 | $sQuery .= " LIMIT ?, ?"; |
| 322 | 339 |
lib/permissions/permissiondescriptor.inc.php
| @@ -189,6 +189,7 @@ class KTPermissionDescriptor extends KTEntity { | @@ -189,6 +189,7 @@ class KTPermissionDescriptor extends KTEntity { | ||
| 189 | if (is_null($aOptions)) { | 189 | if (is_null($aOptions)) { |
| 190 | $aOptions = array(); | 190 | $aOptions = array(); |
| 191 | } | 191 | } |
| 192 | + if (count($aGroups) === 0) { return array(); } | ||
| 192 | $ids = KTUtil::arrayGet($aOptions, 'ids'); | 193 | $ids = KTUtil::arrayGet($aOptions, 'ids'); |
| 193 | $aGroupIDs = array(); | 194 | $aGroupIDs = array(); |
| 194 | foreach ($aGroups as $oGroup) { | 195 | foreach ($aGroups as $oGroup) { |
| @@ -291,6 +292,7 @@ class KTPermissionDescriptor extends KTEntity { | @@ -291,6 +292,7 @@ class KTPermissionDescriptor extends KTEntity { | ||
| 291 | if (is_null($aOptions)) { | 292 | if (is_null($aOptions)) { |
| 292 | $aOptions = array(); | 293 | $aOptions = array(); |
| 293 | } | 294 | } |
| 295 | + if (count($aRoles) === 0) { return array(); } | ||
| 294 | $ids = KTUtil::arrayGet($aOptions, 'ids'); | 296 | $ids = KTUtil::arrayGet($aOptions, 'ids'); |
| 295 | $aRoleIDs = array(); | 297 | $aRoleIDs = array(); |
| 296 | foreach ($aRoles as $oRole) { | 298 | foreach ($aRoles as $oRole) { |
| @@ -393,6 +395,7 @@ class KTPermissionDescriptor extends KTEntity { | @@ -393,6 +395,7 @@ class KTPermissionDescriptor extends KTEntity { | ||
| 393 | if (is_null($aOptions)) { | 395 | if (is_null($aOptions)) { |
| 394 | $aOptions = array(); | 396 | $aOptions = array(); |
| 395 | } | 397 | } |
| 398 | + if (count($aUsers) === 0) { return array(); } | ||
| 396 | $ids = KTUtil::arrayGet($aOptions, 'ids'); | 399 | $ids = KTUtil::arrayGet($aOptions, 'ids'); |
| 397 | $aUserIDs = array(); | 400 | $aUserIDs = array(); |
| 398 | foreach ($aUsers as $oUser) { | 401 | foreach ($aUsers as $oUser) { |
lib/search/searchutil.inc.php
| @@ -166,6 +166,9 @@ class KTSearchUtil { | @@ -166,6 +166,9 @@ class KTSearchUtil { | ||
| 166 | "; | 166 | "; |
| 167 | $aGroups = GroupUtil::listGroupsForUserExpand($oUser); | 167 | $aGroups = GroupUtil::listGroupsForUserExpand($oUser); |
| 168 | $aPermissionDescriptors = KTPermissionDescriptor::getByGroups($aGroups, array('ids' => true)); | 168 | $aPermissionDescriptors = KTPermissionDescriptor::getByGroups($aGroups, array('ids' => true)); |
| 169 | + if (count($aPermissionDescriptors) === 0) { | ||
| 170 | + return PEAR::raiseError('You have no permissions'); | ||
| 171 | + } | ||
| 169 | $sPermissionDescriptors = DBUtil::paramArray($aPermissionDescriptors); | 172 | $sPermissionDescriptors = DBUtil::paramArray($aPermissionDescriptors); |
| 170 | $sSQLString = "PLA.permission_descriptor_id IN ($sPermissionDescriptors)"; | 173 | $sSQLString = "PLA.permission_descriptor_id IN ($sPermissionDescriptors)"; |
| 171 | $aParams = array($oPermission->getId()); | 174 | $aParams = array($oPermission->getId()); |
| @@ -220,8 +223,13 @@ class KTSearchUtil { | @@ -220,8 +223,13 @@ class KTSearchUtil { | ||
| 220 | 223 | ||
| 221 | $sToSearch = KTUtil::arrayGet($aOrigReq, 'fToSearch', 'Live'); // actually never present in this version. | 224 | $sToSearch = KTUtil::arrayGet($aOrigReq, 'fToSearch', 'Live'); // actually never present in this version. |
| 222 | 225 | ||
| 223 | - list ($sPermissionString, $aPermissionParams, $sPermissionJoin) = KTSearchUtil::permissionToSQL($oUser, $sPermissionName); | ||
| 224 | - | 226 | + $res = KTSearchUtil::permissionToSQL($oUser, $sPermissionName); |
| 227 | + if (PEAR::isError($res)) { // only occurs if the group has no permissions. | ||
| 228 | + return $res; | ||
| 229 | + } else { | ||
| 230 | + list ($sPermissionString, $aPermissionParams, $sPermissionJoin) = $res; | ||
| 231 | + } | ||
| 232 | + | ||
| 225 | /* | 233 | /* |
| 226 | * This is to overcome the problem where $sPermissionString (or | 234 | * This is to overcome the problem where $sPermissionString (or |
| 227 | * even $sSQLSearchString) is empty, leading to leading or | 235 | * even $sSQLSearchString) is empty, leading to leading or |
| @@ -300,6 +308,9 @@ class KTSearchUtil { | @@ -300,6 +308,9 @@ class KTSearchUtil { | ||
| 300 | ); | 308 | ); |
| 301 | $aOptions = array('select' => 'COUNT(DISTINCT(D.id)) AS cnt'); | 309 | $aOptions = array('select' => 'COUNT(DISTINCT(D.id)) AS cnt'); |
| 302 | $aQuery = KTSearchUtil::criteriaToQuery($aCriteriaSet, null, null, $aOptions); | 310 | $aQuery = KTSearchUtil::criteriaToQuery($aCriteriaSet, null, null, $aOptions); |
| 311 | + if (PEAR::isError($aQuery)) { // caused by no permissions being set. | ||
| 312 | + return false; | ||
| 313 | + } | ||
| 303 | $cnt = DBUtil::getOneResultKey($aQuery, 'cnt'); | 314 | $cnt = DBUtil::getOneResultKey($aQuery, 'cnt'); |
| 304 | if (PEAR::isError($cnt)) { | 315 | if (PEAR::isError($cnt)) { |
| 305 | return $cnt; | 316 | return $cnt; |
plugins/ktcore/KTCorePlugin.php
| @@ -33,8 +33,7 @@ class KTCorePlugin extends KTPlugin { | @@ -33,8 +33,7 @@ class KTCorePlugin extends KTPlugin { | ||
| 33 | $this->registerDashlet('KTNotificationDashlet', 'ktcore.dashlet.notifications', 'KTDashlets.php'); | 33 | $this->registerDashlet('KTNotificationDashlet', 'ktcore.dashlet.notifications', 'KTDashlets.php'); |
| 34 | $this->registerDashlet('KTCheckoutDashlet', 'ktcore.dashlet.checkout', 'KTDashlets.php'); | 34 | $this->registerDashlet('KTCheckoutDashlet', 'ktcore.dashlet.checkout', 'KTDashlets.php'); |
| 35 | 35 | ||
| 36 | - $this->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', 'Authentication', 'FIXME: describe authentication', 'authentication/authenticationadminpage.inc.php'); | ||
| 37 | - $this->registeri18n('knowledgeTree', KT_DIR . '/i18n'); | 36 | + $this->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', _('Authentication'), _('By default, KnowledgeTree controls its own users and groups and stores all information about them inside the database. In many situations, an organisation will already have a list of users and groups, and needs to use that existing information to allow access to the DMS. These <strong>Authentication Sources</strong> allow the system administrator to specify additional sources of authentication data.'), 'authentication/authenticationadminpage.inc.php'); $this->registeri18n('knowledgeTree', KT_DIR . '/i18n'); |
| 38 | 37 | ||
| 39 | $this->registerPortlet(array('browse', 'dashboard'), | 38 | $this->registerPortlet(array('browse', 'dashboard'), |
| 40 | 'KTSearchPortlet', 'ktcore.portlets.search', | 39 | 'KTSearchPortlet', 'ktcore.portlets.search', |
plugins/ktcore/KTPortlets.php
| @@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
| 3 | require_once(KT_LIB_DIR . '/actions/portletregistry.inc.php'); | 3 | require_once(KT_LIB_DIR . '/actions/portletregistry.inc.php'); |
| 4 | require_once(KT_LIB_DIR . '/widgets/portlet.inc.php'); | 4 | require_once(KT_LIB_DIR . '/widgets/portlet.inc.php'); |
| 5 | 5 | ||
| 6 | +require_once(KT_LIB_DIR . '/search/savedsearch.inc.php'); | ||
| 7 | + | ||
| 6 | class KTSearchPortlet extends KTPortlet { | 8 | class KTSearchPortlet extends KTPortlet { |
| 7 | 9 | ||
| 8 | function KTSearchPortlet() { | 10 | function KTSearchPortlet() { |
| @@ -11,8 +13,16 @@ class KTSearchPortlet extends KTPortlet { | @@ -11,8 +13,16 @@ class KTSearchPortlet extends KTPortlet { | ||
| 11 | function render() { | 13 | function render() { |
| 12 | $oTemplating = new KTTemplating; | 14 | $oTemplating = new KTTemplating; |
| 13 | $oTemplate = $oTemplating->loadTemplate("kt3/portlets/search_portlet"); | 15 | $oTemplate = $oTemplating->loadTemplate("kt3/portlets/search_portlet"); |
| 16 | + | ||
| 17 | + $aSearches = KTSavedSearch::getList(); | ||
| 18 | + // empty on error. | ||
| 19 | + if (PEAR::isError($aSearches)) { | ||
| 20 | + $aSearches = array(); | ||
| 21 | + } | ||
| 22 | + | ||
| 14 | $aTemplateData = array( | 23 | $aTemplateData = array( |
| 15 | "context" => $this, | 24 | "context" => $this, |
| 25 | + "saved_searches" => $aSearches, | ||
| 16 | ); | 26 | ); |
| 17 | 27 | ||
| 18 | return $oTemplate->render($aTemplateData); | 28 | return $oTemplate->render($aTemplateData); |
plugins/ktcore/admin/ajaxComplexConditionals.php
| 1 | <?php | 1 | <?php |
| 2 | -require_once("../../../../../../config/dmsDefaults.php"); | 2 | +require_once("../../../config/dmsDefaults.php"); |
| 3 | require_once(KT_LIB_DIR . "/templating/templating.inc.php"); | 3 | require_once(KT_LIB_DIR . "/templating/templating.inc.php"); |
| 4 | require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc"); | 4 | require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc"); |
| 5 | require_once(KT_LIB_DIR . "/database/dbutil.inc"); | 5 | require_once(KT_LIB_DIR . "/database/dbutil.inc"); |
| 6 | require_once(KT_LIB_DIR . "/util/ktutil.inc"); | 6 | require_once(KT_LIB_DIR . "/util/ktutil.inc"); |
| 7 | require_once(KT_LIB_DIR . "/dispatcher.inc.php"); | 7 | require_once(KT_LIB_DIR . "/dispatcher.inc.php"); |
| 8 | $sectionName = "Administration"; | 8 | $sectionName = "Administration"; |
| 9 | -require_once(KT_DIR . "/presentation/webpageTemplate.inc"); | 9 | + |
| 10 | 10 | ||
| 11 | require_once(KT_LIB_DIR . "/metadata/fieldset.inc.php"); | 11 | require_once(KT_LIB_DIR . "/metadata/fieldset.inc.php"); |
| 12 | require_once(KT_LIB_DIR . "/metadata/fieldbehaviour.inc.php"); | 12 | require_once(KT_LIB_DIR . "/metadata/fieldbehaviour.inc.php"); |
plugins/ktcore/admin/manageConditionals.php
| @@ -63,9 +63,7 @@ class ManageConditionalDispatcher extends KTAdminDispatcher { | @@ -63,9 +63,7 @@ class ManageConditionalDispatcher extends KTAdminDispatcher { | ||
| 63 | 'query' => 'action=manageConditional&fFieldsetId=' . $oFieldset->getId(), | 63 | 'query' => 'action=manageConditional&fFieldsetId=' . $oFieldset->getId(), |
| 64 | 'name' => _('Manage conditional fieldset'), | 64 | 'name' => _('Manage conditional fieldset'), |
| 65 | ); | 65 | ); |
| 66 | - $this->aBreadcrumbs[] = array( | ||
| 67 | - 'name' => _('Manage simple conditional'), | ||
| 68 | - ); | 66 | + $this->oPage->setBreadcrumbDetails(_('Manage simple conditional')); |
| 69 | 67 | ||
| 70 | $aTemplateData = array( | 68 | $aTemplateData = array( |
| 71 | "context" => &$this, | 69 | "context" => &$this, |
| @@ -101,9 +99,7 @@ class ManageConditionalDispatcher extends KTAdminDispatcher { | @@ -101,9 +99,7 @@ class ManageConditionalDispatcher extends KTAdminDispatcher { | ||
| 101 | 'query' => 'action=manageConditional&fFieldsetId=' . $oFieldset->getId(), | 99 | 'query' => 'action=manageConditional&fFieldsetId=' . $oFieldset->getId(), |
| 102 | 'name' => _('Manage conditional fieldset'), | 100 | 'name' => _('Manage conditional fieldset'), |
| 103 | ); | 101 | ); |
| 104 | - $this->aBreadcrumbs[] = array( | ||
| 105 | - 'name' => _('Manage complex conditional'), | ||
| 106 | - ); | 102 | + $this->oPage->setBreadcrumbDetails(_('Manage complex conditional')); |
| 107 | $aTemplateData = array( | 103 | $aTemplateData = array( |
| 108 | "context" => &$this, | 104 | "context" => &$this, |
| 109 | "fieldset_id" => $fieldset_id, | 105 | "fieldset_id" => $fieldset_id, |
plugins/ktcore/admin/savedSearch.php
| @@ -10,7 +10,10 @@ class KTSavedSearchDispatcher extends KTStandardDispatcher { | @@ -10,7 +10,10 @@ class KTSavedSearchDispatcher extends KTStandardDispatcher { | ||
| 10 | var $bAutomaticTransaction = true; | 10 | var $bAutomaticTransaction = true; |
| 11 | 11 | ||
| 12 | function check() { | 12 | function check() { |
| 13 | - $this->oPage->setTitle(_('Manage Saved Searches')); | 13 | + $this->aBreadcrumbs[] = array( |
| 14 | + 'url' => $_SERVER['PHP_SELF'], | ||
| 15 | + 'name' => _('Saved Searches'), | ||
| 16 | + ); | ||
| 14 | return true; | 17 | return true; |
| 15 | } | 18 | } |
| 16 | 19 | ||
| @@ -34,10 +37,26 @@ class KTSavedSearchDispatcher extends KTStandardDispatcher { | @@ -34,10 +37,26 @@ class KTSavedSearchDispatcher extends KTStandardDispatcher { | ||
| 34 | "aCriteria" => $aCriteria, | 37 | "aCriteria" => $aCriteria, |
| 35 | "searchButton" => _("Save"), | 38 | "searchButton" => _("Save"), |
| 36 | 'context' => $this, | 39 | 'context' => $this, |
| 37 | - "sNameTitle" => _('New Stored Search'), | 40 | + "sNameTitle" => _('New Saved Search'), |
| 38 | ); | 41 | ); |
| 39 | return $oTemplate->render($aTemplateData); | 42 | return $oTemplate->render($aTemplateData); |
| 40 | } | 43 | } |
| 44 | + | ||
| 45 | + function do_delete() { | ||
| 46 | + $id = KTUtil::arrayGet($_REQUEST, 'fSavedSearchId'); | ||
| 47 | + $oSearch = KTSavedSearch::get($id); | ||
| 48 | + | ||
| 49 | + if (PEAR::isError($oSearch) || ($oSearch == false)) { | ||
| 50 | + $this->errorRedirectToMain(_('No Such search')); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + $res = $oSearch->delete(); | ||
| 54 | + if (PEAR::isError($res) || ($res == false)) { | ||
| 55 | + return $this->errorRedirectToMain(_('Failed to delete search')); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + $this->successRedirectToMain(_('Search Deleted')); | ||
| 59 | + } | ||
| 41 | 60 | ||
| 42 | function do_view() { | 61 | function do_view() { |
| 43 | 62 |
plugins/ktcore/admin/userManagement.php
| @@ -59,17 +59,19 @@ class KTUserAdminDispatcher extends KTAdminDispatcher { | @@ -59,17 +59,19 @@ class KTUserAdminDispatcher extends KTAdminDispatcher { | ||
| 59 | if ($add_user !== false) { $add_user = true; } | 59 | if ($add_user !== false) { $add_user = true; } |
| 60 | $edit_user = KTUtil::arrayGet($_REQUEST, 'edit_user', false); | 60 | $edit_user = KTUtil::arrayGet($_REQUEST, 'edit_user', false); |
| 61 | 61 | ||
| 62 | + $aOptions = array('autocomplete' => false); | ||
| 63 | + | ||
| 62 | 64 | ||
| 63 | $add_fields = array(); | 65 | $add_fields = array(); |
| 64 | - $add_fields[] = new KTStringWidget(_('Username'),_('The username the user will enter to gain access to the KnowledgeTree. e.g. <strong>jsmith</strong>'), 'username', null, $this->oPage, true); | ||
| 65 | - $add_fields[] = new KTStringWidget(_('Name'),_('The full name of the user. This is shown in reports and listings. e.g. <strong>John Smith</strong>'), 'name', null, $this->oPage, true); | ||
| 66 | - $add_fields[] = new KTStringWidget(_('Email Address'), _('The email address of the user. Notifications and alerts are mailed to this address if <strong>email notifications</strong> is set below. e.g. <strong>jsmith@acme.com</strong>'), 'email_address', null, $this->oPage, false); | ||
| 67 | - $add_fields[] = new KTCheckboxWidget(_('Email Notifications'), _("If this is specified then the user will have notifications sent to the email address entered above. If it isn't set, then the user will only see notifications on the <strong>Dashboard</strong>"), 'email_notifications', true, $this->oPage, false); | ||
| 68 | - $add_fields[] = new KTPasswordWidget(_('Password'), _('Specify an initial password for the user.'), 'password', null, $this->oPage, true); | ||
| 69 | - $add_fields[] = new KTPasswordWidget(_('Confirm Password'), _('Confirm the password specified above.'), 'confirm_password', null, $this->oPage, true); | 66 | + $add_fields[] = new KTStringWidget(_('Username'),_('The username the user will enter to gain access to the KnowledgeTree. e.g. <strong>jsmith</strong>'), 'username', null, $this->oPage, true, null, null, $aOptions); |
| 67 | + $add_fields[] = new KTStringWidget(_('Name'),_('The full name of the user. This is shown in reports and listings. e.g. <strong>John Smith</strong>'), 'name', null, $this->oPage, true, null, null, $aOptions); | ||
| 68 | + $add_fields[] = new KTStringWidget(_('Email Address'), _('The email address of the user. Notifications and alerts are mailed to this address if <strong>email notifications</strong> is set below. e.g. <strong>jsmith@acme.com</strong>'), 'email_address', null, $this->oPage, false, null, null, $aOptions); | ||
| 69 | + $add_fields[] = new KTCheckboxWidget(_('Email Notifications'), _("If this is specified then the user will have notifications sent to the email address entered above. If it isn't set, then the user will only see notifications on the <strong>Dashboard</strong>"), 'email_notifications', true, $this->oPage, false, null, null, $aOptions); | ||
| 70 | + $add_fields[] = new KTPasswordWidget(_('Password'), _('Specify an initial password for the user.'), 'password', null, $this->oPage, true, null, null, $aOptions); | ||
| 71 | + $add_fields[] = new KTPasswordWidget(_('Confirm Password'), _('Confirm the password specified above.'), 'confirm_password', null, $this->oPage, true, null, null, $aOptions); | ||
| 70 | // nice, easy bits. | 72 | // nice, easy bits. |
| 71 | - $add_fields[] = new KTStringWidget(_('Mobile Number'), _("The mobile phone number of the user. If the system is configured to send notifications to cellphones, then this number will be SMS'd with notifications. e.g. <strong>999 9999 999</strong>"), 'mobile_number', null, $this->oPage, false); | ||
| 72 | - $add_fields[] = new KTStringWidget(_('Maximum Sessions'), _('As a safety precaution, it is useful to limit the number of times a given account can log in, before logging out. This prevents a single account being used by many different people.'), 'max_sessions', '3', $this->oPage, true); | 73 | + $add_fields[] = new KTStringWidget(_('Mobile Number'), _("The mobile phone number of the user. If the system is configured to send notifications to cellphones, then this number will be SMS'd with notifications. e.g. <strong>999 9999 999</strong>"), 'mobile_number', null, $this->oPage, false, null, null, $aOptions); |
| 74 | + $add_fields[] = new KTStringWidget(_('Maximum Sessions'), _('As a safety precaution, it is useful to limit the number of times a given account can log in, before logging out. This prevents a single account being used by many different people.'), 'max_sessions', '3', $this->oPage, true, null, null, $aOptions); | ||
| 73 | 75 | ||
| 74 | $aAuthenticationSources =& KTAuthenticationSource::getList(); | 76 | $aAuthenticationSources =& KTAuthenticationSource::getList(); |
| 75 | 77 |
plugins/ktcore/authentication/authenticationadminpage.inc.php
| @@ -4,13 +4,15 @@ require_once(KT_LIB_DIR . '/dispatcher.inc.php'); | @@ -4,13 +4,15 @@ require_once(KT_LIB_DIR . '/dispatcher.inc.php'); | ||
| 4 | require_once(KT_LIB_DIR . '/authentication/authenticationproviderregistry.inc.php'); | 4 | require_once(KT_LIB_DIR . '/authentication/authenticationproviderregistry.inc.php'); |
| 5 | require_once(KT_LIB_DIR . '/authentication/authenticationsource.inc.php'); | 5 | require_once(KT_LIB_DIR . '/authentication/authenticationsource.inc.php'); |
| 6 | 6 | ||
| 7 | +require_once(KT_LIB_DIR . '/widgets/fieldWidgets.php'); | ||
| 8 | + | ||
| 7 | class KTAuthenticationAdminPage extends KTAdminDispatcher { | 9 | class KTAuthenticationAdminPage extends KTAdminDispatcher { |
| 8 | function do_main() { | 10 | function do_main() { |
| 9 | $this->aBreadcrumbs[] = array('name' => _('Authentication'), 'url' => $_SERVER['PHP_SELF']); | 11 | $this->aBreadcrumbs[] = array('name' => _('Authentication'), 'url' => $_SERVER['PHP_SELF']); |
| 10 | $oTemplate =& $this->oValidator->validateTemplate('ktcore/authentication/manage'); | 12 | $oTemplate =& $this->oValidator->validateTemplate('ktcore/authentication/manage'); |
| 11 | $fields = array(); | 13 | $fields = array(); |
| 12 | 14 | ||
| 13 | - $fields[] = new KTStringWidget(_('Name'), 'FIXME', 'name', "", $this->oPage, true); | 15 | + $fields[] = new KTStringWidget(_('Name'), _('A short name which helps identify this source of authentication data.'), 'name', "", $this->oPage, true); |
| 14 | 16 | ||
| 15 | $aVocab = array(); | 17 | $aVocab = array(); |
| 16 | $oRegistry =& KTAuthenticationProviderRegistry::getSingleton(); | 18 | $oRegistry =& KTAuthenticationProviderRegistry::getSingleton(); |
| @@ -19,7 +21,7 @@ class KTAuthenticationAdminPage extends KTAdminDispatcher { | @@ -19,7 +21,7 @@ class KTAuthenticationAdminPage extends KTAdminDispatcher { | ||
| 19 | $aVocab[$aProvider[2]] = $aProvider[0]; | 21 | $aVocab[$aProvider[2]] = $aProvider[0]; |
| 20 | } | 22 | } |
| 21 | $fieldOptions = array("vocab" => $aVocab); | 23 | $fieldOptions = array("vocab" => $aVocab); |
| 22 | - $fields[] = new KTLookupWidget(_('Authentication provider'), 'FIXME', 'authentication_provider', null, $this->oPage, true, null, $fieldErrors, $fieldOptions); | 24 | + $fields[] = new KTLookupWidget(_('Authentication provider'), _('The type of source (e.g. <strong>LDAP</strong>)'), 'authentication_provider', null, $this->oPage, true, null, $fieldErrors, $fieldOptions); |
| 23 | 25 | ||
| 24 | $aSources = KTAuthenticationSource::getList(); | 26 | $aSources = KTAuthenticationSource::getList(); |
| 25 | 27 |
preferences.php
| @@ -27,12 +27,13 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -27,12 +27,13 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 27 | 27 | ||
| 28 | $oUser =& $this->oUser; | 28 | $oUser =& $this->oUser; |
| 29 | 29 | ||
| 30 | + $aOptions = array('autocomplete' => false); | ||
| 30 | 31 | ||
| 31 | $edit_fields = array(); | 32 | $edit_fields = array(); |
| 32 | - $edit_fields[] = new KTStringWidget(_('Name'),_('Your full name. This is shown in reports and listings. e.g. <strong>John Smith</strong>'), 'name', $oUser->getName(), $this->oPage, true); | ||
| 33 | - $edit_fields[] = new KTStringWidget(_('Email Address'),_('Your email address. Notifications and alerts are mailed to this address if <strong>email notifications</strong> is set below. e.g. <strong>jsmith@acme.com</strong>'), 'email_address', $oUser->getEmail(), $this->oPage, false); | ||
| 34 | - $edit_fields[] = new KTCheckboxWidget(_('Email Notifications'),_('If this is specified then the you will receive certain notifications. If it is not set, then you will only see notifications on the <strong>Dashboard</strong>'), 'email_notifications', $oUser->getEmailNotification(), $this->oPage, false); | ||
| 35 | - $edit_fields[] = new KTStringWidget(_('Mobile Number'), _('Your mobile phone number. If the system is configured to send notifications to cellphones, then this number will be sent an SMS with notifications. e.g. <strong>+27 99 999 9999</strong>'), 'mobile_number', $oUser->getMobile(), $this->oPage, false); | 33 | + $edit_fields[] = new KTStringWidget(_('Name'),_('Your full name. This is shown in reports and listings. e.g. <strong>John Smith</strong>'), 'name', $oUser->getName(), $this->oPage, true, null, null, $aOptions); |
| 34 | + $edit_fields[] = new KTStringWidget(_('Email Address'),_('Your email address. Notifications and alerts are mailed to this address if <strong>email notifications</strong> is set below. e.g. <strong>jsmith@acme.com</strong>'), 'email_address', $oUser->getEmail(), $this->oPage, false, null, null, $aOptions); | ||
| 35 | + $edit_fields[] = new KTCheckboxWidget(_('Email Notifications'),_('If this is specified then the you will receive certain notifications. If it is not set, then you will only see notifications on the <strong>Dashboard</strong>'), 'email_notifications', $oUser->getEmailNotification(), $this->oPage, false, null, null, $aOptions); | ||
| 36 | + $edit_fields[] = new KTStringWidget(_('Mobile Number'), _('Your mobile phone number. If the system is configured to send notifications to cellphones, then this number will be sent an SMS with notifications. e.g. <strong>+27 99 999 9999</strong>'), 'mobile_number', $oUser->getMobile(), $this->oPage, false, null, null, $aOptions); | ||
| 36 | 37 | ||
| 37 | $oTemplating = new KTTemplating; | 38 | $oTemplating = new KTTemplating; |
| 38 | $oTemplate = $oTemplating->loadTemplate("ktcore/principals/preferences"); | 39 | $oTemplate = $oTemplating->loadTemplate("ktcore/principals/preferences"); |
| @@ -50,9 +51,11 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -50,9 +51,11 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 50 | 51 | ||
| 51 | $oUser =& $this->oUser; | 52 | $oUser =& $this->oUser; |
| 52 | 53 | ||
| 54 | + $aOptions = array('autocomplete' => false); | ||
| 55 | + | ||
| 53 | $edit_fields = array(); | 56 | $edit_fields = array(); |
| 54 | - $edit_fields[] = new KTPasswordWidget(_('Password'), _('Specify your new password.'), 'password', null, $this->oPage, true); | ||
| 55 | - $edit_fields[] = new KTPasswordWidget(_('Confirm Password'), _('Confirm the password specified above.'), 'confirm_password', null, $this->oPage, true); | 57 | + $edit_fields[] = new KTPasswordWidget(_('Password'), _('Specify your new password.'), 'password', null, $this->oPage, true, null, null, $aOptions); |
| 58 | + $edit_fields[] = new KTPasswordWidget(_('Confirm Password'), _('Confirm the password specified above.'), 'confirm_password', null, $this->oPage, true, null, null, $aOptions); | ||
| 56 | 59 | ||
| 57 | 60 | ||
| 58 | $oTemplating = new KTTemplating; | 61 | $oTemplating = new KTTemplating; |
resources/css/kt-framing.css
| @@ -183,11 +183,25 @@ a.main_nav_item { | @@ -183,11 +183,25 @@ a.main_nav_item { | ||
| 183 | { | 183 | { |
| 184 | margin: 0 0 1.5em 0; | 184 | margin: 0 0 1.5em 0; |
| 185 | border: 0; | 185 | border: 0; |
| 186 | - padding: 0; | 186 | + padding: 0 0 0.5em; |
| 187 | border: 1px solid #888; | 187 | border: 1px solid #888; |
| 188 | background: #f3f3f3; | 188 | background: #f3f3f3; |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | +#portletbar .portlet a { | ||
| 192 | + text-decoration: none; | ||
| 193 | + border-bottom: 1px solid blue; | ||
| 194 | +} | ||
| 195 | + | ||
| 196 | +#portletbar .portlet a:visited { | ||
| 197 | + border-bottom: 1px solid purple; | ||
| 198 | +} | ||
| 199 | + | ||
| 200 | +#portletbar .portlet a:hover { | ||
| 201 | + color: red; | ||
| 202 | + border-bottom: 1px solid red; | ||
| 203 | +} | ||
| 204 | + | ||
| 191 | #portletbar .portlet h4 | 205 | #portletbar .portlet h4 |
| 192 | { | 206 | { |
| 193 | margin: 0; | 207 | margin: 0; |
| @@ -212,7 +226,7 @@ a.main_nav_item { | @@ -212,7 +226,7 @@ a.main_nav_item { | ||
| 212 | { | 226 | { |
| 213 | display: block; | 227 | display: block; |
| 214 | padding: 0; | 228 | padding: 0; |
| 215 | - margin: 0.15em 0.5em 0.15em 0; | 229 | + margin: 0.5em 0.5em 0.15em 0; |
| 216 | text-align: right; | 230 | text-align: right; |
| 217 | border: 0; | 231 | border: 0; |
| 218 | } | 232 | } |
| @@ -663,3 +677,9 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | @@ -663,3 +677,9 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | ||
| 663 | color: #999; | 677 | color: #999; |
| 664 | font-size: small; | 678 | font-size: small; |
| 665 | } | 679 | } |
| 680 | + | ||
| 681 | +hr { | ||
| 682 | + border-width: 1px 0 0 0; | ||
| 683 | + border-style: solid; | ||
| 684 | + border-color: #888; | ||
| 685 | +} | ||
| 666 | \ No newline at end of file | 686 | \ No newline at end of file |
search/booleanSearch.php
| @@ -40,6 +40,7 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | @@ -40,6 +40,7 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | ||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | function do_performSearch() { | 42 | function do_performSearch() { |
| 43 | + $title = _('Advanced Search Results'); | ||
| 43 | $datavars = KTUtil::arrayGet($_REQUEST, 'boolean_search'); | 44 | $datavars = KTUtil::arrayGet($_REQUEST, 'boolean_search'); |
| 44 | if (!is_array($datavars)) { | 45 | if (!is_array($datavars)) { |
| 45 | $datavars = unserialize($datavars); | 46 | $datavars = unserialize($datavars); |
| @@ -52,20 +53,25 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | @@ -52,20 +53,25 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | ||
| 52 | if (!empty($iSavedSearchId)) { | 53 | if (!empty($iSavedSearchId)) { |
| 53 | $oSearch = KTSavedSearch::get($iSavedSearchId); | 54 | $oSearch = KTSavedSearch::get($iSavedSearchId); |
| 54 | $datavars = $oSearch->getSearch(); | 55 | $datavars = $oSearch->getSearch(); |
| 56 | + $title = _('Saved Search: ') . $oSearch->getName(); | ||
| 55 | } | 57 | } |
| 56 | 58 | ||
| 57 | if (empty($datavars)) { | 59 | if (empty($datavars)) { |
| 58 | $this->errorRedirectToMain(_('You need to have at least 1 condition.')); | 60 | $this->errorRedirectToMain(_('You need to have at least 1 condition.')); |
| 59 | } | 61 | } |
| 60 | - | ||
| 61 | - $res = $this->handleCriteriaSet($datavars, KTUtil::arrayGet($_REQUEST, 'fStartIndex', 1)); | 62 | + |
| 63 | + $res = $this->handleCriteriaSet($datavars, KTUtil::arrayGet($_REQUEST, 'fStartIndex', 1), $title); | ||
| 62 | 64 | ||
| 63 | return $res; | 65 | return $res; |
| 64 | } | 66 | } |
| 65 | 67 | ||
| 66 | - function handleCriteriaSet($aCriteriaSet, $iStartIndex) { | 68 | + function handleCriteriaSet($aCriteriaSet, $iStartIndex, $sTitle=null) { |
| 67 | $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _("Boolean search")); | 69 | $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _("Boolean search")); |
| 68 | - $this->oPage->setBreadcrumbDetails(_('searching')); | 70 | + if ($sTitle == null) { |
| 71 | + $this->oPage->setBreadcrumbDetails(_('searching')); | ||
| 72 | + } else { | ||
| 73 | + $this->oPage->setBreadcrumbDetails($sTitle); | ||
| 74 | + } | ||
| 69 | $collection = new DocumentCollection; | 75 | $collection = new DocumentCollection; |
| 70 | $this->browseType = "Folder"; | 76 | $this->browseType = "Folder"; |
| 71 | 77 | ||
| @@ -106,6 +112,7 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | @@ -106,6 +112,7 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | ||
| 106 | $aTemplateData = array( | 112 | $aTemplateData = array( |
| 107 | "context" => $this, | 113 | "context" => $this, |
| 108 | "collection" => $collection, | 114 | "collection" => $collection, |
| 115 | + "custom_title" => $sTitle, | ||
| 109 | ); | 116 | ); |
| 110 | return $oTemplate->render($aTemplateData); | 117 | return $oTemplate->render($aTemplateData); |
| 111 | } | 118 | } |
templates/kt3/browse.smarty
| @@ -4,12 +4,20 @@ | @@ -4,12 +4,20 @@ | ||
| 4 | 4 | ||
| 5 | {$context->oPage->requireJSResource('resources/js/toggleselect.js')} | 5 | {$context->oPage->requireJSResource('resources/js/toggleselect.js')} |
| 6 | 6 | ||
| 7 | +{if ($custom_title != null)} | ||
| 8 | +<h2>{$custom_title}</h2> | ||
| 9 | +{/if} | ||
| 10 | + | ||
| 7 | <form action="{$smarty.server.PHP_SELF}" METHOD="POST"> | 11 | <form action="{$smarty.server.PHP_SELF}" METHOD="POST"> |
| 8 | <input type="hidden" name="action" value="startDelete" /> | 12 | <input type="hidden" name="action" value="startDelete" /> |
| 13 | +{if ($isEditable)} | ||
| 9 | <input type="hidden" name="fFolderid" value="{$context->oFolder->getId()}" /> | 14 | <input type="hidden" name="fFolderid" value="{$context->oFolder->getId()}" /> |
| 15 | +{/if} | ||
| 10 | {$collection->render()} | 16 | {$collection->render()} |
| 17 | +{if ($isEditable)} | ||
| 11 | <div class="form_actions"> | 18 | <div class="form_actions"> |
| 12 | <input type="submit" name="submit[delete]" value="{i18n}Delete{/i18n}" /> | 19 | <input type="submit" name="submit[delete]" value="{i18n}Delete{/i18n}" /> |
| 13 | </div> | 20 | </div> |
| 21 | +{/if} | ||
| 14 | </form> | 22 | </form> |
| 15 | {* we break encapsulation pretty badly here. *} | 23 | {* we break encapsulation pretty badly here. *} |
| 16 | \ No newline at end of file | 24 | \ No newline at end of file |
templates/kt3/fields/base.smarty
| @@ -11,5 +11,5 @@ | @@ -11,5 +11,5 @@ | ||
| 11 | <p class="errorMessage"></p> | 11 | <p class="errorMessage"></p> |
| 12 | {/if} | 12 | {/if} |
| 13 | 13 | ||
| 14 | - <input type="text" name="{$name}" {if $has_id}id="{$id}"{/if} {if $has_value}value="{$value}"{/if}/><input type="hidden" name="kt_core_fieldsets_expect[{$name}]" value ="1" /> | 14 | + <input type="text" name="{$name}" {if $has_id}id="{$id}"{/if} {if $has_value}value="{$value}"{/if}{if ($options.autocomplete === false)}autocomplete="off"{/if}/><input type="hidden" name="kt_core_fieldsets_expect[{$name}]" value ="1" /> |
| 15 | </div> | 15 | </div> |
templates/kt3/portlets/search_portlet.smarty
| 1 | <form action="{$rootUrl}/search/simpleSearch.php" method="GET"> | 1 | <form action="{$rootUrl}/search/simpleSearch.php" method="GET"> |
| 2 | <input type="text" name="fSearchableText" id="portlet-search-text" size="15" /><input type="submit" value="{i18n}search{/i18n}" class="searchbutton" /> | 2 | <input type="text" name="fSearchableText" id="portlet-search-text" size="15" /><input type="submit" value="{i18n}search{/i18n}" class="searchbutton" /> |
| 3 | </form> | 3 | </form> |
| 4 | + | ||
| 5 | +{if (!empty($saved_searches))} | ||
| 6 | +<h4>Saved Searches</h4> | ||
| 4 | <ul class="actionlist"> | 7 | <ul class="actionlist"> |
| 5 | -<li><a href="{$rootUrl}/search/booleanSearch.php">{i18n}Boolean Search{/i18n}</a></li> | 8 | +{foreach item=oSearch from=$saved_searches} |
| 9 | +<li><a href="{"booleanSearch"|generateControllerUrl}&qs[action]=performSearch&qs[fSavedSearchId]={$oSearch->getId()}">{$oSearch->getName()}</a></li> | ||
| 10 | +{/foreach} | ||
| 11 | +</ul> | ||
| 12 | +<hr /> | ||
| 13 | +{/if} | ||
| 14 | +<ul class="actionlist"> | ||
| 15 | +<li><a href="{$rootUrl}/search/booleanSearch.php">{i18n}Advanced Search{/i18n}</a></li> | ||
| 6 | </ul> | 16 | </ul> |
templates/ktcore/authentication/manage.smarty
| 1 | <h2>{i18n}Authentication Sources{/i18n}</h2> | 1 | <h2>{i18n}Authentication Sources{/i18n}</h2> |
| 2 | 2 | ||
| 3 | +<p class="descriptiveText">{i18n}By default, KnowledgeTree controls its | ||
| 4 | +own users and groups and stores all information about them inside the database. | ||
| 5 | +In many situations, an organisation will already have a list of users and groups, | ||
| 6 | +and needs to use that existing information to allow access to the DMS. | ||
| 7 | +These <strong>Authentication Sources</strong> allow the system administrator to | ||
| 8 | +specify additional sources of authentication data.{/i18n}</p> | ||
| 9 | + | ||
| 3 | {if $providers} | 10 | {if $providers} |
| 4 | <form method="POST"> | 11 | <form method="POST"> |
| 5 | <fieldset><legend>{i18n}Add an authentication source{/i18n}</legend> | 12 | <fieldset><legend>{i18n}Add an authentication source{/i18n}</legend> |
| @@ -14,6 +21,10 @@ | @@ -14,6 +21,10 @@ | ||
| 14 | </div> | 21 | </div> |
| 15 | </fieldset> | 22 | </fieldset> |
| 16 | </form> | 23 | </form> |
| 24 | +{else} | ||
| 25 | +<div class="ktInfo"><p>{i18n}Only the standard database authentication is currently available. | ||
| 26 | +If you need to use a different authentication type (e.g. LDAP) you will need to | ||
| 27 | +ensure that the Plugin is enabled.{/i18n}<p></div> | ||
| 17 | {/if} | 28 | {/if} |
| 18 | 29 | ||
| 19 | {if $sources} | 30 | {if $sources} |
| @@ -24,5 +35,7 @@ | @@ -24,5 +35,7 @@ | ||
| 24 | <li><a href="?action=viewsource&source_id={$oSource->getId()}">{$oSource->getName()}</a></li> | 35 | <li><a href="?action=viewsource&source_id={$oSource->getId()}">{$oSource->getName()}</a></li> |
| 25 | {/foreach} | 36 | {/foreach} |
| 26 | </ul> | 37 | </ul> |
| 38 | +{else} | ||
| 39 | +<div class="ktInfo"><p>{i18n}No additional authentication sources have been defined.{/i18n}</p></div> | ||
| 27 | {/if} | 40 | {/if} |
| 28 | 41 |
templates/ktcore/documenttypes/edit.smarty
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | </fieldset> | 39 | </fieldset> |
| 40 | </form> | 40 | </form> |
| 41 | {else} | 41 | {else} |
| 42 | -<p>{i18n}No fieldsets are currently associated with this type.{/i18n}</p> | 42 | +<div class="ktInfo"><p>{i18n}No fieldsets are currently associated with this type.{/i18n}</p></div> |
| 43 | { /if } | 43 | { /if } |
| 44 | 44 | ||
| 45 | { if $aAvailableFieldsets } | 45 | { if $aAvailableFieldsets } |
| @@ -59,5 +59,6 @@ | @@ -59,5 +59,6 @@ | ||
| 59 | </form> | 59 | </form> |
| 60 | 60 | ||
| 61 | {else} | 61 | {else} |
| 62 | -<p>{i18n}There are no fieldsets available for adding.{/i18n} <strong>FIXME link to fieldset creation from here.</strong></p> | 62 | +<div class="ktInfo"><p>{i18n}No fieldsets are available to be added. To add a fieldset, please go to |
| 63 | +DMS Administration{/i18n} » {i18n}Document Metadata and Workflow Configuration{/i18n} » {i18n}Document Field Management{/i18n} </p></div> | ||
| 63 | { /if } | 64 | { /if } |
templates/ktcore/metadata/conditional/editcomplex.smarty
| @@ -103,14 +103,17 @@ false;">{i18n}Change Assignments for this field.{/i18n}</a> | @@ -103,14 +103,17 @@ false;">{i18n}Change Assignments for this field.{/i18n}</a> | ||
| 103 | </tbody> | 103 | </tbody> |
| 104 | </table> | 104 | </table> |
| 105 | 105 | ||
| 106 | - | 106 | +<!-- |
| 107 | <table id="brad-log"> | 107 | <table id="brad-log"> |
| 108 | +<thead> | ||
| 108 | <tr> | 109 | <tr> |
| 109 | <th>Severity</th> | 110 | <th>Severity</th> |
| 110 | <th>Time</th> | 111 | <th>Time</th> |
| 111 | <th>Entry</th> | 112 | <th>Entry</th> |
| 112 | </tr> | 113 | </tr> |
| 114 | +</thead> | ||
| 113 | <tbody > | 115 | <tbody > |
| 114 | 116 | ||
| 115 | </tbody> | 117 | </tbody> |
| 116 | </table> | 118 | </table> |
| 119 | +--> | ||
| 117 | \ No newline at end of file | 120 | \ No newline at end of file |
templates/ktcore/search/administration/savedsearches.smarty
| 1 | -<h1>{i18n}Saved searches{/i18n}</h1> | 1 | +<h2>{i18n}Saved searches{/i18n}</h2> |
| 2 | + | ||
| 3 | +<p class="descriptiveText">{i18n}Saved searches are searches which are particular to your location | ||
| 4 | +For example, you could define a search which returns all documents in a particular workflow state, | ||
| 5 | +or all documents which are considered "common" within your organisation (leave policy, | ||
| 6 | +newsletters, etc.) based on a category or fieldset value.{/i18n}</p> | ||
| 2 | 7 | ||
| 3 | -<h2>{i18n}Create a new saved search{/i18n}</h2> | ||
| 4 | <form action="{$smarty.server.PHP_SELF}" method="POST"> | 8 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| 9 | +<fieldset> | ||
| 10 | +<legend>{i18n}Create a new saved search{/i18n}</legend> | ||
| 11 | +<div class="form_actions"> | ||
| 5 | <input type="hidden" name="action" value="new" /> | 12 | <input type="hidden" name="action" value="new" /> |
| 6 | <input type="submit" name="submit" value="{i18n}New{/i18n}" /> | 13 | <input type="submit" name="submit" value="{i18n}New{/i18n}" /> |
| 14 | +</div> | ||
| 15 | +</fieldset> | ||
| 7 | </form> | 16 | </form> |
| 8 | 17 | ||
| 9 | {if $saved_searches} | 18 | {if $saved_searches} |
| 10 | -<h2>{i18n}Edit existing saved searches{/i18n}</h2> | ||
| 11 | -<form action="{$smarty.server.PHP_SELF}" method="POST"> | ||
| 12 | -<input type="hidden" name="action" value="edit" /> | ||
| 13 | -{entity_radios entities=$saved_searches name="fSavedSearchId" assign=aRadios} | ||
| 14 | -{foreach from=$aRadios item=sRadio} | ||
| 15 | -{$sRadio}<br /> | ||
| 16 | -{/foreach} | ||
| 17 | -<input type="submit" name="submit" value="{i18n}Edit{/i18n}" /> | ||
| 18 | -</form> | 19 | +<h2>{i18n}Existing Searches{/i18n}</h2> |
| 19 | 20 | ||
| 20 | -<h2>{i18n}Run a saved search{/i18n}</h2> | ||
| 21 | -<form action="{"booleanSearch"|generateControllerUrl}" method="GET"> | ||
| 22 | -<input type="hidden" name="action" value="booleanSearch" /> | ||
| 23 | -<input type="hidden" name="qs[action]" value="performSearch" /> | ||
| 24 | -{entity_radios entities=$saved_searches name="qs[fSavedSearchId]" assign=aRadios} | ||
| 25 | -{foreach from=$aRadios item=sRadio} | ||
| 26 | -{$sRadio}<br /> | 21 | +<table class="listing"> |
| 22 | +<thead> | ||
| 23 | + <tr> | ||
| 24 | + <th>{i18n}Search Name{/i18n}</th> | ||
| 25 | + <th>{i18n}Edit{/i18n}</th> | ||
| 26 | + <th>{i18n}Delete{/i18n}</th> | ||
| 27 | + <th>{i18n}View Results{/i18n}</th> | ||
| 28 | + </tr> | ||
| 29 | +</thead> | ||
| 30 | +<tbody> | ||
| 31 | +{foreach item=oSearch from=$saved_searches} | ||
| 32 | + <tr> | ||
| 33 | + <td>{$oSearch->getName()}</td> | ||
| 34 | + <td><a href="{$smarty.server.PHP_SELF}?action=edit&fSavedSearchId={$oSearch->getId()}" class="ktAction ktEdit">Edit</a></td> | ||
| 35 | + <td><a href="{$smarty.server.PHP_SELF}?action=delete&fSavedSearchId={$oSearch->getId()}" class="ktAction ktDelete">Edit</a></td> | ||
| 36 | + <td><a href="{"booleanSearch"|generateControllerUrl}&qs[action]=performSearch&qs[fSavedSearchId]={$oSearch->getId()}">Run Search</a></td> | ||
| 37 | + </tr> | ||
| 27 | {/foreach} | 38 | {/foreach} |
| 28 | -<input type="submit" name="submit" value="{i18n}Run{/i18n}" /> | ||
| 29 | -</form> | 39 | +</tbody> |
| 40 | +</table> | ||
| 41 | +{else} | ||
| 42 | +<div class="ktInfo"><p>{i18n}No Saved Searches have been defined.{/i18n}</p></div> | ||
| 30 | {/if} | 43 | {/if} |
| 31 | - |