From fb34f642daecc16bf81971069b441d411ddba6b9 Mon Sep 17 00:00:00 2001 From: nbm Date: Wed, 17 Nov 2004 13:31:22 +0000 Subject: [PATCH] Make the view layout less dependent on specific pixel sizes, and use divs in place of merely table rows for some cases. --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc | 71 ++++++++++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc index 8bd4e4c..385f7f1 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc @@ -428,7 +428,7 @@ function displayViewButton($oDocument, $bEdit) { if ($default->useTextButtons === false) { return "graphicsUrl/widgets/docactions/view.gif\" border=\"0\" title=\"" . _("View the document") . "\"/>\n"; } else { - return "VIEW\n"; + return "VIEW\n"; } } @@ -455,12 +455,12 @@ function displayCheckInOutButton($oDocument, $bEdit) { if (!$bEdit) { $sDisabledText = _("You do not have write access to this document"); } - return "" . displayButton($sAction, $sQueryString, $sImageName, $sDisabledText) . "\n"; + return displayButton($sAction, $sQueryString, $sImageName, $sDisabledText); } function displayEmailButton($oDocument) { global $default; - return "" . displayButton("emailDocument", "fDocumentID=" . $oDocument->getID(), "email") . "\n"; + return displayButton("emailDocument", "fDocumentID=" . $oDocument->getID(), "email"); } function displayDeleteButton($oDocument, $bEdit) { @@ -472,12 +472,12 @@ function displayDeleteButton($oDocument, $bEdit) { } else { $sDisabledText = _("You do not have write access to this document"); } - return "" . displayButton("deleteDocument", $sQueryString, "delete", $sDisabledText) . "\n"; + return displayButton("deleteDocument", $sQueryString, "delete", $sDisabledText); } function displayHistoryButton($oDocument) { global $default; - return "" . displayButton("viewHistory", "fDocumentID=" . $oDocument->getID(), "history") . "\n"; + return displayButton("viewHistory", "fDocumentID=" . $oDocument->getID(), "history"); } function displayMoveButton($oDocument, $bEdit) { if ($bEdit) { @@ -493,7 +493,7 @@ function displayMoveButton($oDocument, $bEdit) { } else { $sDisabledText = _("You do not have write access to this document"); } - return "" . displayButton("moveDocument", $sQueryString, "move", $sDisabledText) . "\n"; + return displayButton("moveDocument", $sQueryString, "move", $sDisabledText); } function displaySubscriptionButton($oDocument) { @@ -506,12 +506,12 @@ function displaySubscriptionButton($oDocument) { $sAction = "addSubscription"; $sImageName = "subscribe"; } - return "" . displayButton($sAction, "fDocumentID=" . $oDocument->getID(), $sImageName) . "\n"; + return displayButton($sAction, "fDocumentID=" . $oDocument->getID(), $sImageName); } function displayDiscussionButton($oDocument, $bEdit) { global $default; - return "" . displayButton("viewDiscussion", "fDocumentID=" . $oDocument->getID() . "&fForDiscussion=1", "discussion") . "\n"; + return displayButton("viewDiscussion", "fDocumentID=" . $oDocument->getID() . "&fForDiscussion=1", "discussion"); } function displayArchiveButton($oDocument, $bEdit) { @@ -531,12 +531,12 @@ function displayArchiveButton($oDocument, $bEdit) { } else { $sDisabledText = _("You do not have write access to this document"); } - return "" . displayButton("archiveDocument", "fDocumentID=" . $oDocument->getID(), "archive", $sDisabledText) . "\n"; + return displayButton("archiveDocument", "fDocumentID=" . $oDocument->getID(), "archive", $sDisabledText); } function displayDependantDocumentButton($oDocument, $bEdit) { global $default; - return "" . displayButton("createDependantDocument", "fDocumentID=" . $oDocument->getID(), "dependentdoc") . "\n"; + return displayButton("createDependantDocument", "fDocumentID=" . $oDocument->getID(), "dependentdoc"); } function displayPublishButton($oDocument, $bEdit) { @@ -566,7 +566,7 @@ function displayPublishButton($oDocument, $bEdit) { $sDisabledText = _("This document has been marked as pending publishing and the web publisher has been notified."); } } - return "" . displayButton("viewDocument", "fDocumentID=" . $oDocument->getID() . "&fForPublish=1", "publish", $sDisabledText) . "\n"; + return displayButton("viewDocument", "fDocumentID=" . $oDocument->getID() . "&fForPublish=1", "publish", $sDisabledText); } /** @@ -590,11 +590,7 @@ function displayActionButtons($oDocument, $bEdit) { function renderSectionDiv($sDivName, $sHtml) { global $default; - if ($default->bNN4) { - return ""; - } else { - return ""; - } + return "
$sHtml
"; } function renderDocumentSection($sSectionName, $sHeadingText, $bDisplayLink, $iDocumentID) { @@ -603,18 +599,18 @@ function renderDocumentSection($sSectionName, $sHeadingText, $bDisplayLink, $iDo } else { $sLink = "$sHeadingText"; } - return "$sLink\n"; + return '' . $sLink . '' . "\n"; } function getPage($oDocument, $bEdit, $sStatusMessage = "") { global $default; - $sToRender = "
"; $sToRender .= renderHeading(_("Document Detail")); $sToRender .= renderDocumentPath($oDocument, true) . "\n\n"; $sToRender .= ""; $sToRender .= "
"; $sToRender .= ""; + $sToRender .= "
"; // if we have a status message, then make the section links refresh to viewDocument with the fShowSection variable // ie. effectively removes statusMessage on next click @@ -626,19 +622,18 @@ function getPage($oDocument, $bEdit, $sStatusMessage = "") { $sToRender .= renderDocumentSection("archiveSettings", _("Archive Settings"), $bDisplayLink, $oDocument->getID()); $sToRender .= renderDocumentSection("documentRouting", _("Document Routing"), $bDisplayLink, $oDocument->getID()); $sToRender .= renderDocumentSection("linkedDocuments", _("Linked Documents"), $bDisplayLink, $oDocument->getID()); - $sToRender .= "
"; - $sToRender .= "
"; - $sToRender .= "\n"; + + $sToRender .= ""; + $sToRender .= "
"; + $sToRender .= '
'; + $sToRender .= "\n"; $sToRender .= displayActionButtons($oDocument, $bEdit); - $sToRender .= "
\n"; + $sToRender .= "
\n"; $sToRender .= ""; - $sToRender .= ""; - $sToRender .= "
"; - // ugly netscape hacks - if (!$default->bNN4) { - $sToRender .= ""; + $sToRender .= ""; + $sToRender .= ""; return $sToRender; } -- libgit2 0.21.4