Commit bcd06eab3b93d45ced3e9713062b2ff88caaa7ea
1 parent
5b9de553
done testing
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2157 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
136 additions
and
40 deletions
tests/documentmanagement/viewBL.php
| ... | ... | @@ -228,9 +228,9 @@ if (checkSession()) { |
| 228 | 228 | $oPatternCustom = & new PatternCustom(); |
| 229 | 229 | if ($oDocument->isLive()) { |
| 230 | 230 | if (Permission::userHasDocumentWritePermission($fDocumentID)) { |
| 231 | - $oPatternCustom->setHtml(getEditPage($oDocument)); | |
| 231 | + $oPatternCustom->setHtml(getPage($oDocument, true)); | |
| 232 | 232 | } else if (Permission::userHasDocumentReadPermission($fDocumentID)) { |
| 233 | - $oPatternCustom->setHtml(getViewPage($oDocument)); | |
| 233 | + $oPatternCustom->setHtml(getPage($oDocument, false)); | |
| 234 | 234 | } |
| 235 | 235 | } else if ($oDocument->isArchived()) { |
| 236 | 236 | // cancel |
| ... | ... | @@ -238,12 +238,13 @@ if (checkSession()) { |
| 238 | 238 | $main->setErrorMessage("This document has been archived."); |
| 239 | 239 | } |
| 240 | 240 | $main->setCentralPayload($oPatternCustom); |
| 241 | + $main->setDHTMLScrolling(false); | |
| 241 | 242 | $main->setOnLoadJavaScript("switchDiv('documentData')"); |
| 242 | 243 | $main->setFormAction("$default->rootUrl/control.php?action=modifyDocument&fDocumentID=" . $oDocument->getID()); |
| 243 | 244 | $main->render(); |
| 244 | 245 | } else { |
| 245 | 246 | require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); |
| 246 | - | |
| 247 | + $oDocument = & Document::get($fDocumentID); | |
| 247 | 248 | $oPatternCustom = & new PatternCustom(); |
| 248 | 249 | $oPatternCustom->setHtml("<a href=\"" . generateControllerLink("browse", "fFolderID=" . $oDocument->getFolderID()) . "\"><img src=\"$default->graphicsUrl/widgets/back.gif\" border=\"0\" /></a>\n"); |
| 249 | 250 | $main->setErrorMessage("Either you do not have permission to view this document, or the document you have chosen no longer exists on the file system."); | ... | ... |
tests/documentmanagement/viewUI.inc
| ... | ... | @@ -20,7 +20,7 @@ function renderDocumentPath($oDocument) { |
| 20 | 20 | $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); |
| 21 | 21 | $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > "; |
| 22 | 22 | $sDocumentPath .= "<a href=\"$default->rootUrl/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\">" . $oDocument->getName() . "</a>"; |
| 23 | - return "<table border=0 cellpadding=\"5\" width=\"610\"><tr bgcolor=\"$sTDBGColour\"><td width=\"89%\">$sDocumentPath</td><td width=\"15%\">Actions</td></tr></table>\n"; | |
| 23 | + return "<table border=0 cellpadding=\"5\" width=\"610\"><tr bgcolor=\"$sTDBGColour\"><td width=\"87%\">$sDocumentPath</td><td width=\"15%\">Actions</td></tr></table>\n"; | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | function renderDocumentData($oDocument, $sDivName, $bEditable) { |
| ... | ... | @@ -41,7 +41,7 @@ function renderDocumentData($oDocument, $sDivName, $bEditable) { |
| 41 | 41 | $aColumnTypes = array(1,1,1,1,1,1,1,1); |
| 42 | 42 | $oPatternListFromQuery = & new PatternListFromQuery($sQuery, $aColumns, $aColumnNames, $aColumnTypes); |
| 43 | 43 | $oPatternListFromQuery->setTableHeading("Document Data"); |
| 44 | - $oPatternListFromQuery->setTableWidth("530"); | |
| 44 | + $oPatternListFromQuery->setTableWidth("400"); | |
| 45 | 45 | |
| 46 | 46 | $sToRender .= "\t<table border=\"0\" width=\"100%\">\n"; |
| 47 | 47 | $sToRender .= "\t<tr>\n"; |
| ... | ... | @@ -58,7 +58,7 @@ function renderDocumentData($oDocument, $sDivName, $bEditable) { |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
| 61 | -function renderGenericMetaData($oDocument, $sDivName) { | |
| 61 | +function renderGenericMetaData($oDocument, $sDivName, $bEditable) { | |
| 62 | 62 | global $default; |
| 63 | 63 | $sQuery = "SELECT DF.name AS name, DFL.value as value " . |
| 64 | 64 | "FROM $default->owl_documents_table AS D INNER JOIN $default->owl_document_fields_table AS DFL ON D.id = DFL.document_id " . |
| ... | ... | @@ -75,15 +75,17 @@ function renderGenericMetaData($oDocument, $sDivName) { |
| 75 | 75 | $sToRender .= "\t<tr>\n"; |
| 76 | 76 | $sToRender .= "\t<td>" . $oPatternTableSqlQuery->render() . "</td>\n"; |
| 77 | 77 | $sToRender .= "\t</tr>\n"; |
| 78 | - $sToRender .= "\t<tr>\n"; | |
| 79 | - $sToRender .= "<td><a href=\"$default->rootUrl/control.php?action=modifyDocumentGenericMetaData&fDocumentID=" . $oDocument->getID() . "\"><image src=\"$default->graphicsUrl/widgets/edit.gif\" border=\"0\"></a></td>\n"; | |
| 80 | - $sToRender .= "\t</tr>\n"; | |
| 78 | + if ($bEditable) { | |
| 79 | + $sToRender .= "\t<tr>\n"; | |
| 80 | + $sToRender .= "<td><a href=\"$default->rootUrl/control.php?action=modifyDocumentGenericMetaData&fDocumentID=" . $oDocument->getID() . "\"><image src=\"$default->graphicsUrl/widgets/edit.gif\" border=\"0\"></a></td>\n"; | |
| 81 | + $sToRender .= "\t</tr>\n"; | |
| 82 | + } | |
| 81 | 83 | $sToRender .= "\t</table>\n"; |
| 82 | 84 | |
| 83 | 85 | return renderDiv($sDivName, $sToRender); |
| 84 | 86 | } |
| 85 | 87 | |
| 86 | -function renderTypeSpecificMetaData($oDocument, $sDivName) { | |
| 88 | +function renderTypeSpecificMetaData($oDocument, $sDivName, $bEditable) { | |
| 87 | 89 | global $default; |
| 88 | 90 | |
| 89 | 91 | $sQuery = "SELECT DF.name AS name, DFL.value AS value " . |
| ... | ... | @@ -104,15 +106,17 @@ function renderTypeSpecificMetaData($oDocument, $sDivName) { |
| 104 | 106 | $sToRender .= "\t<tr>\n"; |
| 105 | 107 | $sToRender .= "\t\t<td>" . $oPatternTableSqlQuery->render() . "</td>\n"; |
| 106 | 108 | $sToRender .= "\t</tr>\n"; |
| 107 | - $sToRender .= "\t<tr>\n"; | |
| 108 | - $sToRender .= "<td><a href=\"$default->rootUrl/control.php?action=modifyDocumentTypeMetaData&fDocumentID=" . $oDocument->getID() . "\"><image src=\"$default->graphicsUrl/widgets/edit.gif\" border=\"0\"></a></td>\n"; | |
| 109 | - $sToRender .= "\t</tr>\n"; | |
| 109 | + if ($bEditable) { | |
| 110 | + $sToRender .= "\t<tr>\n"; | |
| 111 | + $sToRender .= "<td><a href=\"$default->rootUrl/control.php?action=modifyDocumentTypeMetaData&fDocumentID=" . $oDocument->getID() . "\"><image src=\"$default->graphicsUrl/widgets/edit.gif\" border=\"0\"></a></td>\n"; | |
| 112 | + $sToRender .= "\t</tr>\n"; | |
| 113 | + } | |
| 110 | 114 | $sToRender .= "\t</table>\n"; |
| 111 | 115 | return renderDiv($sDivName, $sToRender); |
| 112 | 116 | } |
| 113 | 117 | |
| 114 | -function renderDocumentArchiveSettings($oDocument, $sDivName) { | |
| 115 | - global $default; | |
| 118 | +function renderEditableDocumentArchiveSettings($oDocument) { | |
| 119 | + global $default; | |
| 116 | 120 | $sQuery = "SELECT d.id, atl.name, 'Edit' AS edit FROM $default->owl_document_archiving_table AS da " . |
| 117 | 121 | "INNER JOIN $default->owl_archiving_type_lookup_table AS atl ON da.archiving_type_id=atl.id " . |
| 118 | 122 | "INNER JOIN $default->owl_documents_table AS d ON da.document_id=d.id " . |
| ... | ... | @@ -128,17 +132,39 @@ function renderDocumentArchiveSettings($oDocument, $sDivName) { |
| 128 | 132 | $oPatternTableSqlQuery->setTableHeading("Archiving Settings"); |
| 129 | 133 | $oPatternTableSqlQuery->setEmptyTableMessage("No archiving settings"); |
| 130 | 134 | $oPatternTableSqlQuery->setDisplayColumnHeadings(true); |
| 135 | + return $oPatternTableSqlQuery->render(); | |
| 136 | +} | |
| 137 | +function renderNonEditableDocumentArchiveSettings($oDocument) { | |
| 138 | + global $default; | |
| 139 | + $sQuery = "SELECT d.id, atl.name FROM $default->owl_document_archiving_table AS da " . | |
| 140 | + "INNER JOIN $default->owl_archiving_type_lookup_table AS atl ON da.archiving_type_id=atl.id " . | |
| 141 | + "INNER JOIN $default->owl_documents_table AS d ON da.document_id=d.id " . | |
| 142 | + "WHERE d.id = " . $oDocument->getID(); | |
| 131 | 143 | |
| 144 | + $aColumns = array("name"); | |
| 145 | + $aColumnHeaders = array("Archiving Type"); | |
| 146 | + $aColumnTypes = array(1); | |
| 147 | + $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "540", $aLinkURLs ,$aDBColumnArray,$aQueryStringVariableNames); | |
| 148 | + $oPatternTableSqlQuery->setTableHeading("Archiving Settings"); | |
| 149 | + $oPatternTableSqlQuery->setEmptyTableMessage("No archiving settings"); | |
| 150 | + $oPatternTableSqlQuery->setDisplayColumnHeadings(true); | |
| 151 | + return $oPatternTableSqlQuery->render(); | |
| 152 | +} | |
| 153 | + | |
| 154 | +function renderDocumentArchiveSettings($oDocument, $sDivName, $bEditable) { | |
| 155 | + global $default; | |
| 132 | 156 | |
| 133 | 157 | $sToRender .= "\t<table border=\"0\" width=\"100%\">\n"; |
| 134 | 158 | $sToRender .= "\t<tr>\n"; |
| 135 | - $sToRender .= "\t\t<td>" . $oPatternTableSqlQuery->render() . "</td>\n"; | |
| 159 | + $sToRender .= "\t\t<td>" . ($bEditable ? renderEditableDocumentArchiveSettings($oDocument) : renderNonEditableDocumentArchiveSettings($oDocument)) . "</td>\n"; | |
| 136 | 160 | $sToRender .= "\t</tr>"; |
| 137 | - $sToRender .= "\t<tr> \n"; | |
| 138 | - // if there are no archiving settings then allow their addition | |
| 139 | - $oDocumentArchiving = DocumentArchiving::getFromDocumentID($oDocument->getID()); | |
| 140 | - $sToRender .= "\t\t<td>" . ($oDocumentArchiving ? "" : generateControllerLink("addDocumentArchiveSettings", "fDocumentID=" . $oDocument->getID(), "<img src=\"$default->graphicsUrl/widgets/add.gif\" border=\"0\"/>")) . "</td>\n"; | |
| 141 | - $sToRender .= "\t</tr>"; | |
| 161 | + if ($bEditable) { | |
| 162 | + $sToRender .= "\t<tr>\n"; | |
| 163 | + // if there are no archiving settings then allow their addition | |
| 164 | + $oDocumentArchiving = DocumentArchiving::getFromDocumentID($oDocument->getID()); | |
| 165 | + $sToRender .= "\t\t<td>" . ($oDocumentArchiving ? "" : generateControllerLink("addDocumentArchiveSettings", "fDocumentID=" . $oDocument->getID(), "<img src=\"$default->graphicsUrl/widgets/add.gif\" border=\"0\"/>")) . "</td>\n"; | |
| 166 | + $sToRender .= "\t</tr>"; | |
| 167 | + } | |
| 142 | 168 | $sToRender .= "\t</table>\n"; |
| 143 | 169 | |
| 144 | 170 | return renderDiv($sDivName, $sToRender); |
| ... | ... | @@ -206,7 +232,7 @@ function renderEditableDocumentRouting($oDocument, $sDivName) { |
| 206 | 232 | return renderDiv($sDivName, $sToRender); |
| 207 | 233 | } |
| 208 | 234 | |
| 209 | -function renderNonEditableDocumentRouting($oDocument) { | |
| 235 | +function renderNonEditableDocumentRouting($oDocument, $sDivName) { | |
| 210 | 236 | global $default; |
| 211 | 237 | $sQuery = "SELECT D.id as document_id, GFAL.id as id, R.name AS role_name, COALESCE(U.Name, 'Not assigned') AS name, GFAL.precedence AS precedence, COALESCE(FURL.active,0) AS active, COALESCE(FURL.done, 0) AS done " . |
| 212 | 238 | "FROM documents AS D INNER JOIN $default->owl_groups_folders_approval_table AS GFAL ON D.folder_id = GFAL.folder_id " . |
| ... | ... | @@ -222,8 +248,24 @@ function renderNonEditableDocumentRouting($oDocument) { |
| 222 | 248 | $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "540", "$default->rootUrl/control.php?action=modifyDocumentRouting",$aDBColumnArray,$aQueryStringVariableNames); |
| 223 | 249 | $oPatternTableSqlQuery->setTableHeading("Document Routing"); |
| 224 | 250 | $oPatternTableSqlQuery->setDisplayColumnHeadings(true); |
| 225 | - return $oPatternTableSqlQuery->render(); | |
| 226 | 251 | |
| 252 | + $sToRender .= "\t<table border=\"0\" width=\"100%\">\n"; | |
| 253 | + $sToRender .= "\t<tr>\n"; | |
| 254 | + $sToRender .= "\t\t<td>" . $oPatternTableSqlQuery->render() . "</td>\n"; | |
| 255 | + $sToRender .= "\t</tr>"; | |
| 256 | + | |
| 257 | + if (DocumentCollaboration::userIsPerformingCurrentCollaborationStep($oDocument->getID())) { | |
| 258 | + //if the current user is responsible for an active step in the collaboration process | |
| 259 | + $sToRender .= "\t\t<tr><td><table border=\"0\"><tr>\n"; | |
| 260 | + $sToRender .= "\t\t<td><b>You currently have an active role<br> in the collaboration process</b></td>\n"; | |
| 261 | + $sToRender .= "\t\t<td align=\"center\"><a href=" . $_SERVER['PHP_SELF'] . "?fDocumentID=" . $oDocument->getID() . "&fCollaborationStepComplete=1><img src=\"$default->graphicsUrl/widgets/approve.gif\" border=\"0\"/></a></td>\n"; | |
| 262 | + $sToRender .= "\t\t<td align=\"center\"><a href=\"$default->rootUrl/control.php?action=collaborationStepReject&fDocumentID=$iDocumentID\"><img src=\"$default->graphicsUrl/widgets/reject.gif\" border=\"0\"/></a></td>\n"; | |
| 263 | + $sToRender .= "\t\t</tr></table></td></tr>\n"; | |
| 264 | + } | |
| 265 | + | |
| 266 | + $sToRender .= "\t</table>\n"; | |
| 267 | + | |
| 268 | + return renderDiv($sDivName, $sToRender); | |
| 227 | 269 | } |
| 228 | 270 | |
| 229 | 271 | function renderEditableLinkedDocuments($oDocument, $sDivName) { |
| ... | ... | @@ -268,11 +310,11 @@ function renderNonEditableLinkedDocuments($oDocument, $sDivName) { |
| 268 | 310 | |
| 269 | 311 | $oPatternListFromQuery = & new PatternListFromQuery($sQuery, $aColumns, $aColumnNames, $aColumnTypes); |
| 270 | 312 | $oPatternListFromQuery->setTableHeading("Linked documents"); |
| 271 | - $oPatternListFromQuery->setTableWidth("100%"); | |
| 313 | + $oPatternListFromQuery->setTableWidth("540"); | |
| 272 | 314 | |
| 273 | 315 | $sToRender .= "\t<table border=\"0\" width=\"100%\">\n"; |
| 274 | 316 | $sToRender .= "\t<tr>\n"; |
| 275 | - $sToRender .= "\t\t<td>" . $oPatternTableSqlQuery->render() . "</td>\n"; | |
| 317 | + $sToRender .= "\t\t<td>" . $oPatternListFromQuery->render() . "</td>\n"; | |
| 276 | 318 | $sToRender .= "\t</tr>"; |
| 277 | 319 | $sToRender .= "\t</table>\n"; |
| 278 | 320 | return renderDiv($sDivName, $sToRender); |
| ... | ... | @@ -281,13 +323,14 @@ function renderNonEditableLinkedDocuments($oDocument, $sDivName) { |
| 281 | 323 | |
| 282 | 324 | function displayActionButtons($oDocument, $bEdit) { |
| 283 | 325 | global $default; |
| 326 | + $sToRender .= "<tr><td align=\"right\"><a href=\"" . generateControllerLink("viewDiscussion", "fDocumentID=" . $oDocument->getID() . "&fForDiscussion=1") . "\"><img src=\"$default->graphicsUrl/widgets/discussion.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 284 | 327 | if ($bEdit) { |
| 285 | 328 | // display the check in button if the document is checked out and you checked the document out |
| 286 | 329 | if ($oDocument->getIsCheckedOut() && ($oDocument->getCheckedOutUserID() == $_SESSION["userID"])) { |
| 287 | - $sToRender = "<tr><td align=\"right\"><a href=\"" . generateControllerLink("checkInDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkin.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 330 | + $sToRender .= "<tr><td align=\"right\"><a href=\"" . generateControllerLink("checkInDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkin.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 288 | 331 | // otherwise display the check out button |
| 289 | 332 | } else { |
| 290 | - $sToRender = "<tr><td align=\"right\"><a href=\"" . generateControllerLink("checkOutDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkout.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 333 | + $sToRender .= "<tr><td align=\"right\"><a href=\"" . generateControllerLink("checkOutDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/checkout.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 291 | 334 | } |
| 292 | 335 | } |
| 293 | 336 | |
| ... | ... | @@ -308,11 +351,13 @@ function displayActionButtons($oDocument, $bEdit) { |
| 308 | 351 | $sToRender .= "<tr><td align=\"right\"><a href=\"" . generateControllerLink("addSubscription", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/subscribe.gif\" border=\"0\" /></a></td></tr>\n"; |
| 309 | 352 | } |
| 310 | 353 | $sToRender .= "<tr><td align=\"right\"><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("viewDocument", "fDocumentID=" . $oDocument->getID() . "&fForDownload=1") . "\"><img src=\"$default->graphicsUrl/widgets/download.gif\" border=\"0\" /></a></td></tr>\n"; |
| 311 | - $sToRender .= "<tr><td align=\"right\"><a href=\"" . generateControllerLink("viewDiscussion", "fDocumentID=" . $oDocument->getID() . "&fForDiscussion=1") . "\"><img src=\"$default->graphicsUrl/widgets/discussion.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 354 | + //$sToRender .= "<tr><td align=\"right\"><a href=\"" . generateControllerLink("viewDiscussion", "fDocumentID=" . $oDocument->getID() . "&fForDiscussion=1") . "\"><img src=\"$default->graphicsUrl/widgets/discussion.gif\" border=\"0\" /></a></td></tr>\n"; | |
| 312 | 355 | // only display the archive button for available documents |
| 313 | 356 | if (!$oDocument->getIsCheckedOut() || !$oDocument->hasCollaboration() || (!DocumentCollaboration::documentCollaborationStarted($oDocument->getID()))) { |
| 314 | 357 | $sToRender .= "<tr><td align=\"right\"><a href=\"" . generateControllerLink("archiveDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/archive.gif\" border=\"0\" /></a></td></tr>\n"; |
| 315 | 358 | } |
| 359 | + | |
| 360 | + $sToRender .= "<td><a href=\"" . generateControllerLink("createDependantDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/archive.gif\" border=\"0\" /></a></td>\n"; | |
| 316 | 361 | |
| 317 | 362 | return $sToRender; |
| 318 | 363 | } |
| ... | ... | @@ -320,10 +365,10 @@ function displayActionButtons($oDocument, $bEdit) { |
| 320 | 365 | function renderDiv($sDivName, $sHtml) { |
| 321 | 366 | global $default; |
| 322 | 367 | |
| 323 | - if ( in_array($default->browser, array("moz", "ns")) ) { | |
| 324 | - return "<div id=\"$sDivName\" style=\"position:absolute;visibility:hidden;top:250px;left:130px;\">$sHtml</div>"; | |
| 368 | + if ( $default->browser = "ie" ) { | |
| 369 | + return "<div id=\"$sDivName\" style=\"position:absolute;visibility:hidden;top:280px;left:135px;\">$sHtml</div>"; | |
| 325 | 370 | } else { |
| 326 | - return "<div id=\"$sDivName\" style=\"position:absolute;visibility:hidden;top:160px;left:0px;\">$sHtml</div>"; | |
| 371 | + return "<div id=\"$sDivName\" style=\"position:absolute;visibility:hidden;top:250px;left:130px;\">$sHtml</div>"; | |
| 327 | 372 | } |
| 328 | 373 | } |
| 329 | 374 | |
| ... | ... | @@ -334,15 +379,15 @@ function renderDocumentSection($sHeading) { |
| 334 | 379 | function getEditPage($oDocument) { |
| 335 | 380 | global $default; |
| 336 | 381 | |
| 337 | -// if ( ($default->browser == "moz") && ($default->version <= 4.79) ) { | |
| 382 | + if ( $default->browser = "ie" ) { | |
| 383 | + $sToRender = "<div id=\"headings\" style=\"position:absolute;visibility:visible;top:120px;left:134px;\">"; | |
| 384 | + } else { | |
| 338 | 385 | $sToRender = "<div id=\"headings\" style=\"position:absolute;visibility:visible;top:106px;left:132px;\">"; |
| 339 | -// } else { | |
| 340 | -// $sToRender = "<div id=\"headings\" style=\"position:absolute;visibility:visible;top:0px;left:0px;\">"; | |
| 341 | -// } | |
| 386 | + } | |
| 342 | 387 | |
| 343 | 388 | $sToRender .= renderHeading("Document Detail"); |
| 344 | 389 | $sToRender .= renderDocumentPath($oDocument) . "\n\n"; |
| 345 | - $sToRender .= "<table border=\"0\" width=\"540\">"; | |
| 390 | + $sToRender .= "<table border=\"0\" width=\"530\">"; | |
| 346 | 391 | $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('documentData');\">Document Data</a>"); |
| 347 | 392 | $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('genericMetaData');\">Generic Meta Data</a>"); |
| 348 | 393 | $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('typeSpecificMetaData');\">Type Specific Meta Data</a>"); |
| ... | ... | @@ -359,11 +404,11 @@ function getEditPage($oDocument) { |
| 359 | 404 | $sToRender .= renderEditableLinkedDocuments($oDocument, "linkedDocuments"); |
| 360 | 405 | $sToRender .= renderTypeSpecificMetaData($oDocument, "typeSpecificMetaData"); |
| 361 | 406 | |
| 362 | -// if ( ($default->browser == "moz") && ($default->version <= 4.79) ) { | |
| 363 | -// $sToRender .= "<div id=\"actionButtons\" style=\"position:absolute;visibility:visible;top:250px;left:657px;\">"; | |
| 364 | -// } else { | |
| 407 | + if ( $default->browser = "ie" ) { | |
| 408 | + $sToRender .= "<div id=\"actionButtons\" style=\"position:absolute;visibility:visible;top:170px;left:665px;\">"; | |
| 409 | + } else { | |
| 365 | 410 | $sToRender .= "<div id=\"actionButtons\" style=\"position:absolute;visibility:visible;top:155px;left:665px;\">"; |
| 366 | -// } | |
| 411 | + } | |
| 367 | 412 | $sToRender .= "<table cellspacing=0 cellpadding=0>\n"; |
| 368 | 413 | $sToRender .= displayActionButtons($oDocument, true); |
| 369 | 414 | $sToRender .= "</table>\n"; |
| ... | ... | @@ -372,6 +417,56 @@ function getEditPage($oDocument) { |
| 372 | 417 | return $sToRender; |
| 373 | 418 | } |
| 374 | 419 | |
| 420 | +function getPage($oDocument, $bEdit) { | |
| 421 | + global $default; | |
| 422 | + | |
| 423 | + if ( $default->browser = "ie" ) { | |
| 424 | + $sToRender = "<div id=\"headings\" style=\"position:absolute;visibility:visible;top:120px;left:134px;\">"; | |
| 425 | + } else { | |
| 426 | + $sToRender = "<div id=\"headings\" style=\"position:absolute;visibility:visible;top:106px;left:132px;\">"; | |
| 427 | + } | |
| 428 | + | |
| 429 | + $sToRender .= renderHeading("Document Detail"); | |
| 430 | + $sToRender .= renderDocumentPath($oDocument) . "\n\n"; | |
| 431 | + $sToRender .= "<table border=\"0\" width=\"530\">"; | |
| 432 | + $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('documentData');\">Document Data</a>"); | |
| 433 | + $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('genericMetaData');\">Generic Meta Data</a>"); | |
| 434 | + $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('typeSpecificMetaData');\">Type Specific Meta Data</a>"); | |
| 435 | + $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('archiveSettings');\">Archive Settings</a>"); | |
| 436 | + $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('documentRouting');\">Document Routing</a>"); | |
| 437 | + $sToRender .= renderDocumentSection("<a href=\"javascript:void();\" onClick=\"switchDiv('linkedDocuments');\">Linked Documents</a>"); | |
| 438 | + $sToRender .= "</table>"; | |
| 439 | + $sToRender .= "</div>"; | |
| 440 | + | |
| 441 | + $sToRender .= renderDocumentData($oDocument, "documentData", $bEdit); | |
| 442 | + $sToRender .= renderDocumentArchiveSettings($oDocument, "archiveSettings", $bEdit); | |
| 443 | + if ($bEdit) { | |
| 444 | + $sToRender .= renderEditableDocumentRouting($oDocument, "documentRouting"); | |
| 445 | + } else { | |
| 446 | + $sToRender .= renderNonEditableDocumentRouting($oDocument, "documentRouting"); | |
| 447 | + } | |
| 448 | + | |
| 449 | + $sToRender .= renderGenericMetaData($oDocument, "genericMetaData", $bEdit); | |
| 450 | + if ($bEdit) { | |
| 451 | + $sToRender .= renderEditableLinkedDocuments($oDocument, "linkedDocuments"); | |
| 452 | + } else { | |
| 453 | + $sToRender .= renderNonEditableLinkedDocuments($oDocument, "linkedDocuments", $bEdit); | |
| 454 | + } | |
| 455 | + $sToRender .= renderTypeSpecificMetaData($oDocument, "typeSpecificMetaData", $bEdit); | |
| 456 | + | |
| 457 | + if ( $default->browser = "ie" ) { | |
| 458 | + $sToRender .= "<div id=\"actionButtons\" style=\"position:absolute;visibility:visible;top:170px;left:665px;\">"; | |
| 459 | + } else { | |
| 460 | + $sToRender .= "<div id=\"actionButtons\" style=\"position:absolute;visibility:visible;top:155px;left:665px;\">"; | |
| 461 | + } | |
| 462 | + $sToRender .= "<table cellspacing=0 cellpadding=0>\n"; | |
| 463 | + $sToRender .= displayActionButtons($oDocument, $bEdit); | |
| 464 | + $sToRender .= "</table>\n"; | |
| 465 | + $sToRender .= "</div>"; | |
| 466 | + | |
| 467 | + return $sToRender; | |
| 468 | +} | |
| 469 | + | |
| 375 | 470 | function getViewPage($oDocument) { |
| 376 | 471 | global $default; |
| 377 | 472 | $iDocumentID = $oDocument->getID(); | ... | ... |