Commit 71e657b5d01cbd0361a6ed9dc35d633c643fb849
1 parent
782afb09
(#2813) refactored and tidied
incorporated addRole link git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2514 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
6 changed files
with
58 additions
and
271 deletions
presentation/lookAndFeel/knowledgeTree/administration/rolemanagement/addRoleBL.php
| ... | ... | @@ -8,18 +8,18 @@ |
| 8 | 8 | * |
| 9 | 9 | */ |
| 10 | 10 | require_once("../../../../../config/dmsDefaults.php"); |
| 11 | +require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 12 | +require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 13 | +require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 14 | +require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 15 | +require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 16 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 17 | +require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 18 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | |
| 19 | +require_once("addRoleUI.inc"); | |
| 11 | 20 | |
| 12 | 21 | if (checkSession()) { |
| 13 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 14 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 15 | - require_once("addRoleUI.inc"); | |
| 16 | - require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 17 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 18 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 19 | - require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 20 | - require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 21 | - require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 22 | - | |
| 22 | + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 23 | 23 | $oPatternCustom = & new PatternCustom(); |
| 24 | 24 | $oPatternCustom->setHtml(getPage()); |
| 25 | 25 | $main->setCentralPayload($oPatternCustom); |
| ... | ... | @@ -27,4 +27,4 @@ if (checkSession()) { |
| 27 | 27 | $main->setHasRequiredFields(true); |
| 28 | 28 | $main->render(); |
| 29 | 29 | } |
| 30 | 30 | -?> |
| 31 | +?> | |
| 31 | 32 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/rolemanagement/addRoleUI.inc
| ... | ... | @@ -30,7 +30,8 @@ function getPage() { |
| 30 | 30 | $sToRender .= "</tr>\n"; |
| 31 | 31 | $sToRender .= "<tr>\n"; |
| 32 | 32 | $sToRender .= "</tr>\n"; |
| 33 | - $sToRender .= "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/add.gif\" value=\"Submit\" border=\"0\"/></td>\n"; | |
| 33 | + $sToRender .= "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/add.gif\" value=\"Submit\" border=\"0\"/>"; | |
| 34 | + $sToRender .= getCancelButton("listRoles") . "</td>\n"; | |
| 34 | 35 | $sToRender .= "</table>\n"; |
| 35 | 36 | |
| 36 | 37 | return $sToRender; | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/rolemanagement/editRoleUI.inc
| ... | ... | @@ -125,7 +125,7 @@ function getEditPageSuccess() { |
| 125 | 125 | $sToRender .= "<tr></tr>\n"; |
| 126 | 126 | $sToRender .= "<tr></tr>\n"; |
| 127 | 127 | $sToRender .= "<tr>\n"; |
| 128 | - $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=listRole\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | |
| 128 | + $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=listRoles\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | |
| 129 | 129 | $sToRender .= "</tr>\n"; |
| 130 | 130 | $sToRender .= "</table>\n"; |
| 131 | 131 | |
| ... | ... | @@ -215,7 +215,7 @@ function getCancelButton($oRole) { |
| 215 | 215 | if (!isset($oRole)) { |
| 216 | 216 | //return "<td align = right><a href=\"$default->rootUrl/control.php?action=groupManagement\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" value=\"cancel\" /></a></td>\n"; |
| 217 | 217 | } else { |
| 218 | - return "<td align = right><a href=\"$default->rootUrl/control.php?action=listRole\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" border = \"0\" /></a></td>\n"; | |
| 218 | + return "<td align = right><a href=\"$default->rootUrl/control.php?action=listRoles\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" border = \"0\" /></a></td>\n"; | |
| 219 | 219 | } |
| 220 | 220 | } |
| 221 | 221 | ?> |
| 222 | 222 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/rolemanagement/listRolesBL.php
| ... | ... | @@ -8,59 +8,22 @@ |
| 8 | 8 | * |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | - require_once("../../../../../config/dmsDefaults.php"); | |
| 11 | +require_once("../../../../../config/dmsDefaults.php"); | |
| 12 | +require_once("$default->fileSystemRoot/lib/users/User.inc"); | |
| 13 | +require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 14 | +require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 15 | +require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); | |
| 16 | +require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 17 | +require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 18 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | |
| 19 | +require_once("listRolesUI.inc"); | |
| 12 | 20 | |
| 13 | -if (checkSession()) { | |
| 14 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 15 | - require_once("listRolesUI.inc"); | |
| 16 | - require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 17 | - require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); | |
| 18 | - require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 19 | - require_once("$default->fileSystemRoot/lib/users/User.inc"); | |
| 20 | - require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 21 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 22 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 23 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); | |
| 24 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternBrowsableSearchResults.inc"); | |
| 25 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 26 | - require_once("$default->fileSystemRoot/lib/discussions/DiscussionThread.inc"); | |
| 27 | - require_once("$default->fileSystemRoot/lib/discussions/DiscussionComment.inc"); | |
| 28 | - require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 29 | - | |
| 30 | - | |
| 21 | +if (checkSession()) { | |
| 31 | 22 | $oPatternCustom = & new PatternCustom(); |
| 32 | - | |
| 33 | -if(checkSession()) { | |
| 34 | - global $default; | |
| 35 | - | |
| 36 | - $oPatternCustom->addHtml(renderHeading("Current System Roles")); // Create the Heading | |
| 37 | - | |
| 38 | - | |
| 39 | - $main->setFormAction($_SERVER['PHP_SELF']); | |
| 40 | - | |
| 41 | - $sQuery = "SELECT id as roleID, name as name, active, can_read as reader, can_write as writer, " . | |
| 42 | - "'Edit', 'Delete' " . | |
| 43 | - "FROM roles " . | |
| 44 | - "ORDER BY name"; | |
| 45 | - | |
| 46 | - $aColumns = array("name", "active", "reader", "writer", "Edit", "Delete"); | |
| 47 | - $aColumnNames = array("Name", "Active", "Read", "Write", "Edit", "Delete"); | |
| 48 | - $aColumnTypes = array(1,2,2,2,3,3); | |
| 49 | - $aDBColumnArray = array("roleID"); | |
| 50 | - $aQueryStringVariableNames = array("fRoleID"); | |
| 51 | - | |
| 52 | - $aHyperLinkURL = array( 4=> "$default->rootUrl/control.php?action=editRole", | |
| 53 | - 5=> "$default->rootUrl/control.php?action=removeRole"); //"$default->rootUrl/control.php?action=removeUserFromGroup"); | |
| 54 | - | |
| 55 | - $oSearchResults = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnNames, "100%", $aHyperLinkURL,$aDBColumnArray,$aQueryStringVariableNames); | |
| 56 | - $oSearchResults->setDisplayColumnHeadings(true); | |
| 57 | - $htmlTables = $oSearchResults->render() ; | |
| 58 | - | |
| 59 | - $oPatternCustom->addHtml($htmlTables); | |
| 60 | - | |
| 61 | - } // end of if checksession | |
| 62 | - | |
| 23 | + $oPatternCustom->setHtml(getPage($fGroupID)); | |
| 24 | + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 63 | 25 | $main->setCentralPayload($oPatternCustom); |
| 64 | - $main->render(); | |
| 26 | + $main->setFormAction($_SERVER['PHP_SELF']); | |
| 27 | + $main->render(); | |
| 65 | 28 | } |
| 66 | 29 | ?> | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/rolemanagement/listRolesUI.inc
| ... | ... | @@ -7,212 +7,35 @@ |
| 7 | 7 | * @package presentation.lookAndFeel.knowledgeTree. |
| 8 | 8 | * |
| 9 | 9 | */ |
| 10 | - | |
| 11 | -function getSubmit() { | |
| 12 | - global $default; | |
| 13 | - $sToRender = "<input type=\"image\" src =\"$default->graphicsUrl/widgets/select.gif\" value=\"submit\" border=\"0\"/>\n"; | |
| 14 | - return $sToRender; | |
| 15 | -} | |
| 16 | - | |
| 17 | -// display the listbox initially ..then just display the text | |
| 18 | -function getGroupDisplay($oGroup, $iSelectedValue = 0) { | |
| 10 | +function getRoles() { | |
| 19 | 11 | global $default; |
| 20 | - if (!isset($oGroup)) { | |
| 21 | - if (Permission::userIsSystemAdministrator()) { | |
| 22 | - // if this is the system administrator, prepend group names with unit name | |
| 23 | - $oPatternListBox = & new PatternListBox($default->owl_groups_table, "name", "id", "fGroupID"); | |
| 24 | - $oPatternListBox->setFromClause("LEFT OUTER JOIN groups_units_link GUL on ST.id=GUL.group_id " . | |
| 25 | - "LEFT OUTER JOIN units_lookup UL on GUL.unit_id=UL.id"); | |
| 26 | - $oPatternListBox->setCompositeDisplayName("DISTINCT COALESCE(CONCAT(CONCAT(UL.name, '-'),ST.name),ST.name)"); | |
| 27 | - } else if (Permission::userIsUnitAdministrator()) { | |
| 28 | - // else if this is a unit administrator, only display the groups in your unit | |
| 29 | - $oPatternListBox = & new PatternListBox($default->owl_groups_table, "name", "id", "fGroupID"); | |
| 30 | - $oPatternListBox->setFromClause("INNER JOIN $default->owl_groups_units_table GUL on ST.id=GUL.group_id"); | |
| 31 | - $oPatternListBox->setWhereClause("GUL.unit_id=" . User::getUnitID($_SESSION["userID"])); | |
| 32 | - } | |
| 33 | - if ($iSelectedValue != 0) { | |
| 34 | - $oPatternListBox->setSelectedValue($iSelectedValue); | |
| 35 | - } | |
| 36 | - | |
| 37 | - return $oPatternListBox->render(); | |
| 38 | - } else { | |
| 39 | - return "<input type=\"hidden\" name=\"fGroupID\" value=\"" . $oGroup->iId . "\">\n" . | |
| 40 | - $oGroup->getName(); | |
| 41 | - } | |
| 42 | - | |
| 43 | -} | |
| 44 | - | |
| 45 | - | |
| 46 | -function getFilterOptions($fGroupID = 0){ | |
| 47 | - global $default; | |
| 48 | - $sToRender .= getGroupDisplay($aGroups, $fGroupID); | |
| 49 | - /* | |
| 50 | - $sToRender .= "<table width=100%><tr>\n"; | |
| 51 | - $sToRender .= "<td align=right width=100%><a href=\"" . generateControllerLink("addComment", "fDocumentID=" . $oThread->getDocumentID() . "&fAddComment=1") . "\"><img src=\"$default->graphicsUrl/widgets/addcomment.gif\" border=\"0\" /></a></td>\n"; | |
| 52 | - $sToRender .= "<td align=right width=10><img src=\"$default->graphicsUrl/widgets/back.gif\" onmouseover=\"this.style.cursor='hand'\" onclick=\"javascript: history.go(-1);\" /></td>\n"; | |
| 53 | - | |
| 54 | - $sToRender .= "</tr></table>\n";*/ | |
| 55 | - return $sToRender ; | |
| 56 | -} | |
| 57 | - | |
| 58 | -function getPageButtons($oThread){ | |
| 12 | + $sQuery = "SELECT id as roleID, name as name, active, can_read as reader, can_write as writer, " . | |
| 13 | + "'Edit', 'Delete' " . | |
| 14 | + "FROM roles " . | |
| 15 | + "ORDER BY name"; | |
| 16 | + | |
| 17 | + $aColumns = array("name", "active", "reader", "writer", "Edit", "Delete"); | |
| 18 | + $aColumnNames = array("Name", "Active", "Read", "Write", "Edit", "Delete"); | |
| 19 | + $aColumnTypes = array(1,2,2,2,3,3); | |
| 20 | + $aDBColumnArray = array("roleID"); | |
| 21 | + $aQueryStringVariableNames = array("fRoleID"); | |
| 22 | + | |
| 23 | + $aHyperLinkURL = array( 4=> "$default->rootUrl/control.php?action=editRole", | |
| 24 | + 5=> "$default->rootUrl/control.php?action=removeRole"); //"$default->rootUrl/control.php?action=removeUserFromGroup"); | |
| 25 | + | |
| 26 | + $oSearchResults = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnNames, "100%", $aHyperLinkURL,$aDBColumnArray,$aQueryStringVariableNames); | |
| 27 | + $oSearchResults->setDisplayColumnHeadings(true); | |
| 28 | + | |
| 29 | + return $oSearchResults->render() ; | |
| 30 | +} | |
| 31 | + | |
| 32 | +function getPage() { | |
| 59 | 33 | global $default; |
| 60 | - | |
| 61 | - $sToRender .= "<table width=100%><tr>\n"; | |
| 62 | - $sToRender .= "<td align=right width=100%><a href=\"" . generateControllerLink("addComment", "fDocumentID=" . $oThread->getDocumentID() . "&fAddComment=1") . "\"><img src=\"$default->graphicsUrl/widgets/addcomment.gif\" border=\"0\" /></a></td>\n"; | |
| 63 | - $sToRender .= "<td align=right width=10><img src=\"$default->graphicsUrl/widgets/back.gif\" onmouseover=\"this.style.cursor='hand'\" onclick=\"javascript: history.go(-1);\" /></td>\n"; | |
| 64 | - | |
| 65 | - $sToRender .= "</tr></table>\n"; | |
| 66 | - //$sToRender .= "<a href=\"" . generateControllerLink("addComment", "fDocumentID=" . $oThread->getDocumentID() . "&fAddComment=1") . "\"><img src=\"$default->graphicsUrl/widgets/addcomment.gif\" border=\"0\" /></a>\n"; | |
| 67 | - //$sToRender .= "<img src=\"$default->graphicsUrl/widgets/back.gif\" onmouseover=\"this.style.cursor='hand'\" onclick=\"javascript: history.go(-1);\" />\n"; | |
| 68 | - | |
| 69 | - return $sToRender ; | |
| 70 | -} | |
| 34 | + $sToRender .= renderHeading("Current System Roles"); | |
| 71 | 35 | |
| 72 | -// If there are no threads to view for a document | |
| 73 | -function getViewFailPage($sMessage) | |
| 74 | -{ | |
| 75 | - global $default; | |
| 76 | - | |
| 77 | - if (strlen($sMessage)>0){ | |
| 78 | - $sToRender = $sMessage; | |
| 79 | - } | |
| 80 | - else $sToRender = "Current document has no discussion. Press the ADD button to start a discussion."; | |
| 81 | - | |
| 36 | + // add user link | |
| 37 | + $sToRender .= getAddLink("addRole", "Add A Role"); | |
| 38 | + $sToRender .= getRoles(); | |
| 82 | 39 | return $sToRender; |
| 83 | 40 | } |
| 84 | - | |
| 85 | -/** | |
| 86 | - * Page to create a new thread | |
| 87 | - * | |
| 88 | - * @param $fDocumentID -> a valid document ID | |
| 89 | - */ | |
| 90 | -function getNewThreadOption($fDocumentID) { | |
| 91 | - global $default; | |
| 92 | - | |
| 93 | - $sToRender .= "Would you like to create a new Discussion thread for this document?"; | |
| 94 | - $sToRender .= " "; | |
| 95 | - $sToRender .= "<a href=\"" . generateControllerLink("addComment", "fDocumentID=" . $fDocumentID . "&fNewThread=1") . "\"><img src=\"$default->graphicsUrl/widgets/new.gif\" border=\"0\"></a>"; | |
| 96 | - $sToRender .= "<a href=\"" . generateControllerLink("viewDocument", "fDocumentID=" . $fDocumentID) . "\"><img src=\"$default->graphicsUrl/widgets/cancel.gif\" border=\"0\"></a>"; | |
| 97 | - | |
| 98 | - return $sToRender; | |
| 99 | -} | |
| 100 | - | |
| 101 | -/** | |
| 102 | - * Renders the heading for the page | |
| 103 | - * | |
| 104 | - * @param $sHeading -> text heading for the page | |
| 105 | - */ | |
| 106 | -function renderHeading1($sHeading) { | |
| 107 | - global $default; | |
| 108 | - | |
| 109 | - $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); | |
| 110 | - $sColor = $default->siteMap->getSectionColour($sSectionName, "th"); | |
| 111 | - $sToRender = "<table border=\"0\" width=\"600\">\n"; | |
| 112 | - $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\"><font color=\"ffffff\">$sHeading</font></th></tr>\n"; | |
| 113 | - $sToRender .= "<tr/>\n"; | |
| 114 | - $sToRender .= "<tr/>\n"; | |
| 115 | - $sToRender .= "</table>\n"; | |
| 116 | - return $sToRender; | |
| 117 | -} | |
| 118 | - | |
| 119 | -/** | |
| 120 | - * Renders the path for the document | |
| 121 | - * | |
| 122 | - * @param $fDocumentID -> a valid document ID | |
| 123 | - */ | |
| 124 | -function renderDocumentPath($iDocumentID) { | |
| 125 | - global $default; | |
| 126 | - | |
| 127 | - $oDocument = & Document::get($iDocumentID); | |
| 128 | - $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); | |
| 129 | - $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); | |
| 130 | - $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > "; | |
| 131 | - $sDocumentPath .= "<a href=\"$default->rootUrl/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\">" . $oDocument->getName() . "</a>"; | |
| 132 | - return "<table border=0 cellpadding=\"5\" width = 100%><tr><td bgcolor=\"$sTDBGColour\">$sDocumentPath</td></tr></table>\n"; | |
| 133 | -} | |
| 134 | - | |
| 135 | -/** | |
| 136 | - * Views the list of comments for a document | |
| 137 | - * Prints out 1 comment | |
| 138 | - * User needs to call this function many times to list all comments | |
| 139 | - * | |
| 140 | - * @param $iNum -> its the iterative index of the current comment | |
| 141 | - * @param $iThread -> a valid Thread Object | |
| 142 | - * @param $oComment -> a valid Comment Object | |
| 143 | - * @param $oUser -> a valid User Object (Logged in user) | |
| 144 | - */ | |
| 145 | -function getViewComment($iNum,$oThread,$oComment,$oUser) { | |
| 146 | - global $default; | |
| 147 | - | |
| 148 | - $iSubjectChars = 59; | |
| 149 | - // If iNum is odd then highlight it | |
| 150 | - if (($iNum%2) == 1) $BGcolor = "#F5F6EE"; | |
| 151 | - if (($iNum%2) == 0) $UserBGcolor = "#F5F6EE"; | |
| 152 | - | |
| 153 | - // If the Subject string is too long | |
| 154 | - if (strlen($oComment->getSubject())>$iSubjectChars ) $dotdot = " ..."; | |
| 155 | - if (strlen($oUser->getUserName())> 13 ) $Userdotdot = " ..."; | |
| 156 | - | |
| 157 | - // If this is the first Subject line then create a table | |
| 158 | - if ($iNum == 1) { | |
| 159 | - $sHeading = "Document Discussion Comments"; | |
| 160 | - | |
| 161 | - $sToRender .= renderHeading($sHeading ); | |
| 162 | - $sToRender .= renderDocumentPath($oThread->getDocumentID()); | |
| 163 | - $sToRender .= "<table border=0 width=100%><tr>"; | |
| 164 | - $sToRender .= "<td width=100><b>Views: </b> " . $oThread->getNumberOfViews() . "</td>"; | |
| 165 | - $sToRender .= "<td width=20></td>"; | |
| 166 | - $sToRender .= "<td><b>Replies: </b> " . $oThread->getNumberOfReplies() . "</td>"; | |
| 167 | - $sToRender .= "<td align=right><a href=\"" . generateControllerLink("addComment", "fDocumentID=" . $oThread->getDocumentID() . "&fAddComment=1") . "\"><img src=\"$default->graphicsUrl/widgets/addcomment.gif\" border=\"0\" /></a>"; | |
| 168 | - $sToRender .= "<img src=\"$default->graphicsUrl/widgets/back.gif\" onmouseover=\"this.style.cursor='hand'\" onclick=\"javascript: history.go(-1);\" ></td>"; | |
| 169 | - $sToRender .= "</tr></table><br>\n"; | |
| 170 | - $sToRender .= "<table border=\"0\" width=\"100%\">\n"; | |
| 171 | - $sToRender .= "<tr><td></td>\n"; | |
| 172 | - $sToRender .= "<td><b>Subject</b></td>\n"; | |
| 173 | - $sToRender .= "<td><b>Author</b></td>\n"; | |
| 174 | - $sToRender .= "<td><b>Date</b></td>\n"; | |
| 175 | - $sToRender .= "</tr>\n"; | |
| 176 | - } | |
| 177 | - | |
| 178 | - $sToRender .= "<tr><td>$iNum </td><td style=\"background-color:$BGcolor\" width=450><a style=\"width:94%\" href=\"" . $_SERVER['PHP_SELF'] . "?fViewComment=1&iCommentID=" . $oComment->getID() . "&iDocumentID=" . $oThread->getDocumentID() . "\" title=\"" . $oComment->getSubject() . "\">" . substr($oComment->getSubject(),0,$iSubjectChars ) . $dotdot . "</a></td>\n"; | |
| 179 | - $sToRender .= "<td style=\"background-color:$UserBGcolor\" width=\"100\" title=\"$oUser->getUserName()\">" . substr($oUser->getUserName(),0,10) . $Userdotdot . "</td>\n"; | |
| 180 | - $sToRender .= "<td style=\"background-color:$BGcolor\" width=\"80\">" . $oComment->getDate() . "<td></tr>\n"; | |
| 181 | - | |
| 182 | - // If this is the last subject line then close the table | |
| 183 | - if ($iNum == ($oThread->getNumberOfReplies())) { $sToRender .= "\n</table>\n\n";} | |
| 184 | - return $sToRender; | |
| 185 | -} | |
| 186 | - | |
| 187 | -/** | |
| 188 | - * Views a single thread comment with its text body | |
| 189 | - * | |
| 190 | - * @param $iDocumentID -> a valid Document ID | |
| 191 | - * @param $oComment -> a valid Comment Object | |
| 192 | - * @param $oUser -> a valid User Object (Logged in user) | |
| 193 | - */ | |
| 194 | -function getCommentBody($oComment, $iDocumentID, $oUser) { | |
| 195 | - global $default; | |
| 196 | - | |
| 197 | - $sHeading = "Document Comment"; | |
| 198 | - | |
| 199 | - $sToRender .= renderHeading($sHeading); | |
| 200 | - $sToRender .= renderDocumentPath($iDocumentID); | |
| 201 | - | |
| 202 | - $sToRender .= "<br><table width=100% border=0><tr ><td colspan=2><b>Author: </b>" . $oUser->getUserName() . "</td>\n"; | |
| 203 | - $sToRender .= "<td align=right>\n"; | |
| 204 | - $sToRender .= "<a href=\"" . generateControllerLink("addComment", "fDocumentID=" . $iDocumentID . "&fReplyComment=1&fCommentID=" . $oComment->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/reply.gif\" border=\"0\" /></a>"; | |
| 205 | - $sToRender .= "</td><td width=30><img src=\"$default->graphicsUrl/widgets/back.gif\" onmouseover=\"this.style.cursor='hand'\" onclick=\"javascript: history.go(-1);\" ></td></tr>\n"; | |
| 206 | - $sToRender .= "<tr><td width=\"1\" style=\"background-color:#F5F6EE;\" valign=\"top\"><b>Subject: </b></td><td width=405 style=\"background-color:#F5F6EE;\">"; | |
| 207 | - $sToRender .= "<a>" . $oComment->getSubject() . "</a>"; | |
| 208 | - $sToRender .= "</td><td colspan=2><b>Date: </b><font color=\"#056DCE\">" . $oComment->getDate() . "</font> </td></tr><tr><td colspan=4 valign=top>"; | |
| 209 | - $sToRender .= "<DIV> "; | |
| 210 | - $sToRender .= urldecode(str_replace("%0D%0A","<br>",str_replace("+", " ",$oComment->getBody()))); // Div Views as HTML | |
| 211 | - $sToRender .= "</DIV></td>"; | |
| 212 | - | |
| 213 | - $sToRender .= "</tr></table> "; | |
| 214 | - | |
| 215 | - return $sToRender; | |
| 216 | -} | |
| 217 | - | |
| 218 | 41 | ?> |
| 219 | 42 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/rolemanagement/removeRoleUI.inc
| ... | ... | @@ -61,7 +61,7 @@ function getDeleteSuccessPage() { |
| 61 | 61 | $sToRender .= "<tr></tr>\n"; |
| 62 | 62 | $sToRender .= "<tr></tr>\n"; |
| 63 | 63 | $sToRender .= "<tr>\n"; |
| 64 | - $sToRender .= "<td align = right><a href=\"$default->rootUrl/control.php?action=listRole\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | |
| 64 | + $sToRender .= "<td align = right><a href=\"$default->rootUrl/control.php?action=listRoles\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | |
| 65 | 65 | $sToRender .= "</tr>\n"; |
| 66 | 66 | $sToRender .= "</table>\n"; |
| 67 | 67 | |
| ... | ... | @@ -84,7 +84,7 @@ function getDeleteFailPage() { |
| 84 | 84 | $sToRender .= "<tr></tr>\n"; |
| 85 | 85 | $sToRender .= "<tr></tr>\n"; |
| 86 | 86 | $sToRender .= "</tr>\n"; |
| 87 | - $sToRender .= "<tr><td align = right><a href=\"$default->rootUrl/control.php?action=listRole\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td></tr>\n"; | |
| 87 | + $sToRender .= "<tr><td align = right><a href=\"$default->rootUrl/control.php?action=listRoles\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td></tr>\n"; | |
| 88 | 88 | $sToRender .= "</table>\n"; |
| 89 | 89 | |
| 90 | 90 | return $sToRender; |
| ... | ... | @@ -138,7 +138,7 @@ function getDeleteButton($oRole) { |
| 138 | 138 | global $default; |
| 139 | 139 | if (isset($oRole)) { |
| 140 | 140 | return "<td></td><td><td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/delete.gif\" value=\"submit\" border=\"0\"/></td>\n". |
| 141 | - "<td align = right><a href=\"$default->rootUrl/control.php?action=listRole\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" border = \"0\" /></a></td>\n"; | |
| 141 | + "<td align = right><a href=\"$default->rootUrl/control.php?action=listRoles\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" border = \"0\" /></a></td>\n"; | |
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | ?> | ... | ... |