Commit 9b655dfcda2b62070b141f188308006f875c4f79
1 parent
4ddcd774
fixed #2647 and #2648
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2253 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
15 additions
and
16 deletions
presentation/lookAndFeel/knowledgeTree/administration/doccheckoutmanagement/editDocCheckoutBL.php
| ... | ... | @@ -14,7 +14,7 @@ if (checkSession()) { |
| 14 | 14 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); |
| 15 | 15 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableListFromQuery.inc"); |
| 16 | 16 | require_once("editDocCheckoutUI.inc"); |
| 17 | - require_once("$default->fileSystemRoot/lib/documentmanagement/document.inc"); | |
| 17 | + require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); | |
| 18 | 18 | require_once("$default->fileSystemRoot/lib/security/permission.inc"); |
| 19 | 19 | require_once("$default->fileSystemRoot/lib/links/link.inc"); |
| 20 | 20 | require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); |
| ... | ... | @@ -34,9 +34,8 @@ if (checkSession()) { |
| 34 | 34 | |
| 35 | 35 | if (($oDoc->getIsCheckedOut() > 0 && $fDocCheckout=="on" ) || |
| 36 | 36 | ($oDoc->getIsCheckedOut() == 0 && $fDocCheckout=="" )){ |
| 37 | - | |
| 38 | - $oPatternCustom->setErrorMessage("No changes were made to the document checkout."); | |
| 39 | - }else { | |
| 37 | + $main->setErrorMessage("No changes were made to the document checkout."); | |
| 38 | + } else { | |
| 40 | 39 | if ($fDocCheckout=="on"){ |
| 41 | 40 | $oDoc->setIsCheckedOut(1); |
| 42 | 41 | }else { |
| ... | ... | @@ -46,7 +45,7 @@ if (checkSession()) { |
| 46 | 45 | if ($oDoc->update()){ |
| 47 | 46 | $oPatternCustom->addHtml(getEditCheckoutSuccessPage()); |
| 48 | 47 | } else { |
| 49 | - $oPatternCustom->setErrorMessage("Error while trying to update the document checkout."); | |
| 48 | + $main->setErrorMessage("Error while trying to update the document checkout."); | |
| 50 | 49 | } |
| 51 | 50 | } |
| 52 | 51 | } | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doccheckoutmanagement/listDocumentsBL.php
| ... | ... | @@ -32,31 +32,31 @@ if (checkSession()) { |
| 32 | 32 | |
| 33 | 33 | if(checkSession()) { |
| 34 | 34 | |
| 35 | - $oPatternCustom->addHtml(renderHeading("Documents")); // Create the Heading | |
| 35 | + $oPatternCustom->addHtml(renderHeading("Checked out Documents")); // Create the Heading | |
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | $main->setFormAction($_SERVER['PHP_SELF']); |
| 39 | 39 | |
| 40 | - $sQuery = "SELECT documents.id as DocId, documents.name as Name, documents.filename as File, is_checked_out as CheckedOut, " . | |
| 40 | + $sQuery = "SELECT documents.id as DocId, documents.name as Name, documents.filename as File, " . | |
| 41 | 41 | "CASE WHEN users.name Is Null THEN '<font color=blue>* No one</font>' ELSE users.name END AS UserName, " . |
| 42 | - "'Edit Checkout' " . | |
| 42 | + "'Check In' " . | |
| 43 | 43 | "FROM documents left join users " . |
| 44 | - "on documents.checked_out_user_id = users.id "; | |
| 44 | + "on documents.checked_out_user_id = users.id " . | |
| 45 | + "WHERE documents.is_checked_out = 1"; | |
| 45 | 46 | |
| 46 | - $aColumns = array("Name", "File", "CheckedOut", "UserName", "Edit Checkout"); | |
| 47 | - $aColumnNames = array("Name", "File", "Checked Out?", "Checked Out to", "Edit Checkout"); | |
| 48 | - $aColumnTypes = array(1,1,2,1,3); | |
| 47 | + $aColumns = array("Name", "File", "UserName", "Check In"); | |
| 48 | + $aColumnNames = array("Name", "File", "Checked Out by", ""); | |
| 49 | + $aColumnTypes = array(1,1,1,3); | |
| 49 | 50 | $aDBColumnArray = array("DocId"); |
| 50 | 51 | $aQueryStringVariableNames = array("fDocID"); |
| 51 | 52 | |
| 52 | - $aHyperLinkURL = array( 4=> "$default->rootUrl/control.php?action=editDocCheckout"); | |
| 53 | + $aHyperLinkURL = array( 3=> "$default->rootUrl/control.php?action=editDocCheckout"); | |
| 53 | 54 | |
| 54 | 55 | $oSearchResults = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnNames, "100%", $aHyperLinkURL,$aDBColumnArray,$aQueryStringVariableNames); |
| 55 | - | |
| 56 | 56 | $oSearchResults->setDisplayColumnHeadings(true); |
| 57 | - $htmlTables = $oSearchResults->render() ; | |
| 57 | + $oSearchResults->setEmptyTableMessage("No checked out documents"); | |
| 58 | 58 | |
| 59 | - $oPatternCustom->addHtml($htmlTables); | |
| 59 | + $oPatternCustom->addHtml($oSearchResults->render()); | |
| 60 | 60 | |
| 61 | 61 | } // end of if checksession |
| 62 | 62 | ... | ... |