Commit 5cccfac2577d4857b8bd6cfbbc23831729829947
1 parent
b0bd21b7
*** empty log message ***
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1775 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
5 changed files
with
15 additions
and
13 deletions
presentation/lookAndFeel/knowledgeTree/discussions/addCommentBL.php
| ... | ... | @@ -75,10 +75,13 @@ if (checkSession()) { |
| 75 | 75 | if($oComment->getID() > 0) { |
| 76 | 76 | $oThread = DiscussionThread::get($iThreadID); |
| 77 | 77 | $oThread->setLastCommentID($oComment->getID()); |
| 78 | - if ($oThread->getFirstComment() == -1){ // if it is a new Thread | |
| 78 | + if ($oThread->getFirstCommentID() == -1){ // if it is a new Thread | |
| 79 | 79 | $oThread->setFirstCommentID($oComment->getID()); |
| 80 | 80 | } |
| 81 | - $oThread->setNumberOfViews(); | |
| 81 | + if($_SESSION['Discussion' . $iDocumentID][0]->bViews != true ){ | |
| 82 | + $oThread->setNumberOfViews(); | |
| 83 | + $_SESSION['Discussion' . $iDocumentID][0]->bViews = true; | |
| 84 | + } | |
| 82 | 85 | $oThread->setNumberOfReplies(); |
| 83 | 86 | if ($oThread->Update()) { |
| 84 | 87 | $oPatternCustom->addHtml(getSubmitSuccessPage($iDocumentID)); | ... | ... |
presentation/lookAndFeel/knowledgeTree/discussions/addCommentUI.inc
| ... | ... | @@ -67,12 +67,12 @@ function getAddComment($fDocumentID, $sSubject, $sBody) { |
| 67 | 67 | $sHeading = "Add a Comment"; |
| 68 | 68 | $sToRender .= renderHeading($sHeading); |
| 69 | 69 | $sToRender .= renderDocumentPath($fDocumentID); |
| 70 | - $sToRender .= "<table width=\"100%\" border=0><tr><td></td>\n"; | |
| 71 | - $sToRender .= "<td align=right><input type=\"submit\" style=\"BORDER-RIGHT: 0px groove; BORDER-TOP: 0px groove; BACKGROUND-IMAGE: url($default->graphicsUrl/widgets/submit.gif); BORDER-LEFT: 0px groove; WIDTH: 45px; BORDER-BOTTOM: 0px groove; HEIGHT: 18; BACKGROUND-COLOR: white\" width=\"45\" height=\"20\" value=\" \" width=\"100\"></td></tr>\n"; | |
| 70 | + $sToRender .= "<table width=\"100%\" border=\"0\" cellpadding=0 ><tr><td></td>\n"; | |
| 71 | + $sToRender .= "<td align=right><input onmouseover=\"this.style.cursor='hand'\" type=\"submit\" style=\"BORDER-RIGHT: 0px groove; BORDER-TOP: 0px groove; BACKGROUND-IMAGE: url($default->graphicsUrl/widgets/submit.gif); BORDER-LEFT: 0px groove; WIDTH: 45px; BORDER-BOTTOM: 0px groove; HEIGHT: 18; BACKGROUND-COLOR: white\" width=\"45\" height=\"20\" value=\" \" width=\"100\"></td></tr>\n"; | |
| 72 | 72 | $sToRender .= "<br><tr><td valign=\"top\" width=10><b>Subject</b></td><td>\n"; |
| 73 | 73 | $sToRender .= "<input type=\"text\" style=\"width:100%\" name=\"NewCommentSubject\" id=\"NewCommentSubject\" value=\"$sSubject\"></td></tr>\n"; |
| 74 | 74 | $sToRender .= "<tr><td valign=\"top\"><b>Body</b></td><td><textarea style=\"width:100%\" rows=\"21\" name=\"NewComment\" id=\"NewComment\" style=\"FONT-STYLE: normal; FONT-FAMILY: sans-serif; FONT-VARIANT: normal\">$sBody</textarea></td></tr></table>\n"; |
| 75 | - $sToRender .= "</table>"; | |
| 75 | + | |
| 76 | 76 | |
| 77 | 77 | return $sToRender; |
| 78 | 78 | ... | ... |
presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionBL.php
| ... | ... | @@ -44,10 +44,10 @@ if(checksession) { |
| 44 | 44 | $oPatternCustom->addHtml(getViewComment($i+1,$oThread,$oComment,$oUser)); |
| 45 | 45 | } |
| 46 | 46 | // On opening, increment the number of views of current thread & update database |
| 47 | - if($_SESSION['Discussion'][0]->bViews !=true ){ | |
| 47 | + if($_SESSION['Discussion' . $fDocumentID][0]->bViews !=true ){ | |
| 48 | 48 | $oThread->setNumberOfViews(); |
| 49 | 49 | if($oThread->Update() == false) $oPatternCustom->addHtml("Failed to update. Please Contact Database Administrator in this regard") ; |
| 50 | - $_SESSION['Discussion'][0]->bViews = true; | |
| 50 | + $_SESSION['Discussion' . $fDocumentID][0]->bViews = true; | |
| 51 | 51 | } |
| 52 | 52 | } else { $oPatternCustom->setHtml(getViewFailPage("")) ;} |
| 53 | 53 | } else { // No current thread, option to create one | ... | ... |
presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionUI.inc
| ... | ... | @@ -28,8 +28,8 @@ function getNewThreadOption($fDocumentID) { |
| 28 | 28 | $sToRender .= "No discussion thread is currently available.<br><br>"; |
| 29 | 29 | $sToRender .= "Would you like to create a new Discussion thread for this document?"; |
| 30 | 30 | $sToRender .= " "; |
| 31 | - $sToRender .= "<a href=\"" . generateControllerLink("addComment", "fDocumentID=" . $fDocumentID . "&fNewThread=1") . "\"><img src=\"$default->graphicsUrl/widgets/new.gif\" border=\"0\" /></a> "; | |
| 32 | - $sToRender .= "<a href=\"" . generateControllerLink("viewDocument", "fDocumentID=" . $fDocumentID) . "\"><img src=\"$default->graphicsUrl/widgets/cancel.gif\" border=\"0\" /></a>"; | |
| 31 | + $sToRender .= "<a href=\"" . generateControllerLink("addComment", "fDocumentID=" . $fDocumentID . "&fNewThread=1") . "\"><img src=\"$default->graphicsUrl/widgets/new.gif\" border=\"0\"></a>"; | |
| 32 | + $sToRender .= "<a href=\"" . generateControllerLink("viewDocument", "fDocumentID=" . $fDocumentID) . "\"><img src=\"$default->graphicsUrl/widgets/cancel.gif\" border=\"0\"></a>"; | |
| 33 | 33 | |
| 34 | 34 | return $sToRender; |
| 35 | 35 | } |
| ... | ... | @@ -109,13 +109,11 @@ function getCommentBody($oComment, $iDocumentID, $oUser) { |
| 109 | 109 | |
| 110 | 110 | $sToRender .= "<br><table width=100% border=0><tr ><td colspan=2><b>Author: </b>" . $oUser->getUserName() . "</td>\n"; |
| 111 | 111 | $sToRender .= "<td align=right>\n"; |
| 112 | - $sToRender .= "<input type=\"submit\" style=\"BORDER-RIGHT: 0px groove; BORDER-TOP: 0px groove; BACKGROUND-IMAGE: url($default->graphicsUrl/widgets/reply.gif); BORDER-LEFT: 0px groove; WIDTH: 40px; BORDER-BOTTOM: 0px groove; HEIGHT: 18; BACKGROUND-COLOR: white\" height=\"20\" value=\" \" width=\"200\"> "; | |
| 112 | + $sToRender .= "<input onmouseover=\"this.style.cursor='hand'\" type=\"submit\" style=\"BORDER-RIGHT: 0px groove; BORDER-TOP: 0px groove; BACKGROUND-IMAGE: url($default->graphicsUrl/widgets/reply.gif); BORDER-LEFT: 0px groove; WIDTH: 40px; BORDER-BOTTOM: 0px groove; HEIGHT: 18; BACKGROUND-COLOR: white\" height=\"20\" value=\" \" width=\"200\"> "; | |
| 113 | 113 | $sToRender .= "</td></tr>\n"; |
| 114 | 114 | $sToRender .= "<tr><td width=\"1\" style=\"background-color:#F5F6EE;\" valign=\"top\"><b>Subject: </b></td><td width=405 style=\"background-color:#F5F6EE;\">"; |
| 115 | 115 | $sToRender .= "<input name=\"CommentSubject\" id=\"CommentSubject\" style=\"background-color:#F5F6EE;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 100%; BORDER-RIGHT-WIDTH: 0px\" readOnly width=0 value=\"" . $oComment->getSubject() . "\">"; |
| 116 | - $sToRender .= "</td><td><b>Date: </b><font color=\"#056DCE\">" . $oComment->getDate() . "</font> </td></tr><tr><td colspan=3 valign=top>"; | |
| 117 | - //$sToRender .= "<TEXTAREA readOnly name=\"Comment\" id=\"Comment\" style=\"BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; BORDER-BOTTOM-WIDTH: 0px; SCROLLBAR-SHADOW-COLOR: white; SCROLLBAR-3DLIGHT-COLOR: white; SCROLLBAR-ARROW-COLOR: white; SCROLLBAR-DARKSHADOW-COLOR: white; SCROLLBAR-BASE-COLOR: white; BORDER-RIGHT-WIDTH: 0px;FONT-FAMILY: sans-serif;\" rows=40 cols=96> "; | |
| 118 | - //$sToRender .= "<TEXTAREA readOnly name=\"Comment\" id=\"Comment\" style=\"BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; BORDER-BOTTOM-WIDTH: 0px; SCROLLBAR-SHADOW-COLOR: white; SCROLLBAR-3DLIGHT-COLOR: white; SCROLLBAR-ARROW-COLOR: white; SCROLLBAR-DARKSHADOW-COLOR: white; SCROLLBAR-BASE-COLOR: white; BORDER-RIGHT-WIDTH: 0px;FONT-FAMILY: sans-serif;\" rows=40 cols=96> "; | |
| 116 | + $sToRender .= "</td><td><b>Date: </b><font color=\"#056DCE\">" . $oComment->getDate() . "</font> </td></tr><tr><td colspan=3 valign=top>"; | |
| 119 | 117 | $sToRender .= "<TEXTAREA readOnly name=\"Comment\" id=\"Comment\" rows=40 cols=100 style=\"BORDER-WIDTH: 0px;FONT-FAMILY: sans-serif;\"> "; |
| 120 | 118 | $sToRender .= urldecode($oComment->getBody()); |
| 121 | 119 | $sToRender .= "</textarea></td>"; | ... | ... |
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
| ... | ... | @@ -163,6 +163,7 @@ function displayActionButtons($oDocument, $bEdit) { |
| 163 | 163 | } |
| 164 | 164 | $sToRender .= "<td><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>\n"; |
| 165 | 165 | $sToRender .= "<td><a href=\"" . generateControllerLink("viewDiscussion", "fDocumentID=" . $oDocument->getID() . "&fForDiscussion=1") . "\"><img src=\"$default->graphicsUrl/widgets/discussion.gif\" border=\"0\" /></a></td>\n"; |
| 166 | + | |
| 166 | 167 | return $sToRender; |
| 167 | 168 | } |
| 168 | 169 | ... | ... |