Commit 41ea7fcadc6bd26708a1a6f47e9afbdc456f87db

Authored by Neil Blakey-Milner
1 parent 5d6b6787

Add preliminary breadcrumbs to the main pages for visual verification


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3850 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/documentFields.php
... ... @@ -14,6 +14,12 @@ require_once(KT_DIR . "/presentation/webpageTemplate.inc");
14 14 class KTDocumentFieldDispatcher extends KTStandardDispatcher {
15 15 var $bAutomaticTransaction = true;
16 16  
  17 + // Breadcrumbs base - added to in methods
  18 + var $aBreadcrumbs = array(
  19 + array('action' => 'administration', 'name' => 'Administration'),
  20 + array('action' => 'docfield', 'name' => 'Document Field Management'),
  21 + );
  22 +
17 23 // {{{ do_main
18 24 function do_main () {
19 25 $oTemplating =& KTTemplating::getSingleton();
... ... @@ -30,6 +36,11 @@ class KTDocumentFieldDispatcher extends KTStandardDispatcher {
30 36 $oTemplating =& KTTemplating::getSingleton();
31 37 $oTemplate =& $oTemplating->loadTemplate('ktcore/metadata/editFieldset');
32 38 $oFieldset =& KTFieldset::get($_REQUEST['fFieldsetId']);
  39 + $this->aBreadcrumbs[] = array(
  40 + 'action' => 'docfield',
  41 + 'query' => 'action=edit&fFieldsetId=' . $_REQUEST['fFieldsetId'],
  42 + 'name' => 'Fieldset ' . $oFieldset->getName()
  43 + );
33 44 $oTemplate->setData(array(
34 45 'oFieldset' => $oFieldset,
35 46 ));
... ... @@ -113,6 +124,14 @@ class KTDocumentFieldDispatcher extends KTStandardDispatcher {
113 124 $oTemplate =& $oTemplating->loadTemplate('ktcore/metadata/editField');
114 125 $oFieldset =& KTFieldset::get($_REQUEST['fFieldsetId']);
115 126 $oField =& DocumentField::get($_REQUEST['fFieldId']);
  127 + $this->aBreadcrumbs[] = array(
  128 + 'action' => 'docfield',
  129 + 'query' => 'action=edit&fFieldsetId=' . $_REQUEST['fFieldsetId'],
  130 + 'name' => 'Fieldset ' . $oFieldset->getName()
  131 + );
  132 + $this->aBreadcrumbs[] = array(
  133 + 'name' => 'Field ' . $oField->getName()
  134 + );
116 135 $oTemplate->setData(array(
117 136 'oFieldset' => $oFieldset,
118 137 'oField' => $oField,
... ... @@ -143,6 +162,9 @@ class KTDocumentFieldDispatcher extends KTStandardDispatcher {
143 162 function do_addLookups() {
144 163 $oFieldset =& KTFieldset::get($_REQUEST['fFieldsetId']);
145 164 $oField =& DocumentField::get($_REQUEST['fFieldId']);
  165 + if (empty($_REQUEST['value'])) {
  166 + $this->errorRedirectTo('editField', 'Empty lookup not added', 'fFieldsetId=' . $oFieldset->getId() . '&fFieldId=' . $oField->getId());
  167 + }
146 168 $oMetaData =& MetaData::createFromArray(array(
147 169 'name' => $_REQUEST['value'],
148 170 'docfieldid' => $oField->getId(),
... ...