Commit 5f499bdc4b97afb38a8fba42da1323a1a5033a4d
1 parent
75150927
added checked out by to view document details
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1232 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
5 additions
and
5 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
| ... | ... | @@ -15,26 +15,26 @@ |
| 15 | 15 | |
| 16 | 16 | function renderDocumentPath($oDocument) { |
| 17 | 17 | global $default; |
| 18 | - //$sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > <a href=\"" . $_SERVER["PHP_SELF"] . "?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\">" . $oDocument->getName() . "</a>"; | |
| 19 | 18 | $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > <a href=\"$default->rootUrl/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\">" . $oDocument->getName() . "</a>"; |
| 20 | 19 | return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n"; |
| 21 | 20 | } |
| 22 | 21 | |
| 23 | 22 | function renderDocumentData($oDocument) { |
| 24 | 23 | global $default; |
| 25 | - $sQuery = "SELECT D.name, D.modified, DTT.datetime AS created, U.name AS initiator, CONCAT(CONCAT(D.major_version, '.'), D.minor_version) AS version, WDSL.name AS status, DTL.name AS document_type " . | |
| 24 | + $sQuery = "SELECT D.name, D.modified, DTT.datetime AS created, U.name AS initiator, CONCAT(CONCAT(D.major_version, '.'), D.minor_version) AS version, WDSL.name AS status, DTL.name AS document_type, D.is_checked_out, COALESCE(U2.name, '') AS c_user " . | |
| 26 | 25 | "FROM $default->owl_documents_table AS D INNER JOIN $default->owl_web_documents_table AS WD ON WD.document_id = D.ID " . |
| 27 | 26 | "INNER JOIN $default->owl_web_documents_status_table AS WDSL ON WD.status_id = WDSL.id " . |
| 28 | 27 | "INNER JOIN $default->owl_users_table AS U ON U.id = D.creator_id " . |
| 29 | 28 | "INNER JOIN $default->owl_document_transactions_table AS DTT ON DTT.document_id = D.id " . |
| 30 | 29 | "INNER JOIN $default->owl_transaction_types_table AS TT ON DTT.transaction_id = TT.id " . |
| 31 | 30 | "INNER JOIN $default->owl_document_types_table AS DTL ON DTL.id = D.document_type_id " . |
| 31 | + "LEFT OUTER JOIN $default->owl_users_table AS U2 ON U2.id = D.checked_out_user_id " . | |
| 32 | 32 | "WHERE D.id = " . $oDocument->getID() . " " . |
| 33 | 33 | "AND TT.name LIKE 'Create'"; |
| 34 | 34 | |
| 35 | - $aColumns = array("name", "modified", "created", "initiator", "document_type", "version", "status"); | |
| 36 | - $aColumnNames = array("Document title", "Last updated", "Created", "Document initiator", "Document Type", "Version", "Status"); | |
| 37 | - $aColumnTypes = array(1,1,1,1,1,1); | |
| 35 | + $aColumns = array("name", "modified", "created", "initiator", "document_type", "version", "status", "c_user"); | |
| 36 | + $aColumnNames = array("Document title", "Last updated", "Created", "Document initiator", "Document Type", "Version", "Status", "Checked out by"); | |
| 37 | + $aColumnTypes = array(1,1,1,1,1,1,1,1); | |
| 38 | 38 | $oPatternListFromQuery = & new PatternListFromQuery($sQuery, $aColumns, $aColumnNames, $aColumnTypes); |
| 39 | 39 | $oPatternListFromQuery->setTableHeading("Document Data"); |
| 40 | 40 | $oPatternListFromQuery->setTableWidth("90%"); | ... | ... |