Commit 79f47fa3f777ac9664bed3ac6e9490740a19b8b0

Authored by michael
1 parent a602f4ce

refactored display integration with the document details page


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2211 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/checkInDocumentUI.inc
@@ -58,6 +58,7 @@ function renderCheckInPage($oDocument) { @@ -58,6 +58,7 @@ function renderCheckInPage($oDocument) {
58 58
59 $sToRender .= "<table>\n"; 59 $sToRender .= "<table>\n";
60 $sToRender .= "<tr>\n"; 60 $sToRender .= "<tr>\n";
  61 + // FIXME: if the document name contains an apostrophe this js doesn't work
61 $sToRender .= "<td><input type=\"image\" border=\"0\" src =\"$default->graphicsUrl/widgets/checkin.gif\" value=\"Submit\" onClick=\"if (validRequired(document.MainForm.fFile, 'Check-In File') && validRequired(document.MainForm.fCheckInComment, 'Check-In Comment')) { return confirm('Are you sure you want to overwrite " . $oDocument->getName() . " with ' + document.MainForm.fFile.value + '?'); } else return false;\"/>\n"; 62 $sToRender .= "<td><input type=\"image\" border=\"0\" src =\"$default->graphicsUrl/widgets/checkin.gif\" value=\"Submit\" onClick=\"if (validRequired(document.MainForm.fFile, 'Check-In File') && validRequired(document.MainForm.fCheckInComment, 'Check-In Comment')) { return confirm('Are you sure you want to overwrite " . $oDocument->getName() . " with ' + document.MainForm.fFile.value + '?'); } else return false;\"/>\n";
62 $sToRender .= "<a href=\"$default->rootUrl/control.php?action=viewDocument&fDocumentID=" . $oDocument->getID() . "\"><img src=\"$default->graphicsUrl/widgets/cancel.gif\" border=\"0\"></a></td>\n"; 63 $sToRender .= "<a href=\"$default->rootUrl/control.php?action=viewDocument&fDocumentID=" . $oDocument->getID() . "\"><img src=\"$default->graphicsUrl/widgets/cancel.gif\" border=\"0\"></a></td>\n";
63 $sToRender .= "</tr>\n"; 64 $sToRender .= "</tr>\n";
@@ -95,6 +96,10 @@ function renderCheckInPage($oDocument) { @@ -95,6 +96,10 @@ function renderCheckInPage($oDocument) {
95 * @param object the document to view and check out 96 * @param object the document to view and check out
96 */ 97 */
97 function getCheckInPage($oDocument) { 98 function getCheckInPage($oDocument) {
98 - return getPage($oDocument, false, renderCheckInPage($oDocument)); 99 + $sToRender .= renderHeading("Document Detail");
  100 + $sToRender .= renderDocumentPath($oDocument, false) . "\n\n";
  101 + $sToRender .= renderCheckInPage($oDocument);
  102 + $sToRender .= renderDocumentData($oDocument, $bEdit);
  103 + return $sToRender;
99 } 104 }
100 ?> 105 ?>
101 \ No newline at end of file 106 \ No newline at end of file