Commit bdeda574150bda8daf7bf43cc3d9650592a47e62
1 parent
538aaa40
moved download button to the top
added button spacing hack for document readonly view git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2245 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
13 additions
and
3 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
| ... | ... | @@ -336,6 +336,9 @@ function renderNonEditableLinkedDocuments($oDocument) { |
| 336 | 336 | |
| 337 | 337 | function displayActionButtons($oDocument, $bEdit) { |
| 338 | 338 | global $default; |
| 339 | + | |
| 340 | + // TODO: change to view | |
| 341 | + $sToRender .= "<tr><td align=\"left\"><a onClick=\"alert('This will download a copy of the document and is not the same as Checking Out a document. Changes to this downloaded file will not be managed in the DMS.'); return true;\" href=\"" . generateControllerLink("downloadDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/download.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 339 | 342 | if ($bEdit) { |
| 340 | 343 | // display the check in button if the document is checked out and you checked the document out |
| 341 | 344 | if ($oDocument->getIsCheckedOut() && ($oDocument->getCheckedOutUserID() == $_SESSION["userID"])) { |
| ... | ... | @@ -361,15 +364,22 @@ function displayActionButtons($oDocument, $bEdit) { |
| 361 | 364 | // otherwise display the subscribe button |
| 362 | 365 | } else { |
| 363 | 366 | $sToRender .= "<tr><td align=\"left\"><a href=\"" . generateControllerLink("addSubscription", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/subscribe.gif\" border=\"0\" /></a></td></tr>\n"; |
| 364 | - } | |
| 365 | - $sToRender .= "<tr><td align=\"left\"><a onClick=\"alert('This will download a copy of the document and is not the same as Checking Out a document. Changes to this downloaded file will not be managed in the DMS.'); return true;\" href=\"" . generateControllerLink("downloadDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/download.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 367 | + } | |
| 366 | 368 | $sToRender .= "<tr><td align=\"left\"><a href=\"" . generateControllerLink("viewDiscussion", "fDocumentID=" . $oDocument->getID() . "&fForDiscussion=1") . "\"><img src=\"$default->graphicsUrl/widgets/docactions/discussion.gif\" border=\"0\" /></a></td></tr>\n"; |
| 367 | 369 | // only display the archive button for available documents |
| 368 | 370 | if (!$oDocument->getIsCheckedOut() || !$oDocument->hasCollaboration() || (!DocumentCollaboration::documentCollaborationStarted($oDocument->getID()))) { |
| 369 | 371 | $sToRender .= "<tr><td align=\"left\"><a href=\"" . generateControllerLink("archiveDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/archive.gif\" border=\"0\" /></a></td></tr>\n"; |
| 370 | 372 | } |
| 371 | 373 | $sToRender .= "<td align=\"left\"><a href=\"" . generateControllerLink("createDependantDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/dependentdoc.gif\" border=\"0\" /></a></td>\n"; |
| 372 | - | |
| 374 | + | |
| 375 | + // spacing hack | |
| 376 | + if (!$bEdit) { | |
| 377 | + $sToRender .= "<tr><td align=\"left\"> </td></tr>\n"; | |
| 378 | + $sToRender .= "<tr><td align=\"left\"> </td></tr>\n"; | |
| 379 | + $sToRender .= "<tr><td align=\"left\"> </td></tr>\n"; | |
| 380 | + $sToRender .= "<tr><td align=\"left\"> </td></tr>\n"; | |
| 381 | + } | |
| 382 | + | |
| 373 | 383 | return $sToRender; |
| 374 | 384 | } |
| 375 | 385 | ... | ... |