Commit e7262b0b61b8e5d0f762cccc8fb6824b6438e54e

Authored by michael
1 parent 555f8b31

implemented action button spacing


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2359 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
... ... @@ -336,11 +336,12 @@ function renderNonEditableLinkedDocuments($oDocument) {
336 336 return $sToRender;
337 337 }
338 338  
339   -
340 339 function displayActionButtons($oDocument, $bEdit) {
341 340 global $default;
342 341  
343   - // TODO: change to view
  342 + $iDummyButtons = 0;
  343 +
  344 + // view
344 345 $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/view.gif\" border=\"0\" /></a></td></tr>\n";
345 346 if ($bEdit) {
346 347 // display the check in button if the document is checked out and you checked the document out
... ... @@ -350,18 +351,26 @@ function displayActionButtons($oDocument, $bEdit) {
350 351 } else {
351 352 $sToRender .= "<tr><td align=\"left\"><a href=\"" . generateControllerLink("checkOutDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/checkout.gif\" border=\"0\" /></a></td></tr>\n";
352 353 }
  354 + } else {
  355 + // display spacing button
  356 + $iDummyButtons++;
353 357 }
354 358  
355 359 $sToRender .= "<tr><td align=\"left\"><a href=\"" . generateControllerLink("emailDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/email.gif\" border=\"0\" /></a></td></tr>\n";
356 360 if ($bEdit) {
357 361 $sToRender .= "<tr><td align=\"left\"><a href=\"" . generateControllerLink("deleteDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/delete.gif\" border=\"0\" /></a></td></tr>\n";
  362 + } else {
  363 + $iDummyButtons++;
358 364 }
  365 +
359 366 $sToRender .= "<tr><td align=\"left\"><a href=\"" . generateControllerLink("viewHistory", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/history.gif\" border=\"0\" /></a></td></tr>\n";
360 367 if ($bEdit) {
361 368 // documents in collaboration and checked out documents can't be moved
362 369 if (!$oDocument->getIsCheckedOut() && (!DocumentCollaboration::documentCollaborationStarted($oDocument->getID()))) {
363 370 $sToRender .= "<tr><td align=\"left\"><a href=\"" . generateControllerLink("moveDocument", "fFolderID=" . $oDocument->getFolderID() . "&fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/move.gif\" border=\"0\" /></a></td></tr>\n";
364 371 }
  372 + } else {
  373 + $iDummyButtons++;
365 374 }
366 375  
367 376 // display the unsubscribe button if the user is subscribed to the document
... ... @@ -375,14 +384,14 @@ function displayActionButtons($oDocument, $bEdit) {
375 384 // only display the archive button for available documents
376 385 if (!$oDocument->getIsCheckedOut() && !$oDocument->hasCollaboration() && (!DocumentCollaboration::documentCollaborationStarted($oDocument->getID()))) {
377 386 $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";
  387 + } else {
  388 + $iDummyButtons++;
378 389 }
  390 +
379 391 $sToRender .= "<td align=\"left\"><a href=\"" . generateControllerLink("createDependantDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/dependentdoc.gif\" border=\"0\" /></a></td>\n";
380 392  
381 393 // spacing hack
382   - if (!$bEdit) {
383   - $sToRender .= "<tr><td align=\"left\">&nbsp;</td></tr>\n";
384   - $sToRender .= "<tr><td align=\"left\">&nbsp;</td></tr>\n";
385   - $sToRender .= "<tr><td align=\"left\">&nbsp;</td></tr>\n";
  394 + for ($i=0; $i<$iDummyButtons; $i++) {
386 395 $sToRender .= "<tr><td align=\"left\">&nbsp;</td></tr>\n";
387 396 }
388 397  
... ... @@ -391,8 +400,7 @@ function displayActionButtons($oDocument, $bEdit) {
391 400  
392 401 function renderSectionDiv($sDivName, $sHtml) {
393 402 global $default;
394   - $bNN4 = (($default->browser == "moz") && ($default->version <= "4.79"));
395   - if ($bNN4) {
  403 + if ($default->bNN4) {
396 404 return "<div id=\"$sDivName\" style=\"position:absolute;visibility:hidden;left:135px;\">$sHtml</div>";
397 405 } else {
398 406 return "<div id=\"$sDivName\" style=\"position:absolute;visibility:hidden;left:5px;\">$sHtml</div>";
... ... @@ -438,8 +446,7 @@ function getPage($oDocument, $bEdit, $sStatusMessage = &quot;&quot;) {
438 446 $sToRender .= "</div>";
439 447  
440 448 // ugly netscape hacks
441   - $bNN4 = (($default->browser == "moz") && ($default->version <= "4.79"));
442   - if (!$bNN4) {
  449 + if (!$default->bNN4) {
443 450 $sToRender .= "<div id=\"contentDiv\" style=\"position:relative;visibility:hidden;top:-80px;width:500px;\">";
444 451 }
445 452 $sToRender .= renderSectionDiv("documentData", renderDocumentData($oDocument, $bEdit, $sStatusMessage));
... ... @@ -453,7 +460,7 @@ function getPage($oDocument, $bEdit, $sStatusMessage = &quot;&quot;) {
453 460 $sToRender .= renderSectionDiv("documentRouting", renderNonEditableDocumentRouting($oDocument));
454 461 $sToRender .= renderSectionDiv("linkedDocuments", renderNonEditableLinkedDocuments($oDocument, $bEdit));
455 462 }
456   - if (!$bNN4) {
  463 + if (!$default->bNN4) {
457 464 $sToRender .= "</div>";
458 465 }
459 466 return $sToRender;
... ...