Commit 3b4bd0931052c98922f1ef3a86d8c03dbf7d4e1f
1 parent
56270082
- handle the case where no workflow actions are controlled gracefully.
- user-passwords are controlled. - make conditions editable - add copyright to VD - clean up user/group visual display. - conditional metadata was broken again - help-overview was not using correct CSS. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4602 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
13 changed files
with
29 additions
and
24 deletions
lib/workflow/workflowutil.inc.php
| ... | ... | @@ -147,13 +147,15 @@ class KTWorkflowUtil { |
| 147 | 147 | return $res; |
| 148 | 148 | } |
| 149 | 149 | $aOptions = array('noid' => true); |
| 150 | - foreach ($aActions as $sAction) { | |
| 151 | - $res = DBUtil::autoInsert($sTable, array( | |
| 152 | - 'workflow_id' => $iWorkflowId, | |
| 153 | - 'action_name' => $sAction, | |
| 154 | - ), $aOptions); | |
| 155 | - if (PEAR::isError($res)) { | |
| 156 | - return $res; | |
| 150 | + if (!empty($aActions)) { | |
| 151 | + foreach ($aActions as $sAction) { | |
| 152 | + $res = DBUtil::autoInsert($sTable, array( | |
| 153 | + 'workflow_id' => $iWorkflowId, | |
| 154 | + 'action_name' => $sAction, | |
| 155 | + ), $aOptions); | |
| 156 | + if (PEAR::isError($res)) { | |
| 157 | + return $res; | |
| 158 | + } | |
| 157 | 159 | } |
| 158 | 160 | } |
| 159 | 161 | return; | ... | ... |
plugins/ktcore/KTCorePlugin.php
| ... | ... | @@ -110,7 +110,7 @@ class KTCorePlugin extends KTPlugin { |
| 110 | 110 | _('Archived Document Restoration'), _("Restore old (archived) documents, usually at a user's request."), |
| 111 | 111 | 'admin/archivedDocuments.php', null); |
| 112 | 112 | $this->registerAdminPage("expunge", 'DeletedDocumentsDispatcher', 'storage', |
| 113 | - _('Expunge Deleted Documents'), _('Permanently expunge deleted documents.'), | |
| 113 | + _('Restore or Expunge Deleted Documents'), _('Restore previously deleted documents, or permanently expunge them.'), | |
| 114 | 114 | 'admin/deletedDocuments.php', null); |
| 115 | 115 | |
| 116 | 116 | // misc | ... | ... |
plugins/ktcore/KTDocumentActions.php
| ... | ... | @@ -626,6 +626,9 @@ class KTDocumentWorkflowAction extends KTDocumentAction { |
| 626 | 626 | $oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentId']); |
| 627 | 627 | $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']); |
| 628 | 628 | $res = KTWorkflowUtil::startWorkflowOnDocument($oWorkflow, $oDocument); |
| 629 | + if (PEAR::isError($res)) { | |
| 630 | + $this->errorRedirectToMain($res->message, sprintf('fDocumentId=%s',$oDocument->getId())); | |
| 631 | + } | |
| 629 | 632 | $this->successRedirectToMain(_('Workflow started'), |
| 630 | 633 | array('fDocumentId' => $oDocument->getId())); |
| 631 | 634 | exit(0); | ... | ... |
plugins/ktcore/admin/ajaxSimpleConditionals.php
| 1 | 1 | <?php |
| 2 | -require_once("../../../../../../config/dmsDefaults.php"); | |
| 2 | +require_once("../../../config/dmsDefaults.php"); | |
| 3 | 3 | require_once(KT_LIB_DIR . "/templating/templating.inc.php"); |
| 4 | 4 | require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc"); |
| 5 | 5 | require_once(KT_LIB_DIR . "/database/dbutil.inc"); |
| 6 | 6 | require_once(KT_LIB_DIR . "/util/ktutil.inc"); |
| 7 | 7 | require_once(KT_LIB_DIR . "/dispatcher.inc.php"); |
| 8 | 8 | $sectionName = "Administration"; |
| 9 | -require_once(KT_DIR . "/presentation/webpageTemplate.inc"); | |
| 9 | + | |
| 10 | 10 | |
| 11 | 11 | require_once(KT_LIB_DIR . "/metadata/fieldset.inc.php"); |
| 12 | 12 | require_once(KT_LIB_DIR . '/metadata/fieldbehaviour.inc.php'); | ... | ... |
plugins/ktcore/admin/groupManagement.php
| ... | ... | @@ -330,10 +330,10 @@ class KTGroupAdminDispatcher extends KTAdminDispatcher { |
| 330 | 330 | |
| 331 | 331 | function do_addGroup() { |
| 332 | 332 | $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _('Group Management')); |
| 333 | - $this->oPage->setBreadcrumbDetails(_('create new group')); | |
| 333 | + $this->oPage->setBreadcrumbDetails(_('Add a new group')); | |
| 334 | 334 | |
| 335 | 335 | |
| 336 | - $this->oPage->setTitle(_("Create New Group")); | |
| 336 | + $this->oPage->setTitle(_("Add a new group")); | |
| 337 | 337 | |
| 338 | 338 | $edit_fields = array(); |
| 339 | 339 | $add_fields[] = new KTStringWidget(_('Group Name'),_('A short name for the group. e.g. <strong>administrators</strong>.'), 'group_name', null, $this->oPage, true); | ... | ... |
plugins/ktcore/admin/manageConditionals.php
| 1 | 1 | <?php |
| 2 | -require_once("../../../../../../config/dmsDefaults.php"); | |
| 2 | +require_once("../../../config/dmsDefaults.php"); | |
| 3 | 3 | require_once(KT_LIB_DIR . "/templating/templating.inc.php"); |
| 4 | 4 | require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc"); |
| 5 | 5 | require_once(KT_LIB_DIR . "/database/dbutil.inc"); | ... | ... |
plugins/ktcore/folder/addDocument.php
| ... | ... | @@ -41,7 +41,7 @@ class KTFolderAddDocumentAction extends KTFolderAction { |
| 41 | 41 | $oTemplate =& $this->oValidator->validateTemplate('ktcore/document/add'); |
| 42 | 42 | $add_fields = array(); |
| 43 | 43 | $add_fields[] = new KTFileUploadWidget(_('File'), _('The contents of the document to be added to the document management system.'), 'file', "", $this->oPage, true); |
| 44 | - $add_fields[] = new KTStringWidget(_('Title'), _('Describe the changes made to the document.'), 'title', "", $this->oPage, true); | |
| 44 | + $add_fields[] = new KTStringWidget(_('Title'), _('The document title is used as the main name of a document through the KnowledgeTree.'), 'title', "", $this->oPage, true); | |
| 45 | 45 | |
| 46 | 46 | $aVocab = array(); |
| 47 | 47 | foreach (DocumentType::getList() as $oDocumentType) { | ... | ... |
templates/ktcore/folder/roles.smarty
| ... | ... | @@ -20,6 +20,7 @@ role allocations can take very long time, depending on the number of folders bel |
| 20 | 20 | </tr> |
| 21 | 21 | </thead> |
| 22 | 22 | <tbody> |
| 23 | +{if (count($roles) > 0)} | |
| 23 | 24 | {foreach item=aRole key=role_id from=$roles} |
| 24 | 25 | <tr class="{cycle values=odd,even}"> |
| 25 | 26 | <td>{$aRole.name}</td> |
| ... | ... | @@ -43,5 +44,8 @@ role allocations can take very long time, depending on the number of folders bel |
| 43 | 44 | {/if} |
| 44 | 45 | </tr> |
| 45 | 46 | {/foreach} |
| 47 | +{else} | |
| 48 | +<tr><td colspan="4" class="ktInfo"><p>{i18n}No roles defined in the Role Administration area.{/i18n}</p></td></tr> | |
| 49 | +{/if} | |
| 46 | 50 | </tbody> |
| 47 | 51 | </table> |
| 48 | 52 | \ No newline at end of file | ... | ... |
templates/ktcore/metadata/conditional/editsimple.smarty
| ... | ... | @@ -93,7 +93,7 @@ addLoadEvent(partial(editSimpleField, {$iMasterFieldId})); |
| 93 | 93 | |
| 94 | 94 | </tr> |
| 95 | 95 | </table> |
| 96 | - | |
| 96 | +<!-- | |
| 97 | 97 | <table id="brad-log"> |
| 98 | 98 | <tr> |
| 99 | 99 | <th>Severity</th> |
| ... | ... | @@ -104,3 +104,4 @@ addLoadEvent(partial(editSimpleField, {$iMasterFieldId})); |
| 104 | 104 | |
| 105 | 105 | </tbody> |
| 106 | 106 | </table> |
| 107 | +--> | |
| 107 | 108 | \ No newline at end of file | ... | ... |
templates/ktcore/metadata/conditional/manageConditional.smarty
| ... | ... | @@ -40,7 +40,7 @@ complex conditional{/i18n}</a> |
| 40 | 40 | {else} |
| 41 | 41 | |
| 42 | 42 | {i18n}Simple{/i18n}: <a |
| 43 | -href="{$config->get("urls/uiUrl")}/administration/docfieldmanagement/conditional/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 | 44 | |
| 45 | 45 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| 46 | 46 | <input type="hidden" name="action" value="changeToComplex" /> | ... | ... |
templates/ktcore/principals/addgroup.smarty
| 1 | -<h2>{i18n}Create a new Group{/i18n}</h2> | |
| 1 | +<h2>{i18n}Add a new group{/i18n}</h2> | |
| 2 | 2 | |
| 3 | -<p class="descriptiveText">{i18n}Create a new group.{/i18n}</p> | |
| 3 | +<p class="descriptiveText">{i18n}Add a new group{/i18n}</p> | |
| 4 | 4 | |
| 5 | 5 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| 6 | 6 | <input type="hidden" name="action" value="createGroup" /> |
| 7 | 7 | |
| 8 | 8 | <fieldset> |
| 9 | - <legend>{i18n}Change Group Details{/i18n}</legend> | |
| 9 | + <legend>{i18n}Specify group details{/i18n}</legend> | |
| 10 | 10 | <p class="descriptiveText"><strong>FIXME</strong> brief overview of group editing.</p> |
| 11 | 11 | {foreach item=oWidget from=$add_fields} |
| 12 | 12 | {$oWidget->render()} | ... | ... |
templates/ktcore/principals/groupadmin.smarty
| 1 | 1 | <h2>{i18n}Group Administration{/i18n}</h2> |
| 2 | 2 | |
| 3 | -<p class="descriptiveText"><strong>FIXME</strong> Overview of groups.</p> | |
| 4 | - | |
| 5 | - | |
| 6 | 3 | <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 | 4 | |
| 8 | 5 | <!-- we roll both in here. --> | ... | ... |
templates/ktcore/principals/useradmin.smarty
| 1 | 1 | <h2>User Management</h2> |
| 2 | 2 | |
| 3 | -<p class="descriptiveText"><strong>FIXME</strong> brief overview of user management.</p> | |
| 4 | -<div class="ktError"><p>Restrict groups that are editable based on <strong>group_id</strong> if only a unitAdmin</p></div> | |
| 5 | 3 | |
| 6 | 4 | <!-- FIXME inline CSS is _very_ bad. --> |
| 7 | 5 | ... | ... |