Commit a82a8d588e4f64ebda5973b446c30f9c02d7107c
1 parent
48fa35e1
added check in / check out buttons
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1146 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
10 additions
and
1 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
| ... | ... | @@ -159,7 +159,16 @@ function getEditPage($oDocument) { |
| 159 | 159 | $sToRender .= "<td><input type=\"image\" src=\"$default->graphicsUrl/widgets/edit.gif\" border=\"0\"></td>\n"; |
| 160 | 160 | $sToRender .= "<td><a href=\"" . $_SERVER["PHP_SELF"] . "?fDocumentID=" . $oDocument->getID() . "&fForDownload=1\"><img src=\"$default->graphicsUrl/widgets/download.gif\" border=\"0\" /></a></td>\n"; |
| 161 | 161 | $sToRender .= "<td><a href=\"" . generateControllerLink("emailDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/email.gif\" border=\"0\" /></a></td>\n"; |
| 162 | - $sToRender .= "<td><a href=\"" . generateControllerLink("deleteDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/delete.gif\" border=\"0\" /></a></td>\n"; | |
| 162 | + $sToRender .= "<td><a href=\"" . generateControllerLink("deleteDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/delete.gif\" border=\"0\" /></a></td>\n"; | |
| 163 | + | |
| 164 | + // display the check in button if the document is checked out | |
| 165 | + if ($oDocument->getIsCheckedOut()) { | |
| 166 | + $sToRender .= "<td><a href=\"" . generateControllerLink("checkInDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkin.gif\" border=\"0\" /></a></td>\n"; | |
| 167 | + // otherwise display the check out button | |
| 168 | + } else { | |
| 169 | + $sToRender .= "<td><a href=\"" . generateControllerLink("checkOutDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkout.gif\" border=\"0\" /></a></td>\n"; | |
| 170 | + } | |
| 171 | + | |
| 163 | 172 | $sToRender .= "</tr>\n"; |
| 164 | 173 | $sToRender .= "</table>\n"; |
| 165 | 174 | ... | ... |