Commit 53b538b61152bf957fd0e825eec21f56c41d9898

Authored by Brad Shuttleworth
1 parent b4335ccd

- admin breadcrumbs

- workflow portlet
- help urls


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4776 c91229c3-7414-0410-bfa2-8a42b809f60b
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' => $_SERVER['PHP_SELF'], 'name' => 'Administration'), 16 + array('url' => KTUtil::getRequestScriptName($_SERVER), 'name' => 'Administration'),
17 ); 17 );
18 18
19 parent::KTAdminDispatcher(); 19 parent::KTAdminDispatcher();
@@ -85,7 +85,7 @@ if (empty($sub_url)) { @@ -85,7 +85,7 @@ if (empty($sub_url)) {
85 $aCategory = $oRegistry->getCategory($aParts[0]); 85 $aCategory = $oRegistry->getCategory($aParts[0]);
86 86
87 $oDispatcher->aBreadcrumbs = array(); 87 $oDispatcher->aBreadcrumbs = array();
88 - $oDispatcher->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => 'Administration'); 88 + $oDispatcher->aBreadcrumbs[] = array('url' => KTUtil::getRequestScriptName($_SERVER), 'name' => 'Administration');
89 $oDispatcher->aBreadcrumbs[] = array("name" => $aCategory['title'], "url" => KTUtil::ktLink('admin.php',$aParts[0])); 89 $oDispatcher->aBreadcrumbs[] = array("name" => $aCategory['title'], "url" => KTUtil::ktLink('admin.php',$aParts[0]));
90 } else { 90 } else {
91 // FIXME (minor) redirect to no-suburl? 91 // FIXME (minor) redirect to no-suburl?
lib/templating/kt3template.inc.php
@@ -298,7 +298,7 @@ class KTPage { @@ -298,7 +298,7 @@ class KTPage {
298 return null; 298 return null;
299 } 299 }
300 300
301 - return '/help.php/' . $this->helpPage; // FIXME handle auto-url 301 + return KTUtil::ktLink('help.php',$this->helpPage);
302 } 302 }
303 } 303 }
304 304
lib/util/ktutil.inc
@@ -442,6 +442,7 @@ class KTUtil { @@ -442,6 +442,7 @@ class KTUtil {
442 function addQueryString($url, $qs) { 442 function addQueryString($url, $qs) {
443 require_once(KT_DIR . '/thirdparty/pear/Net/URL.php'); 443 require_once(KT_DIR . '/thirdparty/pear/Net/URL.php');
444 $oUrl = new Net_URL($url); 444 $oUrl = new Net_URL($url);
  445 +
445 $aQs = $oUrl->_parseRawQuerystring($qs); 446 $aQs = $oUrl->_parseRawQuerystring($qs);
446 foreach ($aQs as $k => $v) { 447 foreach ($aQs as $k => $v) {
447 $oUrl->addQueryString($k, $v); 448 $oUrl->addQueryString($k, $v);
@@ -455,6 +456,7 @@ class KTUtil { @@ -455,6 +456,7 @@ class KTUtil {
455 $KTConfig =& KTConfig::getSingleton(); 456 $KTConfig =& KTConfig::getSingleton();
456 $root = $KTConfig->get("KnowledgeTree/rootUrl"); 457 $root = $KTConfig->get("KnowledgeTree/rootUrl");
457 $url = $root . '/' . $base; 458 $url = $root . '/' . $base;
  459 + $url = $base;
458 $query = ''; 460 $query = '';
459 461
460 $hasPathInfo = $KTConfig->get("KnowledgeTree/pathInfoSupport"); 462 $hasPathInfo = $KTConfig->get("KnowledgeTree/pathInfoSupport");
@@ -467,6 +469,7 @@ class KTUtil { @@ -467,6 +469,7 @@ class KTUtil {
467 } 469 }
468 } 470 }
469 $query .= $qs; 471 $query .= $qs;
  472 +
470 return KTUtil::addQueryString($url, $query); 473 return KTUtil::addQueryString($url, $query);
471 } 474 }
472 // }}} 475 // }}}
plugins/ktcore/admin/workflows.php
@@ -36,10 +36,10 @@ class WorkflowNavigationPortlet extends KTPortlet { @@ -36,10 +36,10 @@ 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' => 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());  
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()); 39 + $aAdminPages[] = array('name' => _('Overview'), 'url' => KTUtil::addQueryStringSelf('action=editWorkflow&fWorkflowId=' . $this->oWorkflow->getId()));
  40 + $aAdminPages[] = array('name' => _('States'), 'url' => KTUtil::addQueryStringSelf('action=manageStates&fWorkflowId=' . $this->oWorkflow->getId()));
  41 + $aAdminPages[] = array('name' => _('Transitions'), 'url' => KTUtil::addQueryStringSelf('action=manageTransitions&fWorkflowId=' . $this->oWorkflow->getId()));
  42 + $aAdminPages[] = array('name' => _('Actions'), 'url' => KTUtil::addQueryStringSelf('action=manageActions&fWorkflowId=' . $this->oWorkflow->getId()));
43 43
44 44
45 $oTemplating = new KTTemplating; 45 $oTemplating = new KTTemplating;
templates/kt3/standard_page.smarty
@@ -130,7 +130,7 @@ @@ -130,7 +130,7 @@
130 <div id="content"> 130 <div id="content">
131 131
132 <h1 class="{$page->componentClass}"><span class="fahrner">{$page->componentLabel}</span> 132 <h1 class="{$page->componentClass}"><span class="fahrner">{$page->componentLabel}</span>
133 -{if ($page->getHelpURL() != null)} <a class="ktHelp" href="{$rootUrl}{$page->getHelpURL()}">Help</a> {/if} 133 +{if ($page->getHelpURL() != null)} <a class="ktHelp" href="{$page->getHelpURL()}">Help</a> {/if}
134 </h1> 134 </h1>
135 135
136 <!-- any status / error messages get added here. --> 136 <!-- any status / error messages get added here. -->
templates/ktcore/workflow/workflow_notification.smarty
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 state <strong>#state#</strong>, and you are specified as one of the users to inform 4 state <strong>#state#</strong>, and you are specified as one of the users to inform
5 about documents in this state.{/i18n} 5 about documents in this state.{/i18n}
6 <div class="actionoptions"> 6 <div class="actionoptions">
7 - <a href="{$absoluteRootUrl}/notify.php?id={$notify_id}">{i18n}View Document{/i18n}</a>  
8 - | <a href="{$absoluteRootUrl}/notify.php?id={$notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 7 + <a href="{ktLink base="notify.php" query="id=`$notify_id`"}">{i18n}View Document{/i18n}</a>
  8 + | <a href="{ktLink base="notify.php" query="id=`$notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
9 </div> 9 </div>
10 </dd> 10 </dd>