Commit 702ade26897a0ff88ac0212361f12d279e314e5d
1 parent
a5bdc823
moved checkout button to the front
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1441 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
10 additions
and
8 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
| ... | ... | @@ -193,6 +193,15 @@ function getEditPage($oDocument) { |
| 193 | 193 | $sToRender .= "</table>\n"; |
| 194 | 194 | $sToRender .= "<table>\n"; |
| 195 | 195 | $sToRender .= "<tr>\n"; |
| 196 | + | |
| 197 | + // display the check in button if the document is checked out and you checked the document out | |
| 198 | + if ($oDocument->getIsCheckedOut() && ($oDocument->getCheckedOutUserID() == $_SESSION["userID"])) { | |
| 199 | + $sToRender .= "<td><a href=\"" . generateControllerLink("checkInDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkin.gif\" border=\"0\" /></a></td>\n"; | |
| 200 | + // otherwise display the check out button | |
| 201 | + } else { | |
| 202 | + $sToRender .= "<td><a href=\"" . generateControllerLink("checkOutDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkout.gif\" border=\"0\" /></a></td>\n"; | |
| 203 | + } | |
| 204 | + | |
| 196 | 205 | if ($default->phpSniff->property("browser") == "ie") { |
| 197 | 206 | $sToRender .= "<td><a href=\"http://" . $default->serverName . $_SERVER["PHP_SELF"] . "?fDocumentID=" . $oDocument->getID() . "&fForDownload=1\"><img src=\"$default->graphicsUrl/widgets/download.gif\" border=\"0\" /></a></td>\n"; |
| 198 | 207 | } else { |
| ... | ... | @@ -202,14 +211,7 @@ function getEditPage($oDocument) { |
| 202 | 211 | $sToRender .= "<td><a href=\"" . generateControllerLink("deleteDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/delete.gif\" border=\"0\" /></a></td>\n"; |
| 203 | 212 | $sToRender .= "<td><a href=\"" . generateControllerLink("viewHistory", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/history.gif\" border=\"0\" /></a></td>\n"; |
| 204 | 213 | |
| 205 | - // display the check in button if the document is checked out and you checked the document out | |
| 206 | - if ($oDocument->getIsCheckedOut() && ($oDocument->getCheckedOutUserID() == $_SESSION["userID"])) { | |
| 207 | - $sToRender .= "<td><a href=\"" . generateControllerLink("checkInDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkin.gif\" border=\"0\" /></a></td>\n"; | |
| 208 | - // otherwise display the check out button | |
| 209 | - } else { | |
| 210 | - $sToRender .= "<td><a href=\"" . generateControllerLink("checkOutDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkout.gif\" border=\"0\" /></a></td>\n"; | |
| 211 | - } | |
| 212 | - | |
| 214 | + | |
| 213 | 215 | // display the unsubscribe button if the user is subscribed to the document |
| 214 | 216 | if (Subscription::exists($_SESSION["userID"], $oDocument->getID(), SubscriptionConstants::subscriptionType("DocumentSubscription"))) { |
| 215 | 217 | $sToRender .= "<td><a href=\"" . generateControllerLink("removeSubscription", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/unsubscribe.gif\" border=\"0\" /></a></td>\n"; | ... | ... |