Rev 6873 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'=====================================================' notifications.asp' Display package notification information'=====================================================%><%Option explicit' Good idea to set when using redirectResponse.Expires = 0 ' always load the page, dont store%><!--#include file="common/conf.asp"--><!--#include file="common/globals.asp"--><!--#include file="common/formating.asp"--><!--#include file="common/qstr.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/common_dbedit.asp"--><!--#include file="_tabs.asp"--><!--#include file="_action_buttons.asp"--><!--#include file="common/_package_common.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_login_optional.asp"--><!--#include file="_access_control_general.asp"--><%'------------ Variable Definition -------------Dim rsTempDim rsQryDim canDelete : canDelete = FALSE'------------ Constants Declaration -----------'------------ Variable Init -------------------canDelete = canActionControlInProject("AdminView")'----------------------------------------------%><html><title><%=Title(Request("rtag_id"))%></title><link rel="shortcut icon" href="<%=FavIcon%>"/><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css"><link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css"><script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script><script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script><!--#include file="_jquery_includes.asp"--><!-- TIPS --><script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script><script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script><!-- DROPDOWN MENUS --><!--#include file="_menu_def.asp"--><script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script><script language="JavaScript">// Local TipsformTips.tips.enabledUser = stdTip(200, 'Enabled User', 'Emails will be sent to disabled users.'+'<p>They will not be allowed access to the Manager Suite of applications.' +'This is an indication that the user many not be required to receive notifications.' );formTips.tips.opr = stdTip(200, 'Operations', 'A user can delete their own notification request' +'<p>A user with "ViewAdmin" permission can delete any users notification request.');</script><script language="javascript">$(document).ready(function () {// Add operation to all the delete buttons$('.btn_delete').on('click', function(){var el = $(this);var trel = el.closest("tr");var proj_id = trel.data("proj_id");var uid_id = trel.data("user_id");// Get the table row as an array to simplify accessvar colData = new Array();trel.each(function(){$(this).find('td').each(function(){colData.push($(this));})});var projName = colData[2].text();var userName = colData[0].text();vixConfirm("Remove notifications from this package<br>for user '"+userName+"'<br>in the '"+projName+"' project",{ok : removeUserNotification,data : { "uid" : uid_id,"proj_id" : proj_id,"element" : trel}});});// Delete notifications for this package in selected projectsfunction removeUserNotification(args){//console.log("removeUserNotification", args.data.uid, args.data.proj_id);$.ajax({type : 'POST',url : '_json_Notifications.asp',data : {Opr : 'RemoveUserFromProject', pkg_id : <%=pkgInfoHash.Item("pkg_id")%>, user_id : args.data.uid, proj_id : args.data.proj_id },dataType : 'json',}).fail(function( jqXHR, textStatus, errorThrown ){vixAlert('Ajax Error. Unexpected result.<p>' + errorThrown);}).done(function( data, textStatus, jqXHR ){if (typeof data.result === undefined){vixAlert('Ajax Error. Unexpected result');} else if (data.result != 0){vixAlert('Error Deleting item.<p>' + data.emsgDetails);} else {// Delete row associated with this entyargs.data.element.remove();}});}});</script></head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" ><!-- HEADER --><!--#include file="_header.asp"--><!-- BODY ----><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class='bg_bage'><!-- LEFT --><!--#include file="_environment.asp"--></td><td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td><td valign="top" width="100%"><!-- MIDDLE --><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%" background="images/bg_action_norm.gif"><IMG height=35 src="images/spacer.gif" width=15></td><td width="100%" background="images/bg_action_norm.gif"><%Call RenderActionBar(parRtag_id,parPv_id)%></td><td width="1%" background="images/bg_action_norm.gif"><IMG height=1 src="images/spacer.gif" width=15></td></tr><tr><td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td><td background="images/bg_lght_gray.gif"><%Call RenderStatus(parRtag_id,parPv_id)%></td><td background="images/bg_lght_gray.gif"> </td></tr><tr><td background="images/bg_lght_gray.gif"> </td><td valign="bottom" background="images/bg_lght_gray.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><IMG height="1" src="images/spacer.gif" width="0" alt="tab-left-margin" ></td><td><!-- TABS -------------------------------------><%Call Generate_Tab_Menu ( TABarray1, "Notifications", "orange" )%></td></tr></table></td><td background="images/bg_lght_gray.gif"> </td></tr><tr class='bg_panel' style="height:35px;"><td></td><td><!-- TAB ACTION BUTTONS -------------------------------------></td><td></td></tr><tr><td></td><td valign="top"><!-- DETAILS -------------------------------------------------><br><span class="body_colb">Package Notification Details</span><br><table width="100%" border="0" cellspacing="1" cellpadding="3" class=stdGrey><thead><tr><th nowrap width="1%" >Who<%=Quick_Help("enabledUser")%> </th><th nowrap width="1%">Opr<%=Quick_Help("opr")%> </th><th nowrap width="97%">Project </th></thead></tr><%OraDatabase.Parameters.Add "PKG_ID", pkgInfoHash.Item("pkg_id"), ORAPARM_INPUT, ORATYPE_NUMBERSet 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))%><%If rsTemp.RecordCount < 1 Then%><tr><td nowrap> </td><td nowrap> </td><td nowrap> </td><td nowrap> </td></tr><%End If%><%While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))Dim userImage : userImage = LIMG_USER_DISABLEDIf isNull(rsTemp("is_DISABLED")) ThenuserImage = LIMG_USEREnd IfDim DelUserImage : DelUserImage = LIMG_NDEL_DISABLEDDim btnText : btnText = "Operation not available"Dim btnClass : btnClass = ""If canDelete OR objAccessControl.UserId = rsTemp("user_id") ThenDelUserImage = LIMG_NDELbtnText = "Remove notifications to this user"btnClass = "class=btn_delete"End If%><tr data-user_id="<%=rsTemp("user_id")%>" data-proj_id="<%=rsTemp("proj_id")%>" ><td nowrap valign="top"><%=emailField(userImage & rsTemp("FULL_NAME"),rsTemp("user_email"))%></td><td nowrap valign="top" <%=btnClass%> title="<%=btnText%>"><%=DelUserImage%></td><td nowrap valign="top"><a href="rtree.asp?proj_id=<%=rsTemp("PROJ_ID")%>"><%=rsTemp("PROJ_NAME")%></a></td></tr><%rsTemp.MoveNextWEndrsTemp.CloseSet rsTemp = nothingOraDatabase.Parameters.Remove "PKG_ID"%></table><!------------------------------------------------------------><br><!-- END DETAILS -------------------------------------------------></td><td> </td></tr></table><!-- END MIDDLE --------></td></tr></table><!-- FOOTER --><!--#include file="_footer.asp"--></body></html>