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)
164
            <%If parPv_id Then%>
165
               f.action = "make_bulk_release.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>";
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
659
'------------------------------------------------------------------------------------------------------------------------------------------------
660
%>
661
<%
662
 
663
'------------------------- MAIN LINE ---------------------------
664
%>
665
 
666
<%If parRtag_Id <> "" Then%>
667
<!-- RELEASE ACTION BUTTONS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
668
 
123 ghuddy 669
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
670
      <tr>
671
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="35"></td>
672
         <td width="100%" nowrap background="images/bg_action_norm.gif" >
673
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
674
               <tr>
675
                  <%
676
                  Dim rsTest
677
                  Set rsTest = OraDataBase.DbCreateDynaset( "SELECT PROJ_ID   FROM RELEASE_TAGS WHERE RTAG_ID ="&parRtag_id , ORADYN_DEFAULT )
119 ghuddy 678
 
123 ghuddy 679
                  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
680
                     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>"
681
                     '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>"
682
                  Else
683
                     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>"
684
                     '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>"
685
                  End If
119 ghuddy 686
 
123 ghuddy 687
                  If (pkgInfoHash.Item("dlocked") <> "Y") AND (objAccessControl.UserLogedIn) AND (Request("pv_id") <> "") Then
688
                     If ( (objAccessControl.UserName = pkgInfoHash.Item("creator")) OR (objAccessControl.IsActive("DestroyPackageFromRelease")) ) Then
689
                        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>"
690
                     End If
691
                  End If
119 ghuddy 692
 
123 ghuddy 693
                  If objAccessControl.IsActive("CreateNewRelease") Then
694
                     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>"
695
                  End If
119 ghuddy 696
 
123 ghuddy 697
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
698
                  If objAccessControl.UserLogedIn Then
699
                     If QStrPar("Pview") = "disable" Then
700
                        Response.write "<td width='1'><a href='"& scriptName &"?Pview=&pv_id="& Request("pv_id") &"&rtag_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>"
701
                     Else
702
                        Response.write "<td width='1'><a href='"& scriptName &"?Pview=disable&pv_id="& Request("pv_id") &"&rtag_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>"
703
                     End If
704
                  Else
705
                     Response.write "<td width='1'><img src='images/abtn_personal_view_off.gif' width='26' height='26' hspace='1' border='0'></td>"
706
                  End If
119 ghuddy 707
 
123 ghuddy 708
                  If QStrPar("Dview") = "enable" Then
709
                     Response.write "<td width='1'><a href='"& scriptName &"?Dview=&Pview="& QStrPar("Pview") &"&pv_id="& Request("pv_id") &"&rtag_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>"
710
                  Else
711
                     Response.write "<td width='1'><a href='"& scriptName &"?Dview=enable&Pview="& QStrPar("Pview") &"&pv_id="& Request("pv_id") &"&rtag_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>"
712
                  End If
119 ghuddy 713
 
123 ghuddy 714
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 715
 
123 ghuddy 716
                  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 717
 
123 ghuddy 718
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 719
 
123 ghuddy 720
                  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 721
 
123 ghuddy 722
                  If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
723
                     If objAccessControl.UserLogedIn Then
724
                        If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
725
                           If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
726
                              Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
727
                           End If
728
                        Else
729
                           Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
730
                        End If
731
                     End If
732
                  End If
733
                  rsTest.Close()
734
                  Set rsTest = nothing
735
                  %>
736
                  <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
737
               </tr>
738
            </table>
739
         </td>
740
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="8"></td>
741
      </tr>
742
   </table>
119 ghuddy 743
 
744
<!-- ADVANCED SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 745
   <DIV name="DIV_ADVANCED_SEARCH" id="DIV_ADVANCED_SEARCH" style="display:none;">
746
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
747
         <form name="advancedsearch" method="get" action="find.asp">
748
            <tr>
749
               <td nowrap  class="form_txt" valign="middle">
750
                  <%
751
                  Dim FindPackageCheck, FindFileCheck
119 ghuddy 752
 
123 ghuddy 753
                  FindPackageCheck = ""
754
                  FindFileCheck = ""
119 ghuddy 755
 
123 ghuddy 756
                  If Request("searchtype") = "2" Then
757
                     FindFileCheck = "checked"
758
                  Else
759
                     FindPackageCheck = "checked"
760
                  End If
119 ghuddy 761
 
123 ghuddy 762
                  %>
763
                  <fieldset>
764
                     <legend class="body_colb"><img src="images/i_mglass.gif" width="17" height="17" border="0" align="absmiddle">&nbsp;Advanced Search</legend>
765
                     <input name="searchtype" id="searchtype1" type="radio" value="1" <%=FindPackageCheck%>>
766
                     <a href="javascript:;" onClick="MM_findObj('searchtype1').checked=true;" class="body_txt">Find a Package</a><br>
767
                     <input name="searchtype" id="searchtype2" type="radio" value="2" <%=FindFileCheck%>>
768
                     <a href="javascript:;" onClick="MM_findObj('searchtype2').checked=true;" class="body_txt">Find a File</a><br><br>
769
                     <%If CInt(nEnvTab) = enumENVTAB_WORK_IN_PROGRESS Then%>
770
                        Find in Work In Progress<br>
771
                     <%ElseIf CInt(nEnvTab) = enumENVTAB_PLANNED Then%>
772
                        Find in Pending<br>
773
                     <%ElseIf  CInt(nEnvTab) = enumENVTAB_RELEASED Then%>
774
                        Find in Released<br>
775
                     <%End If%>
776
                     <input type="text" name="keyword" size="25" class="form_ivaluew" value="<%=Request("keyword")%>">
777
                     <input type="submit" name="btn" value="Find" class="form_ivalue">
119 ghuddy 778
 
123 ghuddy 779
                     <input type="hidden" name="envtab" value="<%=nEnvTab%>">
780
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
781
                  </fieldset>
782
                  <br>
783
               </td>
784
            </tr>
785
         </form>
786
      </table>
787
   </DIV>
119 ghuddy 788
 
123 ghuddy 789
   <script language="JavaScript" type="text/javascript">
790
      <!--
791
      function ToggleAdvancedSearch( )
792
      {
793
         if ( MM_findObj("DIV_ADVANCED_SEARCH").style.display == 'none')
794
         {
795
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'block';
796
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'none';
797
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'block';
798
         }
799
         else
800
         {
801
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'none';
802
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'block';
803
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'none';
804
         }
119 ghuddy 805
 
123 ghuddy 806
         document.cookie = 'RELMGR_DIV_ADVANCED_SEARCH' + '=' + MM_findObj("DIV_ADVANCED_SEARCH").style.display;
807
      }
119 ghuddy 808
 
123 ghuddy 809
      // Run this on page render for default setting
810
      if (GetCookie('RELMGR_DIV_ADVANCED_SEARCH') == 'block')
811
      {
812
         ToggleAdvancedSearch();
813
      }
119 ghuddy 814
 
123 ghuddy 815
   //-->
816
   </script>
119 ghuddy 817
 
818
<!-- RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 819
   <DIV name="DIV_RELEASE_REFERENCES" id="DIV_RELEASE_REFERENCES" style="display:none;">
820
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
821
         <form name="relref" method="get" action="_remove_release_reference.asp" onSubmit="ToggleDisplay('RelRefProgressBar');">
822
            <tr>
823
               <td width="100%" nowrap class="form_txt">
824
                  <fieldset>
825
                     <legend class="body_colb"><img src="images/i_releaseref.gif" border="0" align="absmiddle">&nbsp;Release References</legend>
826
                     <DIV id="RelRefProgressBar" name="RelRefProgressBar" style="display:none;" class="class="body_scol"">
827
                        <img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...
828
                     </DIV>
829
                     <b>References</b>
830
                     <hr noshade size="1">
831
                     <%If (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE) Then%>
832
                        <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')">
833
                        &nbsp;<input <%=objAccessControl.IsComponentDisabled("RemoveReleaseReference")%> type="submit" name="btn" value="Remove" class="form_ivalue"><br><br>
834
                     <%End If%>
119 ghuddy 835
 
123 ghuddy 836
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
119 ghuddy 837
 
123 ghuddy 838
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
839
                        <tr>
840
                           <td bgcolor="#999999">
119 ghuddy 841
 
123 ghuddy 842
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
843
                                 <%
844
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 845
 
123 ghuddy 846
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferences.sql"), 0 )
119 ghuddy 847
 
123 ghuddy 848
                                 OraDatabase.Parameters.Remove "RTAG_ID"
849
                                 %>
119 ghuddy 850
 
123 ghuddy 851
                                 <%If rsEnvQry.RecordCount = 0 Then%>
852
                                 <tr>
853
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
854
                                       No references used.
855
                                    </td>
856
                                 </tr>
857
                                 <%End If%>
119 ghuddy 858
 
123 ghuddy 859
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
860
                                    If rsEnvQry("official") = "Y" Then
861
                                       IMG_locked = imgLocked
862
                                    Else
863
                                       IMG_locked = ""
864
                                    End If%>
865
                                    <tr>
866
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>"></td>
867
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
868
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
869
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
870
                                       </td>
871
                                    </tr>
872
                                    <%rsEnvQry.MoveNext()
873
                                 WEnd%>
874
                                 <tr>
875
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
876
                                       <br><br><br>
877
                                    </td>
878
                                 </tr>
879
                              </table>
880
                           </td>
881
                        </tr>
882
                     </table>
883
                     <br><br>
119 ghuddy 884
 
123 ghuddy 885
                     <b>Referenced By</b>
886
                     <hr noshade size="1">
119 ghuddy 887
 
123 ghuddy 888
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
889
                        <tr>
890
                           <td bgcolor="#999999">
119 ghuddy 891
 
123 ghuddy 892
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
893
                                 <%
894
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 895
 
123 ghuddy 896
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferencedBy.sql"), 0 )
119 ghuddy 897
 
123 ghuddy 898
                                 OraDatabase.Parameters.Remove "RTAG_ID"
899
                                 %>
119 ghuddy 900
 
123 ghuddy 901
                                 <%If rsEnvQry.RecordCount = 0 Then%>
902
                                    <tr>
903
                                       <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
904
                                          Not referenced anywhere.
905
                                       </td>
906
                                    </tr>
907
                                 <%End If%>
119 ghuddy 908
 
123 ghuddy 909
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
910
                                    If rsEnvQry("official") = "Y" Then
911
                                       IMG_locked = imgLocked
912
                                    Else
913
                                       IMG_locked = ""
914
                                    End If%>
915
                                    <tr>
916
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>" disabled></td>
917
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
918
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
919
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
920
                                       </td>
921
                                    </tr>
922
                                    <%rsEnvQry.MoveNext()
923
                                 WEnd%>
924
                                 <tr>
925
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
926
                                       <br><br><br>
927
                                    </td>
928
                                 </tr>
929
                              </table>
930
                           </td>
931
                        </tr>
932
                     </table>
933
                     <br>
934
                  </fieldset>
935
                  <br>
936
               </td>
937
            </tr>
938
         </form>
939
      </table>
940
   </DIV>
119 ghuddy 941
<!-- END OF RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
942
 
943
<!-- PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 944
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
945
      <form id="pending_PVID_List" name="pending_PVID_List" method="post" action="make_bulk_release.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>", onSubmit="makeBulkRelease();">
946
         <tr>
947
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="25"></td>
948
            <td width="100%" bgcolor="#999999" valign="bottom">
949
               <!-- TAB CONTROLS ++++++++++++++++++++++ -->
950
               <%
951
               Set objTabControl = New TabControl
952
               objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleDreamWeaver/dreamweaver_style.html") ) ' Supply tab style definition
953
               objTabControl.TabStyle = "StyleDreamWeaver"
954
               If   QStrPar("Dview") = "enable"   Then
955
                  objTabControl.AddTabDefnition ( arrProductEnv )   '-   Integration/Test/Deploy
956
               Else
957
                  objTabControl.AddTabDefnition ( arrEnv )
958
               End If
959
               objTabControl.SelectByIndex ( nEnvTab )
960
               objTabControl.Render ()
961
               %>
962
               <!-- END OF TAB CONTROLS +++++++++++++++ -->
963
            </td>
964
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="1"></td>
965
         </tr>
966
         <tr>
967
            <td></td>
968
            <td>
969
               <br>
970
               <%
971
               Dim tempTimer
972
               tempTimer = Timer
973
               %>
974
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
975
               <%
119 ghuddy 976
 
123 ghuddy 977
               '--- Render Environment ---
978
               If objAccessControl.UserLogedIn AND (parPview <> "disable") Then
979
                  'Personal View
980
                  Call Print_View( nEnvTab, "personal", parRtag_id, parPshow, objAccessControl.UserId )
981
               Else
982
                  ' Guest view
983
                  Call Print_View( nEnvTab, "guest", parRtag_id, parBshow, empty )
984
               End If
985
               %>
119 ghuddy 986
 
123 ghuddy 987
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
988
               <br>
989
            </td>
990
            <td></td>
991
         </tr>
992
      </form>
993
   </table>
994
   <!-- <input type="hidden" name="pv_id_list" value=<%=Request("pv_id_list")%>> -->
119 ghuddy 995
<!--END OF PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
996
 
997
<%End If%>