Commit bdeda574150bda8daf7bf43cc3d9650592a47e62

Authored by Michael Joseph
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
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
@@ -336,6 +336,9 @@ function renderNonEditableLinkedDocuments($oDocument) { @@ -336,6 +336,9 @@ function renderNonEditableLinkedDocuments($oDocument) {
336 336
337 function displayActionButtons($oDocument, $bEdit) { 337 function displayActionButtons($oDocument, $bEdit) {
338 global $default; 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 if ($bEdit) { 342 if ($bEdit) {
340 // display the check in button if the document is checked out and you checked the document out 343 // display the check in button if the document is checked out and you checked the document out
341 if ($oDocument->getIsCheckedOut() && ($oDocument->getCheckedOutUserID() == $_SESSION["userID"])) { 344 if ($oDocument->getIsCheckedOut() && ($oDocument->getCheckedOutUserID() == $_SESSION["userID"])) {
@@ -361,15 +364,22 @@ function displayActionButtons($oDocument, $bEdit) { @@ -361,15 +364,22 @@ function displayActionButtons($oDocument, $bEdit) {
361 // otherwise display the subscribe button 364 // otherwise display the subscribe button
362 } else { 365 } else {
363 $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"; 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 $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"; 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 // only display the archive button for available documents 369 // only display the archive button for available documents
368 if (!$oDocument->getIsCheckedOut() || !$oDocument->hasCollaboration() || (!DocumentCollaboration::documentCollaborationStarted($oDocument->getID()))) { 370 if (!$oDocument->getIsCheckedOut() || !$oDocument->hasCollaboration() || (!DocumentCollaboration::documentCollaborationStarted($oDocument->getID()))) {
369 $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"; 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 $sToRender .= "<td align=\"left\"><a href=\"" . generateControllerLink("createDependantDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/dependentdoc.gif\" border=\"0\" /></a></td>\n"; 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\">&nbsp;</td></tr>\n";
  378 + $sToRender .= "<tr><td align=\"left\">&nbsp;</td></tr>\n";
  379 + $sToRender .= "<tr><td align=\"left\">&nbsp;</td></tr>\n";
  380 + $sToRender .= "<tr><td align=\"left\">&nbsp;</td></tr>\n";
  381 + }
  382 +
373 return $sToRender; 383 return $sToRender;
374 } 384 }
375 385