From 5f4b1127d2cffb583635961413843ca69332b6fb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Mar 2010 16:28:21 +0100 Subject: [PATCH] Fixed Copy/Move template for Workflow actions --- plugins/ktcore/KTWorkflowTriggers.inc.php | 12 ++++++++---- templates/ktcore/workflowtriggers/copyaction.smarty | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 templates/ktcore/workflowtriggers/copyaction.smarty diff --git a/plugins/ktcore/KTWorkflowTriggers.inc.php b/plugins/ktcore/KTWorkflowTriggers.inc.php index 01ae978..862f8e6 100644 --- a/plugins/ktcore/KTWorkflowTriggers.inc.php +++ b/plugins/ktcore/KTWorkflowTriggers.inc.php @@ -33,7 +33,7 @@ * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices * must display the words "Powered by KnowledgeTree" and retain the original * copyright notice. - * Contributor( s): ______________________________________ + * Contributor( s): thePanz (thepanz@gmail.com) * */ @@ -475,9 +475,9 @@ class BaseCopyActionTrigger extends KTWorkflowTrigger { $oToFolder = Folder::get($iFolderId); if (PEAR::isError($oFolder)) { if ($this->isCopy) - return PEAR::raiseError(_kt('The folder to which this document should be copied does not exist. Cancelling the transition - please contact a system administrator.')); + return PEAR::raiseError(_kt('The folder to which this document should be copied does not exists. Cancelling the transition - please contact a system administrator.')); else - return PEAR::raiseError(_kt('The folder to which this document should be moved does not exist. Cancelling the transition - please contact a system administrator.')); + return PEAR::raiseError(_kt('The folder to which this document should be moved does not exists. Cancelling the transition - please contact a system administrator.')); } if ($this->isCopy) @@ -488,8 +488,12 @@ class BaseCopyActionTrigger extends KTWorkflowTrigger { function displayConfiguration($args) { $oTemplating =& KTTemplating::getSingleton(); - $oTemplate = $oTemplating->loadTemplate('ktcore/workflowtriggers/moveaction'); + if ($this->isCopy) + $oTemplate = $oTemplating->loadTemplate('ktcore/workflowtriggers/copyaction'); + else + $oTemplate = $oTemplating->loadTemplate('ktcore/workflowtriggers/moveaction'); + require_once(KT_LIB_DIR . '/browse/DocumentCollection.inc.php'); require_once(KT_LIB_DIR . '/browse/columnregistry.inc.php'); diff --git a/templates/ktcore/workflowtriggers/copyaction.smarty b/templates/ktcore/workflowtriggers/copyaction.smarty new file mode 100644 index 0000000..69f6443 --- /dev/null +++ b/templates/ktcore/workflowtriggers/copyaction.smarty @@ -0,0 +1,23 @@ +

{i18n}Copy Action for Transition{/i18n}

+ +
+
+ {i18n}Copy{/i18n} + + +{foreach from=$args item=val key=name} + +{/foreach} + +

{i18n}Specify the folder to which the document must be copied to.{/i18n}

+ +{$breadcrumbs} + +{$collection->render()} + +
+ + {* FIXME how do I cancel again? *} +
+
+
-- libgit2 0.21.4