| 6497 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
' notifications.asp
|
|
|
5 |
' Display package notification information
|
|
|
6 |
'=====================================================
|
|
|
7 |
%>
|
|
|
8 |
<%
|
|
|
9 |
Option explicit
|
|
|
10 |
' Good idea to set when using redirect
|
|
|
11 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/conf.asp"-->
|
|
|
14 |
<!--#include file="common/globals.asp"-->
|
|
|
15 |
<!--#include file="common/formating.asp"-->
|
|
|
16 |
<!--#include file="common/qstr.asp"-->
|
|
|
17 |
<!--#include file="common/common_subs.asp"-->
|
|
|
18 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
19 |
<!--#include file="_tabs.asp"-->
|
|
|
20 |
<!--#include file="_action_buttons.asp"-->
|
|
|
21 |
<!--#include file="common/_package_common.asp"-->
|
|
|
22 |
<%
|
|
|
23 |
'------------ ACCESS CONTROL ------------------
|
|
|
24 |
%>
|
|
|
25 |
<!--#include file="_access_control_login_optional.asp"-->
|
|
|
26 |
<!--#include file="_access_control_general.asp"-->
|
|
|
27 |
<%
|
|
|
28 |
'------------ Variable Definition -------------
|
|
|
29 |
Dim rsTemp
|
|
|
30 |
Dim rsQry
|
|
|
31 |
Dim canDelete : canDelete = FALSE
|
|
|
32 |
'------------ Constants Declaration -----------
|
|
|
33 |
'------------ Variable Init -------------------
|
|
|
34 |
canDelete = canActionControlInProject("AdminView")
|
|
|
35 |
'----------------------------------------------
|
|
|
36 |
%>
|
|
|
37 |
<html>
|
|
|
38 |
<title><%=Title(Request("rtag_id"))%></title>
|
|
|
39 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
40 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
41 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
42 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
43 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
44 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
|
|
45 |
<script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
|
| 6497 |
dpurdie |
46 |
<!--#include file="_jquery_includes.asp"-->
|
| 6499 |
dpurdie |
47 |
<!-- TIPS -->
|
| 6579 |
dpurdie |
48 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
49 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
| 6497 |
dpurdie |
50 |
<!-- DROPDOWN MENUS -->
|
|
|
51 |
<!--#include file="_menu_def.asp"-->
|
| 6579 |
dpurdie |
52 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
| 6499 |
dpurdie |
53 |
<script language="JavaScript">
|
|
|
54 |
// Local Tips
|
|
|
55 |
formTips.tips.enabledUser = stdTip(200, 'Enabled User', 'Emails will be sent to disabled users.'+
|
|
|
56 |
'<p>They will not be allowed access to the Manager Suite of applications.' +
|
|
|
57 |
'This is an indication that the user many not be required to receive notifications.' );
|
|
|
58 |
formTips.tips.opr = stdTip(200, 'Operations', 'A user can delete their own notification request' +
|
|
|
59 |
'<p>A user with "ViewAdmin" permission can delete any users notification request.');
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
</script>
|
| 6497 |
dpurdie |
63 |
<script language="javascript">
|
|
|
64 |
$(document).ready(function () {
|
|
|
65 |
|
|
|
66 |
// Add operation to all the delete buttons
|
|
|
67 |
$('.btn_delete').on('click', function(){
|
|
|
68 |
var el = $(this);
|
|
|
69 |
var trel = el.closest("tr");
|
|
|
70 |
var proj_id = trel.data("proj_id");
|
|
|
71 |
var uid_id = trel.data("user_id");
|
|
|
72 |
|
| 6509 |
dpurdie |
73 |
// Get the table row as an array to simplify access
|
|
|
74 |
var colData = new Array();
|
|
|
75 |
trel.each(function(){
|
|
|
76 |
$(this).find('td').each(function(){
|
|
|
77 |
colData.push($(this));
|
|
|
78 |
})
|
|
|
79 |
});
|
|
|
80 |
var projName = colData[2].text();
|
|
|
81 |
var userName = colData[0].text();
|
|
|
82 |
|
|
|
83 |
vixConfirm("Remove notifications from this package<br>for user '"+userName+"'<br>in the '"+projName+"' project",
|
| 6497 |
dpurdie |
84 |
{ok : removeUserNotification,
|
|
|
85 |
data : { "uid" : uid_id,
|
|
|
86 |
"proj_id" : proj_id,
|
|
|
87 |
"element" : trel
|
|
|
88 |
}});
|
|
|
89 |
});
|
|
|
90 |
|
|
|
91 |
// Delete notifications for this package in selected projects
|
|
|
92 |
function removeUserNotification(args)
|
|
|
93 |
{
|
| 6509 |
dpurdie |
94 |
//console.log("removeUserNotification", args.data.uid, args.data.proj_id);
|
| 6497 |
dpurdie |
95 |
$.ajax({
|
|
|
96 |
type : 'POST',
|
|
|
97 |
url : '_json_Notifications.asp',
|
|
|
98 |
data : {Opr : 'RemoveUserFromProject', pkg_id : <%=pkgInfoHash.Item("pkg_id")%>, user_id : args.data.uid, proj_id : args.data.proj_id },
|
|
|
99 |
dataType : 'json',
|
|
|
100 |
}).fail(function( jqXHR, textStatus, errorThrown ){
|
|
|
101 |
vixAlert('Ajax Error. Unexpected result.<p>' + errorThrown);
|
|
|
102 |
}).done(function( data, textStatus, jqXHR ){
|
|
|
103 |
if (typeof data.result === undefined){
|
|
|
104 |
vixAlert('Ajax Error. Unexpected result');
|
|
|
105 |
} else if (data.result != 0){
|
|
|
106 |
vixAlert('Error Deleting item.<p>' + data.emsgDetails);
|
|
|
107 |
} else {
|
|
|
108 |
// Delete row associated with this enty
|
|
|
109 |
args.data.element.remove();
|
|
|
110 |
}
|
|
|
111 |
});
|
|
|
112 |
}
|
|
|
113 |
});
|
|
|
114 |
</script>
|
|
|
115 |
</head>
|
|
|
116 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
117 |
<!-- HEADER -->
|
|
|
118 |
<!--#include file="_header.asp"-->
|
|
|
119 |
<!-- BODY ---->
|
|
|
120 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
121 |
<tr>
|
|
|
122 |
<td valign="top" width="1" background="images/bg_bage.gif">
|
|
|
123 |
<!-- LEFT -->
|
|
|
124 |
<!--#include file="_environment.asp"-->
|
|
|
125 |
</td>
|
|
|
126 |
<td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
|
|
|
127 |
<td valign="top" width="100%">
|
|
|
128 |
<!-- MIDDLE -->
|
|
|
129 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
130 |
<tr>
|
|
|
131 |
<td width="1%" background="images/bg_action_norm.gif"><IMG height=35 src="images/spacer.gif" width=15></td>
|
|
|
132 |
<td width="100%" background="images/bg_action_norm.gif"><%Call RenderActionBar(parRtag_id,parPv_id)%></td>
|
|
|
133 |
<td width="1%" background="images/bg_action_norm.gif"><IMG height=1 src="images/spacer.gif" width=15></td>
|
|
|
134 |
</tr>
|
|
|
135 |
<tr>
|
|
|
136 |
<td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td>
|
|
|
137 |
<td background="images/bg_lght_gray.gif"><%Call RenderStatus(parRtag_id,parPv_id)%></td>
|
|
|
138 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
139 |
</tr>
|
|
|
140 |
<tr>
|
|
|
141 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
142 |
<td valign="bottom" background="images/bg_lght_gray.gif">
|
|
|
143 |
<table width="100" border="0" cellspacing="0" cellpadding="0">
|
|
|
144 |
<tr>
|
|
|
145 |
<td><IMG height="1" src="images/spacer.gif" width="0" alt="tab-left-margin" ></td>
|
|
|
146 |
<td>
|
|
|
147 |
<!-- TABS ------------------------------------->
|
|
|
148 |
<%Call Generate_Tab_Menu ( TABarray1, "Notifications", "orange" )%>
|
|
|
149 |
</td>
|
|
|
150 |
</tr>
|
|
|
151 |
</table>
|
|
|
152 |
</td>
|
|
|
153 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
154 |
</tr>
|
|
|
155 |
<tr>
|
|
|
156 |
<td background="images/lbox_bg_orange.gif"><IMG height=35 src="images/spacer.gif" width=1></td>
|
|
|
157 |
<td background="images/lbox_bg_orange.gif">
|
|
|
158 |
<!-- TAB ACTION BUTTONS ------------------------------------->
|
|
|
159 |
</td>
|
|
|
160 |
<td background="images/lbox_bg_orange.gif"> </td>
|
|
|
161 |
</tr>
|
|
|
162 |
<tr>
|
|
|
163 |
<td></td>
|
|
|
164 |
<td valign="top">
|
|
|
165 |
<!-- DETAILS ------------------------------------------------->
|
|
|
166 |
<br>
|
|
|
167 |
<span class="body_colb">Package Notification Details</span><br>
|
|
|
168 |
<table width="100%" border="0" cellspacing="1" cellpadding="3">
|
|
|
169 |
<tr class="form_field_hdr">
|
| 6508 |
dpurdie |
170 |
<td nowrap width="1%" >Who<%=Quick_Help("enabledUser")%> </td>
|
| 6499 |
dpurdie |
171 |
<td nowrap width="1%">Opr<%=Quick_Help("opr")%> </td>
|
| 6497 |
dpurdie |
172 |
<td nowrap width="97%">Project </td>
|
|
|
173 |
|
|
|
174 |
</tr>
|
|
|
175 |
<%
|
|
|
176 |
|
|
|
177 |
OraDatabase.Parameters.Add "PKG_ID", pkgInfoHash.Item("pkg_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
178 |
|
|
|
179 |
Set rsTemp = OraDatabase.DbCreateDynaset( "select pi.proj_id, p.PROJ_NAME, u.user_id, u.FULL_NAME, u.USER_EMAIL, u.IS_DISABLED from PACKAGE_INTEREST pi, PROJECTS p, USERS u where pi.USER_ID = u.USER_ID and p.PROJ_ID = pi.proj_id and pkg_id = :PKG_ID order by UPPER(PROJ_NAME), UPPER(FULL_NAME)", cint(0))
|
|
|
180 |
%>
|
|
|
181 |
<%If rsTemp.RecordCount < 1 Then%>
|
|
|
182 |
<tr class="form_item_grey" >
|
|
|
183 |
<td nowrap> </td>
|
|
|
184 |
<td nowrap> </td>
|
|
|
185 |
<td nowrap> </td>
|
|
|
186 |
<td nowrap> </td>
|
|
|
187 |
</tr>
|
|
|
188 |
<%End If%>
|
|
|
189 |
<%While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
| 6508 |
dpurdie |
190 |
Dim userImage : userImage = LIMG_USER_DISABLED
|
| 6497 |
dpurdie |
191 |
If isNull(rsTemp("is_DISABLED")) Then
|
| 6508 |
dpurdie |
192 |
userImage = LIMG_USER
|
| 6497 |
dpurdie |
193 |
End If
|
|
|
194 |
|
| 6509 |
dpurdie |
195 |
Dim DelUserImage : DelUserImage = LIMG_NDEL_DISABLED
|
|
|
196 |
Dim btnText : btnText = "Operation not available"
|
|
|
197 |
Dim btnClass : btnClass = ""
|
| 6497 |
dpurdie |
198 |
If canDelete OR objAccessControl.UserId = rsTemp("user_id") Then
|
| 6509 |
dpurdie |
199 |
DelUserImage = LIMG_NDEL
|
|
|
200 |
btnText = "Remove notifications to this user"
|
|
|
201 |
btnClass = "class=btn_delete"
|
| 6497 |
dpurdie |
202 |
End If
|
|
|
203 |
|
|
|
204 |
%>
|
|
|
205 |
<tr class="form_item_grey" data-user_id="<%=rsTemp("user_id")%>" data-proj_id="<%=rsTemp("proj_id")%>" >
|
| 6612 |
dpurdie |
206 |
<td nowrap valign="top"><%=emailField(userImage & rsTemp("FULL_NAME"),rsTemp("user_email"))%></td>
|
| 6509 |
dpurdie |
207 |
<td nowrap valign="top" <%=btnClass%> title="<%=btnText%>"><%=DelUserImage%></td>
|
| 6497 |
dpurdie |
208 |
<td nowrap valign="top"><a href="rtree.asp?proj_id=<%=rsTemp("PROJ_ID")%>"><%=rsTemp("PROJ_NAME")%></a></td>
|
|
|
209 |
</tr>
|
|
|
210 |
<%rsTemp.MoveNext
|
|
|
211 |
WEnd
|
|
|
212 |
rsTemp.Close
|
|
|
213 |
Set rsTemp = nothing
|
|
|
214 |
|
|
|
215 |
OraDatabase.Parameters.Remove "PKG_ID"
|
|
|
216 |
%>
|
|
|
217 |
</table>
|
|
|
218 |
<!------------------------------------------------------------>
|
|
|
219 |
<br>
|
|
|
220 |
|
|
|
221 |
<!-- END DETAILS ------------------------------------------------->
|
|
|
222 |
</td>
|
|
|
223 |
<td> </td>
|
|
|
224 |
</tr>
|
|
|
225 |
</table>
|
|
|
226 |
<!-- END MIDDLE -------->
|
|
|
227 |
</td>
|
|
|
228 |
</tr>
|
|
|
229 |
</table>
|
|
|
230 |
<!-- FOOTER -->
|
|
|
231 |
<!--#include file="_footer.asp"-->
|
|
|
232 |
</body>
|
|
|
233 |
</html>
|