Commit c0ad442fbc58d079c05646c7cef00f05079ccd39
1 parent
5e6ae707
correct path_info irregularities.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4774 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
24 changed files
with
86 additions
and
40 deletions
admin.php
| @@ -13,7 +13,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | @@ -13,7 +13,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | ||
| 13 | 13 | ||
| 14 | function AdminSplashDispatcher() { | 14 | function AdminSplashDispatcher() { |
| 15 | $this->aBreadcrumbs = array( | 15 | $this->aBreadcrumbs = array( |
| 16 | - array('url' => KTUtil::getRequestScriptName($_SERVER), 'name' => 'Administration'), | 16 | + array('url' => $_SERVER['PHP_SELF'], 'name' => 'Administration'), |
| 17 | ); | 17 | ); |
| 18 | 18 | ||
| 19 | parent::KTAdminDispatcher(); | 19 | parent::KTAdminDispatcher(); |
| @@ -37,7 +37,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | @@ -37,7 +37,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | ||
| 37 | $aTemplateData = array( | 37 | $aTemplateData = array( |
| 38 | "context" => $this, | 38 | "context" => $this, |
| 39 | "categories" => $categories, | 39 | "categories" => $categories, |
| 40 | - "baseurl" => KTUtil::getRequestScriptName($_SERVER), | 40 | + "baseurl" => $_SERVER['PHP_SELF'], |
| 41 | ); | 41 | ); |
| 42 | return $oTemplate->render($aTemplateData); | 42 | return $oTemplate->render($aTemplateData); |
| 43 | } | 43 | } |
| @@ -51,7 +51,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | @@ -51,7 +51,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | ||
| 51 | $aCategory = $oRegistry->getCategory($category); | 51 | $aCategory = $oRegistry->getCategory($category); |
| 52 | 52 | ||
| 53 | $aItems = $oRegistry->getItemsForCategory($category); | 53 | $aItems = $oRegistry->getItemsForCategory($category); |
| 54 | - $this->aBreadcrumbs[] = array("name" => $aCategory["title"]); | 54 | + $this->aBreadcrumbs[] = array("name" => $aCategory["title"], "url" => KTUtil::ktLink('admin.php',$category)); |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | $this->oPage->title = _("DMS Administration") . ": " . $aCategory["title"]; | 57 | $this->oPage->title = _("DMS Administration") . ": " . $aCategory["title"]; |
| @@ -61,13 +61,14 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | @@ -61,13 +61,14 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | ||
| 61 | "context" => $this, | 61 | "context" => $this, |
| 62 | "category" => $aCategory, | 62 | "category" => $aCategory, |
| 63 | "items" => $aItems, | 63 | "items" => $aItems, |
| 64 | - "baseurl" => KTUtil::getRequestScriptName($_SERVER), | 64 | + "baseurl" => $_SERVER['PHP_SELF'], |
| 65 | ); | 65 | ); |
| 66 | return $oTemplate->render($aTemplateData); | 66 | return $oTemplate->render($aTemplateData); |
| 67 | } | 67 | } |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | $sub_url = KTUtil::arrayGet($_SERVER, 'PATH_INFO'); | 70 | $sub_url = KTUtil::arrayGet($_SERVER, 'PATH_INFO'); |
| 71 | + | ||
| 71 | $sub_url = trim($sub_url); | 72 | $sub_url = trim($sub_url); |
| 72 | $sub_url= trim($sub_url, "/"); | 73 | $sub_url= trim($sub_url, "/"); |
| 73 | 74 | ||
| @@ -84,8 +85,8 @@ if (empty($sub_url)) { | @@ -84,8 +85,8 @@ if (empty($sub_url)) { | ||
| 84 | $aCategory = $oRegistry->getCategory($aParts[0]); | 85 | $aCategory = $oRegistry->getCategory($aParts[0]); |
| 85 | 86 | ||
| 86 | $oDispatcher->aBreadcrumbs = array(); | 87 | $oDispatcher->aBreadcrumbs = array(); |
| 87 | - $oDispatcher->aBreadcrumbs[] = array('url' => KTUtil::getRequestScriptName($_SERVER), 'name' => 'Administration'); | ||
| 88 | - $oDispatcher->aBreadcrumbs[] = array("name" => $aCategory['title'], "url" => KTUtil::getRequestScriptName($_SERVER) . '/' . $aParts[0]); | 88 | + $oDispatcher->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => 'Administration'); |
| 89 | + $oDispatcher->aBreadcrumbs[] = array("name" => $aCategory['title'], "url" => KTUtil::ktLink('admin.php',$aParts[0])); | ||
| 89 | } else { | 90 | } else { |
| 90 | // FIXME (minor) redirect to no-suburl? | 91 | // FIXME (minor) redirect to no-suburl? |
| 91 | $oDispatcher = new AdminSplashDispatcher(); | 92 | $oDispatcher = new AdminSplashDispatcher(); |
config/dmsDefaults.php
| @@ -371,7 +371,7 @@ if (array_key_exists('HTTPS', $_SERVER)) { | @@ -371,7 +371,7 @@ if (array_key_exists('HTTPS', $_SERVER)) { | ||
| 371 | } | 371 | } |
| 372 | $oKTConfig->setdefaultns("KnowledgeTree", "rootUrl", $KTInit->guessRootUrl()); | 372 | $oKTConfig->setdefaultns("KnowledgeTree", "rootUrl", $KTInit->guessRootUrl()); |
| 373 | $oKTConfig->setdefaultns("KnowledgeTree", "execSearchPath", $_SERVER['PATH']); | 373 | $oKTConfig->setdefaultns("KnowledgeTree", "execSearchPath", $_SERVER['PATH']); |
| 374 | -$oKTConfig->setdefaultns("KnowledgeTree", "pathInfoSupport", true); | 374 | +$oKTConfig->setdefaultns("KnowledgeTree", "pathInfoSupport", false); |
| 375 | $oKTConfig->setdefaultns("storage", "manager", 'KTOnDiskPathStorageManager'); | 375 | $oKTConfig->setdefaultns("storage", "manager", 'KTOnDiskPathStorageManager'); |
| 376 | $oKTConfig->setdefaultns("config", "useDatabaseConfiguration", false); | 376 | $oKTConfig->setdefaultns("config", "useDatabaseConfiguration", false); |
| 377 | $oKTConfig->setdefaultns("tweaks", "browseToRoot", false); | 377 | $oKTConfig->setdefaultns("tweaks", "browseToRoot", false); |
docs/INSTALL.txt
| @@ -121,6 +121,11 @@ Installing this package is beyond the scope of this document - please | @@ -121,6 +121,11 @@ Installing this package is beyond the scope of this document - please | ||
| 121 | consult the KnowledgeTree Wiki at http://support.ktdms.com/confluence/ | 121 | consult the KnowledgeTree Wiki at http://support.ktdms.com/confluence/ |
| 122 | to see how others have approached this on your platform. | 122 | to see how others have approached this on your platform. |
| 123 | 123 | ||
| 124 | +NOTE: if you install the packages outside of the path normally searched | ||
| 125 | +by your operating system (e.g. in c:\antiword or /usr/local/bin) you will | ||
| 126 | +need to specify the _full_ path to the actual applications (e.g. | ||
| 127 | +/usr/local/bin/pdftotext). | ||
| 128 | + | ||
| 124 | Troubleshooting | 129 | Troubleshooting |
| 125 | --------------- | 130 | --------------- |
| 126 | 131 |
lib/templating/smartytemplate.inc.php
| @@ -77,6 +77,7 @@ class KTSmartyTemplate extends KTTemplate { | @@ -77,6 +77,7 @@ class KTSmartyTemplate extends KTTemplate { | ||
| 77 | $smarty->register_function('entity_radios', array('KTSmartyTemplate', 'entity_radios')); | 77 | $smarty->register_function('entity_radios', array('KTSmartyTemplate', 'entity_radios')); |
| 78 | $smarty->register_block('i18n', array('KTSmartyTemplate', 'i18n_block'), false); | 78 | $smarty->register_block('i18n', array('KTSmartyTemplate', 'i18n_block'), false); |
| 79 | $smarty->register_modifier('addQueryString', array('KTSmartyTemplate', 'addQueryString')); | 79 | $smarty->register_modifier('addQueryString', array('KTSmartyTemplate', 'addQueryString')); |
| 80 | + $smarty->register_function('ktLink', array('KTSmartyTemplate', 'ktLink')); | ||
| 80 | $smarty->register_modifier('addQS', array('KTSmartyTemplate', 'addQueryString')); | 81 | $smarty->register_modifier('addQS', array('KTSmartyTemplate', 'addQueryString')); |
| 81 | $smarty->register_modifier('addQueryStringSelf', array('KTSmartyTemplate', 'addQueryStringSelf')); | 82 | $smarty->register_modifier('addQueryStringSelf', array('KTSmartyTemplate', 'addQueryStringSelf')); |
| 82 | $smarty->register_modifier('addQSSelf', array('KTSmartyTemplate', 'addQueryStringSelf')); | 83 | $smarty->register_modifier('addQSSelf', array('KTSmartyTemplate', 'addQueryStringSelf')); |
| @@ -240,9 +241,29 @@ class KTSmartyTemplate extends KTTemplate { | @@ -240,9 +241,29 @@ class KTSmartyTemplate extends KTTemplate { | ||
| 240 | return KTUtil::addQueryString($url, $qs); | 241 | return KTUtil::addQueryString($url, $qs); |
| 241 | } | 242 | } |
| 242 | 243 | ||
| 244 | + | ||
| 245 | + /* | ||
| 246 | + * ktLink generates a fully prepared link for KT. | ||
| 247 | + * | ||
| 248 | + * It takes into account kt_path_info requirements, | ||
| 249 | + * rootUrl requirements, etc. | ||
| 250 | + * | ||
| 251 | + * To do this effectively, you need three things: | ||
| 252 | + * | ||
| 253 | + * @param base e.g. /admin.php | ||
| 254 | + * @param subpath e.g. /security/permissions/ | ||
| 255 | + * @param query e.g. fFolder=1&fMyVar=2 | ||
| 256 | + * | ||
| 257 | + */ | ||
| 258 | + function ktLink($params, &$smarty) { | ||
| 259 | + return KTUtil::ktLink($params['base'], $params['subpath'], $params['query']); | ||
| 260 | + } | ||
| 261 | + | ||
| 262 | + | ||
| 243 | function addQueryStringSelf($qs) { | 263 | function addQueryStringSelf($qs) { |
| 244 | return KTUtil::addQueryStringSelf($qs); | 264 | return KTUtil::addQueryStringSelf($qs); |
| 245 | } | 265 | } |
| 266 | + | ||
| 246 | } | 267 | } |
| 247 | 268 | ||
| 248 | ?> | 269 | ?> |
lib/util/ktutil.inc
| @@ -450,6 +450,27 @@ class KTUtil { | @@ -450,6 +450,27 @@ class KTUtil { | ||
| 450 | } | 450 | } |
| 451 | // }}} | 451 | // }}} |
| 452 | 452 | ||
| 453 | + // {{{ ktLink | ||
| 454 | + function ktLink($base, $subpath='', $qs='') { | ||
| 455 | + $KTConfig =& KTConfig::getSingleton(); | ||
| 456 | + $root = $KTConfig->get("KnowledgeTree/rootUrl"); | ||
| 457 | + $url = $root . '/' . $base; | ||
| 458 | + $query = ''; | ||
| 459 | + | ||
| 460 | + $hasPathInfo = $KTConfig->get("KnowledgeTree/pathInfoSupport"); | ||
| 461 | + if ($hasPathInfo) { | ||
| 462 | + $url .= $subpath; | ||
| 463 | + } else { | ||
| 464 | + $query = 'kt_path_info=' . $subpath; | ||
| 465 | + if (!empty($qs)) { | ||
| 466 | + $query .= '&'; | ||
| 467 | + } | ||
| 468 | + } | ||
| 469 | + $query .= $qs; | ||
| 470 | + return KTUtil::addQueryString($url, $query); | ||
| 471 | + } | ||
| 472 | + // }}} | ||
| 473 | + | ||
| 453 | // {{{ addQueryStringSelf | 474 | // {{{ addQueryStringSelf |
| 454 | function addQueryStringSelf($qs) { | 475 | function addQueryStringSelf($qs) { |
| 455 | return KTUtil::addQueryString($_SERVER['PHP_SELF'], $qs); | 476 | return KTUtil::addQueryString($_SERVER['PHP_SELF'], $qs); |
plugins/ktcore/admin/workflows.php
| @@ -36,7 +36,7 @@ class WorkflowNavigationPortlet extends KTPortlet { | @@ -36,7 +36,7 @@ class WorkflowNavigationPortlet extends KTPortlet { | ||
| 36 | if (is_null($this->oWorkflow)) { return _('No Workflow Selected.'); } | 36 | if (is_null($this->oWorkflow)) { return _('No Workflow Selected.'); } |
| 37 | 37 | ||
| 38 | $aAdminPages = array(); | 38 | $aAdminPages = array(); |
| 39 | - $aAdminPages[] = array('name' => _('Overview'), 'url' => $_SERVER['PHP_SELF'] . '?action=editWorkflow&fWorkflowId=' . $this->oWorkflow->getId()); | 39 | + $aAdminPages[] = array('name' => _('Overview'), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], '?action=editWorkflow&fWorkflowId=' . $this->oWorkflow->getId())); |
| 40 | $aAdminPages[] = array('name' => _('States'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageStates&fWorkflowId=' . $this->oWorkflow->getId()); | 40 | $aAdminPages[] = array('name' => _('States'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageStates&fWorkflowId=' . $this->oWorkflow->getId()); |
| 41 | $aAdminPages[] = array('name' => _('Transitions'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageTransitions&fWorkflowId=' . $this->oWorkflow->getId()); | 41 | $aAdminPages[] = array('name' => _('Transitions'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageTransitions&fWorkflowId=' . $this->oWorkflow->getId()); |
| 42 | $aAdminPages[] = array('name' => _('Actions'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageActions&fWorkflowId=' . $this->oWorkflow->getId()); | 42 | $aAdminPages[] = array('name' => _('Actions'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageActions&fWorkflowId=' . $this->oWorkflow->getId()); |
templates/kt3/admin_categories.smarty
| 1 | <dl class="panel_menu"> | 1 | <dl class="panel_menu"> |
| 2 | {foreach item=aCategory from=$categories} | 2 | {foreach item=aCategory from=$categories} |
| 3 | - <dt><a href="{$smarty.server.PHP_SELF}?action=viewCategory&fCategory={$aCategory.name}">{$aCategory.title}</a></dt> | 3 | + <dt>{capture assign="cat_id"}{$aCategory.name}{/capture}<a href="{$smarty.server.PHP_SELF|addQueryString:"action=viewCategory&fCategory=$cat_id"}">{$aCategory.title}</a></dt> |
| 4 | <dd class="descriptiveText">{$aCategory.description}</dd> | 4 | <dd class="descriptiveText">{$aCategory.description}</dd> |
| 5 | {/foreach} | 5 | {/foreach} |
| 6 | </dl> | 6 | </dl> |
| 7 | \ No newline at end of file | 7 | \ No newline at end of file |
templates/kt3/admin_items.smarty
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | {else} | 5 | {else} |
| 6 | <dl class="panel_menu"> | 6 | <dl class="panel_menu"> |
| 7 | {foreach item=aItem from=$items} | 7 | {foreach item=aItem from=$items} |
| 8 | - <dt><a href="{$baseurl}/{$aItem.fullname}">{$aItem.title}</a></dt> | 8 | + <dt><a href="{ktLink base="admin.php" subpath="`$aItem.fullname`"}">{$aItem.title}</a></dt> |
| 9 | <dd class="descriptiveText">{$aItem.description}</dd> | 9 | <dd class="descriptiveText">{$aItem.description}</dd> |
| 10 | {/foreach} | 10 | {/foreach} |
| 11 | </dl> | 11 | </dl> |
templates/ktcore/manage_permissions.smarty
| @@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
| 47 | </td> --> | 47 | </td> --> |
| 48 | <td> | 48 | <td> |
| 49 | <a | 49 | <a |
| 50 | -href="{$smarty.server.PHP_SELF}?action=deletePermission&id={$oPerm->getId()}" | 50 | +href="{addQS}action=deletePermission&id={$oPerm->getId()}{/addQS}" |
| 51 | class="ktAction ktDelete">{i18n}Delete Permission{/i18n}</a> | 51 | class="ktAction ktDelete">{i18n}Delete Permission{/i18n}</a> |
| 52 | </td> | 52 | </td> |
| 53 | { /if } | 53 | { /if } |
templates/ktcore/metadata/conditional/manageConditional.smarty
| 1 | -<h2>{i18n}Manage conditional fieldset{/i18n}<h2> | 1 | +<h2>{i18n}Manage conditional fieldset{/i18n}</h2> |
| 2 | 2 | ||
| 3 | {if $sIncomplete || !$oFieldset->getIsComplete()} | 3 | {if $sIncomplete || !$oFieldset->getIsComplete()} |
| 4 | <div class="ktError"> | 4 | <div class="ktError"> |
| @@ -27,9 +27,9 @@ to complete{/i18n}: {$sIncomplete|escape}</p> | @@ -27,9 +27,9 @@ to complete{/i18n}: {$sIncomplete|escape}</p> | ||
| 27 | <h2>{i18n}Conditional type{/i18n}</h2> | 27 | <h2>{i18n}Conditional type{/i18n}</h2> |
| 28 | 28 | ||
| 29 | {if $oFieldset->getIsComplex()} | 29 | {if $oFieldset->getIsComplex()} |
| 30 | -{i18n}Complex{/i18n}: <a | 30 | +<p>{i18n}Complex{/i18n}: <a |
| 31 | href="{$rootUrl}/plugins/ktcore/admin/manageConditionals.php?action=editComplexFieldset&fieldset_id={$oFieldset->getId()}">{i18n}Manage | 31 | href="{$rootUrl}/plugins/ktcore/admin/manageConditionals.php?action=editComplexFieldset&fieldset_id={$oFieldset->getId()}">{i18n}Manage |
| 32 | -complex conditional{/i18n}</a> | 32 | +complex conditional{/i18n}</a></p> |
| 33 | 33 | ||
| 34 | <form action="{$smarty.server.PHP_SELF}" method="POST"> | 34 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| 35 | <input type="hidden" name="action" value="changeToSimple" /> | 35 | <input type="hidden" name="action" value="changeToSimple" /> |
| @@ -39,8 +39,9 @@ complex conditional{/i18n}</a> | @@ -39,8 +39,9 @@ complex conditional{/i18n}</a> | ||
| 39 | 39 | ||
| 40 | {else} | 40 | {else} |
| 41 | 41 | ||
| 42 | -{i18n}Simple{/i18n}: <a | 42 | +<p>{i18n}Simple{/i18n}: <a |
| 43 | href="{$rootUrl}/plugins/ktcore/admin/manageConditionals.php?action=editFieldset&fieldset_id={$oFieldset->getId()}">{i18n}Manage simple conditional{/i18n}</a> | 43 | href="{$rootUrl}/plugins/ktcore/admin/manageConditionals.php?action=editFieldset&fieldset_id={$oFieldset->getId()}">{i18n}Manage simple conditional{/i18n}</a> |
| 44 | +</p> | ||
| 44 | 45 | ||
| 45 | <form action="{$smarty.server.PHP_SELF}" method="POST"> | 46 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| 46 | <input type="hidden" name="action" value="changeToComplex" /> | 47 | <input type="hidden" name="action" value="changeToComplex" /> |
templates/ktcore/principals/addgroup.smarty
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | {/foreach} | 13 | {/foreach} |
| 14 | <div class="form_actions"> | 14 | <div class="form_actions"> |
| 15 | <input type="submit" value="{i18n}create group{/i18n}" /> | 15 | <input type="submit" value="{i18n}create group{/i18n}" /> |
| 16 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 16 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 17 | </div> | 17 | </div> |
| 18 | </fieldset> | 18 | </fieldset> |
| 19 | </form> | 19 | </form> |
templates/ktcore/principals/adduser.smarty
| @@ -36,7 +36,7 @@ within KnowledgeTree below.{/i18n}</p> | @@ -36,7 +36,7 @@ within KnowledgeTree below.{/i18n}</p> | ||
| 36 | {/foreach} | 36 | {/foreach} |
| 37 | <div class="form_actions"> | 37 | <div class="form_actions"> |
| 38 | <input type="submit" value="{i18n}create user{/i18n}" /> | 38 | <input type="submit" value="{i18n}create user{/i18n}" /> |
| 39 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 39 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 40 | </div> | 40 | </div> |
| 41 | </fieldset> | 41 | </fieldset> |
| 42 | </form> | 42 | </form> |
templates/ktcore/principals/editgroup.smarty
| @@ -14,7 +14,7 @@ the system's information about group <strong>#name</strong>{/i18n}</p> | @@ -14,7 +14,7 @@ the system's information about group <strong>#name</strong>{/i18n}</p> | ||
| 14 | {/foreach} | 14 | {/foreach} |
| 15 | <div class="form_actions"> | 15 | <div class="form_actions"> |
| 16 | <input type="submit" value="{i18n}save changes to group{/i18n}" /> | 16 | <input type="submit" value="{i18n}save changes to group{/i18n}" /> |
| 17 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 17 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 18 | </div> | 18 | </div> |
| 19 | </fieldset> | 19 | </fieldset> |
| 20 | </form> | 20 | </form> |
templates/ktcore/principals/edituser.smarty
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | {/foreach} | 12 | {/foreach} |
| 13 | <div class="form_actions"> | 13 | <div class="form_actions"> |
| 14 | <input type="submit" value="{i18n}save changes{/i18n}" /> | 14 | <input type="submit" value="{i18n}save changes{/i18n}" /> |
| 15 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 15 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 16 | </div> | 16 | </div> |
| 17 | </fieldset> | 17 | </fieldset> |
| 18 | </form> | 18 | </form> |
templates/ktcore/principals/groupadmin.smarty
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <legend>Add New Group</legend> | 4 | <legend>Add New Group</legend> |
| 5 | <p class="descriptiveText">{i18n}Groups allow you to assign permissions and roles to a | 5 | <p class="descriptiveText">{i18n}Groups allow you to assign permissions and roles to a |
| 6 | number of different users at once.{/i18n}</p> | 6 | number of different users at once.{/i18n}</p> |
| 7 | -<p><a href="?action=addGroup" class="ktAction ktAddGroup" style="float: left; padding-right: 0.5em;">Add Group</a><a href="?action=addGroup">Add a new group</a>.</p> | 7 | +<p><a href="{addQS}action=addGroup{/addQS}" class="ktAction ktAddGroup ktInline">Add Group</a><a href="{addQS}action=addGroup{/addQS}">Add a new group</a>.</p> |
| 8 | </fieldset> | 8 | </fieldset> |
| 9 | <!-- we roll both in here. --> | 9 | <!-- we roll both in here. --> |
| 10 | <form action="{$smarty.server.PHP_SELF}" method="POST"> | 10 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| @@ -12,7 +12,7 @@ number of different users at once.{/i18n}</p> | @@ -12,7 +12,7 @@ number of different users at once.{/i18n}</p> | ||
| 12 | <legend>{i18n}Search for groups{/i18n}</legend> | 12 | <legend>{i18n}Search for groups{/i18n}</legend> |
| 13 | <p class="descriptiveText">{i18n}Since there may be many groups in the | 13 | <p class="descriptiveText">{i18n}Since there may be many groups in the |
| 14 | system, please type a few letters from the group's name to begin. | 14 | system, please type a few letters from the group's name to begin. |
| 15 | -Alternatively, <a href="?show_all=1">view all groups</a> (note that this | 15 | +Alternatively, <a href="{addQS}show_all=1{/addQS}">view all groups</a> (note that this |
| 16 | action may take some time if you have many groups).{/i18n}</p> | 16 | action may take some time if you have many groups).{/i18n}</p> |
| 17 | 17 | ||
| 18 | {foreach item=oWidget from=$search_fields} | 18 | {foreach item=oWidget from=$search_fields} |
| @@ -53,13 +53,13 @@ action may take some time if you have many groups).{/i18n}</p> | @@ -53,13 +53,13 @@ action may take some time if you have many groups).{/i18n}</p> | ||
| 53 | {$context->_getUnitName($oGroup)} | 53 | {$context->_getUnitName($oGroup)} |
| 54 | {/if} | 54 | {/if} |
| 55 | </td> | 55 | </td> |
| 56 | - <td><a href="?action=editGroup&group_id={$oGroup->getId()}" | 56 | + <td><a href="{addQS}action=editGroup&group_id={$oGroup->getId()}{/addQS}" |
| 57 | class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> | 57 | class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> |
| 58 | <td><a | 58 | <td><a |
| 59 | -href="?action=manageUsers&group_id={$oGroup->getId()}">{i18n}Manage Users{/i18n}</a></td> | 59 | +href="{addQS}action=manageUsers&group_id={$oGroup->getId()}{/addQS}">{i18n}Manage Users{/i18n}</a></td> |
| 60 | <td><a | 60 | <td><a |
| 61 | -href="?action=manageSubgroups&group_id={$oGroup->getId()}">{i18n}Manage sub-groups{/i18n}</a></td> | ||
| 62 | - <td><a href="?action=deleteGroup&group_id={$oGroup->getId()}" | 61 | +href="{addQS}action=manageSubgroups&group_id={$oGroup->getId()}{/addQS}">{i18n}Manage sub-groups{/i18n}</a></td> |
| 62 | + <td><a href="{addQS}action=deleteGroup&group_id={$oGroup->getId()}{/addQS}" | ||
| 63 | class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | 63 | class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> |
| 64 | </tr> | 64 | </tr> |
| 65 | {/foreach} | 65 | {/foreach} |
templates/ktcore/principals/groups_managesubgroups.smarty
| @@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
| 63 | 63 | ||
| 64 | <div class="form_actions"> | 64 | <div class="form_actions"> |
| 65 | <input type="submit" value="{i18n}save changes{/i18n}" /> | 65 | <input type="submit" value="{i18n}save changes{/i18n}" /> |
| 66 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 66 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 67 | </div> | 67 | </div> |
| 68 | </fieldset> | 68 | </fieldset> |
| 69 | </form> | 69 | </form> |
templates/ktcore/principals/groups_manageusers.smarty
| @@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
| 62 | 62 | ||
| 63 | <div class="form_actions"> | 63 | <div class="form_actions"> |
| 64 | <input type="submit" value="{i18n}save changes{/i18n}" /> | 64 | <input type="submit" value="{i18n}save changes{/i18n}" /> |
| 65 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 65 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 66 | </div> | 66 | </div> |
| 67 | </fieldset> | 67 | </fieldset> |
| 68 | </form> | 68 | </form> |
templates/ktcore/principals/orgadmin.smarty
| @@ -36,7 +36,7 @@ asd | @@ -36,7 +36,7 @@ asd | ||
| 36 | {foreach item=oOrg from=$org_list} | 36 | {foreach item=oOrg from=$org_list} |
| 37 | <tr> | 37 | <tr> |
| 38 | <td>{$oOrg->getName()}</td> | 38 | <td>{$oOrg->getName()}</td> |
| 39 | - <td><a href="?org_id={$oOrg->getId()}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> | 39 | + <td><a href="{addQS}org_id={$oOrg->getId()}{/addQS}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> |
| 40 | 40 | ||
| 41 | </tr> | 41 | </tr> |
| 42 | {/foreach} | 42 | {/foreach} |
templates/ktcore/principals/password.smarty
| @@ -15,9 +15,6 @@ | @@ -15,9 +15,6 @@ | ||
| 15 | <div class="form_actions"> | 15 | <div class="form_actions"> |
| 16 | <input type="submit" value="{i18n}Change your password{/i18n}" /> | 16 | <input type="submit" value="{i18n}Change your password{/i18n}" /> |
| 17 | 17 | ||
| 18 | - <!-- FIXME add CSS for secondary actions. --> | ||
| 19 | - <!-- Commenting this out due to redundancy. Why is it here? | ||
| 20 | - <p><a href="?action=setPassword">{i18n}Change your password.{/i18n}</a></p> --> | ||
| 21 | </div> | 18 | </div> |
| 22 | </fieldset> | 19 | </fieldset> |
| 23 | 20 |
templates/ktcore/principals/preferences.smarty
| @@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
| 15 | <div class="form_actions"> | 15 | <div class="form_actions"> |
| 16 | <input type="submit" value="{i18n}Update your details{/i18n}" /> | 16 | <input type="submit" value="{i18n}Update your details{/i18n}" /> |
| 17 | <!-- FIXME add CSS for secondary actions. --> | 17 | <!-- FIXME add CSS for secondary actions. --> |
| 18 | - <p><a href="?action=setPassword">{i18n}Change your password.{/i18n}</a></p> | 18 | + <p><a href="{addQS}action=setPassword{/addQS}">{i18n}Change your password.{/i18n}</a></p> |
| 19 | </div> | 19 | </div> |
| 20 | </fieldset> | 20 | </fieldset> |
| 21 | 21 |
templates/ktcore/principals/roleadmin.smarty
| @@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
| 35 | 35 | ||
| 36 | <div class="form_actions"> | 36 | <div class="form_actions"> |
| 37 | <input type="submit" value="{i18n}update role information{/i18n}" /> | 37 | <input type="submit" value="{i18n}update role information{/i18n}" /> |
| 38 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 38 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 39 | </div class="form_actions"> | 39 | </div class="form_actions"> |
| 40 | </fieldset> | 40 | </fieldset> |
| 41 | </form> | 41 | </form> |
| @@ -55,8 +55,8 @@ | @@ -55,8 +55,8 @@ | ||
| 55 | {foreach item=oRole from=$roles} | 55 | {foreach item=oRole from=$roles} |
| 56 | <tr> | 56 | <tr> |
| 57 | <td>{$oRole->getName()}</td> | 57 | <td>{$oRole->getName()}</td> |
| 58 | - <td><a href="?action=editRole&role_id={$oRole->getId()}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> | ||
| 59 | - <td><a href="?action=deleteRole&role_id={$oRole->getId()}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | 58 | + <td><a href="{addQS}action=editRole&role_id={$oRole->getId()}{/addQS}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> |
| 59 | + <td><a href="{addQS}action=deleteRole&role_id={$oRole->getId()}{/addQS}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | ||
| 60 | </tr> | 60 | </tr> |
| 61 | {/foreach} | 61 | {/foreach} |
| 62 | {else} | 62 | {else} |
templates/ktcore/principals/unitadmin.smarty
| @@ -9,7 +9,7 @@ of the document management system to a particular part of your | @@ -9,7 +9,7 @@ of the document management system to a particular part of your | ||
| 9 | organisation. Unit administrators have additional right within that | 9 | organisation. Unit administrators have additional right within that |
| 10 | portion of the document management system, and they can also adjust the | 10 | portion of the document management system, and they can also adjust the |
| 11 | membership of groups that belong to the unit.{/i18n}</p> | 11 | membership of groups that belong to the unit.{/i18n}</p> |
| 12 | -<p><a href="?action=addGroup" class="ktAction ktAddGroup ktInline">Add Unit</a><a href="?action=addUnit">Add a new unit</a>.</p> | 12 | +<p><a href="{addQS}action=addGroup{/addQS}" class="ktAction ktAddGroup ktInline">Add Unit</a><a href="{addQS}action=addUnit{/addQS}">Add a new unit</a>.</p> |
| 13 | </fieldset> | 13 | </fieldset> |
| 14 | 14 | ||
| 15 | <table class="listing"> | 15 | <table class="listing"> |
| @@ -24,8 +24,8 @@ membership of groups that belong to the unit.{/i18n}</p> | @@ -24,8 +24,8 @@ membership of groups that belong to the unit.{/i18n}</p> | ||
| 24 | {foreach item=oUnit from=$unit_list} | 24 | {foreach item=oUnit from=$unit_list} |
| 25 | <tr> | 25 | <tr> |
| 26 | <td>{$oUnit->getName()}</td> | 26 | <td>{$oUnit->getName()}</td> |
| 27 | - <td><a href="?action=editUnit&unit_id={$oUnit->getId()}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> | ||
| 28 | - <td><a href="?action=deleteUnit&unit_id={$oUnit->getId()}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | 27 | + <td><a href="{addQS}action=editUnit&unit_id={$oUnit->getId()}{/addQS}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> |
| 28 | + <td><a href="{addQS}action=deleteUnit&unit_id={$oUnit->getId()}{/addQS}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | ||
| 29 | </tr> | 29 | </tr> |
| 30 | {/foreach} | 30 | {/foreach} |
| 31 | </tbody> | 31 | </tbody> |
templates/ktcore/principals/updatepassword.smarty
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | 12 | ||
| 13 | <div class="form_actions"> | 13 | <div class="form_actions"> |
| 14 | <input type="submit" value="{i18n}change password{/i18n}" /> | 14 | <input type="submit" value="{i18n}change password{/i18n}" /> |
| 15 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 15 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 16 | </div> | 16 | </div> |
| 17 | </fieldset> | 17 | </fieldset> |
| 18 | </form> | 18 | </form> |
templates/ktcore/principals/usergroups.smarty
| @@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
| 64 | 64 | ||
| 65 | <div class="form_actions"> | 65 | <div class="form_actions"> |
| 66 | <input type="submit" value="{i18n}save changes{/i18n}" /> | 66 | <input type="submit" value="{i18n}save changes{/i18n}" /> |
| 67 | - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a> | 67 | + <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a> |
| 68 | </div> | 68 | </div> |
| 69 | </fieldset> | 69 | </fieldset> |
| 70 | </form> | 70 | </form> |