Commit 8b575c19b58902ffd679a1b5ade144917e2ae857

Authored by Brad Shuttleworth
1 parent 4ccac372

- add "add" icon

- improve workflow ui (to fix newly added bugs)
- improve tree-edit
-


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4700 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/admin/documentFields.php
@@ -626,12 +626,19 @@ class KTDocumentFieldDispatcher extends KTStandardDispatcher { @@ -626,12 +626,19 @@ class KTDocumentFieldDispatcher extends KTStandardDispatcher {
626 $this->oPage->setTitle(_('Edit Lookup Tree')); 626 $this->oPage->setTitle(_('Edit Lookup Tree'));
627 627
628 //$this->oPage->requireJSResource('thirdparty/js/MochiKit/Base.js'); 628 //$this->oPage->requireJSResource('thirdparty/js/MochiKit/Base.js');
629 - 629 +
  630 + if ($current_node == 0) { $category_name = 'Root'; }
  631 + else {
  632 + $oNode = MDTreeNode::get($current_node);
  633 + $category_name = $oNode->getName();
  634 + }
  635 +
630 $aTemplateData = array( 636 $aTemplateData = array(
631 "field" => $oField, 637 "field" => $oField,
632 "tree" => $fieldTree, 638 "tree" => $fieldTree,
633 "renderedTree" => $renderedTree, 639 "renderedTree" => $renderedTree,
634 "currentNode" => $current_node, 640 "currentNode" => $current_node,
  641 + 'category_name' => $category_name,
635 "freechildren" => $free_metadata, 642 "freechildren" => $free_metadata,
636 "context" => $this, 643 "context" => $this,
637 ); 644 );
@@ -752,7 +759,7 @@ class KTDocumentFieldDispatcher extends KTStandardDispatcher { @@ -752,7 +759,7 @@ class KTDocumentFieldDispatcher extends KTStandardDispatcher {
752 } 759 }
753 else 760 else
754 { 761 {
755 - $actionStr .= '<a href="?action=editTree&field_id='.$iFieldId.'&current_node='.$current_node.'">add items</a> '; 762 + $actionStr .= '<a href="?action=editTree&field_id='.$iFieldId.'&current_node='.$current_node.'">attach keywords</a> ';
756 $actionStr .= '| <a href="?action=editTree&field_id='.$iFieldId.'&current_node='.$current_node.'&subaction=deleteCategory">delete</a>'; 763 $actionStr .= '| <a href="?action=editTree&field_id='.$iFieldId.'&current_node='.$current_node.'&subaction=deleteCategory">delete</a>';
757 } 764 }
758 $actionStr .= ")"; 765 $actionStr .= ")";
plugins/ktcore/admin/workflows.php
@@ -155,11 +155,13 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -155,11 +155,13 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
155 155
156 156
157 $aAlways = array(); 157 $aAlways = array();
  158 + /*
158 foreach ($aInfo['actions'] as $iActionId => $aAction) { 159 foreach ($aInfo['actions'] as $iActionId => $aAction) {
159 if (!array_key_exists($iActionId, $aInfo['controlled_actions'])) { 160 if (!array_key_exists($iActionId, $aInfo['controlled_actions'])) {
160 $aAlways[$iActionId] = $aAction; 161 $aAlways[$iActionId] = $aAction;
161 } 162 }
162 } 163 }
  164 + */
163 165
164 $aNamedActions = array(); 166 $aNamedActions = array();
165 foreach ($aInfo['actions_by_state'][$oState->getId()] as $sName) { 167 foreach ($aInfo['actions_by_state'][$oState->getId()] as $sName) {
@@ -214,14 +216,14 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -214,14 +216,14 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
214 return $val; 216 return $val;
215 } 217 }
216 218
217 - function actionAvailable($oAction, $oState) { 219 + function actionAvailable($sAction, $oState) {
218 $aInfo = $this->aWorkflowInfo; 220 $aInfo = $this->aWorkflowInfo;
219 221
220 $val = false; 222 $val = false;
221 223
222 foreach ($aInfo['actions_by_state'][$oState->getId()] as $oA) { 224 foreach ($aInfo['actions_by_state'][$oState->getId()] as $oA) {
223 225
224 - if ($oAction->getName() == $oA) { $val = true; } 226 + if ($sAction == $oA) { $val = true; }
225 } 227 }
226 228
227 return $val; 229 return $val;
@@ -398,6 +400,23 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -398,6 +400,23 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
398 400
399 $aInfo = $this->buildWorkflowInfo($oWorkflow); 401 $aInfo = $this->buildWorkflowInfo($oWorkflow);
400 402
  403 +
  404 + $oTemplate->setData(array(
  405 + 'context' => $this,
  406 + 'oWorkflow' => $oWorkflow,
  407 +
  408 + // info
  409 + 'workflow_info' => $aInfo,
  410 + ));
  411 + return $oTemplate;
  412 + }
  413 +
  414 + function do_createState() {
  415 + $oTemplate =& $this->oValidator->validateTemplate('ktcore/workflow/createState');
  416 + $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']);
  417 +
  418 + $aInfo = $this->buildWorkflowInfo($oWorkflow);
  419 +
401 $add_fields = array(); 420 $add_fields = array();
402 $add_fields[] = new KTStringWidget(_('Name'), _('A human-readable name for the state.'), 'fName', null, $this->oPage, true); 421 $add_fields[] = new KTStringWidget(_('Name'), _('A human-readable name for the state.'), 'fName', null, $this->oPage, true);
403 422
@@ -409,6 +428,12 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -409,6 +428,12 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
409 428
410 // info 429 // info
411 'workflow_info' => $aInfo, 430 'workflow_info' => $aInfo,
  431 +
  432 + 'aActions' => KTDocumentActionUtil::getDocumentActionsByNames(KTWorkflowUtil::getControlledActionsForWorkflow($oWorkflow)),
  433 + 'aActionsSelected' => KTWorkflowUtil::getEnabledActionsForState($oState),
  434 + 'aGroups' => Group::getList(),
  435 + 'aRoles' => Role::getList(),
  436 + 'aUsers' => User::getList(),
412 437
413 // subform 438 // subform
414 'add_fields' => $add_fields, 439 'add_fields' => $add_fields,
@@ -421,7 +446,30 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -421,7 +446,30 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
421 $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']); 446 $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']);
422 447
423 $aInfo = $this->buildWorkflowInfo($oWorkflow); 448 $aInfo = $this->buildWorkflowInfo($oWorkflow);
424 - 449 +
  450 + $oTemplate->setData(array(
  451 + 'context' => $this,
  452 + 'oWorkflow' => $oWorkflow,
  453 +
  454 + // info
  455 + 'workflow_info' => $aInfo,
  456 +
  457 + // subform
  458 + 'add_fields' => $add_transition_fields,
  459 + ));
  460 + return $oTemplate;
  461 + }
  462 +
  463 + function do_createTransition() {
  464 + $oTemplate =& $this->oValidator->validateTemplate('ktcore/workflow/createTransition');
  465 + $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']);
  466 +
  467 + $aInfo = $this->buildWorkflowInfo($oWorkflow);
  468 + $aPermissions = $aInfo['permissions'];
  469 + $aGroups = $aInfo['groups'];
  470 + $aRoles = $aInfo['roles'];
  471 + $aConditions = KTSavedSearch::getConditions();
  472 +
425 $add_transition_fields = array(); 473 $add_transition_fields = array();
426 $add_transition_fields[] = new KTStringWidget(_('Name'), _('A human-readable name for the transition.'), 'fName', null, $this->oPage, true); 474 $add_transition_fields[] = new KTStringWidget(_('Name'), _('A human-readable name for the transition.'), 'fName', null, $this->oPage, true);
427 $aOptions = array(); 475 $aOptions = array();
@@ -437,7 +485,37 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -437,7 +485,37 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
437 $vocab[$permission->getId()] = $permission->getHumanName(); 485 $vocab[$permission->getId()] = $permission->getHumanName();
438 } 486 }
439 $aOptions['vocab'] = $vocab; 487 $aOptions['vocab'] = $vocab;
440 - $add_transition_fields[] = new KTLookupWidget(_('Guard Permission.'), _('Which permission must the user have in order to follow this transition?'), 'fPermissionId', $oWorkflow->getStartStateId(), $this->oPage, true, null, null, $aOptions); 488 + $add_transition_fields[] = new KTLookupWidget(_('Guard Permission.'), _('Which permission must the user have in order to follow this transition?'), 'fPermissionId', NULL, $this->oPage, true, null, null, $aOptions);
  489 +
  490 + $aOptions = array();
  491 + $vocab = array();
  492 + $vocab[0] = 'None';
  493 + foreach($aGroups as $group) {
  494 + $vocab[$group->getId()] = $group->getName();
  495 + }
  496 + $aOptions['vocab'] = $vocab;
  497 + $add_transition_fields[] = new KTLookupWidget(_('Guard Group.'), _('Which group must the user belong to in order to follow this transition?'), 'fGroupId', NULL, $this->oPage, false, null, null, $aOptions);
  498 + $aOptions = array();
  499 + $vocab = array();
  500 + $vocab[0] = 'None';
  501 + foreach($aRoles as $role) {
  502 + $vocab[$role->getId()] = $role->getName();
  503 + }
  504 + $aOptions['vocab'] = $vocab;
  505 + $add_transition_fields[] = new KTLookupWidget(_('Guard Role.'), _('Which role must the user have in order to follow this transition?'), 'fRoleId', NULL, $this->oPage, false, null, null, $aOptions);
  506 +
  507 + if (!empty($aConditions)) {
  508 + $aOptions = array();
  509 + $vocab = array();
  510 + $vocab[0] = 'None';
  511 + foreach($aConditions as $condition) {
  512 + $vocab[$condition->getId()] = $condition->getName();
  513 + }
  514 + $aOptions['vocab'] = $vocab;
  515 + $edit_fields[] = new KTLookupWidget(_('Guard Condition.'), _('Which condition (stored search) must be satisfied before the transition can take place?'), 'fConditionId', NULL, $this->oPage, false, null, null, $aOptions);
  516 + }
  517 +
  518 +
441 519
442 $oTemplate->setData(array( 520 $oTemplate->setData(array(
443 'context' => $this, 521 'context' => $this,
@@ -474,7 +552,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -474,7 +552,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
474 } 552 }
475 $this->commitTransaction(); 553 $this->commitTransaction();
476 554
477 - $this->successRedirectTo('manageTransitions', _('Availability updated.'), sprintf('fWorkflowId=%d', $oWorkflow->getId())); 555 + $this->successRedirectTo('manageTransitions', _('Transition Availability updated.'), sprintf('fWorkflowId=%d', $oWorkflow->getId()));
478 } 556 }
479 557
480 558
@@ -511,7 +589,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -511,7 +589,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
511 'redirect_to' => array('editWorkflow', 'fWorkflowId=' . $oWorkflow->getId()), 589 'redirect_to' => array('editWorkflow', 'fWorkflowId=' . $oWorkflow->getId()),
512 'message' => _('Error saving workflow controlled actions'), 590 'message' => _('Error saving workflow controlled actions'),
513 )); 591 ));
514 - $this->successRedirectTo('editWorkflow', _('Changes saved'), 'fWorkflowId=' . $oWorkflow->getId()); 592 + $this->successRedirectTo('manageActions', _('Controlled actions changed.'), 'fWorkflowId=' . $oWorkflow->getId());
515 exit(0); 593 exit(0);
516 } 594 }
517 // }}} 595 // }}}
@@ -546,10 +624,16 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -546,10 +624,16 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
546 )); 624 ));
547 625
548 $this->oValidator->notError($oState, array( 626 $this->oValidator->notError($oState, array(
549 - 'redirect_to' => array('editWorkflow', 'fWorkflowId=' . $oWorkflow->getId()), 627 + 'redirect_to' => array('createState', 'fWorkflowId=' . $oWorkflow->getId()),
550 'message' => _('Could not create workflow state'), 628 'message' => _('Could not create workflow state'),
551 )); 629 ));
552 630
  631 + $res = KTWorkflowUtil::setEnabledActionsForState($oState, $_REQUEST['fActions']);
  632 + $this->oValidator->notErrorFalse($res, array(
  633 + 'redirect_to' => array('editState', 'fWorkflowId=' . $oWorkflow->getId(), '&fStateId=' . $oState->getId()),
  634 + 'message' => _('Error saving state enabled actions'),
  635 + ));
  636 +
553 $this->successRedirectTo('editState', _('Workflow state created'), 'fWorkflowId=' . $oWorkflow->getId() . '&fStateId=' . $oState->getId()); 637 $this->successRedirectTo('editState', _('Workflow state created'), 'fWorkflowId=' . $oWorkflow->getId() . '&fStateId=' . $oState->getId());
554 exit(0); 638 exit(0);
555 } 639 }
@@ -573,15 +657,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -573,15 +657,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
573 } 657 }
574 } 658 }
575 $aTransitionsSelected = KTWorkflowUtil::getTransitionsFrom($oState, array('ids' => true)); 659 $aTransitionsSelected = KTWorkflowUtil::getTransitionsFrom($oState, array('ids' => true));
576 - $this->aBreadcrumbs[] = array(  
577 - 'url' => $_SERVER['PHP_SELF'],  
578 - 'name' => _('Workflows'),  
579 - );  
580 - $this->aBreadcrumbs[] = array(  
581 - 'url' => $_SERVER['PHP_SELF'],  
582 - 'query' => 'action=editWorkflow&fWorkflowId=' . $oWorkflow->getId(),  
583 - 'name' => $oWorkflow->getName(),  
584 - ); 660 +
585 $this->oPage->setBreadcrumbDetails(_('State') . ': ' . $oState->getName()); 661 $this->oPage->setBreadcrumbDetails(_('State') . ': ' . $oState->getName());
586 662
587 $aInformed = KTWorkflowUtil::getInformedForState($oState); 663 $aInformed = KTWorkflowUtil::getInformedForState($oState);
@@ -648,7 +724,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -648,7 +724,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
648 'redirect_to' => array('editState', 'fWorkflowId=' . $oWorkflow->getId(), '&fStateId=' . $oState->getId()), 724 'redirect_to' => array('editState', 'fWorkflowId=' . $oWorkflow->getId(), '&fStateId=' . $oState->getId()),
649 'message' => _('Error saving state enabled actions'), 725 'message' => _('Error saving state enabled actions'),
650 )); 726 ));
651 - $this->successRedirectTo('editState', _('Actions set'), 'fWorkflowId=' . $oWorkflow->getId() . '&fStateId=' . $oState->getId()); 727 + $this->successRedirectTo('manageActions', _('Controlled Actions changed.'), 'fWorkflowId=' . $oWorkflow->getId() . '&fStateId=' . $oState->getId());
652 exit(0); 728 exit(0);
653 } 729 }
654 // }}} 730 // }}}
@@ -699,6 +775,8 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -699,6 +775,8 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
699 $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']); 775 $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']);
700 $oState =& $this->oValidator->validateWorkflowState($_REQUEST['fTargetStateId']); 776 $oState =& $this->oValidator->validateWorkflowState($_REQUEST['fTargetStateId']);
701 777
  778 + $aInfo = $this->buildWorkflowInfo($oWorkflow);
  779 +
702 // setup error options for later 780 // setup error options for later
703 $aErrorOptions = array( 781 $aErrorOptions = array(
704 'redirect_to' => array('editWorkflow', sprintf('fWorkflowId=%d', $oWorkflow->getId())), 782 'redirect_to' => array('editWorkflow', sprintf('fWorkflowId=%d', $oWorkflow->getId())),
@@ -707,7 +785,8 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -707,7 +785,8 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
707 $iPermissionId = KTUtil::arrayGet($_REQUEST, 'fPermissionId'); 785 $iPermissionId = KTUtil::arrayGet($_REQUEST, 'fPermissionId');
708 $iGroupId = KTUtil::arrayGet($_REQUEST, 'fGroupId'); 786 $iGroupId = KTUtil::arrayGet($_REQUEST, 'fGroupId');
709 $iRoleId = KTUtil::arrayGet($_REQUEST, 'fRoleId'); 787 $iRoleId = KTUtil::arrayGet($_REQUEST, 'fRoleId');
710 - 788 + $iConditionId = KTUtil::arrayGet($_REQUEST, 'fConditionId', null);
  789 +
711 // validate name 790 // validate name
712 $sName = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'fName'), $aErrorOptions); 791 $sName = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'fName'), $aErrorOptions);
713 792
@@ -729,6 +808,9 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -729,6 +808,9 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
729 if ($iRoleId) { 808 if ($iRoleId) {
730 $this->oValidator->validateRole($_REQUEST['fRoleId']); 809 $this->oValidator->validateRole($_REQUEST['fRoleId']);
731 } 810 }
  811 + if ($iConditionId) {
  812 + $this->oValidator->validateCondition($_REQUEST['fConditionId']);
  813 + }
732 814
733 $res = KTWorkflowTransition::createFromArray(array( 815 $res = KTWorkflowTransition::createFromArray(array(
734 'workflowid' => $oWorkflow->getId(), 816 'workflowid' => $oWorkflow->getId(),
@@ -743,7 +825,30 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -743,7 +825,30 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
743 'redirect_to' => array('editWorkflow', 'fWorkflowId=' . $oWorkflow->getId()), 825 'redirect_to' => array('editWorkflow', 'fWorkflowId=' . $oWorkflow->getId()),
744 'message' => _('Could not create workflow transition'), 826 'message' => _('Could not create workflow transition'),
745 )); 827 ));
746 - $this->successRedirectTo('editTransition', _('Workflow transition created'), sprintf('fWorkflowId=%d&fTransitionId=%d', $oWorkflow->getId(), $res->getId())); 828 +
  829 + // now attach it to the appropriate states.
  830 + $aStateId = (array) KTUtil::arrayGet($_REQUEST, 'fStatesAvailableIn');
  831 + $aStateId = array_keys($aStateId);
  832 + $newTransition = $res;
  833 +
  834 + foreach ($aStateId as $iStateId) {
  835 + if ($iStateId == $res->getTargetStateId()) { continue; }
  836 + $oState = $aInfo['states'][$iStateId];
  837 +
  838 + $aTransitions = KTWorkflowTransition::getBySourceState($oState);
  839 + $aTransitions[] = $res;
  840 + $aTransitionIds = array();
  841 + foreach ($aTransitions as $oTransition) {
  842 + $aTransitionIds[] = $oTransition->getId();
  843 + }
  844 + $res = KTWorkflowUtil::saveTransitionsFrom($oState, $aTransitionIds);
  845 + if (PEAR::isError($res)) {
  846 + $this->errorRedirectTo('manageTransitions',sprintf(_('Unable to assign new transition to state %s'),$oState->getName()), sprintf('fWorkflowId=%d', $oWorkflow->getId()));
  847 + }
  848 + }
  849 +
  850 +
  851 + $this->successRedirectTo('editTransition', _('Workflow transition created'), sprintf('fWorkflowId=%d&fTransitionId=%d', $oWorkflow->getId(), $newTransition->getId()));
747 exit(0); 852 exit(0);
748 } 853 }
749 // }}} 854 // }}}
@@ -807,15 +912,6 @@ class KTWorkflowDispatcher extends KTAdminDispatcher { @@ -807,15 +912,6 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
807 912
808 $this->aBreadcrumbs[] = array( 913 $this->aBreadcrumbs[] = array(
809 'url' => $_SERVER['PHP_SELF'], 914 'url' => $_SERVER['PHP_SELF'],
810 - 'name' => _('Workflows'),  
811 - );  
812 - $this->aBreadcrumbs[] = array(  
813 - 'url' => $_SERVER['PHP_SELF'],  
814 - 'query' => 'action=editWorkflow&fWorkflowId=' . $oWorkflow->getId(),  
815 - 'name' => $oWorkflow->getName(),  
816 - );  
817 - $this->aBreadcrumbs[] = array(  
818 - 'url' => $_SERVER['PHP_SELF'],  
819 'query' => 'action=editTransition&fWorkflowId=' . $oWorkflow->getId() . '&fTransitionId=' . $oTransition->getId(), 915 'query' => 'action=editTransition&fWorkflowId=' . $oWorkflow->getId() . '&fTransitionId=' . $oTransition->getId(),
820 'name' => $oTransition->getName(), 916 'name' => $oTransition->getName(),
821 ); 917 );
resources/css/kt-contenttypes.css
@@ -20,7 +20,10 @@ @@ -20,7 +20,10 @@
20 .contenttype.excel { background-image: url(../../resources/mimetypes/excel.png); } 20 .contenttype.excel { background-image: url(../../resources/mimetypes/excel.png); }
21 .contenttype.openoffice { background-image: url(../../resources/mimetypes/openoffice.png); } 21 .contenttype.openoffice { background-image: url(../../resources/mimetypes/openoffice.png); }
22 .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.png); } 22 .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.png); }
  23 +.contenttype.image { background-image: url(../../resources/mimetypes/image.png); }
  24 +.contenttype.compressed { background-image: url(../../resources/mimetypes/compressed.png); }
23 25
24 .contenttype.txt, 26 .contenttype.txt,
  27 +.contenttype.text,
25 .contenttype.unspecified_type { background-image: url(../../thirdparty/icon-theme/16x16/mimetypes/text-x-generic.png); } 28 .contenttype.unspecified_type { background-image: url(../../thirdparty/icon-theme/16x16/mimetypes/text-x-generic.png); }
26 .contenttype.folder { background-image: url(../../thirdparty/icon-theme/16x16/mimetypes/x-directory-normal.png); } 29 .contenttype.folder { background-image: url(../../thirdparty/icon-theme/16x16/mimetypes/x-directory-normal.png); }
resources/css/kt-framing.css
@@ -637,6 +637,11 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes @@ -637,6 +637,11 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes
637 cursor: pointer; 637 cursor: pointer;
638 } 638 }
639 639
  640 +.ktAction.ktInline {
  641 + float: left;
  642 + padding-right: 0.5em;
  643 +}
  644 +
640 .ktHelp { 645 .ktHelp {
641 background: transparent url(../../thirdparty/icon-theme/16x16/apps/help-browser.png) top left no-repeat; 646 background: transparent url(../../thirdparty/icon-theme/16x16/apps/help-browser.png) top left no-repeat;
642 float: right; 647 float: right;
@@ -657,6 +662,7 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes @@ -657,6 +662,7 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes
657 .ktAction.ktEdit { background: transparent url(../../thirdparty/icon-theme/16x16/actions/document-properties.png) top left no-repeat; } 662 .ktAction.ktEdit { background: transparent url(../../thirdparty/icon-theme/16x16/actions/document-properties.png) top left no-repeat; }
658 .ktAction.ktAddUser { background: transparent url(../../thirdparty/icon-theme/16x16/actions/contact-new.png) top left no-repeat; } 663 .ktAction.ktAddUser { background: transparent url(../../thirdparty/icon-theme/16x16/actions/contact-new.png) top left no-repeat; }
659 .ktAction.ktAddGroup { background: transparent url(../../thirdparty/icon-theme/16x16/actions/group-new.png) top left no-repeat; } 664 .ktAction.ktAddGroup { background: transparent url(../../thirdparty/icon-theme/16x16/actions/group-new.png) top left no-repeat; }
  665 +.ktAction.ktAdd { background: transparent url(../../thirdparty/icon-theme/16x16/actions/add.png) top left no-repeat; }
660 666
661 /* =========== standard listings. */ 667 /* =========== standard listings. */
662 668
resources/css/kt-ie-icons.css
@@ -6,12 +6,18 @@ @@ -6,12 +6,18 @@
6 .ktAction.ktEdit { background: transparent url(../../thirdparty/icon-theme/16x16/actions/document-properties.gif) top left no-repeat; } 6 .ktAction.ktEdit { background: transparent url(../../thirdparty/icon-theme/16x16/actions/document-properties.gif) top left no-repeat; }
7 .ktAction.ktAddUser { background: transparent url(../../thirdparty/icon-theme/16x16/actions/contact-new.gif) top left no-repeat; } 7 .ktAction.ktAddUser { background: transparent url(../../thirdparty/icon-theme/16x16/actions/contact-new.gif) top left no-repeat; }
8 .ktAction.ktAddGroup { background: transparent url(../../thirdparty/icon-theme/16x16/actions/group-new.gif) top left no-repeat; } 8 .ktAction.ktAddGroup { background: transparent url(../../thirdparty/icon-theme/16x16/actions/group-new.gif) top left no-repeat; }
  9 +.ktAction.ktAdd { background: transparent url(../../thirdparty/icon-theme/16x16/actions/add.gif) top left no-repeat; }
  10 +
9 .contenttype.office { background-image: url(../../resources/mimetypes/office.gif); } 11 .contenttype.office { background-image: url(../../resources/mimetypes/office.gif); }
10 .contenttype.word { background-image: url(../../resources/mimetypes/word.gif); } 12 .contenttype.word { background-image: url(../../resources/mimetypes/word.gif); }
  13 +.contenttype.database { background-image: url(../../resources/mimetypes/database.gif); }
11 .contenttype.excel { background-image: url(../../resources/mimetypes/excel.gif); } 14 .contenttype.excel { background-image: url(../../resources/mimetypes/excel.gif); }
12 .contenttype.openoffice { background-image: url(../../resources/mimetypes/openoffice.gif); } 15 .contenttype.openoffice { background-image: url(../../resources/mimetypes/openoffice.gif); }
13 .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.gif); } 16 .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.gif); }
  17 +.contenttype.image { background-image: url(../../resources/mimetypes/image.gif); }
  18 +.contenttype.compressed { background-image: url(../../resources/mimetypes/compressed.gif); }
14 19
15 .contenttype.txt, 20 .contenttype.txt,
  21 +.contenttype.text,
16 .contenttype.unspecified_type { background-image: url(../../thirdparty/icon-theme/16x16/mimetypes/text-x-generic.gif); } 22 .contenttype.unspecified_type { background-image: url(../../thirdparty/icon-theme/16x16/mimetypes/text-x-generic.gif); }
17 .contenttype.folder { background-image: url(../../thirdparty/icon-theme/16x16/mimetypes/x-directory-normal.gif); } 23 .contenttype.folder { background-image: url(../../thirdparty/icon-theme/16x16/mimetypes/x-directory-normal.gif); }
templates/ktcore/edit_lookuptrees.smarty
@@ -5,10 +5,28 @@ @@ -5,10 +5,28 @@
5 5
6 <h2>{i18n}Edit Lookup Tree{/i18n}: {$field->getName()}</h2> 6 <h2>{i18n}Edit Lookup Tree{/i18n}: {$field->getName()}</h2>
7 7
  8 +<p class="descriptiveText">{i18n}Many "lookup" fields make sense in a hierachy:
  9 +countries are part of continents and sub-continents, school classes are part of grades
  10 +and programs, Powerbooks are Apple Macs, while Thinkpads are made by Lenovo. This
  11 +page will allow you to arrange the lookups in the field in a hierachy. All changes
  12 +are immediately stored, so when you are done simply navigate back to the field menu.{/i18n}</p>
  13 +
8 14
9 <form action="{$smarty.server.PHP_SELF}" method="POST"> 15 <form action="{$smarty.server.PHP_SELF}" method="POST">
10 <fieldset> 16 <fieldset>
11 - <legend>{i18n}Add New Subcategory{/i18n}</legend> 17 + <legend>{i18n arg_category="$category_name"}Add New Subcategory to <strong>#category#</strong>{/i18n}</legend>
  18 +
  19 + <p class="descriptiveText">{i18n}In order to organise the options into a "tree", you
  20 + need to add subcategories at each level. The "top" level is called the root, and
  21 + holds all the toplevel items. "Root" will not be shown to the final user, but
  22 + provides a single "parent" to the toplevel items.{/i18n}</p>
  23 +
  24 + <p class="descriptiveText">{i18n}As an example, if you are creating a tree of the
  25 + countries in the world, the actual countries would be <strong>keywords</strong>
  26 + (e.g. South Africa, England, Pakistan, India). The highest group of categories
  27 + would be continents &mdash; e.g. Africa, Europe, Asia, The Americas &mdash; followed by
  28 + subcategories that contain actual countries &mdash; e.g. Western Europe, Sub-saharan Africa,
  29 + Austalasia.{/i18n}</p>
12 30
13 31
14 32
@@ -20,24 +38,33 @@ @@ -20,24 +38,33 @@
20 <input type="text" name="category_name"/> 38 <input type="text" name="category_name"/>
21 39
22 <div class="form_actions"> 40 <div class="form_actions">
23 - <input type="submit" name="submit" value="{i18n}add new category{/i18n}" /> 41 + <input type="submit" name="submit" value="{i18n}add new subcategory{/i18n}" />
24 </div> 42 </div>
25 </fieldset> 43 </fieldset>
26 </form> 44 </form>
  45 +
27 {if ($currentNode != 0)} 46 {if ($currentNode != 0)}
28 {if (empty($freechildren))} 47 {if (empty($freechildren))}
29 -<p>{i18n}No free keywords. Use the "unlink" action on a keyword to  
30 -make it available.{/i18n}</p> 48 +<p class="descriptiveText">{i18n}Keywords which are directly below the
  49 + <strong>Root</strong> are considered "free" &mdash; they are not attached to
  50 + a subcategory. Only free keywords can be associated with a subcategory. To
  51 + free a keyword, click on the "unlink" command next to it in the preview tree below.
  52 + Deleting a subcategory will automatically unlink all keywords below it (including
  53 + those in subcategories of the subcategory).
  54 + {/i18n}</p>
  55 +
  56 +<div class="ktInfo"><p>{i18n}No free keywords. Use the "unlink" action on a keyword to
  57 +make it available.{/i18n}</p></div>
31 {else} 58 {else}
32 <form action="{$smarty.server.PHP_SELF}" method="POST"> 59 <form action="{$smarty.server.PHP_SELF}" method="POST">
33 <fieldset> 60 <fieldset>
34 - <legend>{i18n}Link free keywords.{/i18n}</legend>  
35 -  
36 -<p>{i18n}Category{/i18n}: <strong>{if ($currentNode == 0)}  
37 -Root  
38 -{else}  
39 -{$tree->mapnodes[$currentNode]->getName()}  
40 -{/if}</strong></p> 61 + <legend>{i18n arg_category=$category_name}Attach keywords to <strong>#category#</strong>{/i18n}</legend>
  62 +
  63 + <p class="descriptiveText">{i18n}Keywords which are directly below the
  64 + <strong>Root</strong> are considered "free" &mdash; they are not attached to
  65 + a subcategory. Only free keywords can be associated with a subcategory. To
  66 + free a keyword, click on the "unlink" command next to it in the preview tree below.
  67 + {/i18n}</p>
41 68
42 <input type="hidden" name="field_id" value="{$field->getId()}" /> 69 <input type="hidden" name="field_id" value="{$field->getId()}" />
43 <input type="hidden" name="action" value="editTree" /> 70 <input type="hidden" name="action" value="editTree" />
@@ -62,9 +89,10 @@ Root @@ -62,9 +89,10 @@ Root
62 89
63 90
64 <h2>{i18n}Preview{/i18n}</h2> 91 <h2>{i18n}Preview{/i18n}</h2>
65 -<div class="helpText"> 92 +<div><p class="descriptiveText">
66 {i18n}Use the +/- arrows to open or close the tree. Bold items are metadata keywords. 93 {i18n}Use the +/- arrows to open or close the tree. Bold items are metadata keywords.
67 To edit a category (including adding or removing keywords) click on the "edit" link.{/i18n} 94 To edit a category (including adding or removing keywords) click on the "edit" link.{/i18n}
  95 + </p>
68 </div> 96 </div>
69 97
70 {$renderedTree} 98 {$renderedTree}
templates/ktcore/workflow/createState.smarty
@@ -7,133 +7,69 @@ the &quot;sent&quot; &lt;strong&gt;transition&lt;/strong&gt; has been performed by a user.&lt;/p&gt; @@ -7,133 +7,69 @@ the &quot;sent&quot; &lt;strong&gt;transition&lt;/strong&gt; has been performed by a user.&lt;/p&gt;
7 7
8 <form action="{$smarty.server.PHP_SELF}" method="POST"> 8 <form action="{$smarty.server.PHP_SELF}" method="POST">
9 <fieldset> 9 <fieldset>
10 -<legend>{i18n}Edit state properties{/i18n}</legend>  
11 -<input type="hidden" name="action" value="saveState" /> 10 +<legend>{i18n}Create a new state{/i18n}</legend>
  11 +
  12 +<p class="descriptiveText">Please note that additional configuration is
  13 +possible on states beyond what is specified here (e.g. which users to notify
  14 +about the document, etc). Please edit the state
  15 +to access and modify these other properties.</p>
  16 +
  17 +<input type="hidden" name="action" value="newState" />
12 <input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" /> 18 <input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
13 -<input type="hidden" name="fStateId" value="{$oState->getId()}" />  
14 -{foreach item=oWidget from=$editForm} 19 +
  20 +{* Standard Form *}
  21 +
  22 +{foreach item=oWidget from=$add_fields}
15 {$oWidget->render()} 23 {$oWidget->render()}
16 {/foreach} 24 {/foreach}
17 -<div class="form_actions">  
18 - <input type="submit" name="submit" value="{i18n}Save{/i18n}" />  
19 -</div>  
20 -</fieldset>  
21 -</form>  
22 25
23 -<form action="{$smarty.server.PHP_SELF}" method="POST">  
24 -<input type="hidden" name="action" value="saveInform" />  
25 -<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />  
26 -<input type="hidden" name="fStateId" value="{$oState->getId()}" /> 26 +{*
27 27
28 -<fieldset>  
29 -<legend>{i18n}Inform Which Users?{/i18n}</legend> 28 +<div class="field">
  29 +<label>Informed Users</label>
30 <p class="descriptiveText">{i18n}Please select which roles or groups should be 30 <p class="descriptiveText">{i18n}Please select which roles or groups should be
31 informed when this state is reached.{/i18n}</p> 31 informed when this state is reached.{/i18n}</p>
32 32
33 33
34 {if $aRoles} 34 {if $aRoles}
35 -<h3>{i18n}Roles{/i18n}</h3> 35 +<p>{i18n}Roles{/i18n}</p>
36 {entity_checkboxes entities=$aRoles name="fRoleIds" multiple="true" selected=$aInformed.role assign=aBoxes} 36 {entity_checkboxes entities=$aRoles name="fRoleIds" multiple="true" selected=$aInformed.role assign=aBoxes}
37 {foreach from=$aBoxes item=sBox} 37 {foreach from=$aBoxes item=sBox}
38 -{$sBox}<br /> 38 +{$sBox}
39 {/foreach} 39 {/foreach}
40 {/if} 40 {/if}
41 41
42 -<h3>{i18n}Groups{/i18n}</h3> 42 +<p>{i18n}Groups{/i18n}</p>
43 {entity_checkboxes entities=$aGroups name="fGroupIds" multiple="true" selected=$aInformed.group assign=aBoxes} 43 {entity_checkboxes entities=$aGroups name="fGroupIds" multiple="true" selected=$aInformed.group assign=aBoxes}
44 {foreach from=$aBoxes item=sBox} 44 {foreach from=$aBoxes item=sBox}
45 -{$sBox}<br />  
46 -{/foreach}  
47 -  
48 -{*  
49 -<h3>{i18n}Users{/i18n}</h3>  
50 -{entity_checkboxes entities=$aUsers name="fUserIds" multiple="true" selected=$aInformed.user assign=aBoxes}  
51 -{foreach from=$aBoxes item=sBox}  
52 -{$sBox}<br /> 45 +{$sBox}
53 {/foreach} 46 {/foreach}
54 -<input type="submit" name="submit" value="{i18n}Save{/i18n}" />  
55 -  
56 -</form>  
57 -*}  
58 -  
59 -</fieldset>  
60 - 47 +</div>
61 48
62 -{*  
63 -<h3>{i18n}Assigned Permissions{/i18n}</h3>  
64 -<p class="descriptiveText">{i18n}While in this workflow state, additional permissions  
65 -may be given. This is done either to expose the document to more users  
66 -or to allow a particular role to be fulfilled before a workflow  
67 -transition can be accomplished.{/i18n}</p>  
68 *} 49 *}
69 50
  51 +<div class="field">
  52 +<label>Actions Allowed</label>
  53 +<p class="descriptiveText">Workflows can control which actions (edit metadata,
  54 +download, etc.) are available on a given document. Please specify which of
  55 +the actions controlled by this workflow are available when the document is in
  56 +this state.</p>
  57 +{if (!empty($aActions))}
70 58
71 -<fieldset>  
72 -<legend>{i18n}Transitions{/i18n}</legend>  
73 -  
74 -<p class="descriptiveText">{i18n}Transitions are how documents move from one  
75 -state to another. Typically, most transitions can only be performed by people  
76 -with a specific <strong>role</strong> (e.g. Manager) or part of a specific group  
77 -(e.g. Marketing Department).{/i18n}</p>  
78 -  
79 -{if $aTransitionsTo}  
80 -<h3>{i18n}Transitions to this state{/i18n}</h3>  
81 -{if (!empty($aTransitionsTo))}  
82 -<ul>  
83 -{foreach from=$aTransitionsTo item=oTransition}  
84 - <li><a  
85 -href="?action=editTransition&fWorkflowId={$oWorkflow->getId()}&fTransitionId={$oTransition->getId()}"  
86 -title="Transition  
87 -{$oTransition->getId()}">{$oTransition->getName()|escape}</a></li> 59 +{entity_checkboxes name="fActions" entities=$aActions idmethod="getName" method="getDisplayName" assign="aCheckboxes" selected="$aActionsSelected"}
  60 +{foreach from=$aCheckboxes item=sCheckbox}
  61 +{$sCheckbox}
88 {/foreach} 62 {/foreach}
89 -</ul>  
90 63
91 -{/if}  
92 -{else}  
93 -<div class="ktInfo"><p>{i18n}No transitions lead to this state.{/i18n}</p></div>  
94 -{/if}  
95 64
96 -<h3>{i18n}Transitions from this state{/i18n}</h3>  
97 -<form action="{$smarty.server.PHP_SELF}" method="POST">  
98 -<input type="hidden" name="action" value="saveTransitions" />  
99 -<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />  
100 -<input type="hidden" name="fStateId" value="{$oState->getId()}" />  
101 -  
102 -{if (!empty($aTransitions))}  
103 -{entity_checkboxes entities=$aTransitions name="fTransitionIds" multiple="true" selected=$aTransitionsSelected separator="<br />"}  
104 -<div class="form_actions">  
105 -<input type="submit" name="submit" value="{i18n}Save{/i18n}" />  
106 -</div>  
107 {else} 65 {else}
108 -<div class="ktInfo"><p>{i18n}No transitions have been defined for this workflow.{/i18n}</p></div> 66 +<div class="ktInfo"<p>{i18n}No actions are controlled by this workflow.{/i18n}</p></div>
109 {/if} 67 {/if}
110 -</form>  
111 -</fieldset>  
112 -  
113 -  
114 -  
115 -  
116 -<form action="{$smarty.server.PHP_SELF}" method="POST">  
117 -<fieldset>  
118 -<legend>Actions allowed</legend>  
119 -  
120 -<input type="hidden" name="action" value="setStateActions" />  
121 -<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />  
122 -<input type="hidden" name="fStateId" value="{$oState->getId()}" /> 68 +</div>
123 69
124 -{if (!empty($aActions))}  
125 -<ul>  
126 -{entity_checkboxes name="fActions" entities=$aActions idmethod="getName" method="getDisplayName" assign="aCheckboxes" selected="$aActionsSelected"}  
127 -{foreach from=$aCheckboxes item=sCheckbox}  
128 -<li>{$sCheckbox}</li>  
129 -{/foreach}  
130 -</ul>  
131 <div class="form_actions"> 70 <div class="form_actions">
132 - <input type="submit" name="submit" value="Set allowed actions" /> 71 +<input type="submit" name="submit" value="{i18n}Create state{/i18n}" />
133 </div> 72 </div>
134 -{else}  
135 -No actions defined.  
136 -{/if} 73 +
137 </fieldset> 74 </fieldset>
138 -</form>  
139 75
templates/ktcore/workflow/createTransition.smarty 0 → 100644
  1 +<h2>{i18n}Manage Transitions{/i18n}</h2>
  2 +
  3 +<p class="descriptiveText">{i18n}Transitions are what drive the workflow of documents.
  4 +Each step that needs to be followed in the document's lifecycle could
  5 +map to a transition, and can be allowed or denied by a combination
  6 +of roles, permissions and groups.{/i18n}</p>
  7 +
  8 +<p class="descriptiveText">{i18n}Use the form below to create a new Transition, and
  9 +assign or edit existing transitions using the table below.{/i18n}</p>
  10 +
  11 +<form action="{$smarty.server.PHP_SELF}" method="POST">
  12 +<fieldset>
  13 +<legend>{i18n}Create a new transition{/i18n}</legend>
  14 +
  15 +<input type="hidden" name="action" value="newTransition" />
  16 +<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
  17 +
  18 +{* Standard Form *}
  19 +
  20 +{foreach item=oWidget from=$add_fields}
  21 + {$oWidget->render()}
  22 +{/foreach}
  23 +
  24 +<div class="field">
  25 +<label>Source States</label>
  26 +<p class="descriptiveText">{i18n}Please select which states this transition should be available from. <strong>Note</strong>
  27 +that transitions are never available from their target state, even if you specify it below.{/i18n}</p>
  28 +
  29 +{foreach item=oState from=$workflow_info.states}
  30 +<label><input type="checkbox" name="fStatesAvailableIn[{$oState->getId()}]" />{$oState->getName()}</label>
  31 +{/foreach}
  32 +</div>
  33 +<div class="form_actions">
  34 +<input type="submit" name="submit" value="{i18n}Create transition{/i18n}" />
  35 +</div>
  36 +</fieldset>
  37 +</form>
  38 +
  39 +</form>
0 \ No newline at end of file 40 \ No newline at end of file
templates/ktcore/workflow/editWorkflow.smarty
@@ -33,7 +33,7 @@ Workflow menu (on the left) to create new states.&lt;/p&gt;&lt;/div&gt; @@ -33,7 +33,7 @@ Workflow menu (on the left) to create new states.&lt;/p&gt;&lt;/div&gt;
33 <li>{i18n}Notified groups &amp; roles:{/i18n} 33 <li>{i18n}Notified groups &amp; roles:{/i18n}
34 {$context->getNotificationStringForState($oState)} 34 {$context->getNotificationStringForState($oState)}
35 </li> 35 </li>
36 - <li>{i18n}Actions available: {/i18n} 36 + <li>{i18n}Controlled Actions available: {/i18n}
37 {$context->getActionStringForState($oState)} 37 {$context->getActionStringForState($oState)}
38 </li> 38 </li>
39 39
templates/ktcore/workflow/manageActions.smarty
@@ -48,8 +48,8 @@ will be available at all states.{/i18n}&lt;/p&gt;&lt;/div&gt; @@ -48,8 +48,8 @@ will be available at all states.{/i18n}&lt;/p&gt;&lt;/div&gt;
48 <thead> 48 <thead>
49 <tr> 49 <tr>
50 <th>&nbsp;</th> 50 <th>&nbsp;</th>
51 - {foreach from=$aActions item=oAction}  
52 - <th>{$oAction->getDisplayName()}</th> 51 + {foreach from=$aActionsSelected item=sAction}
  52 + <th>{$workflow_info.actions_by_name.$sAction->getDisplayName()}</th>
53 {/foreach} 53 {/foreach}
54 </tr> 54 </tr>
55 </thead> 55 </thead>
@@ -57,8 +57,8 @@ will be available at all states.{/i18n}&lt;/p&gt;&lt;/div&gt; @@ -57,8 +57,8 @@ will be available at all states.{/i18n}&lt;/p&gt;&lt;/div&gt;
57 {foreach item=oState from=$workflow_info.states} 57 {foreach item=oState from=$workflow_info.states}
58 <tr class='{cycle values="odd,even"}'> 58 <tr class='{cycle values="odd,even"}'>
59 <td>{$oState->getName()}</td> 59 <td>{$oState->getName()}</td>
60 - {foreach item=oAction from=$aActions}  
61 - <td><input type="checkbox" name="fAvailableActions[{$oState->getId()}][{$oAction->getName()}]" {if ($context->actionAvailable($oAction, $oState))}checked="true"{/if}/></td> 60 + {foreach item=sAction from=$aActionsSelected}
  61 + <td><input type="checkbox" name="fAvailableActions[{$oState->getId()}][{$sAction}]" {if ($context->actionAvailable($sAction, $oState))}checked="true"{/if}/></td>
62 {/foreach} 62 {/foreach}
63 </tr> 63 </tr>
64 {/foreach} 64 {/foreach}
templates/ktcore/workflow/manageStates.smarty
@@ -6,29 +6,16 @@ are placed in certain &lt;strong&gt;states&lt;/strong&gt;. For example, an invoice @@ -6,29 +6,16 @@ are placed in certain &lt;strong&gt;states&lt;/strong&gt;. For example, an invoice
6 which has been mailed might be in the "Pending" <strong>state</strong> after 6 which has been mailed might be in the "Pending" <strong>state</strong> after
7 the "sent" <strong>transition</strong> has been performed by a user.</p> 7 the "sent" <strong>transition</strong> has been performed by a user.</p>
8 8
9 -<form action="{$smarty.server.PHP_SELF}" method="POST">  
10 <fieldset> 9 <fieldset>
11 -<legend>{i18n}Create a new state{/i18n}</legend> 10 +<legend>Create a new state</legend>
  11 +<p class="descriptiveText">A critical part of workflow is the creation of
  12 +various different states for documents.</p>
  13 +<a href="{$smarty.server.PHP_SELF}?action=createState&fWorkflowId={$oWorkflow->getId()}"
  14 + class="ktAction ktInline ktAdd">{i18n}Create a new state{/i18n}</a>
  15 +<a href="{$smarty.server.PHP_SELF}?action=createState&fWorkflowId={$oWorkflow->getId()}">{i18n}Create a new state{/i18n}</a>
12 16
13 -<p class="descriptiveText">Please note that additional configuration is  
14 -possible on states beyond what is specified here (e.g. which users to notify  
15 -about the document, etc). Please edit the state  
16 -to access and modify these other properties.</p>  
17 -  
18 -<input type="hidden" name="action" value="newState" />  
19 -<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />  
20 -  
21 -{* Standard Form *}  
22 -  
23 -{foreach item=oWidget from=$add_fields}  
24 - {$oWidget->render()}  
25 -{/foreach}  
26 -  
27 -<div class="form_actions">  
28 -<input type="submit" name="submit" value="{i18n}Create state{/i18n}" />  
29 -</div>  
30 </fieldset> 17 </fieldset>
31 -</form> 18 +
32 19
33 {if (empty($workflow_info.states))} 20 {if (empty($workflow_info.states))}
34 <div class="ktInfo"><p>This workflow does not define any states.</p></div> 21 <div class="ktInfo"><p>This workflow does not define any states.</p></div>
@@ -40,7 +27,7 @@ to access and modify these other properties.&lt;/p&gt; @@ -40,7 +27,7 @@ to access and modify these other properties.&lt;/p&gt;
40 <li><a href="{$smarty.server.PHP_SELF}?action=editState&fStateId={$oState->getId()}&fWorkflowId={$oWorkflow->getId()}">{i18n}Notified groups & roles:{/i18n}</a> 27 <li><a href="{$smarty.server.PHP_SELF}?action=editState&fStateId={$oState->getId()}&fWorkflowId={$oWorkflow->getId()}">{i18n}Notified groups & roles:{/i18n}</a>
41 {$context->getNotificationStringForState($oState)} 28 {$context->getNotificationStringForState($oState)}
42 </li> 29 </li>
43 - <li><a href="{$smarty.server.PHP_SELF}?action=editState&fStateId={$oState->getId()}&fWorkflowId={$oWorkflow->getId()}">{i18n}Actions available: {/i18n}</a> 30 + <li><a href="{$smarty.server.PHP_SELF}?action=editState&fStateId={$oState->getId()}&fWorkflowId={$oWorkflow->getId()}">{i18n}Controlled Actions available: {/i18n}</a>
44 {$context->getActionStringForState($oState)} 31 {$context->getActionStringForState($oState)}
45 </li> 32 </li>
46 33
templates/ktcore/workflow/manageTransitions.smarty
@@ -5,27 +5,15 @@ Each step that needs to be followed in the document&#39;s lifecycle could @@ -5,27 +5,15 @@ Each step that needs to be followed in the document&#39;s lifecycle could
5 map to a transition, and can be allowed or denied by a combination 5 map to a transition, and can be allowed or denied by a combination
6 of roles, permissions and groups.{/i18n}</p> 6 of roles, permissions and groups.{/i18n}</p>
7 7
8 -<p class="descriptiveText">{i18n}Use the form below to create a new Transition, and  
9 -assign or edit existing transitions using the table below.{/i18n}</p>  
10 -  
11 -<form action="{$smarty.server.PHP_SELF}" method="POST">  
12 <fieldset> 8 <fieldset>
13 -<legend>{i18n}Create a new state{/i18n}</legend>  
14 -  
15 -<input type="hidden" name="action" value="newTransition" />  
16 -<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" /> 9 +<legend>{i18n}Create a new transition{/i18n}</legend>
17 10
18 -{* Standard Form *} 11 +<a href="{$smarty.server.PHP_SELF}?action=createTransition&fWorkflowId={$oWorkflow->getId()}"
  12 + class="ktAction ktAdd ktInline">{i18n}Create a new transition{/i18n}</a>
  13 +<a href="{$smarty.server.PHP_SELF}?action=createTransition&fWorkflowId={$oWorkflow->getId()}"
  14 + >{i18n}Create a new transition{/i18n}</a>
19 15
20 -{foreach item=oWidget from=$add_fields}  
21 - {$oWidget->render()}  
22 -{/foreach}  
23 -  
24 -<div class="form_actions">  
25 -<input type="submit" name="submit" value="{i18n}Create transition{/i18n}" />  
26 -</div>  
27 </fieldset> 16 </fieldset>
28 -</form>  
29 17
30 <h3>{i18n}Transition Availability{/i18n}</h3> 18 <h3>{i18n}Transition Availability{/i18n}</h3>
31 19
thirdparty/icon-theme/16x16/actions/add.gif 0 → 100644

611 Bytes

thirdparty/icon-theme/16x16/actions/add.png 0 → 100644

847 Bytes