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
 
4388 dpurdie 47
///////////////////////////////////////////////
48
//  Function:       toggletick    
49
//  Description:    This function will toggle all visible (pending) tick boxes 
50
//  Input:          te  - Controlling element
51
//
52
function toggletick(te)
53
{
54
    // Get the form containing all of the pending items
55
    var f = document.getElementById('pending_PVID_List');
56
    if (f == null) {
57
       alert('Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
58
    } else {
59
       if (f.pv_id_list != null) {
60
           if (f.length == 1 || typeof f.pv_id_list.length == "undefined") {
61
              if (false == f.pv_id_list.disabled) {
62
                 f.pv_id_list.checked = te.checked;
63
              }
64
           } else {
65
              for (n = 0; n < f.pv_id_list.length; n++) {
66
                 if (false == f.pv_id_list[n].disabled) {
67
                    f.pv_id_list[n].checked = te.checked;
68
                 }
69
              }
70
           }
71
       }
72
    }
73
}
119 ghuddy 74
 
4388 dpurdie 75
///////////////////////////////////////////////
76
//  Function:       countBulkItems
77
//  Description:    Determine the number of bulk ticked items
78
//                  These are suiable and enabled items
79
//  Input:          f - Form element to process
80
//
81
function countBulkItems(f)
82
{
83
    var n;
84
    var numCheckedAndEnabled = 0;
85
    var numUncheckedAndEnabled = 0;
86
 
87
    // Unbelievably, if the form has just one single PV_ID checkbox item, the syntax via which we access it
88
    // has to change. We cannot use array access syntax in such a case.
89
    if (f.length == 1 || typeof f.pv_id_list.length == "undefined")
90
    {
91
       if (f.pv_id_list.value != null)
92
       {
93
          if (false == f.pv_id_list.disabled)
94
          {
95
             if (true == f.pv_id_list.checked)
96
                numCheckedAndEnabled++;
97
             else
98
                numUncheckedAndEnabled++;
99
          }
100
       }
101
    }
102
    else
103
    {
104
       // Here we can and have to use array access syntax.
105
       for (n = 0; n < f.pv_id_list.length; n++)
106
       {
107
          if (false == f.pv_id_list[n].disabled)
108
          {
109
             if (true == f.pv_id_list[n].checked)
110
                numCheckedAndEnabled++;
111
             else
112
                numUncheckedAndEnabled++;
113
          }
114
       }
115
    }
116
    return numCheckedAndEnabled;
117
}
118
 
123 ghuddy 119
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
120
// This function is executed when the Bulk Release action button is pressed. It will do some local
121
// client side checks and then if all is well, it will use the make_bulk_release.asp to initiate
122
// the bulk release process on the server side.
123
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
124
function makeBulkRelease()
125
{
126
   // Get the form containing all of the pending items
127
   var f = document.getElementById('pending_PVID_List');
128
   if (f == null)
129
      alert('Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
130
   else
131
   {
132
      // When no items exist in the pending tab, the pending_PVID_List form will not contain any
133
      // element called pv_id_list, so it will be null. Check for that and issue an alert as appropriate.
134
      if (f.pv_id_list == null)
135
      {
136
         alert('There are no items pending that can be considered for bulk release.\n\n' +
4388 dpurdie 137
               'Use the Bulk Release button when items with checkboxes are present in the Pending Tab.');
123 ghuddy 138
      }
139
      else
140
      {
141
         var doBulkRelease = true;
4388 dpurdie 142
         var numCheckedAndEnabled = countBulkItems(f);
143
         if (numCheckedAndEnabled == 0)
123 ghuddy 144
         {
4388 dpurdie 145
                alert('Currently, there are no items that can be bulk released.\n\n' +
146
                      'Select items to be released before using the Bulk Release button');
147
                doBulkRelease = false;
148
	     }
123 ghuddy 149
         else
150
         {
4388 dpurdie 151
             doBulkRelease = confirm('Release all ('+numCheckedAndEnabled+') checked items from the Pending List.\n\n' +
152
                                     '\tPress OK to Bulk Release all outstanding items.\n' +
153
                                     '\tPress CANCEL to abort Bulk Release.\n\n' );
123 ghuddy 154
         }
119 ghuddy 155
 
123 ghuddy 156
         if (doBulkRelease == true)
157
         {
158
            // Initiate the bulk release by redirecting the browser to the make_bulk_release.asp page
159
            // which holds the server side VBScript code that actually carries out the release operations.
160
            // Once complete, that code will redirect the browser back to the dependencies.asp page of which
161
            // this _environment.asp file is a part (by direct inclusion)
125 ghuddy 162
            <%If Request("pv_id") Then%>
163
               f.action = "make_bulk_release.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>";
123 ghuddy 164
            <%Else%>
165
               f.action = "make_bulk_release.asp?rtag_id=<%=parRtag_id%>";
166
            <%End If%>
167
            f.submit();
168
            // TODO : I would like to show progress? Is that even possible? If so, how?
169
         }
170
      }
171
   }
172
}
119 ghuddy 173
 
4358 dpurdie 174
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
175
// This function is executed when the Bulk Remove action button is pressed. It will do some local
176
// client side checks and then if all is well, it will use the make_bulk_remove.asp to initiate
177
// the bulk remove process on the server side.
178
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
179
function makeBulkReject()
180
{
181
   // Get the form containing all of the pending items
182
   var f = document.getElementById('pending_PVID_List');
183
   if (f == null)
184
      alert('Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
185
   else
186
   {
187
      // When no items exist in the pending tab, the pending_PVID_List form will not contain any
188
      // element called pv_id_list, so it will be null. Check for that and issue an alert as appropriate.
189
      if (f.pv_id_list == null)
190
      {
4388 dpurdie 191
         alert('There are no items pending that can be considered for Bulk Rejection.\n\n' +
192
               'Use the Bulk Reject button when items with checkboxes are present in the Pending Tab.');
4358 dpurdie 193
      }
194
      else
195
      {
196
         var doBulkReject = true;
4388 dpurdie 197
         var numCheckedAndEnabled = countBulkItems(f);
4358 dpurdie 198
         if (numCheckedAndEnabled == 0)
199
         {
4388 dpurdie 200
             alert('Currently, there are no items that can be Bulk Reject.\n\n' +
201
                   'Select items to be released before using the Bulk Reject button');
202
             doBulkReject = false;
4358 dpurdie 203
         }
204
         else
205
         {
4388 dpurdie 206
             doBulkReject = confirm('Reject all ('+numCheckedAndEnabled+') checked items from the Pending List.\n\n' +
207
                                     '\tPress OK to Bulk Reject all outstanding items.\n' +
208
                                     '\tPress CANCEL to abort Bulk Reject.\n\n' );
4358 dpurdie 209
         }
210
 
211
         if (doBulkReject == true)
212
         {
213
            // Initiate the bulk remove by redirecting the browser to the make_bulk_remove.asp page
214
            // which holds the server side VBScript code that actually carries out the remove operations.
215
            // Once complete, that code will redirect the browser back to the dependencies.asp page of which
216
            // this _environment.asp file is a part (by direct inclusion)
217
            <%If Request("pv_id") Then%>
218
               f.action = "make_bulk_reject.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>";
219
            <%Else%>
220
               f.action = "make_bulk_reject.asp?rtag_id=<%=parRtag_id%>";
221
            <%End If%>
222
            f.submit();
223
            // TODO : I would like to show progress? Is that even possible? If so, how?
224
         }
225
      }
226
   }
227
}
228
 
4388 dpurdie 229
///////////////////////////////////////////////
4395 dpurdie 230
//  Function:    openAllViews
231
//  Description: Open and Populate all Views
232
//               Views are populated via AJAX
233
//               Current scheme allows for one AJAX request to be outstanding
234
//               Have AJAX callback determine if there is more work to be done
235
//
236
var openingAllViews = 0;
237
function openAllViews()
238
{
239
    openingAllViews = 0;
240
    toggleAllViewsIcon(0);
241
 
242
    //if (event.shiftKey==1)
243
    //
244
    //  Locate first/next view to be expanded
245
    var divs = document.getElementsByTagName("div");
246
    for (var i=0;i<divs.length;i++) {
247
        var el = divs[i]; 
248
        var id = el.id;
249
        if (id.indexOf("ENVDIV") == 0)
250
        {
251
            var rowId = id.substr(6);
252
            if (el.innerHTML.indexOf('<%=enumLOADING%>') != -1)
253
            {
254
                openingAllViews = 1;
4398 dpurdie 255
                RequestViewContent(rowId);
4395 dpurdie 256
                return;
257
            } else if (el.style.display == 'none') {
258
               UpdateViewHeader(rowId, 0);
259
            }
260
        }
261
    }
262
}
263
 
264
///////////////////////////////////////////////
4388 dpurdie 265
//  Function:       closeAllViews
4395 dpurdie 266
//  Description:    Close and forget about All Populated Views
4388 dpurdie 267
//
268
function closeAllViews()
269
{
4395 dpurdie 270
    openingAllViews = 0;
271
    toggleAllViewsIcon(0);
272
 
4396 dpurdie 273
    //  Get the View cookie and convert it into a hash
274
    var vhash = new Object();
4388 dpurdie 275
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
276
    if (us) {
277
        var aViewList = us.split(',');
278
        for (index=0; index < aViewList.length;++index) {
4396 dpurdie 279
            vhash[aViewList[index]] = 1;
280
        }
281
    }
282
 
283
    //  Locate first/next view to be closed
284
    var divs = document.getElementsByTagName("div");
285
    for (var i=0;i<divs.length;i++) {
286
        var el = divs[i]; 
287
        var id = el.id;
288
        if (id.indexOf("ENVDIV") == 0)
289
        {
290
            var rowId = id.substr(6);
291
            if (el.innerHTML.indexOf('<%=enumLOADING%>') == -1)
292
            {
293
                UpdateViewHeader(rowId, 1);
294
                el.innerHTML = '<%=enumLOADING%>';
295
 
296
                // Delete from cookie too
297
                delete vhash[rowId];
4388 dpurdie 298
            }
299
        }
4396 dpurdie 300
    }
301
 
302
    //  Reform the cookie
303
    if (us)
304
    {
305
        us = Object.keys(vhash).join(',');
4388 dpurdie 306
        // Store to cookie
307
        document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
4396 dpurdie 308
    }
4388 dpurdie 309
}
4358 dpurdie 310
 
4388 dpurdie 311
///////////////////////////////////////////////
4395 dpurdie 312
//  Function:    toggleAllViewsIcon
313
//  Description: Update the toogleAllViews Icon
314
//  arg        : mode - 0 min, else max
315
//
316
function toggleAllViewsIcon(mode)
317
{
318
    //  Update image
319
    //      images/btn_min.gif 
320
    var f = document.getElementById('cb_minall');
321
    if (mode ) {
322
        f.src = 'images/btn_max.gif';
323
    } else {
324
        f.src = 'images/btn_min.gif';
325
    }
326
}
327
 
328
 
329
///////////////////////////////////////////////
4388 dpurdie 330
//  Function:    toggleAllViews
331
//  Description: Hide/Show all the expanded views
332
//               Will not change the saved list, just the current display
333
//
334
function toggleAllViews()
335
{
4396 dpurdie 336
    var dmatch, dset;
4395 dpurdie 337
    openingAllViews = 0;
338
 
339
    //  Update the icon image
4388 dpurdie 340
    var f = document.getElementById('cb_minall');
341
    if (f.src.indexOf('min.gif') >= 0) {
342
        f.src = 'images/btn_max.gif';
343
        dmatch = 'block';
344
        dset = 'none';
345
    } else {
346
        f.src = 'images/btn_min.gif';
347
        dmatch = 'none';
348
        dset = 'block';
349
    }
350
 
4396 dpurdie 351
    //  Locate first/next view to be toggled
352
    var divs = document.getElementsByTagName("div");
353
    for (var i=0;i<divs.length;i++) {
354
        var el = divs[i]; 
355
        var id = el.id;
356
        if (id.indexOf("ENVDIV") == 0)
357
        {
358
            if (el.innerHTML.indexOf('<%=enumLOADING%>') == -1) {
359
                var rowId = id.substr(6);
360
                if (el && el.style.display == dmatch ) {
361
                    el.style.display = dset;
362
                }
4388 dpurdie 363
            }
364
        }
365
    }
366
}
367
 
368
function UpdateViewHeader(rowId, show)
369
{
370
    if ( show )
371
    {
372
       // View is currently minimised
373
       MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_max.gif';
374
       MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#808080';
4397 dpurdie 375
       MM_findObj( 'ENVDIV'+ rowId ).style.display = 'none';
4388 dpurdie 376
    }
377
    else
378
    {
379
       // View is currently maximised
380
       MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_min.gif';
381
       MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#000000';
4397 dpurdie 382
       MM_findObj( 'ENVDIV'+ rowId ).style.display = 'block';
4388 dpurdie 383
    }
384
}
385
 
4396 dpurdie 386
///////////////////////////////////////////////
387
//  Function:       RequestViewContent    
388
//  Description:    Maintain view content
389
//                  If View Tab is unpopulated - then populate it
390
//                  if View Tab is populated - then Minimise it
4398 dpurdie 391
//  Arguments:      rowId   - Id if Row to Fetch
4396 dpurdie 392
//
4398 dpurdie 393
function RequestViewContent( rowId ){
123 ghuddy 394
   var requestURL = 'RequestViewContent.asp';
4398 dpurdie 395
   var paramString = '?envtab=<%=nEnvTab%>&rtag_id=<%=parRtag_id%>&script_name=<%=ScriptName%>&view_id=' + rowId;
119 ghuddy 396
 
123 ghuddy 397
   // Change display states
398
   if ( (MM_findObj( 'ENVIMG'+ rowId ).src).indexOf('btn_max.gif') == -1 )
399
   {
400
      // View is currently minimised
4388 dpurdie 401
      UpdateViewHeader(rowId, 1);    
119 ghuddy 402
 
123 ghuddy 403
      // Remove from SHow View List
404
      RemoveFromShowView ( rowId );
405
   }
406
   else
407
   {
408
      // View is currently maximised
4388 dpurdie 409
      UpdateViewHeader(rowId, 0);
410
 
123 ghuddy 411
      // Add it to Show view id
412
      AddToShowView ( rowId );
413
   }
119 ghuddy 414
 
123 ghuddy 415
   // Fix div width for ie so it does not overflow
416
   if (is_ie)
417
   {
418
      MM_findObj( 'ENVDIV'+ rowId ).style.width = '100%';
419
   }
119 ghuddy 420
 
123 ghuddy 421
   // Set ajax divname
422
   ajaxdivname = 'ENVDIV'+ rowId;
119 ghuddy 423
 
123 ghuddy 424
   // Request data from server
425
   if ( (MM_findObj( ajaxdivname ).innerHTML).indexOf('<%=enumLOADING%>') != -1 )
426
   {
427
      //Append the name to search for to the requestURL
428
      var url = requestURL + paramString;
119 ghuddy 429
 
123 ghuddy 430
      //Create the xmlHttp object to use in the request
431
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
432
      // This is non-blocking (asynchronous)
433
      xmlHttp = GetXmlHttpObject(stateChangeHandler);
119 ghuddy 434
 
123 ghuddy 435
      //Send the xmlHttp get to the specified url
436
      xmlHttp_Get(xmlHttp, url);
437
   }
438
}
119 ghuddy 439
 
123 ghuddy 440
function GetXmlHttpObject(handler) {
441
   var objXmlHttp = null;    //Holds the local xmlHTTP object instance
119 ghuddy 442
 
123 ghuddy 443
   //Depending on the browser, try to create the xmlHttp object
444
   if (is_ie){
445
      //The object to create depends on version of IE
446
      //If it isn't ie5, then default to the Msxml2.XMLHTTP object
447
      var strObjName = (is_ie5) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP';
119 ghuddy 448
 
123 ghuddy 449
      //Attempt to create the object
450
      try{
451
         objXmlHttp = new ActiveXObject(strObjName);
452
         objXmlHttp.onreadystatechange = handler;
453
      }
454
      catch(e){
455
      //Object creation errored
456
         alert('IE detected, but object could not be created. Verify that active scripting and activeX controls are enabled');
457
         return;
458
      }
459
   }
460
   else if (is_opera){
461
      //Opera has some issues with xmlHttp object functionality
462
      alert('Opera detected. The page may not behave as expected.');
463
      return;
464
   }
465
   else{
466
      // Mozilla | Netscape | Safari
467
      objXmlHttp = new XMLHttpRequest();
468
      objXmlHttp.onload = handler;
469
      objXmlHttp.onerror = handler;
470
   }
119 ghuddy 471
 
123 ghuddy 472
   //Return the instantiated object
473
   return objXmlHttp;
119 ghuddy 474
}
475
 
123 ghuddy 476
//stateChangeHandler will fire when the state has changed, i.e. data is received back
477
// This is non-blocking (asynchronous)
478
function stateChangeHandler()
479
{
480
   //readyState of 4 or 'complete' represents that data has been returned
481
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete'){
482
      //Gather the results from the callback
483
      var str = xmlHttp.responseText;
119 ghuddy 484
 
123 ghuddy 485
      //Populate the innerHTML of the div with the results
486
      document.getElementById(ajaxdivname).innerHTML = str;
487
   }
4395 dpurdie 488
 
489
   //Cascade view opening
490
   if (openingAllViews) {
491
       openAllViews();
492
   }
123 ghuddy 493
}
119 ghuddy 494
 
123 ghuddy 495
// XMLHttp send GET request
496
function xmlHttp_Get(xmlhttp, url) {
497
   //Getting a permissions error here? Check the url string to
498
   // ensure it is accurate (defined above)
499
   xmlhttp.open('GET', url, true);
500
   xmlhttp.send(null);
501
}
119 ghuddy 502
 
503
 
504
 
505
function RemoveFromShowView ( ViewId )
506
{
123 ghuddy 507
   // Get current cookie settings
508
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
509
   var aShowViews = new Array();
119 ghuddy 510
 
123 ghuddy 511
   if (us)
512
   {
513
      // Cookie is not empty, hence just append new value
514
      var aViews = us.split(',');
119 ghuddy 515
 
123 ghuddy 516
      // Make sure that view is not already on the list
517
      for (i=0; i<aViews.length; i++)
518
      {
519
         if (aViews[i] != ViewId)
520
         {
521
            aShowViews.push(aViews[i]);
522
         }
523
      }
119 ghuddy 524
 
123 ghuddy 525
      // Make a new view list to be stored in cookie
526
      us = aShowViews.join(',');
527
   }
528
   else
529
   {
530
      us = '';
531
   }
119 ghuddy 532
 
123 ghuddy 533
   // Store to cookie
534
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 535
}
536
 
537
function AddToShowView ( ViewId )
538
{
123 ghuddy 539
   // Get current cookie settings
540
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
541
   var aShowViews = new Array();
119 ghuddy 542
 
123 ghuddy 543
   //Release Manager Cookie Available on Show View
544
   if ( us )
545
   {
546
      // Cookie is not empty, hence just append new value
547
      var aViews = us.split(',');
119 ghuddy 548
 
123 ghuddy 549
      // Make sure that view is not already on the list
550
      for (i=0; i<aViews.length; i++)
551
      {
552
         if (aViews[i] != ViewId)
553
         {
554
            aShowViews.push(aViews[i]);
555
         }
556
      }
119 ghuddy 557
 
123 ghuddy 558
      // Make a new view list to be stored in cookie
559
      us = aShowViews.join(',') + ',' + ViewId;
560
   }
561
   else//Release Manager Cookie Not Available on Show View
562
   {
563
      // Cookie is empty, just add this value
564
      us = ViewId;
119 ghuddy 565
 
123 ghuddy 566
   }
119 ghuddy 567
 
123 ghuddy 568
   // Store to cookie
569
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 570
}
571
 
572
 
573
//-->
574
</script>
575
 
576
<%
577
'------------------------------------------------------------------------------------------------------------------------------------------------
578
Function GetEnvTab ( sEnvTab )
123 ghuddy 579
   If sEnvTab <> "" Then
580
      GetEnvTab = sEnvTab
581
      Response.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") = sEnvTab
582
   Else
583
      If Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") <> "" Then
584
         GetEnvTab = Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab")
585
      Else
586
         GetEnvTab = enumENVTAB_WORK_IN_PROGRESS
587
         Response.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") = enumENVTAB_WORK_IN_PROGRESS
588
      End If
589
   End If
119 ghuddy 590
 
591
End Function
592
'------------------------------------------------------------------------------------------------------------------------------------------------
593
Sub Display_Env_BaseView ( NNbase_view_id, SSbase_view, BBviewCollapsed, SScontents )
594
%>
595
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
123 ghuddy 596
   <tr>
597
      <td width="1" align="left" valign="top" bgcolor="#dad7c8"><img src="images/p_ctl.gif" width="3" height="3"></td>
598
      <td width="100%" bgcolor="#dad7c8"><img src="images/spacer.gif" width="1" height="1"></td>
599
      <td width="1" bgcolor="#dad7c8"><img src="images/spacer.gif" width="1" height="1"></td>
600
      <td width="1" align="right" valign="top" bgcolor="#dad7c8"><img src="images/p_ctr.gif" width="3" height="3"></td>
601
   </tr>
602
   <tr>
603
      <td align="left" valign="top" bgcolor="#dad7c8">&nbsp;</td>
604
      <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>
4398 dpurdie 605
      <td align="right" bgcolor="#dad7c8"><a href="javascript:;" title="Expand/Collapse View" onClick="RequestViewContent('<%=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>
123 ghuddy 606
      <td align="right" valign="top" bgcolor="#dad7c8">&nbsp;</td>
607
   </tr>
119 ghuddy 608
</table>
609
<DIV id="ENVDIV<%=NNbase_view_id%>" class="envContent" <%If BBviewCollapsed Then %>style="display:none;"<%Else%>style="display:block;"<%End If%>>
123 ghuddy 610
   <%If NOT BBviewCollapsed Then %>
611
      <%=SScontents%>
612
   <%Else%>
613
      <%=enumLOADING%>
614
   <%End If%>
615
</DIV>
119 ghuddy 616
<br>
617
<%
618
End Sub
619
'------------------------------------------------------------------------------------------------------------------------------------------------
620
Sub Print_View( NNEnvTab, SSviewtype, NNrtag_id, SSshowviews, NNuser_id )
123 ghuddy 621
   Dim rsView, Query_String
622
   'Dim btn1
623
   Dim tmpURL
624
   Dim SSscript
625
   Dim qstrPar
626
   Dim nViewType
627
   Dim nTrueRecordCount
628
   Dim nOperation
629
   Dim relContentsSTR, viewCollapsed, curr_view_id, view_name
119 ghuddy 630
 
123 ghuddy 631
   If scriptName = "find.asp" Then
632
      SSscript = "dependencies.asp"
633
   Else
634
      SSscript = scriptName
635
   End If
119 ghuddy 636
 
123 ghuddy 637
   If SSviewtype = "guest" Then
638
      nViewType = 1
639
      qstrPar = "Bshow"
640
   ElseIf SSviewtype = "personal" Then
641
      nViewType = 2
642
      qstrPar = "Pshow"
643
   End If
119 ghuddy 644
 
123 ghuddy 645
   OraDatabase.Parameters.Add "VIEW_TYPE",           nViewType, ORAPARM_INPUT, ORATYPE_NUMBER
646
   'OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   ShowView( Pipes2Commas( SSshowviews ), SSviewtype ), ORAPARM_INPUT, ORATYPE_VARCHAR2
647
   OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   GetShowViewList(), ORAPARM_INPUT, ORATYPE_VARCHAR2
648
   OraDatabase.Parameters.Add "RTAG_ID",             NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
649
   OraDatabase.Parameters.Add "USER_ID",             NNuser_id, ORAPARM_INPUT, ORATYPE_NUMBER
650
   OraDatabase.Parameters.Add "TRUE_RECORD_COUNT",   NULL, ORAPARM_OUTPUT, ORATYPE_NUMBER
651
   OraDatabase.Parameters.Add "RECORD_SET",          NULL, ORAPARM_OUTPUT, ORATYPE_CURSOR
119 ghuddy 652
 
123 ghuddy 653
   'If it's a Deployment View
654
   If parDview = "enable" Then
655
      ' Decide which environment list is to be displayed to the Integrators/Testers
656
      Select Case CInt( NNEnvTab )
657
         Case enumENVTAB_PRODRELEASE
658
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_PRODRELEASE_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 659
 
123 ghuddy 660
         Case enumENVTAB_INTEGRATE
661
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_INTEGRATION_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 662
 
123 ghuddy 663
         Case enumENVTAB_TEST
664
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_TEST_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 665
 
123 ghuddy 666
         Case enumENVTAB_DEPLOY
667
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_DEPLOY_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 668
 
123 ghuddy 669
         Case enumENVTAB_REJECT
670
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_REJECT_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 671
 
123 ghuddy 672
      End Select
119 ghuddy 673
 
123 ghuddy 674
   Else
675
      ' Decide which environment list is to be displayed
676
      Select Case CInt( NNEnvTab )
677
         Case enumENVTAB_WORK_IN_PROGRESS
678
            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 679
 
123 ghuddy 680
         Case enumENVTAB_PLANNED
681
            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 682
 
123 ghuddy 683
         Case enumENVTAB_RELEASED
684
            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 685
 
123 ghuddy 686
         Case Else
687
            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 688
 
123 ghuddy 689
      End Select
119 ghuddy 690
 
123 ghuddy 691
   End If
119 ghuddy 692
 
123 ghuddy 693
   ' Get Record set from database
694
   Set rsView = OraDatabase.Parameters("RECORD_SET").Value
695
   nTrueRecordCount = OraDatabase.Parameters("TRUE_RECORD_COUNT").Value
119 ghuddy 696
 
123 ghuddy 697
   OraDatabase.Parameters.Remove "RTAG_ID"
698
   OraDatabase.Parameters.Remove "USER_ID"
699
   OraDatabase.Parameters.Remove "VIEW_TYPE"
700
   OraDatabase.Parameters.Remove "VIEW_ID_SHOW_LIST"
701
   OraDatabase.Parameters.Remove "RECORD_SET"
702
   OraDatabase.Parameters.Remove "TRUE_RECORD_COUNT"
119 ghuddy 703
 
123 ghuddy 704
   ' Initialise variables
705
   If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
706
      relContentsSTR = ""
707
      viewCollapsed = FALSE
708
      curr_view_id = rsView("view_id")      ' Set current view
709
      view_name = rsView("view_name")
710
   End If
119 ghuddy 711
 
123 ghuddy 712
   While ((NOT rsView.BOF) AND (NOT rsView.EOF))
713
      '==== Get View Contents ====
714
      If NOT IsNull(rsView.Fields("pv_id")) Then
715
         tmpURL = SSscript &"?pv_id="& rsView.Fields("pv_id") &"&rtag_id="& parRtag_id
716
         IMG_locked = ""
717
         If rsView.Fields("dlocked") = "Y" Then IMG_locked = imgLocked
119 ghuddy 718
 
123 ghuddy 719
         ' DEVI-45275 - Normally, dlocked=Y items are denoted with a padlock icon on the web page. Since we can now merge
720
         ' into the pending tab, the dlocked=Y items that end up there would not give any visual indication to the user
721
         ' as to why they are present. So, instead of the padlock icon, display the added or removed icon to indicate
722
         ' what the intended action is to be, once the pending item is approved.
723
         ' Obviously, this functionality does not apply if we are in the deployment view, and only applies if viewing
724
         ' the PENDING or ALL environment tabs.
725
         ' With regard to the operation value, A = Added, S = Subtracted
726
         nOperation = " "
727
         If parDview <> "enable" AND (CInt( NNEnvTab ) = enumENVTAB_PLANNED OR CInt( NNEnvTab ) = enumENVTAB_ALL) Then
728
            nOperation = rsView.Fields("operation")   ' NB. this field is only availble if earlier query was GET_PENDING_ITEMS or GET_ENVIRONMENT_ITEMS
729
            If nOperation = "A" Then
730
               IMG_locked = imgAdded
731
            ElseIf nOperation = "S" Then
732
               IMG_locked = imgRemoved
733
            End If
734
         End If
119 ghuddy 735
 
123 ghuddy 736
         relContentsSTR = relContentsSTR & "<tr>" & VBNewLine
119 ghuddy 737
 
123 ghuddy 738
         If rsView("pkg_state") = 0 And rsView.Fields("deprecated_state") <> "" Then
739
            relContentsSTR = relContentsSTR & "  <td width='1%'>"& DefineStateIcon ( rsView.Fields("deprecated_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
740
         Else
741
            If (parDview <> "enable") AND ( ( CInt(NNEnvTab) = enumENVTAB_PLANNED ) OR ( Request("envtab") = enumENVTAB_PLANNED ) ) Then
119 ghuddy 742
 
123 ghuddy 743
               ' if package version is unlocked, rejected, or pending approval, or is to be added/subtracted to/from the release (DEVI-45275), then
744
               If (rsView("dlocked") = "N") OR (rsView("dlocked") = "R") OR (rsView("dlocked") = "P") OR (nOperation = "A") OR (nOperation = "S") Then
745
                  checked = NULL
746
                  disabled = NULL
747
                  ' disable check box if not logged in, or if not in open mode and user has no permission to approve pending
748
                  If objAccessControl.UserLogedIn Then
749
                     If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
750
                        If NOT objAccessControl.IsActive("ApproveForAutoBuild") Then
751
                           disabled = "disabled"
752
                        End If
753
                     End If
754
                  Else
755
                     disabled = "disabled"
756
                  End If
119 ghuddy 757
 
123 ghuddy 758
               Else ' always check and disable the checkbox
759
                  checked = "checked"
760
                  disabled = "disabled"
761
               End If
119 ghuddy 762
 
123 ghuddy 763
               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
764
            Else
765
               relContentsSTR = relContentsSTR & " <td width='1%'>"& DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
766
            End If
767
         End If
119 ghuddy 768
 
123 ghuddy 769
         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
770
         relContentsSTR = relContentsSTR & "  <td width='1%' nowrap class='envPkg'>"& rsView.Fields("pkg_version") &"</td>" & VBNewLine
771
         relContentsSTR = relContentsSTR & "  <td width='1%'>"& IMG_locked &"</td>"
772
         relContentsSTR = relContentsSTR & "</tr>" & VBNewLine
773
      Else
774
         'relContentsSTR = relContentsSTR & "<tr><td><label class='form_txt' disabled>...</label></td></tr>"      ' Collapsed view displays dots
119 ghuddy 775
 
123 ghuddy 776
         viewCollapsed = TRUE
777
      End If
119 ghuddy 778
 
123 ghuddy 779
      rsView.MoveNext
119 ghuddy 780
 
123 ghuddy 781
      If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
782
         ' NOT end of the record set
783
         If curr_view_id <> rsView("view_id") Then
784
            '====== Draw buttons =================================
785
            'If InStrPipes( SSshowviews, curr_view_id ) Then
786
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
787
            'Else
788
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
789
            'End If
119 ghuddy 790
 
123 ghuddy 791
            '====== Print contents ===============================
792
            relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
793
            Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 794
 
123 ghuddy 795
            curr_view_id = rsView("view_id")
796
            view_name = rsView("view_name")
797
            relContentsSTR = ""      ' Empty the contents string
798
            viewCollapsed = FALSE
799
         End If
119 ghuddy 800
 
123 ghuddy 801
      Else
802
         ' End of the record set
119 ghuddy 803
 
123 ghuddy 804
         '====== Draw buttons =================================
805
         'If InStrPipes( SSshowviews, curr_view_id ) Then
806
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
807
         'Else
808
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
809
         'End If
119 ghuddy 810
 
123 ghuddy 811
         '====== Print contents ===============================
812
         relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
813
         Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 814
 
123 ghuddy 815
      End If
119 ghuddy 816
 
123 ghuddy 817
   WEnd
119 ghuddy 818
 
123 ghuddy 819
   If relContentsSTR <> "" Then
820
      Response.write "<a href='help/icons_F017.asp' target='_blank' class='body_scol'>Icon Legend...</a><br>"
821
   End If
119 ghuddy 822
 
123 ghuddy 823
   If nTrueRecordCount > 0 Then
824
      If rsView.RecordCount < 1 Then
825
         'If qstrPar = "Bshow" Then
826
         '   'Release is empty. Draw default box for Base view
827
         '   Call DisplayInfo ( "EMPTY_RELEASE_CONTENTS", "100%" )
828
         '
829
         'End If
119 ghuddy 830
 
123 ghuddy 831
         If qstrPar = "Pshow"  Then
832
            'Release is empty. Draw default box for Personal view
833
            Call DisplayInfo ( "PERSONAL_VIEW_NOT_SETUP", "100%" )
834
         End If
119 ghuddy 835
 
123 ghuddy 836
      End If
837
   End If
119 ghuddy 838
 
123 ghuddy 839
   ' Destroy
840
   rsView.Close
841
   Set rsView = nothing
119 ghuddy 842
End Sub
843
'------------------------------------------------------------------------------------------------------------------------------------------------
844
Sub PopulateGetShowViews ( ByRef outShowView )
845
 
123 ghuddy 846
   If Session(SESSION_SHOW_BASE_VIEW) <> "" Then
847
      Set outShowView = Session(SESSION_SHOW_BASE_VIEW)
119 ghuddy 848
 
123 ghuddy 849
   End If
119 ghuddy 850
End Sub
851
'------------------------------------------------------------------------------------------------------------------------------------------------
852
Function GetShowViewList ()
123 ghuddy 853
   'If SSparshow <> "" Then
854
   '   ' get list from query string
855
   '   ShowView = SSparshow
856
   'ElseIf Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype ) <> "" Then
857
   '   ' get list from cookie
858
   '   ShowView = Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype )
859
   'Else
860
   '   ' no list i.e. collapse all views
861
   '   ShowView = -1
862
   'End If
119 ghuddy 863
 
123 ghuddy 864
   'If oShowView.Count = 0 Then
865
   '   GetShowViewList = -1
866
   'Else
867
   '   GetShowViewList = Join( oShowView.Keys, "," )
868
   'End If
119 ghuddy 869
 
123 ghuddy 870
   If Request.Cookies(COOKIE_RELMGR_SHOW_VIEW) = "" Then
871
      GetShowViewList = -1
872
   Else
873
      GetShowViewList = Request.Cookies(COOKIE_RELMGR_SHOW_VIEW)
874
   End If
119 ghuddy 875
 
876
End Function
125 ghuddy 877
 
878
 
879
 
119 ghuddy 880
'------------------------------------------------------------------------------------------------------------------------------------------------
125 ghuddy 881
' 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.
882
' 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
883
' as yet, unknown reason).
884
'
885
Function RefreshedURL(NNdview, NNpview, NNpv_id, NNrtag_id)
886
   Dim url
887
 
888
   url = scriptName & "?Dview=" & NNdview & "&Pview=" & NNpview
889
 
890
   If NNpv_id Then
891
      url = url & "&pv_id=" & NNpv_id
892
   End If
893
 
894
   url = url & "&rtag_id=" & NNrtag_id
895
 
896
   RefreshedURL = url
897
End Function
898
 
899
 
900
'------------------------------------------------------------------------------------------------------------------------------------------------
119 ghuddy 901
%>
902
<%
903
 
904
'------------------------- MAIN LINE ---------------------------
905
%>
906
 
907
<%If parRtag_Id <> "" Then%>
908
<!-- RELEASE ACTION BUTTONS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
909
 
123 ghuddy 910
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
911
      <tr>
912
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="35"></td>
913
         <td width="100%" nowrap background="images/bg_action_norm.gif" >
914
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
915
               <tr>
916
                  <%
917
                  Dim rsTest
918
                  Set rsTest = OraDataBase.DbCreateDynaset( "SELECT PROJ_ID   FROM RELEASE_TAGS WHERE RTAG_ID ="&parRtag_id , ORADYN_DEFAULT )
119 ghuddy 919
 
4670 dpurdie 920
                  If objAccessControl.UserLogedIn AND ((((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
123 ghuddy 921
                     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>"
922
                  Else
923
                     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>"
924
                  End If
119 ghuddy 925
 
4670 dpurdie 926
                  If (pkgInfoHash.Item("dlocked") <> "Y") AND (Request("pv_id") <> "") Then
927
                     If  (objAccessControl.UserLogedIn) AND ( (objAccessControl.UserName = pkgInfoHash.Item("creator")) OR (objAccessControl.IsActive("DestroyPackageFromRelease")) ) Then
123 ghuddy 928
                        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>"
4670 dpurdie 929
                     Else
930
                        Response.write "<td width='1'><img title='Destroy the selected Package Version' src='icons/i_destroy_package_off.gif' alt='Destroy the selected Package Version' width='26' height='26' hspace='1' border='0'></td>"
123 ghuddy 931
                     End If
932
                  End If
119 ghuddy 933
 
123 ghuddy 934
                  If objAccessControl.IsActive("CreateNewRelease") Then
935
                     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>"
936
                  End If
119 ghuddy 937
 
123 ghuddy 938
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
939
                  If objAccessControl.UserLogedIn Then
940
                     If QStrPar("Pview") = "disable" Then
125 ghuddy 941
                        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 942
                     Else
125 ghuddy 943
                        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 944
                     End If
945
                  Else
946
                     Response.write "<td width='1'><img src='images/abtn_personal_view_off.gif' width='26' height='26' hspace='1' border='0'></td>"
947
                  End If
119 ghuddy 948
 
123 ghuddy 949
                  If QStrPar("Dview") = "enable" Then
125 ghuddy 950
                     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 951
                  Else
125 ghuddy 952
                     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 953
                  End If
119 ghuddy 954
 
123 ghuddy 955
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 956
 
123 ghuddy 957
                  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 958
 
123 ghuddy 959
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 960
 
123 ghuddy 961
                  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 962
 
123 ghuddy 963
                  If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
964
                     If objAccessControl.UserLogedIn Then
965
                        If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
966
                           If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
967
                              Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
968
                           End If
969
                        Else
970
                           Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
971
                        End If
972
                     End If
973
                  End If
4358 dpurdie 974
                  Response.write "<td width='1'><img src='images/spacer.gif' width='1' height='25'></td>"
975
                  If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
976
                     If objAccessControl.UserLogedIn Then
977
                        If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
978
                           If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
979
                              Response.write "<td width='1'><a href='#' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></td>"
980
                           End If
981
                        Else
982
                           Response.write "<td width='1'><a href='#' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></td>"
983
                        End If
984
                     End If
985
                  End If
123 ghuddy 986
                  rsTest.Close()
987
                  Set rsTest = nothing
988
                  %>
989
                  <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
990
               </tr>
991
            </table>
992
         </td>
993
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="8"></td>
994
      </tr>
995
   </table>
119 ghuddy 996
 
997
<!-- ADVANCED SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 998
   <DIV name="DIV_ADVANCED_SEARCH" id="DIV_ADVANCED_SEARCH" style="display:none;">
999
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
1000
         <form name="advancedsearch" method="get" action="find.asp">
1001
            <tr>
1002
               <td nowrap  class="form_txt" valign="middle">
1003
                  <%
1004
                  Dim FindPackageCheck, FindFileCheck
119 ghuddy 1005
 
123 ghuddy 1006
                  FindPackageCheck = ""
1007
                  FindFileCheck = ""
119 ghuddy 1008
 
123 ghuddy 1009
                  If Request("searchtype") = "2" Then
1010
                     FindFileCheck = "checked"
1011
                  Else
1012
                     FindPackageCheck = "checked"
1013
                  End If
119 ghuddy 1014
 
123 ghuddy 1015
                  %>
1016
                  <fieldset>
1017
                     <legend class="body_colb"><img src="images/i_mglass.gif" width="17" height="17" border="0" align="absmiddle">&nbsp;Advanced Search</legend>
1018
                     <input name="searchtype" id="searchtype1" type="radio" value="1" <%=FindPackageCheck%>>
1019
                     <a href="javascript:;" onClick="MM_findObj('searchtype1').checked=true;" class="body_txt">Find a Package</a><br>
1020
                     <input name="searchtype" id="searchtype2" type="radio" value="2" <%=FindFileCheck%>>
1021
                     <a href="javascript:;" onClick="MM_findObj('searchtype2').checked=true;" class="body_txt">Find a File</a><br><br>
1022
                     <%If CInt(nEnvTab) = enumENVTAB_WORK_IN_PROGRESS Then%>
1023
                        Find in Work In Progress<br>
1024
                     <%ElseIf CInt(nEnvTab) = enumENVTAB_PLANNED Then%>
1025
                        Find in Pending<br>
1026
                     <%ElseIf  CInt(nEnvTab) = enumENVTAB_RELEASED Then%>
1027
                        Find in Released<br>
1028
                     <%End If%>
1029
                     <input type="text" name="keyword" size="25" class="form_ivaluew" value="<%=Request("keyword")%>">
1030
                     <input type="submit" name="btn" value="Find" class="form_ivalue">
119 ghuddy 1031
 
123 ghuddy 1032
                     <input type="hidden" name="envtab" value="<%=nEnvTab%>">
1033
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
1034
                  </fieldset>
1035
                  <br>
1036
               </td>
1037
            </tr>
1038
         </form>
1039
      </table>
1040
   </DIV>
119 ghuddy 1041
 
123 ghuddy 1042
   <script language="JavaScript" type="text/javascript">
1043
      <!--
1044
      function ToggleAdvancedSearch( )
1045
      {
1046
         if ( MM_findObj("DIV_ADVANCED_SEARCH").style.display == 'none')
1047
         {
1048
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'block';
1049
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'none';
1050
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'block';
1051
         }
1052
         else
1053
         {
1054
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'none';
1055
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'block';
1056
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'none';
1057
         }
119 ghuddy 1058
 
123 ghuddy 1059
         document.cookie = 'RELMGR_DIV_ADVANCED_SEARCH' + '=' + MM_findObj("DIV_ADVANCED_SEARCH").style.display;
1060
      }
119 ghuddy 1061
 
123 ghuddy 1062
      // Run this on page render for default setting
1063
      if (GetCookie('RELMGR_DIV_ADVANCED_SEARCH') == 'block')
1064
      {
1065
         ToggleAdvancedSearch();
1066
      }
119 ghuddy 1067
 
123 ghuddy 1068
   //-->
1069
   </script>
119 ghuddy 1070
 
1071
<!-- RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 1072
   <DIV name="DIV_RELEASE_REFERENCES" id="DIV_RELEASE_REFERENCES" style="display:none;">
1073
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
1074
         <form name="relref" method="get" action="_remove_release_reference.asp" onSubmit="ToggleDisplay('RelRefProgressBar');">
1075
            <tr>
1076
               <td width="100%" nowrap class="form_txt">
1077
                  <fieldset>
1078
                     <legend class="body_colb"><img src="images/i_releaseref.gif" border="0" align="absmiddle">&nbsp;Release References</legend>
1079
                     <DIV id="RelRefProgressBar" name="RelRefProgressBar" style="display:none;" class="class="body_scol"">
1080
                        <img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...
1081
                     </DIV>
1082
                     <b>References</b>
1083
                     <hr noshade size="1">
1084
                     <%If (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE) Then%>
1085
                        <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')">
1086
                        &nbsp;<input <%=objAccessControl.IsComponentDisabled("RemoveReleaseReference")%> type="submit" name="btn" value="Remove" class="form_ivalue"><br><br>
1087
                     <%End If%>
119 ghuddy 1088
 
123 ghuddy 1089
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
119 ghuddy 1090
 
123 ghuddy 1091
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
1092
                        <tr>
1093
                           <td bgcolor="#999999">
119 ghuddy 1094
 
123 ghuddy 1095
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
1096
                                 <%
1097
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1098
 
123 ghuddy 1099
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferences.sql"), 0 )
119 ghuddy 1100
 
123 ghuddy 1101
                                 OraDatabase.Parameters.Remove "RTAG_ID"
1102
                                 %>
119 ghuddy 1103
 
123 ghuddy 1104
                                 <%If rsEnvQry.RecordCount = 0 Then%>
1105
                                 <tr>
1106
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1107
                                       No references used.
1108
                                    </td>
1109
                                 </tr>
1110
                                 <%End If%>
119 ghuddy 1111
 
123 ghuddy 1112
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
1113
                                    If rsEnvQry("official") = "Y" Then
1114
                                       IMG_locked = imgLocked
1115
                                    Else
1116
                                       IMG_locked = ""
1117
                                    End If%>
1118
                                    <tr>
1119
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>"></td>
1120
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
1121
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
1122
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
1123
                                       </td>
1124
                                    </tr>
1125
                                    <%rsEnvQry.MoveNext()
1126
                                 WEnd%>
1127
                                 <tr>
1128
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1129
                                       <br><br><br>
1130
                                    </td>
1131
                                 </tr>
1132
                              </table>
1133
                           </td>
1134
                        </tr>
1135
                     </table>
1136
                     <br><br>
119 ghuddy 1137
 
123 ghuddy 1138
                     <b>Referenced By</b>
1139
                     <hr noshade size="1">
119 ghuddy 1140
 
123 ghuddy 1141
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
1142
                        <tr>
1143
                           <td bgcolor="#999999">
119 ghuddy 1144
 
123 ghuddy 1145
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
1146
                                 <%
1147
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1148
 
123 ghuddy 1149
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferencedBy.sql"), 0 )
119 ghuddy 1150
 
123 ghuddy 1151
                                 OraDatabase.Parameters.Remove "RTAG_ID"
1152
                                 %>
119 ghuddy 1153
 
123 ghuddy 1154
                                 <%If rsEnvQry.RecordCount = 0 Then%>
1155
                                    <tr>
1156
                                       <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1157
                                          Not referenced anywhere.
1158
                                       </td>
1159
                                    </tr>
1160
                                 <%End If%>
119 ghuddy 1161
 
123 ghuddy 1162
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
1163
                                    If rsEnvQry("official") = "Y" Then
1164
                                       IMG_locked = imgLocked
1165
                                    Else
1166
                                       IMG_locked = ""
1167
                                    End If%>
1168
                                    <tr>
1169
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>" disabled></td>
1170
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
1171
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
1172
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
1173
                                       </td>
1174
                                    </tr>
1175
                                    <%rsEnvQry.MoveNext()
1176
                                 WEnd%>
1177
                                 <tr>
1178
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1179
                                       <br><br><br>
1180
                                    </td>
1181
                                 </tr>
1182
                              </table>
1183
                           </td>
1184
                        </tr>
1185
                     </table>
1186
                     <br>
1187
                  </fieldset>
1188
                  <br>
1189
               </td>
1190
            </tr>
1191
         </form>
1192
      </table>
1193
   </DIV>
119 ghuddy 1194
<!-- END OF RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1195
 
1196
<!-- PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
4389 dpurdie 1197
   <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 1198
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
1199
         <tr>
1200
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="25"></td>
1201
            <td width="100%" bgcolor="#999999" valign="bottom">
1202
               <!-- TAB CONTROLS ++++++++++++++++++++++ -->
1203
               <%
1204
               Set objTabControl = New TabControl
1205
               objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleDreamWeaver/dreamweaver_style.html") ) ' Supply tab style definition
1206
               objTabControl.TabStyle = "StyleDreamWeaver"
1207
               If   QStrPar("Dview") = "enable"   Then
1208
                  objTabControl.AddTabDefnition ( arrProductEnv )   '-   Integration/Test/Deploy
1209
               Else
1210
                  objTabControl.AddTabDefnition ( arrEnv )
1211
               End If
1212
               objTabControl.SelectByIndex ( nEnvTab )
1213
               objTabControl.Render ()
1214
               %>
1215
               <!-- END OF TAB CONTROLS +++++++++++++++ -->
1216
            </td>
1217
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="1"></td>
1218
         </tr>
1219
         <tr>
1220
            <td></td>
1221
            <td>
4388 dpurdie 1222
                <%Dim cb_selectall_display, cb_disabled
1223
                  If nEnvTab <> 1 Then cb_selectall_display = " style=display:none"
1224
                  If NOT objAccessControl.UserLogedIn Then cb_disabled = " disabled"%>
1225
                <input id="cb_selectall" type="checkbox" title="Toggle all checkboxes" onclick="toggletick(this);"<%=cb_selectall_display%><%=cb_disabled%> style="position: relative;left: 5px;float: left;">
1226
                <a href="javascript:;" title="Minimise/Restore all populated Views" onclick="toggleAllViews();"><img id="cb_minall" src="images/btn_min.gif" style="float: right;position: relative;left: -4;top: 3;"></a>
1227
                <a href="javascript:;" title="Close Populated Views" onclick="closeAllViews();"><img src="images/btn_remove.gif" style="float: right;position: relative;left: -4;"></a>
4395 dpurdie 1228
                <a href="javascript:;" title="Open and Populate all Views" onclick="openAllViews();"><img src="images/btn_expand.gif" style="float: right;position: relative;left: -4; top:2;"></a>
123 ghuddy 1229
               <%
1230
               Dim tempTimer
1231
               tempTimer = Timer
1232
               %>
1233
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1234
               <%
119 ghuddy 1235
 
123 ghuddy 1236
               '--- Render Environment ---
1237
               If objAccessControl.UserLogedIn AND (parPview <> "disable") Then
1238
                  'Personal View
1239
                  Call Print_View( nEnvTab, "personal", parRtag_id, parPshow, objAccessControl.UserId )
1240
               Else
1241
                  ' Guest view
1242
                  Call Print_View( nEnvTab, "guest", parRtag_id, parBshow, empty )
1243
               End If
1244
               %>
119 ghuddy 1245
 
123 ghuddy 1246
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1247
               <br>
1248
            </td>
1249
            <td></td>
1250
         </tr>
4389 dpurdie 1251
       </table>
1252
   </form>
123 ghuddy 1253
   <!-- <input type="hidden" name="pv_id_list" value=<%=Request("pv_id_list")%>> -->
119 ghuddy 1254
<!--END OF PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1255
 
1256
<%End If%>