collaborationUI.inc
2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* Presentation data for collaborationBL.php
*
* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
* @date 28 January 2003
* @package presentation.lookAndFeel.knowledgeTree.documentmanagement
*
*/
function getGroupRow($iGroupID) {
$oGroup = Group::get($iGroupID);
return "<input type=\"hidden\" name=\"fGroupID\" value=\"" . $iGroupID . "\" />" . $oGroup->getName();
}
function getUserDropDown($iGroupID, $iUserID) {
global $default;
$oPatternListBox = & new PatternListBox("$default->owl_users_table", "name", "id", "fUserID");
$sFromClause = "INNER JOIN $default->owl_users_groups_table AS UGL ON ST.id = UGL.user_id ";
$oPatternListBox->setFromClause($sFromClause);
$sWhereClause = "UGL.group_id = $iGroupID";
$oPatternListBox->setWhereClause($sWhereClause);
if (isset($iUserID)) {
$oPatternListBox->setSelectedValue($iUserID);
}
$oPatternListBox->setEmptyErrorMessage("There are no users in this group");
return $oPatternListBox->render();
}
function getRole($iRoleID) {
$oRole = Role::get($iRoleID);
return "<input type=\"hidden\" name=\"fRoleID\" value=\"$iRoleID\" />" . $oRole->getName();
/*global $default;
$oPatternListBox = & new PatternListBox("$default->owl_roles_table", "name", "id", "fRoleID");
if (isset($iRoleID)) {
$oPatternListBox->setSelectedValue($iRoleID);
}
$oPatternListBox->setEmptyErrorMessage("There are no users in this group");
return $oPatternListBox->render();*/
}
function getDocumentRoutingPage($iGroupID, $iUserID, $iRoleID, $iSequenceNumber, $fDocumentID) {
global $default;
return "<table cellspacing=2, cellpadding=2, border=0>\n" .
"<caption><b>Document Routing</b></caption>\n" .
"<tr>\n" .
"<td><b>Group</b></td><td>".getGroupRow($iGroupID)."</td>\n" .
"</tr>\n" .
"<tr>\n" .
//"<td><b>Role</b></td><td>".getRoleDropDown($iRoleID)."</td>\n" .
"<td><b>Role</b></td><td>".getRole($iRoleID)."</td>\n" .
"</tr>\n" .
"<tr>\n" .
"<td><b>Player</b></td><td>".getUserDropDown($iGroupID, $iUserID)."</td>\n" .
"</tr>\n" .
"<tr>\n" .
"<tr>\n" .
"<td><b>Seq. no.</b></td><td>$iSequenceNumber</td>\n" .
"</tr>\n" .
"<tr>\n" .
"<td colspan=\"2\"> </td>\n" .
"</tr>\n" .
"<tr>\n" .
"<td><b><input type=\"image\" src=\"$default->graphicsUrl/widgets/update.gif\" /></b></td><td><a href=\"$default->rootUrl/control.php?action=viewDocument&fDocumentID=$fDocumentID \"><img src=\"$default->graphicsUrl/widgets/cancel.gif\" border=\"0\"></a></td>\n" .
"</tr>\n" .
"</table>\n";
}
?>