Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%
2
'=====================================================
123 ghuddy 3
'               Build Environment
119 ghuddy 4
'=====================================================
5
%>
6
<!--#include file="_tabs_definition_env.asp"-->
7
<!--#include file="common/_form_window_common.asp"-->
8
<%
9
'------------ Variable Definition -------------
123 ghuddy 10
Dim parOLshow     ' show/hide outer-latest
11
Dim parBshow      ' expand/collapse base views
12
Dim parPshow      ' expand/collapse personal views
13
Dim parPview      ' enable/disable all personal views
14
Dim parDview      ' enable/disable   deployment   view.
119 ghuddy 15
Dim IMG_locked
16
Dim rsEnvQry
17
Dim pvIdInList
18
Dim checked
19
Dim disabled
20
Dim pkgType
21
Dim SCRIPT_NAME 'Use this here only as the previous one ScriptName is Already Defined
22
'------------ Constants Declaration -----------
23
Const imgMaximise  = "<IMG src='images/i_maximise.gif' alt='Show view contents.' width=13 height=13 hspace='2' vspace='1' border='0'>"
24
Const imgMinimise  = "<IMG src='images/i_minimise.gif' alt='Hide view contents.' width=13 height=13 hspace='2' vspace='1' border='0'>"
25
Const imgForced    = "<img src='images/s_forced.gif' width='19' height='17' align='absmiddle'>"
26
Const imgLocked    = "<img src='images/i_locked.gif' width='7' height='10' border='0' hspace='2'>"
27
Const hlColor      = "#DDDDDD"
28
Const imgAdded     = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Added'>"
29
Const imgRemoved   = "<img src='images/i_removed.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Removed'>"
30
'------------ Variable Init -------------------
31
parOLshow = QStrPar("OLshow")
32
parBshow = QStrPar("Bshow")
33
parPshow = QStrPar("Pshow")
34
parPview = QStrPar("Pview")
35
parDview = QStrPar("Dview")
36
'----------------------------------------------
37
%>
38
 
39
<script language="JavaScript" type="text/javascript">
40
<!--
41
var is_ie = (navigator.userAgent.indexOf('MSIE') >= 0) ? 1 : 0;
42
var is_ie5 = (navigator.appVersion.indexOf("MSIE 5.5")!=-1) ? 1 : 0;
43
var is_opera = ((navigator.userAgent.indexOf("Opera6")!=-1)||(navigator.userAgent.indexOf("Opera/6")!=-1)) ? 1 : 0;
44
    //netscape, safari, mozilla behave the same???
45
var is_netscape = (navigator.userAgent.indexOf('Netscape') >= 0) ? 1 : 0;
46
 
47
 
123 ghuddy 48
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
49
// This function is executed when the Bulk Release action button is pressed. It will do some local
50
// client side checks and then if all is well, it will use the make_bulk_release.asp to initiate
51
// the bulk release process on the server side.
52
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
53
function makeBulkRelease()
54
{
55
   // Get the form containing all of the pending items
56
   var f = document.getElementById('pending_PVID_List');
57
   if (f == null)
58
      alert('Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
59
   else
60
   {
61
      // When no items exist in the pending tab, the pending_PVID_List form will not contain any
62
      // element called pv_id_list, so it will be null. Check for that and issue an alert as appropriate.
63
      if (f.pv_id_list == null)
64
      {
65
         alert('There are no items pending that can be considered for bulk release.\n\n' +
66
               'Use the Bulk Release button when items with checkboxes are present in the\n' +
67
               'Pending Tab.');
68
      }
69
      else
70
      {
71
         var doBulkRelease = true;
119 ghuddy 72
 
123 ghuddy 73
         // Count the number of checked and enabled items to see if there is actually any work to
74
         // do and if not issue an alert to the user. The pending_PVID_List form contains checkbox
75
         // items representing the pending versions, and the user may have checked any number of them
76
         // or none.
77
         //
78
         // NOTE, disabled items are indicative of pending autobuild versions that have already
79
         // been approved and are just awaiting processing by the build daemon that will make
80
         // them released once they have built successfully. We must not count those in our total.
81
         var n;
82
         var numCheckedAndEnabled = 0;
83
         var numUncheckedAndEnabled = 0;
119 ghuddy 84
 
123 ghuddy 85
         // Unbelievably, if the form has just one single PV_ID checkbox item, the syntax via which we access it
86
         // has to change. We cannot use array access syntax in such a case.
87
         if (f.length == 1 )
88
         {
89
            if (f.pv_id_list.value != null)
90
            {
91
               if (false == f.pv_id_list.disabled)
92
               {
93
                  if (true == f.pv_id_list.checked)
94
                     numCheckedAndEnabled++;
95
                  else
96
                     numUncheckedAndEnabled++;
97
               }
98
            }
99
         }
100
         else
101
         {
102
            // Here we can and have to use array access syntax.
103
            for (n = 0; n < f.pv_id_list.length; n++)
104
            {
105
               if (false == f.pv_id_list[n].disabled)
106
               {
107
                  if (true == f.pv_id_list[n].checked)
108
                     numCheckedAndEnabled++;
109
                  else
110
                     numUncheckedAndEnabled++;
111
               }
112
            }
113
         }
119 ghuddy 114
 
123 ghuddy 115
         if (numCheckedAndEnabled == 0)
116
         {
117
				if (numUncheckedAndEnabled == 0)
118
				{
119
					alert('Currently, there are no items that can be bulk released');
120
					doBulkRelease = false;
121
				}
122
				else
123
				{
124
            	// No enabled items have their checkboxes checked. Offer the user an easy way to
125
            	// bulk release the entire set, or to abort
126
            	doBulkRelease = confirm('No (enabled) items in the Pending Tab have been checked.\n' +
127
                                    	'This may mean you wish to bulk release ALL items without\n' +
128
                                    	'having to check every single one of them individually.\n\n' +
129
                                    	'\tPress OK to bulk release all outstanding items.\n' +
130
                                    	'\tPress CANCEL to abort bulk release.\n\n' );
131
            	if (doBulkRelease == true)
132
            	{
133
               	// Programmatically check all the enabled items. The user will see this happening on their browser
134
               	// and may be able to uncheck a few items before the submit() action further down in this
135
               	// function is called. However, the worst that can happen is that a few items will not get
136
               	// bulk released and the user has to do another bulk release operation.
137
                  if (f.length == 1 )
138
                  {
139
                     if (false == f.pv_id_list.checked && false == f.pv_id_list.disabled)
140
                     {
141
                        f.pv_id_list.checked = true;
142
                     }
143
                  }
144
                  else
145
                  {
146
                     for (n = 0; n < f.pv_id_list.length; n++)
147
                     {
148
                        if (false == f.pv_id_list[n].checked && false == f.pv_id_list[n].disabled)
149
                        {
150
                           f.pv_id_list[n].checked = true;
151
                        }
152
                     }
153
                  }
154
            	}
155
				}
156
         }
119 ghuddy 157
 
123 ghuddy 158
         if (doBulkRelease == true)
159
         {
160
            // Initiate the bulk release by redirecting the browser to the make_bulk_release.asp page
161
            // which holds the server side VBScript code that actually carries out the release operations.
162
            // Once complete, that code will redirect the browser back to the dependencies.asp page of which
163
            // this _environment.asp file is a part (by direct inclusion)
125 ghuddy 164
            <%If Request("pv_id") Then%>
165
               f.action = "make_bulk_release.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>";
123 ghuddy 166
            <%Else%>
167
               f.action = "make_bulk_release.asp?rtag_id=<%=parRtag_id%>";
168
            <%End If%>
169
            f.submit();
170
            // TODO : I would like to show progress? Is that even possible? If so, how?
171
         }
172
      }
173
   }
174
}
119 ghuddy 175
 
123 ghuddy 176
function RequestViewContent( paramString, rowId ){
177
   var requestURL = 'RequestViewContent.asp';
119 ghuddy 178
 
123 ghuddy 179
   // Toggle div
180
   ToggleDisplay( 'ENVDIV'+ rowId );
119 ghuddy 181
 
123 ghuddy 182
   // Change display states
183
   if ( (MM_findObj( 'ENVIMG'+ rowId ).src).indexOf('btn_max.gif') == -1 )
184
   {
185
      // View is currently minimised
186
      MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_max.gif';
187
      MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#808080';
119 ghuddy 188
 
123 ghuddy 189
      // Remove from SHow View List
190
      RemoveFromShowView ( rowId );
191
   }
192
   else
193
   {
194
      // View is currently maximised
195
      MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_min.gif';
196
      MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#000000';
119 ghuddy 197
 
123 ghuddy 198
      // Add it to Show view id
199
      AddToShowView ( rowId );
200
   }
119 ghuddy 201
 
123 ghuddy 202
   // Fix div width for ie so it does not overflow
203
   if (is_ie)
204
   {
205
      MM_findObj( 'ENVDIV'+ rowId ).style.width = '100%';
206
   }
119 ghuddy 207
 
123 ghuddy 208
   // Set ajax divname
209
   ajaxdivname = 'ENVDIV'+ rowId;
119 ghuddy 210
 
123 ghuddy 211
   // Request data from server
212
   if ( (MM_findObj( ajaxdivname ).innerHTML).indexOf('<%=enumLOADING%>') != -1 )
213
   {
214
      //Append the name to search for to the requestURL
215
      var url = requestURL + paramString;
119 ghuddy 216
 
123 ghuddy 217
      //Create the xmlHttp object to use in the request
218
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
219
      // This is non-blocking (asynchronous)
220
      xmlHttp = GetXmlHttpObject(stateChangeHandler);
119 ghuddy 221
 
123 ghuddy 222
      //Send the xmlHttp get to the specified url
223
      xmlHttp_Get(xmlHttp, url);
224
   }
225
}
119 ghuddy 226
 
123 ghuddy 227
function GetXmlHttpObject(handler) {
228
   var objXmlHttp = null;    //Holds the local xmlHTTP object instance
119 ghuddy 229
 
123 ghuddy 230
   //Depending on the browser, try to create the xmlHttp object
231
   if (is_ie){
232
      //The object to create depends on version of IE
233
      //If it isn't ie5, then default to the Msxml2.XMLHTTP object
234
      var strObjName = (is_ie5) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP';
119 ghuddy 235
 
123 ghuddy 236
      //Attempt to create the object
237
      try{
238
         objXmlHttp = new ActiveXObject(strObjName);
239
         objXmlHttp.onreadystatechange = handler;
240
      }
241
      catch(e){
242
      //Object creation errored
243
         alert('IE detected, but object could not be created. Verify that active scripting and activeX controls are enabled');
244
         return;
245
      }
246
   }
247
   else if (is_opera){
248
      //Opera has some issues with xmlHttp object functionality
249
      alert('Opera detected. The page may not behave as expected.');
250
      return;
251
   }
252
   else{
253
      // Mozilla | Netscape | Safari
254
      objXmlHttp = new XMLHttpRequest();
255
      objXmlHttp.onload = handler;
256
      objXmlHttp.onerror = handler;
257
   }
119 ghuddy 258
 
123 ghuddy 259
   //Return the instantiated object
260
   return objXmlHttp;
119 ghuddy 261
}
262
 
123 ghuddy 263
//stateChangeHandler will fire when the state has changed, i.e. data is received back
264
// This is non-blocking (asynchronous)
265
function stateChangeHandler()
266
{
267
   //readyState of 4 or 'complete' represents that data has been returned
268
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete'){
269
      //Gather the results from the callback
270
      var str = xmlHttp.responseText;
119 ghuddy 271
 
123 ghuddy 272
      //Populate the innerHTML of the div with the results
273
      document.getElementById(ajaxdivname).innerHTML = str;
274
   }
275
}
119 ghuddy 276
 
123 ghuddy 277
// XMLHttp send GET request
278
function xmlHttp_Get(xmlhttp, url) {
279
   //Getting a permissions error here? Check the url string to
280
   // ensure it is accurate (defined above)
281
   xmlhttp.open('GET', url, true);
282
   xmlhttp.send(null);
283
}
119 ghuddy 284
 
285
 
286
 
287
function RemoveFromShowView ( ViewId )
288
{
123 ghuddy 289
   // Get current cookie settings
290
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
291
   var aShowViews = new Array();
119 ghuddy 292
 
123 ghuddy 293
   if (us)
294
   {
295
      // Cookie is not empty, hence just append new value
296
      var aViews = us.split(',');
119 ghuddy 297
 
123 ghuddy 298
      // Make sure that view is not already on the list
299
      for (i=0; i<aViews.length; i++)
300
      {
301
         if (aViews[i] != ViewId)
302
         {
303
            aShowViews.push(aViews[i]);
304
         }
305
      }
119 ghuddy 306
 
123 ghuddy 307
      // Make a new view list to be stored in cookie
308
      us = aShowViews.join(',');
309
   }
310
   else
311
   {
312
      us = '';
313
   }
119 ghuddy 314
 
123 ghuddy 315
   // Store to cookie
316
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 317
}
318
 
319
function AddToShowView ( ViewId )
320
{
123 ghuddy 321
   // Get current cookie settings
322
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
323
   var aShowViews = new Array();
119 ghuddy 324
 
123 ghuddy 325
   //Release Manager Cookie Available on Show View
326
   if ( us )
327
   {
328
      // Cookie is not empty, hence just append new value
329
      var aViews = us.split(',');
119 ghuddy 330
 
123 ghuddy 331
      // Make sure that view is not already on the list
332
      for (i=0; i<aViews.length; i++)
333
      {
334
         if (aViews[i] != ViewId)
335
         {
336
            aShowViews.push(aViews[i]);
337
         }
338
      }
119 ghuddy 339
 
123 ghuddy 340
      // Make a new view list to be stored in cookie
341
      us = aShowViews.join(',') + ',' + ViewId;
342
   }
343
   else//Release Manager Cookie Not Available on Show View
344
   {
345
      // Cookie is empty, just add this value
346
      us = ViewId;
119 ghuddy 347
 
123 ghuddy 348
   }
119 ghuddy 349
 
123 ghuddy 350
   // Store to cookie
351
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 352
}
353
 
354
 
355
//-->
356
</script>
357
 
358
<%
359
'------------------------------------------------------------------------------------------------------------------------------------------------
360
Function GetEnvTab ( sEnvTab )
123 ghuddy 361
   If sEnvTab <> "" Then
362
      GetEnvTab = sEnvTab
363
      Response.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") = sEnvTab
364
   Else
365
      If Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") <> "" Then
366
         GetEnvTab = Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab")
367
      Else
368
         GetEnvTab = enumENVTAB_WORK_IN_PROGRESS
369
         Response.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") = enumENVTAB_WORK_IN_PROGRESS
370
      End If
371
   End If
119 ghuddy 372
 
373
End Function
374
'------------------------------------------------------------------------------------------------------------------------------------------------
375
Sub Display_Env_BaseView ( NNbase_view_id, SSbase_view, BBviewCollapsed, SScontents )
376
%>
377
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
123 ghuddy 378
   <tr>
379
      <td width="1" align="left" valign="top" bgcolor="#dad7c8"><img src="images/p_ctl.gif" width="3" height="3"></td>
380
      <td width="100%" bgcolor="#dad7c8"><img src="images/spacer.gif" width="1" height="1"></td>
381
      <td width="1" bgcolor="#dad7c8"><img src="images/spacer.gif" width="1" height="1"></td>
382
      <td width="1" align="right" valign="top" bgcolor="#dad7c8"><img src="images/p_ctr.gif" width="3" height="3"></td>
383
   </tr>
384
   <tr>
385
      <td align="left" valign="top" bgcolor="#dad7c8">&nbsp;</td>
386
      <td bgcolor="#dad7c8"><SPAN id="SPANVIEW<%=NNbase_view_id%>" <%If BBviewCollapsed Then%>class="body_scol_thin"<%Else%>class="body_txt"<%End If%>>&nbsp;<b><%=SSbase_view%></b></SPAN></td>
387
      <td align="right" bgcolor="#dad7c8"><a href="javascript:;" onClick="RequestViewContent('?envtab=<%=nEnvTab%>&rtag_id=<%=parRtag_id%>&view_id=<%=NNbase_view_id%>&script_name=<%=ScriptName%>','<%=NNbase_view_id%>');"><img id="ENVIMG<%=NNbase_view_id%>" src="images/<%If BBviewCollapsed Then %>btn_max.gif<%Else%>btn_min.gif<%End If%>" border="0"></a></td>
388
      <td align="right" valign="top" bgcolor="#dad7c8">&nbsp;</td>
389
   </tr>
119 ghuddy 390
</table>
391
<DIV id="ENVDIV<%=NNbase_view_id%>" class="envContent" <%If BBviewCollapsed Then %>style="display:none;"<%Else%>style="display:block;"<%End If%>>
123 ghuddy 392
   <%If NOT BBviewCollapsed Then %>
393
      <%=SScontents%>
394
   <%Else%>
395
      <%=enumLOADING%>
396
   <%End If%>
397
</DIV>
119 ghuddy 398
<br>
399
<%
400
End Sub
401
'------------------------------------------------------------------------------------------------------------------------------------------------
402
Sub Print_View( NNEnvTab, SSviewtype, NNrtag_id, SSshowviews, NNuser_id )
123 ghuddy 403
   Dim rsView, Query_String
404
   'Dim btn1
405
   Dim tmpURL
406
   Dim SSscript
407
   Dim qstrPar
408
   Dim nViewType
409
   Dim nTrueRecordCount
410
   Dim nOperation
411
   Dim relContentsSTR, viewCollapsed, curr_view_id, view_name
119 ghuddy 412
 
123 ghuddy 413
   If scriptName = "find.asp" Then
414
      SSscript = "dependencies.asp"
415
   Else
416
      SSscript = scriptName
417
   End If
119 ghuddy 418
 
123 ghuddy 419
   If SSviewtype = "guest" Then
420
      nViewType = 1
421
      qstrPar = "Bshow"
422
   ElseIf SSviewtype = "personal" Then
423
      nViewType = 2
424
      qstrPar = "Pshow"
425
   End If
119 ghuddy 426
 
123 ghuddy 427
   OraDatabase.Parameters.Add "VIEW_TYPE",           nViewType, ORAPARM_INPUT, ORATYPE_NUMBER
428
   'OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   ShowView( Pipes2Commas( SSshowviews ), SSviewtype ), ORAPARM_INPUT, ORATYPE_VARCHAR2
429
   OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   GetShowViewList(), ORAPARM_INPUT, ORATYPE_VARCHAR2
430
   OraDatabase.Parameters.Add "RTAG_ID",             NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
431
   OraDatabase.Parameters.Add "USER_ID",             NNuser_id, ORAPARM_INPUT, ORATYPE_NUMBER
432
   OraDatabase.Parameters.Add "TRUE_RECORD_COUNT",   NULL, ORAPARM_OUTPUT, ORATYPE_NUMBER
433
   OraDatabase.Parameters.Add "RECORD_SET",          NULL, ORAPARM_OUTPUT, ORATYPE_CURSOR
119 ghuddy 434
 
123 ghuddy 435
   'If it's a Deployment View
436
   If parDview = "enable" Then
437
      ' Decide which environment list is to be displayed to the Integrators/Testers
438
      Select Case CInt( NNEnvTab )
439
         Case enumENVTAB_PRODRELEASE
440
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_PRODRELEASE_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 441
 
123 ghuddy 442
         Case enumENVTAB_INTEGRATE
443
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_INTEGRATION_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 444
 
123 ghuddy 445
         Case enumENVTAB_TEST
446
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_TEST_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 447
 
123 ghuddy 448
         Case enumENVTAB_DEPLOY
449
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_DEPLOY_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 450
 
123 ghuddy 451
         Case enumENVTAB_REJECT
452
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_REJECT_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 453
 
123 ghuddy 454
      End Select
119 ghuddy 455
 
123 ghuddy 456
   Else
457
      ' Decide which environment list is to be displayed
458
      Select Case CInt( NNEnvTab )
459
         Case enumENVTAB_WORK_IN_PROGRESS
460
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_WORK_IN_PROGRESS_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 461
 
123 ghuddy 462
         Case enumENVTAB_PLANNED
463
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_PENDING_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 464
 
123 ghuddy 465
         Case enumENVTAB_RELEASED
466
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_RELEASED_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 467
 
123 ghuddy 468
         Case Else
469
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_ENVIRONMENT_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 470
 
123 ghuddy 471
      End Select
119 ghuddy 472
 
123 ghuddy 473
   End If
119 ghuddy 474
 
123 ghuddy 475
   ' Get Record set from database
476
   Set rsView = OraDatabase.Parameters("RECORD_SET").Value
477
   nTrueRecordCount = OraDatabase.Parameters("TRUE_RECORD_COUNT").Value
119 ghuddy 478
 
123 ghuddy 479
   OraDatabase.Parameters.Remove "RTAG_ID"
480
   OraDatabase.Parameters.Remove "USER_ID"
481
   OraDatabase.Parameters.Remove "VIEW_TYPE"
482
   OraDatabase.Parameters.Remove "VIEW_ID_SHOW_LIST"
483
   OraDatabase.Parameters.Remove "RECORD_SET"
484
   OraDatabase.Parameters.Remove "TRUE_RECORD_COUNT"
119 ghuddy 485
 
123 ghuddy 486
   ' Initialise variables
487
   If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
488
      relContentsSTR = ""
489
      viewCollapsed = FALSE
490
      curr_view_id = rsView("view_id")      ' Set current view
491
      view_name = rsView("view_name")
492
   End If
119 ghuddy 493
 
123 ghuddy 494
   While ((NOT rsView.BOF) AND (NOT rsView.EOF))
495
      '==== Get View Contents ====
496
      If NOT IsNull(rsView.Fields("pv_id")) Then
497
         tmpURL = SSscript &"?pv_id="& rsView.Fields("pv_id") &"&rtag_id="& parRtag_id
498
         IMG_locked = ""
499
         If rsView.Fields("dlocked") = "Y" Then IMG_locked = imgLocked
119 ghuddy 500
 
123 ghuddy 501
         ' DEVI-45275 - Normally, dlocked=Y items are denoted with a padlock icon on the web page. Since we can now merge
502
         ' into the pending tab, the dlocked=Y items that end up there would not give any visual indication to the user
503
         ' as to why they are present. So, instead of the padlock icon, display the added or removed icon to indicate
504
         ' what the intended action is to be, once the pending item is approved.
505
         ' Obviously, this functionality does not apply if we are in the deployment view, and only applies if viewing
506
         ' the PENDING or ALL environment tabs.
507
         ' With regard to the operation value, A = Added, S = Subtracted
508
         nOperation = " "
509
         If parDview <> "enable" AND (CInt( NNEnvTab ) = enumENVTAB_PLANNED OR CInt( NNEnvTab ) = enumENVTAB_ALL) Then
510
            nOperation = rsView.Fields("operation")   ' NB. this field is only availble if earlier query was GET_PENDING_ITEMS or GET_ENVIRONMENT_ITEMS
511
            If nOperation = "A" Then
512
               IMG_locked = imgAdded
513
            ElseIf nOperation = "S" Then
514
               IMG_locked = imgRemoved
515
            End If
516
         End If
119 ghuddy 517
 
123 ghuddy 518
         relContentsSTR = relContentsSTR & "<tr>" & VBNewLine
119 ghuddy 519
 
123 ghuddy 520
         If rsView("pkg_state") = 0 And rsView.Fields("deprecated_state") <> "" Then
521
            relContentsSTR = relContentsSTR & "  <td width='1%'>"& DefineStateIcon ( rsView.Fields("deprecated_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
522
         Else
523
            If (parDview <> "enable") AND ( ( CInt(NNEnvTab) = enumENVTAB_PLANNED ) OR ( Request("envtab") = enumENVTAB_PLANNED ) ) Then
119 ghuddy 524
 
123 ghuddy 525
               ' if package version is unlocked, rejected, or pending approval, or is to be added/subtracted to/from the release (DEVI-45275), then
526
               If (rsView("dlocked") = "N") OR (rsView("dlocked") = "R") OR (rsView("dlocked") = "P") OR (nOperation = "A") OR (nOperation = "S") Then
527
                  checked = NULL
528
                  disabled = NULL
529
                  ' disable check box if not logged in, or if not in open mode and user has no permission to approve pending
530
                  If objAccessControl.UserLogedIn Then
531
                     If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
532
                        If NOT objAccessControl.IsActive("ApproveForAutoBuild") Then
533
                           disabled = "disabled"
534
                        End If
535
                     End If
536
                  Else
537
                     disabled = "disabled"
538
                  End If
119 ghuddy 539
 
123 ghuddy 540
               Else ' always check and disable the checkbox
541
                  checked = "checked"
542
                  disabled = "disabled"
543
               End If
119 ghuddy 544
 
123 ghuddy 545
               relContentsSTR = relContentsSTR & " <td width='1%'><input name='pv_id_list' id='pv_id_list' type=checkbox value="&rsView.Fields("pv_id")&" "&checked&" "&disabled&"></td>"& VBNewLine
546
            Else
547
               relContentsSTR = relContentsSTR & " <td width='1%'>"& DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
548
            End If
549
         End If
119 ghuddy 550
 
123 ghuddy 551
         relContentsSTR = relContentsSTR & "  <td width='100%' nowrap><a href='"& tmpURL &"' class='body_txt_drk' title="""& HTMLEncode( rsView("pv_description") ) &""">"& rsView.Fields("pkg_name") &"</a></td>" & VBNewLine
552
         relContentsSTR = relContentsSTR & "  <td width='1%' nowrap class='envPkg'>"& rsView.Fields("pkg_version") &"</td>" & VBNewLine
553
         relContentsSTR = relContentsSTR & "  <td width='1%'>"& IMG_locked &"</td>"
554
         relContentsSTR = relContentsSTR & "</tr>" & VBNewLine
555
      Else
556
         'relContentsSTR = relContentsSTR & "<tr><td><label class='form_txt' disabled>...</label></td></tr>"      ' Collapsed view displays dots
119 ghuddy 557
 
123 ghuddy 558
         viewCollapsed = TRUE
559
      End If
119 ghuddy 560
 
123 ghuddy 561
      rsView.MoveNext
119 ghuddy 562
 
123 ghuddy 563
      If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
564
         ' NOT end of the record set
565
         If curr_view_id <> rsView("view_id") Then
566
            '====== Draw buttons =================================
567
            'If InStrPipes( SSshowviews, curr_view_id ) Then
568
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
569
            'Else
570
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
571
            'End If
119 ghuddy 572
 
123 ghuddy 573
            '====== Print contents ===============================
574
            relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
575
            Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 576
 
123 ghuddy 577
            curr_view_id = rsView("view_id")
578
            view_name = rsView("view_name")
579
            relContentsSTR = ""      ' Empty the contents string
580
            viewCollapsed = FALSE
581
         End If
119 ghuddy 582
 
123 ghuddy 583
      Else
584
         ' End of the record set
119 ghuddy 585
 
123 ghuddy 586
         '====== Draw buttons =================================
587
         'If InStrPipes( SSshowviews, curr_view_id ) Then
588
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
589
         'Else
590
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
591
         'End If
119 ghuddy 592
 
123 ghuddy 593
         '====== Print contents ===============================
594
         relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
595
         Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 596
 
123 ghuddy 597
      End If
119 ghuddy 598
 
123 ghuddy 599
   WEnd
119 ghuddy 600
 
123 ghuddy 601
   If relContentsSTR <> "" Then
602
      Response.write "<a href='help/icons_F017.asp' target='_blank' class='body_scol'>Icon Legend...</a><br>"
603
   End If
119 ghuddy 604
 
123 ghuddy 605
   If nTrueRecordCount > 0 Then
606
      If rsView.RecordCount < 1 Then
607
         'If qstrPar = "Bshow" Then
608
         '   'Release is empty. Draw default box for Base view
609
         '   Call DisplayInfo ( "EMPTY_RELEASE_CONTENTS", "100%" )
610
         '
611
         'End If
119 ghuddy 612
 
123 ghuddy 613
         If qstrPar = "Pshow"  Then
614
            'Release is empty. Draw default box for Personal view
615
            Call DisplayInfo ( "PERSONAL_VIEW_NOT_SETUP", "100%" )
616
         End If
119 ghuddy 617
 
123 ghuddy 618
      End If
619
   End If
119 ghuddy 620
 
123 ghuddy 621
   ' Destroy
622
   rsView.Close
623
   Set rsView = nothing
119 ghuddy 624
End Sub
625
'------------------------------------------------------------------------------------------------------------------------------------------------
626
Sub PopulateGetShowViews ( ByRef outShowView )
627
 
123 ghuddy 628
   If Session(SESSION_SHOW_BASE_VIEW) <> "" Then
629
      Set outShowView = Session(SESSION_SHOW_BASE_VIEW)
119 ghuddy 630
 
123 ghuddy 631
   End If
119 ghuddy 632
End Sub
633
'------------------------------------------------------------------------------------------------------------------------------------------------
634
Function GetShowViewList ()
123 ghuddy 635
   'If SSparshow <> "" Then
636
   '   ' get list from query string
637
   '   ShowView = SSparshow
638
   'ElseIf Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype ) <> "" Then
639
   '   ' get list from cookie
640
   '   ShowView = Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype )
641
   'Else
642
   '   ' no list i.e. collapse all views
643
   '   ShowView = -1
644
   'End If
119 ghuddy 645
 
123 ghuddy 646
   'If oShowView.Count = 0 Then
647
   '   GetShowViewList = -1
648
   'Else
649
   '   GetShowViewList = Join( oShowView.Keys, "," )
650
   'End If
119 ghuddy 651
 
123 ghuddy 652
   If Request.Cookies(COOKIE_RELMGR_SHOW_VIEW) = "" Then
653
      GetShowViewList = -1
654
   Else
655
      GetShowViewList = Request.Cookies(COOKIE_RELMGR_SHOW_VIEW)
656
   End If
119 ghuddy 657
 
658
End Function
125 ghuddy 659
 
660
 
661
 
119 ghuddy 662
'------------------------------------------------------------------------------------------------------------------------------------------------
125 ghuddy 663
' This function forms a URL to use for refreshing the current dependencies.asp based page using the settings that are in effect at the time.
664
' Most importantly, it filters out the pv_id parameter if it is null (which otherwise would cause the page to be rendered incorreclty for an
665
' as yet, unknown reason).
666
'
667
Function RefreshedURL(NNdview, NNpview, NNpv_id, NNrtag_id)
668
   Dim url
669
 
670
   url = scriptName & "?Dview=" & NNdview & "&Pview=" & NNpview
671
 
672
   If NNpv_id Then
673
      url = url & "&pv_id=" & NNpv_id
674
   End If
675
 
676
   url = url & "&rtag_id=" & NNrtag_id
677
 
678
   RefreshedURL = url
679
End Function
680
 
681
 
682
'------------------------------------------------------------------------------------------------------------------------------------------------
119 ghuddy 683
%>
684
<%
685
 
686
'------------------------- MAIN LINE ---------------------------
687
%>
688
 
689
<%If parRtag_Id <> "" Then%>
690
<!-- RELEASE ACTION BUTTONS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
691
 
123 ghuddy 692
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
693
      <tr>
694
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="35"></td>
695
         <td width="100%" nowrap background="images/bg_action_norm.gif" >
696
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
697
               <tr>
698
                  <%
699
                  Dim rsTest
700
                  Set rsTest = OraDataBase.DbCreateDynaset( "SELECT PROJ_ID   FROM RELEASE_TAGS WHERE RTAG_ID ="&parRtag_id , ORADYN_DEFAULT )
119 ghuddy 701
 
123 ghuddy 702
                  If (((ReleaseMode = enumDB_RELEASE_IN_CCB_MODE) OR (ReleaseMode = enumDB_RELEASE_IN_RESTRICTIVE_MODE)) AND objAccessControl.IsActive("AddDeletePackageInRestrictiveMode") And objAccessControl.IsDataActive("PROJECTS", DB_PROJ_ID, "EditProjects")) OR (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE ) Then
703
                     Response.write "<td width='1'><a href='form_search_pkgs.asp?rtag_id="& Request("rtag_id") &"&add_type="& enum_ADD_PACKAGES &"' title='Add package to this release'><img src='images/abtn_add_pkg.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
704
                     'Response.write "<td width='1'><a href='_remove_package.asp?rtag_id="& Request("rtag_id") &"&pv_id="& Request("pv_id") &"' title='Remove package from this release'><img src='images/abtn_remove_pkg.gif' alt='Remove package from this release' width='26' height='26' hspace='1' border='0'></td>"
705
                  Else
706
                     Response.write "<td width='1'><img src='images/abtn_add_pkg_off.gif' alt='Add package to this release' width='26' height='26' hspace='1' border='0'></td>"
707
                     'Response.write "<td width='1'><img src='images/abtn_remove_pkg_off.gif' alt='Remove package from this release' width='26' height='26' hspace='1' border='0'></td>"
708
                  End If
119 ghuddy 709
 
123 ghuddy 710
                  If (pkgInfoHash.Item("dlocked") <> "Y") AND (objAccessControl.UserLogedIn) AND (Request("pv_id") <> "") Then
711
                     If ( (objAccessControl.UserName = pkgInfoHash.Item("creator")) OR (objAccessControl.IsActive("DestroyPackageFromRelease")) ) Then
712
                        Response.write "<td width='1'><a href='_destroy_package.asp?rtag_id="& Request("rtag_id") &"&bfile="& ScriptName &"&pkg_id="& pkgInfoHash.Item("pkg_id") &"&pv_id="& Request("pv_id") &"' title='Destroy the selected Package Version' onClick='return confirmAction(""You are about to destroy ["& pkgInfoHash.Item("pkg_name") &" "& pkgInfoHash.Item("pkg_version") &"]. You cannot undo this operation.\nDo you want to proceed?"");'><img src='icons/i_destroy_package.gif' alt='Destroy the selected Package Version' width='26' height='26' hspace='1' border='0'></td>"
713
                     End If
714
                  End If
119 ghuddy 715
 
123 ghuddy 716
                  If objAccessControl.IsActive("CreateNewRelease") Then
717
                     Response.write "<td width='1'><a href='form_edit_release.asp?rtag_id_list="&parRtag_id&"&proj_id="&rsTest("proj_id")&"' title='Release properties'><img src='images/abtn_release_properties.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
718
                  End If
119 ghuddy 719
 
123 ghuddy 720
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
721
                  If objAccessControl.UserLogedIn Then
722
                     If QStrPar("Pview") = "disable" Then
125 ghuddy 723
                        Response.write "<td width='1'><a href='"& RefreshedURL(QStrPar("Dview"), "", Request("pv_id"), Request("rtag_id")) &"' title='Personal view disabled. Click to enable.'><img src='images/abtn_base_view.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
123 ghuddy 724
                     Else
125 ghuddy 725
                        Response.write "<td width='1'><a href='"& RefreshedURL(QStrPar("Dview"), "disable", Request("pv_id"), Request("rtag_id")) &"' title='Personal view enabled. Click for full view.'><img src='images/abtn_personal_view.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
123 ghuddy 726
                     End If
727
                  Else
728
                     Response.write "<td width='1'><img src='images/abtn_personal_view_off.gif' width='26' height='26' hspace='1' border='0'></td>"
729
                  End If
119 ghuddy 730
 
123 ghuddy 731
                  If QStrPar("Dview") = "enable" Then
125 ghuddy 732
                     Response.write "<td width='1'><a href='"& RefreshedURL("", QStrPar("Pview"), Request("pv_id"), Request("rtag_id")) &"' title='Click to switch to Release View'><img src='icons/ReleaseView.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
123 ghuddy 733
                  Else
125 ghuddy 734
                     Response.write "<td width='1'><a href='"& RefreshedURL("enable", QStrPar("Pview"), Request("pv_id"), Request("rtag_id")) &"' title='Click to switch to Deployment View'><img src='icons/DeploymentView.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
123 ghuddy 735
                  End If
119 ghuddy 736
 
123 ghuddy 737
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 738
 
123 ghuddy 739
                  Response.write "<td width='1'><a href='javascript:;' title='Reference other releases...' onClick='ToggleDisplay(""DIV_RELEASE_REFERENCES"",""SPAN_RELEASE_REFERENCES"",""SPAN_RELEASE_REFERENCES_ON""); ' ><SPAN name='SPAN_RELEASE_REFERENCES' id='SPAN_RELEASE_REFERENCES' style='display:block;'><img src='images/abtn_link_release.gif' width='25' height='25' border='0' hspace='1' ></SPAN><SPAN name='SPAN_RELEASE_REFERENCES_ON' id='SPAN_RELEASE_REFERENCES_ON' style='display:none;'><img src='images/abtn_link_release_on.gif' width='25' height='25' border='0' hspace='1' ></SPAN></a></td>"
119 ghuddy 740
 
123 ghuddy 741
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 742
 
123 ghuddy 743
                  Response.write "<td width='1'><a href='javascript:;' title='Advanced Search...' onClick='ToggleAdvancedSearch(); ' ><SPAN name='SPAN_ADVANCED_SEARCH' id='SPAN_ADVANCED_SEARCH' style='display:block;'><img src='images/abtn_advanced_search.gif' width='25' height='25' border='0' hspace='1' ></SPAN><SPAN name='SPAN_ADVANCED_SEARCH_ON' id='SPAN_ADVANCED_SEARCH_ON' style='display:none;'><img src='images/abtn_advanced_search_on.gif' width='25' height='25' border='0' hspace='1' ></SPAN></a></td>"
119 ghuddy 744
 
123 ghuddy 745
                  If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
746
                     If objAccessControl.UserLogedIn Then
747
                        If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
748
                           If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
749
                              Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
750
                           End If
751
                        Else
752
                           Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
753
                        End If
754
                     End If
755
                  End If
756
                  rsTest.Close()
757
                  Set rsTest = nothing
758
                  %>
759
                  <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
760
               </tr>
761
            </table>
762
         </td>
763
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="8"></td>
764
      </tr>
765
   </table>
119 ghuddy 766
 
767
<!-- ADVANCED SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 768
   <DIV name="DIV_ADVANCED_SEARCH" id="DIV_ADVANCED_SEARCH" style="display:none;">
769
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
770
         <form name="advancedsearch" method="get" action="find.asp">
771
            <tr>
772
               <td nowrap  class="form_txt" valign="middle">
773
                  <%
774
                  Dim FindPackageCheck, FindFileCheck
119 ghuddy 775
 
123 ghuddy 776
                  FindPackageCheck = ""
777
                  FindFileCheck = ""
119 ghuddy 778
 
123 ghuddy 779
                  If Request("searchtype") = "2" Then
780
                     FindFileCheck = "checked"
781
                  Else
782
                     FindPackageCheck = "checked"
783
                  End If
119 ghuddy 784
 
123 ghuddy 785
                  %>
786
                  <fieldset>
787
                     <legend class="body_colb"><img src="images/i_mglass.gif" width="17" height="17" border="0" align="absmiddle">&nbsp;Advanced Search</legend>
788
                     <input name="searchtype" id="searchtype1" type="radio" value="1" <%=FindPackageCheck%>>
789
                     <a href="javascript:;" onClick="MM_findObj('searchtype1').checked=true;" class="body_txt">Find a Package</a><br>
790
                     <input name="searchtype" id="searchtype2" type="radio" value="2" <%=FindFileCheck%>>
791
                     <a href="javascript:;" onClick="MM_findObj('searchtype2').checked=true;" class="body_txt">Find a File</a><br><br>
792
                     <%If CInt(nEnvTab) = enumENVTAB_WORK_IN_PROGRESS Then%>
793
                        Find in Work In Progress<br>
794
                     <%ElseIf CInt(nEnvTab) = enumENVTAB_PLANNED Then%>
795
                        Find in Pending<br>
796
                     <%ElseIf  CInt(nEnvTab) = enumENVTAB_RELEASED Then%>
797
                        Find in Released<br>
798
                     <%End If%>
799
                     <input type="text" name="keyword" size="25" class="form_ivaluew" value="<%=Request("keyword")%>">
800
                     <input type="submit" name="btn" value="Find" class="form_ivalue">
119 ghuddy 801
 
123 ghuddy 802
                     <input type="hidden" name="envtab" value="<%=nEnvTab%>">
803
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
804
                  </fieldset>
805
                  <br>
806
               </td>
807
            </tr>
808
         </form>
809
      </table>
810
   </DIV>
119 ghuddy 811
 
123 ghuddy 812
   <script language="JavaScript" type="text/javascript">
813
      <!--
814
      function ToggleAdvancedSearch( )
815
      {
816
         if ( MM_findObj("DIV_ADVANCED_SEARCH").style.display == 'none')
817
         {
818
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'block';
819
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'none';
820
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'block';
821
         }
822
         else
823
         {
824
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'none';
825
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'block';
826
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'none';
827
         }
119 ghuddy 828
 
123 ghuddy 829
         document.cookie = 'RELMGR_DIV_ADVANCED_SEARCH' + '=' + MM_findObj("DIV_ADVANCED_SEARCH").style.display;
830
      }
119 ghuddy 831
 
123 ghuddy 832
      // Run this on page render for default setting
833
      if (GetCookie('RELMGR_DIV_ADVANCED_SEARCH') == 'block')
834
      {
835
         ToggleAdvancedSearch();
836
      }
119 ghuddy 837
 
123 ghuddy 838
   //-->
839
   </script>
119 ghuddy 840
 
841
<!-- RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 842
   <DIV name="DIV_RELEASE_REFERENCES" id="DIV_RELEASE_REFERENCES" style="display:none;">
843
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
844
         <form name="relref" method="get" action="_remove_release_reference.asp" onSubmit="ToggleDisplay('RelRefProgressBar');">
845
            <tr>
846
               <td width="100%" nowrap class="form_txt">
847
                  <fieldset>
848
                     <legend class="body_colb"><img src="images/i_releaseref.gif" border="0" align="absmiddle">&nbsp;Release References</legend>
849
                     <DIV id="RelRefProgressBar" name="RelRefProgressBar" style="display:none;" class="class="body_scol"">
850
                        <img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...
851
                     </DIV>
852
                     <b>References</b>
853
                     <hr noshade size="1">
854
                     <%If (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE) Then%>
855
                        <input <%=objAccessControl.IsComponentDisabled("AddReleaseReference")%> type="reset" name="btn" value="Add.." class="form_ivalue" onClick="MM_openBrWindow('_wform_reference_release.asp?ToRtag_id=<%=parRtag_id%>&rfile=<%=ScriptName%>&rtag_id=<%=parRtag_id%>','ReferenceRelease','scrollbars=yes,resizable=yes,width=400,height=200')">
856
                        &nbsp;<input <%=objAccessControl.IsComponentDisabled("RemoveReleaseReference")%> type="submit" name="btn" value="Remove" class="form_ivalue"><br><br>
857
                     <%End If%>
119 ghuddy 858
 
123 ghuddy 859
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
119 ghuddy 860
 
123 ghuddy 861
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
862
                        <tr>
863
                           <td bgcolor="#999999">
119 ghuddy 864
 
123 ghuddy 865
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
866
                                 <%
867
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 868
 
123 ghuddy 869
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferences.sql"), 0 )
119 ghuddy 870
 
123 ghuddy 871
                                 OraDatabase.Parameters.Remove "RTAG_ID"
872
                                 %>
119 ghuddy 873
 
123 ghuddy 874
                                 <%If rsEnvQry.RecordCount = 0 Then%>
875
                                 <tr>
876
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
877
                                       No references used.
878
                                    </td>
879
                                 </tr>
880
                                 <%End If%>
119 ghuddy 881
 
123 ghuddy 882
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
883
                                    If rsEnvQry("official") = "Y" Then
884
                                       IMG_locked = imgLocked
885
                                    Else
886
                                       IMG_locked = ""
887
                                    End If%>
888
                                    <tr>
889
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>"></td>
890
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
891
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
892
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
893
                                       </td>
894
                                    </tr>
895
                                    <%rsEnvQry.MoveNext()
896
                                 WEnd%>
897
                                 <tr>
898
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
899
                                       <br><br><br>
900
                                    </td>
901
                                 </tr>
902
                              </table>
903
                           </td>
904
                        </tr>
905
                     </table>
906
                     <br><br>
119 ghuddy 907
 
123 ghuddy 908
                     <b>Referenced By</b>
909
                     <hr noshade size="1">
119 ghuddy 910
 
123 ghuddy 911
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
912
                        <tr>
913
                           <td bgcolor="#999999">
119 ghuddy 914
 
123 ghuddy 915
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
916
                                 <%
917
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 918
 
123 ghuddy 919
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferencedBy.sql"), 0 )
119 ghuddy 920
 
123 ghuddy 921
                                 OraDatabase.Parameters.Remove "RTAG_ID"
922
                                 %>
119 ghuddy 923
 
123 ghuddy 924
                                 <%If rsEnvQry.RecordCount = 0 Then%>
925
                                    <tr>
926
                                       <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
927
                                          Not referenced anywhere.
928
                                       </td>
929
                                    </tr>
930
                                 <%End If%>
119 ghuddy 931
 
123 ghuddy 932
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
933
                                    If rsEnvQry("official") = "Y" Then
934
                                       IMG_locked = imgLocked
935
                                    Else
936
                                       IMG_locked = ""
937
                                    End If%>
938
                                    <tr>
939
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>" disabled></td>
940
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
941
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
942
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
943
                                       </td>
944
                                    </tr>
945
                                    <%rsEnvQry.MoveNext()
946
                                 WEnd%>
947
                                 <tr>
948
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
949
                                       <br><br><br>
950
                                    </td>
951
                                 </tr>
952
                              </table>
953
                           </td>
954
                        </tr>
955
                     </table>
956
                     <br>
957
                  </fieldset>
958
                  <br>
959
               </td>
960
            </tr>
961
         </form>
962
      </table>
963
   </DIV>
119 ghuddy 964
<!-- END OF RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
965
 
966
<!-- PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 967
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
125 ghuddy 968
      <form id="pending_PVID_List" name="pending_PVID_List" method="post" action="make_bulk_release.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>", onSubmit="makeBulkRelease();">
123 ghuddy 969
         <tr>
970
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="25"></td>
971
            <td width="100%" bgcolor="#999999" valign="bottom">
972
               <!-- TAB CONTROLS ++++++++++++++++++++++ -->
973
               <%
974
               Set objTabControl = New TabControl
975
               objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleDreamWeaver/dreamweaver_style.html") ) ' Supply tab style definition
976
               objTabControl.TabStyle = "StyleDreamWeaver"
977
               If   QStrPar("Dview") = "enable"   Then
978
                  objTabControl.AddTabDefnition ( arrProductEnv )   '-   Integration/Test/Deploy
979
               Else
980
                  objTabControl.AddTabDefnition ( arrEnv )
981
               End If
982
               objTabControl.SelectByIndex ( nEnvTab )
983
               objTabControl.Render ()
984
               %>
985
               <!-- END OF TAB CONTROLS +++++++++++++++ -->
986
            </td>
987
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="1"></td>
988
         </tr>
989
         <tr>
990
            <td></td>
991
            <td>
992
               <br>
993
               <%
994
               Dim tempTimer
995
               tempTimer = Timer
996
               %>
997
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
998
               <%
119 ghuddy 999
 
123 ghuddy 1000
               '--- Render Environment ---
1001
               If objAccessControl.UserLogedIn AND (parPview <> "disable") Then
1002
                  'Personal View
1003
                  Call Print_View( nEnvTab, "personal", parRtag_id, parPshow, objAccessControl.UserId )
1004
               Else
1005
                  ' Guest view
1006
                  Call Print_View( nEnvTab, "guest", parRtag_id, parBshow, empty )
1007
               End If
1008
               %>
119 ghuddy 1009
 
123 ghuddy 1010
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1011
               <br>
1012
            </td>
1013
            <td></td>
1014
         </tr>
1015
      </form>
1016
   </table>
1017
   <!-- <input type="hidden" name="pv_id_list" value=<%=Request("pv_id_list")%>> -->
119 ghuddy 1018
<!--END OF PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1019
 
1020
<%End If%>