Rev 119 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| RequestViewCointent.asp |'| |'=====================================================%><%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"--><%'------------ Variable Definition -------------Dim rsViewDim sURLDim IMG_lockedDim relContentsSTRDim parScriptNameDim parRtagIdDim nOperation'------------ Constants Declaration -----------Const LIMG_LOCKED = "<img src='images/i_locked.gif' width='7' height='10' border='0' hspace='2'>"Const imgAdded = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Added'>"Const imgRemoved = "<img src='images/i_removed.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Removed'>"'------------ Variable Init -------------------parScriptName = Request("script_name")parRtagId = Request("rtag_id")'----------------------------------------------%><%'------------------------------------------------------------------------------------------------------------------------'------------------------------------------------------------------------------------------------------------------------%><%'------------------------ MAIN LINE ---------------------------------If (Request("envtab") = "") OR (Request("rtag_id") = "") OR (Request("view_id") = "") OR (Request("script_name") = "") ThenResponse.write "ERROR: Missing Parameters at "& ScriptNameEnd If'--------------------------------------------------------------------%><%OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "VIEW_ID", Request("view_id"), ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "RECORD_SET", NULL, ORAPARM_OUTPUT, ORATYPE_CURSOR' Decide which environment list is to be displayedSelect Case CInt( Request("envtab") )Case enumENVTAB_WORK_IN_PROGRESSOraDatabase.ExecuteSQL "BEGIN PK_WORK_IN_PROGRESS.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;"Case enumENVTAB_PLANNEDOraDatabase.ExecuteSQL "BEGIN PK_PLANNED.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;"Case enumENVTAB_RELEASEDOraDatabase.ExecuteSQL "BEGIN PK_RELEASE.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;"Case ElseOraDatabase.ExecuteSQL "BEGIN PK_ENVIRONMENT.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;"End SelectSet rsView = OraDatabase.Parameters("RECORD_SET").ValueOraDatabase.Parameters.Remove "RTAG_ID"OraDatabase.Parameters.Remove "VIEW_ID"OraDatabase.Parameters.Remove "RECORD_SET"' Retrun if no records foundIf rsView.RecordCount < 1 ThenrelContentsSTR = "No packages found."End If' Get view contentWhile ((NOT rsView.BOF) AND (NOT rsView.EOF))sURL = parScriptName &"?pv_id="& rsView("pv_id") &"&rtag_id="& parRtagIdIMG_locked = ""If rsView.Fields("dlocked") = "Y" Then IMG_locked = LIMG_LOCKED' DEVI-45275 - Normally, dlocked=Y items are denoted with a padlock icon on the web page. Since we can now merge' into the pending tab, the dlocked=Y items that end up there would not give any visual indication to the user' as to why they are present. So, instead of the padlock icon, display the added or removed icon to indicate' what the intended action is to be, once the pending item is approved.' Obviously, this functionality only applies if viewing the PENDING or ALL environment tabs.' With regard to the operation value, A = Added, S = SubtractednOperation = " "If (CInt(Request("envtab")) = enumENVTAB_PLANNED OR CInt(Request("envtab")) = enumENVTAB_ALL) ThennOperation = rsView.Fields("operation") ' NB. this field is only availble if earlier query was PK_PLANNED.GET_VIEW_CONTENT or PK_ENVIRONMENT.GET_VIEW_CONTENTIf nOperation = "A" ThenIMG_locked = imgAddedElseIf nOperation = "S" ThenIMG_locked = imgRemovedEnd IfEnd IfrelContentsSTR = relContentsSTR & "<tr>" & VBNewLineIf rsView("pkg_state") = 0 And rsView.Fields("deprecated_state") <> "" ThenrelContentsSTR = relContentsSTR & " <td width='1%'>"& DefineStateIcon ( rsView.Fields("deprecated_state"), rsView("dlocked"), NULL, NULL, rsView("build_type"), TRUE ) &"</td>"& VBNewLineElserelContentsSTR = relContentsSTR & " <td width='1%'>"& DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, rsView("build_type"), TRUE ) &"</td>"& VBNewLineEnd IfrelContentsSTR = relContentsSTR & " <td width='100%' nowrap><a href='"& sURL &"' class='body_txt_drk' title="""& HTMLEncode( rsView("pv_description") ) &""">"& rsView.Fields("pkg_name") &"</a></td>" & VBNewLinerelContentsSTR = relContentsSTR & " <td width='1%' nowrap class='envPkg'>"& rsView.Fields("pkg_version") &"</td>" & VBNewLinerelContentsSTR = relContentsSTR & " <td width='1%'>"& IMG_locked &"</td>"relContentsSTR = relContentsSTR & "</tr>" & VBNewLinersView.MoveNextWEndrsView.CloseSet rsView = nothingrelContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"' Response the contentResponse.write relContentsSTR%><%Call Destroy_All_Objects%>