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;
255
                RequestViewContent('?envtab=<%=nEnvTab%>&rtag_id=<%=parRtag_id%>&view_id=' + rowId,rowId);
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
391
//
123 ghuddy 392
function RequestViewContent( paramString, rowId ){
393
   var requestURL = 'RequestViewContent.asp';
119 ghuddy 394
 
123 ghuddy 395
   // Change display states
396
   if ( (MM_findObj( 'ENVIMG'+ rowId ).src).indexOf('btn_max.gif') == -1 )
397
   {
398
      // View is currently minimised
4388 dpurdie 399
      UpdateViewHeader(rowId, 1);    
119 ghuddy 400
 
123 ghuddy 401
      // Remove from SHow View List
402
      RemoveFromShowView ( rowId );
403
   }
404
   else
405
   {
406
      // View is currently maximised
4388 dpurdie 407
      UpdateViewHeader(rowId, 0);
408
 
123 ghuddy 409
      // Add it to Show view id
410
      AddToShowView ( rowId );
411
   }
119 ghuddy 412
 
123 ghuddy 413
   // Fix div width for ie so it does not overflow
414
   if (is_ie)
415
   {
416
      MM_findObj( 'ENVDIV'+ rowId ).style.width = '100%';
417
   }
119 ghuddy 418
 
123 ghuddy 419
   // Set ajax divname
420
   ajaxdivname = 'ENVDIV'+ rowId;
119 ghuddy 421
 
123 ghuddy 422
   // Request data from server
423
   if ( (MM_findObj( ajaxdivname ).innerHTML).indexOf('<%=enumLOADING%>') != -1 )
424
   {
425
      //Append the name to search for to the requestURL
426
      var url = requestURL + paramString;
119 ghuddy 427
 
123 ghuddy 428
      //Create the xmlHttp object to use in the request
429
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
430
      // This is non-blocking (asynchronous)
431
      xmlHttp = GetXmlHttpObject(stateChangeHandler);
119 ghuddy 432
 
123 ghuddy 433
      //Send the xmlHttp get to the specified url
434
      xmlHttp_Get(xmlHttp, url);
435
   }
436
}
119 ghuddy 437
 
123 ghuddy 438
function GetXmlHttpObject(handler) {
439
   var objXmlHttp = null;    //Holds the local xmlHTTP object instance
119 ghuddy 440
 
123 ghuddy 441
   //Depending on the browser, try to create the xmlHttp object
442
   if (is_ie){
443
      //The object to create depends on version of IE
444
      //If it isn't ie5, then default to the Msxml2.XMLHTTP object
445
      var strObjName = (is_ie5) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP';
119 ghuddy 446
 
123 ghuddy 447
      //Attempt to create the object
448
      try{
449
         objXmlHttp = new ActiveXObject(strObjName);
450
         objXmlHttp.onreadystatechange = handler;
451
      }
452
      catch(e){
453
      //Object creation errored
454
         alert('IE detected, but object could not be created. Verify that active scripting and activeX controls are enabled');
455
         return;
456
      }
457
   }
458
   else if (is_opera){
459
      //Opera has some issues with xmlHttp object functionality
460
      alert('Opera detected. The page may not behave as expected.');
461
      return;
462
   }
463
   else{
464
      // Mozilla | Netscape | Safari
465
      objXmlHttp = new XMLHttpRequest();
466
      objXmlHttp.onload = handler;
467
      objXmlHttp.onerror = handler;
468
   }
119 ghuddy 469
 
123 ghuddy 470
   //Return the instantiated object
471
   return objXmlHttp;
119 ghuddy 472
}
473
 
123 ghuddy 474
//stateChangeHandler will fire when the state has changed, i.e. data is received back
475
// This is non-blocking (asynchronous)
476
function stateChangeHandler()
477
{
478
   //readyState of 4 or 'complete' represents that data has been returned
479
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete'){
480
      //Gather the results from the callback
481
      var str = xmlHttp.responseText;
119 ghuddy 482
 
123 ghuddy 483
      //Populate the innerHTML of the div with the results
484
      document.getElementById(ajaxdivname).innerHTML = str;
485
   }
4395 dpurdie 486
 
487
   //Cascade view opening
488
   if (openingAllViews) {
489
       openAllViews();
490
   }
123 ghuddy 491
}
119 ghuddy 492
 
123 ghuddy 493
// XMLHttp send GET request
494
function xmlHttp_Get(xmlhttp, url) {
495
   //Getting a permissions error here? Check the url string to
496
   // ensure it is accurate (defined above)
497
   xmlhttp.open('GET', url, true);
498
   xmlhttp.send(null);
499
}
119 ghuddy 500
 
501
 
502
 
503
function RemoveFromShowView ( ViewId )
504
{
123 ghuddy 505
   // Get current cookie settings
506
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
507
   var aShowViews = new Array();
119 ghuddy 508
 
123 ghuddy 509
   if (us)
510
   {
511
      // Cookie is not empty, hence just append new value
512
      var aViews = us.split(',');
119 ghuddy 513
 
123 ghuddy 514
      // Make sure that view is not already on the list
515
      for (i=0; i<aViews.length; i++)
516
      {
517
         if (aViews[i] != ViewId)
518
         {
519
            aShowViews.push(aViews[i]);
520
         }
521
      }
119 ghuddy 522
 
123 ghuddy 523
      // Make a new view list to be stored in cookie
524
      us = aShowViews.join(',');
525
   }
526
   else
527
   {
528
      us = '';
529
   }
119 ghuddy 530
 
123 ghuddy 531
   // Store to cookie
532
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 533
}
534
 
535
function AddToShowView ( ViewId )
536
{
123 ghuddy 537
   // Get current cookie settings
538
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
539
   var aShowViews = new Array();
119 ghuddy 540
 
123 ghuddy 541
   //Release Manager Cookie Available on Show View
542
   if ( us )
543
   {
544
      // Cookie is not empty, hence just append new value
545
      var aViews = us.split(',');
119 ghuddy 546
 
123 ghuddy 547
      // Make sure that view is not already on the list
548
      for (i=0; i<aViews.length; i++)
549
      {
550
         if (aViews[i] != ViewId)
551
         {
552
            aShowViews.push(aViews[i]);
553
         }
554
      }
119 ghuddy 555
 
123 ghuddy 556
      // Make a new view list to be stored in cookie
557
      us = aShowViews.join(',') + ',' + ViewId;
558
   }
559
   else//Release Manager Cookie Not Available on Show View
560
   {
561
      // Cookie is empty, just add this value
562
      us = ViewId;
119 ghuddy 563
 
123 ghuddy 564
   }
119 ghuddy 565
 
123 ghuddy 566
   // Store to cookie
567
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 568
}
569
 
570
 
571
//-->
572
</script>
573
 
574
<%
575
'------------------------------------------------------------------------------------------------------------------------------------------------
576
Function GetEnvTab ( sEnvTab )
123 ghuddy 577
   If sEnvTab <> "" Then
578
      GetEnvTab = sEnvTab
579
      Response.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") = sEnvTab
580
   Else
581
      If Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") <> "" Then
582
         GetEnvTab = Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab")
583
      Else
584
         GetEnvTab = enumENVTAB_WORK_IN_PROGRESS
585
         Response.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") = enumENVTAB_WORK_IN_PROGRESS
586
      End If
587
   End If
119 ghuddy 588
 
589
End Function
590
'------------------------------------------------------------------------------------------------------------------------------------------------
591
Sub Display_Env_BaseView ( NNbase_view_id, SSbase_view, BBviewCollapsed, SScontents )
592
%>
593
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
123 ghuddy 594
   <tr>
595
      <td width="1" align="left" valign="top" bgcolor="#dad7c8"><img src="images/p_ctl.gif" width="3" height="3"></td>
596
      <td width="100%" bgcolor="#dad7c8"><img src="images/spacer.gif" width="1" height="1"></td>
597
      <td width="1" bgcolor="#dad7c8"><img src="images/spacer.gif" width="1" height="1"></td>
598
      <td width="1" align="right" valign="top" bgcolor="#dad7c8"><img src="images/p_ctr.gif" width="3" height="3"></td>
599
   </tr>
600
   <tr>
601
      <td align="left" valign="top" bgcolor="#dad7c8">&nbsp;</td>
602
      <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>
603
      <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>
604
      <td align="right" valign="top" bgcolor="#dad7c8">&nbsp;</td>
605
   </tr>
119 ghuddy 606
</table>
607
<DIV id="ENVDIV<%=NNbase_view_id%>" class="envContent" <%If BBviewCollapsed Then %>style="display:none;"<%Else%>style="display:block;"<%End If%>>
123 ghuddy 608
   <%If NOT BBviewCollapsed Then %>
609
      <%=SScontents%>
610
   <%Else%>
611
      <%=enumLOADING%>
612
   <%End If%>
613
</DIV>
119 ghuddy 614
<br>
615
<%
616
End Sub
617
'------------------------------------------------------------------------------------------------------------------------------------------------
618
Sub Print_View( NNEnvTab, SSviewtype, NNrtag_id, SSshowviews, NNuser_id )
123 ghuddy 619
   Dim rsView, Query_String
620
   'Dim btn1
621
   Dim tmpURL
622
   Dim SSscript
623
   Dim qstrPar
624
   Dim nViewType
625
   Dim nTrueRecordCount
626
   Dim nOperation
627
   Dim relContentsSTR, viewCollapsed, curr_view_id, view_name
119 ghuddy 628
 
123 ghuddy 629
   If scriptName = "find.asp" Then
630
      SSscript = "dependencies.asp"
631
   Else
632
      SSscript = scriptName
633
   End If
119 ghuddy 634
 
123 ghuddy 635
   If SSviewtype = "guest" Then
636
      nViewType = 1
637
      qstrPar = "Bshow"
638
   ElseIf SSviewtype = "personal" Then
639
      nViewType = 2
640
      qstrPar = "Pshow"
641
   End If
119 ghuddy 642
 
123 ghuddy 643
   OraDatabase.Parameters.Add "VIEW_TYPE",           nViewType, ORAPARM_INPUT, ORATYPE_NUMBER
644
   'OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   ShowView( Pipes2Commas( SSshowviews ), SSviewtype ), ORAPARM_INPUT, ORATYPE_VARCHAR2
645
   OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   GetShowViewList(), ORAPARM_INPUT, ORATYPE_VARCHAR2
646
   OraDatabase.Parameters.Add "RTAG_ID",             NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
647
   OraDatabase.Parameters.Add "USER_ID",             NNuser_id, ORAPARM_INPUT, ORATYPE_NUMBER
648
   OraDatabase.Parameters.Add "TRUE_RECORD_COUNT",   NULL, ORAPARM_OUTPUT, ORATYPE_NUMBER
649
   OraDatabase.Parameters.Add "RECORD_SET",          NULL, ORAPARM_OUTPUT, ORATYPE_CURSOR
119 ghuddy 650
 
123 ghuddy 651
   'If it's a Deployment View
652
   If parDview = "enable" Then
653
      ' Decide which environment list is to be displayed to the Integrators/Testers
654
      Select Case CInt( NNEnvTab )
655
         Case enumENVTAB_PRODRELEASE
656
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_PRODRELEASE_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 657
 
123 ghuddy 658
         Case enumENVTAB_INTEGRATE
659
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_INTEGRATION_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 660
 
123 ghuddy 661
         Case enumENVTAB_TEST
662
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_TEST_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 663
 
123 ghuddy 664
         Case enumENVTAB_DEPLOY
665
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_DEPLOY_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 666
 
123 ghuddy 667
         Case enumENVTAB_REJECT
668
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_REJECT_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 669
 
123 ghuddy 670
      End Select
119 ghuddy 671
 
123 ghuddy 672
   Else
673
      ' Decide which environment list is to be displayed
674
      Select Case CInt( NNEnvTab )
675
         Case enumENVTAB_WORK_IN_PROGRESS
676
            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 677
 
123 ghuddy 678
         Case enumENVTAB_PLANNED
679
            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 680
 
123 ghuddy 681
         Case enumENVTAB_RELEASED
682
            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 683
 
123 ghuddy 684
         Case Else
685
            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 686
 
123 ghuddy 687
      End Select
119 ghuddy 688
 
123 ghuddy 689
   End If
119 ghuddy 690
 
123 ghuddy 691
   ' Get Record set from database
692
   Set rsView = OraDatabase.Parameters("RECORD_SET").Value
693
   nTrueRecordCount = OraDatabase.Parameters("TRUE_RECORD_COUNT").Value
119 ghuddy 694
 
123 ghuddy 695
   OraDatabase.Parameters.Remove "RTAG_ID"
696
   OraDatabase.Parameters.Remove "USER_ID"
697
   OraDatabase.Parameters.Remove "VIEW_TYPE"
698
   OraDatabase.Parameters.Remove "VIEW_ID_SHOW_LIST"
699
   OraDatabase.Parameters.Remove "RECORD_SET"
700
   OraDatabase.Parameters.Remove "TRUE_RECORD_COUNT"
119 ghuddy 701
 
123 ghuddy 702
   ' Initialise variables
703
   If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
704
      relContentsSTR = ""
705
      viewCollapsed = FALSE
706
      curr_view_id = rsView("view_id")      ' Set current view
707
      view_name = rsView("view_name")
708
   End If
119 ghuddy 709
 
123 ghuddy 710
   While ((NOT rsView.BOF) AND (NOT rsView.EOF))
711
      '==== Get View Contents ====
712
      If NOT IsNull(rsView.Fields("pv_id")) Then
713
         tmpURL = SSscript &"?pv_id="& rsView.Fields("pv_id") &"&rtag_id="& parRtag_id
714
         IMG_locked = ""
715
         If rsView.Fields("dlocked") = "Y" Then IMG_locked = imgLocked
119 ghuddy 716
 
123 ghuddy 717
         ' DEVI-45275 - Normally, dlocked=Y items are denoted with a padlock icon on the web page. Since we can now merge
718
         ' into the pending tab, the dlocked=Y items that end up there would not give any visual indication to the user
719
         ' as to why they are present. So, instead of the padlock icon, display the added or removed icon to indicate
720
         ' what the intended action is to be, once the pending item is approved.
721
         ' Obviously, this functionality does not apply if we are in the deployment view, and only applies if viewing
722
         ' the PENDING or ALL environment tabs.
723
         ' With regard to the operation value, A = Added, S = Subtracted
724
         nOperation = " "
725
         If parDview <> "enable" AND (CInt( NNEnvTab ) = enumENVTAB_PLANNED OR CInt( NNEnvTab ) = enumENVTAB_ALL) Then
726
            nOperation = rsView.Fields("operation")   ' NB. this field is only availble if earlier query was GET_PENDING_ITEMS or GET_ENVIRONMENT_ITEMS
727
            If nOperation = "A" Then
728
               IMG_locked = imgAdded
729
            ElseIf nOperation = "S" Then
730
               IMG_locked = imgRemoved
731
            End If
732
         End If
119 ghuddy 733
 
123 ghuddy 734
         relContentsSTR = relContentsSTR & "<tr>" & VBNewLine
119 ghuddy 735
 
123 ghuddy 736
         If rsView("pkg_state") = 0 And rsView.Fields("deprecated_state") <> "" Then
737
            relContentsSTR = relContentsSTR & "  <td width='1%'>"& DefineStateIcon ( rsView.Fields("deprecated_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
738
         Else
739
            If (parDview <> "enable") AND ( ( CInt(NNEnvTab) = enumENVTAB_PLANNED ) OR ( Request("envtab") = enumENVTAB_PLANNED ) ) Then
119 ghuddy 740
 
123 ghuddy 741
               ' if package version is unlocked, rejected, or pending approval, or is to be added/subtracted to/from the release (DEVI-45275), then
742
               If (rsView("dlocked") = "N") OR (rsView("dlocked") = "R") OR (rsView("dlocked") = "P") OR (nOperation = "A") OR (nOperation = "S") Then
743
                  checked = NULL
744
                  disabled = NULL
745
                  ' disable check box if not logged in, or if not in open mode and user has no permission to approve pending
746
                  If objAccessControl.UserLogedIn Then
747
                     If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
748
                        If NOT objAccessControl.IsActive("ApproveForAutoBuild") Then
749
                           disabled = "disabled"
750
                        End If
751
                     End If
752
                  Else
753
                     disabled = "disabled"
754
                  End If
119 ghuddy 755
 
123 ghuddy 756
               Else ' always check and disable the checkbox
757
                  checked = "checked"
758
                  disabled = "disabled"
759
               End If
119 ghuddy 760
 
123 ghuddy 761
               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
762
            Else
763
               relContentsSTR = relContentsSTR & " <td width='1%'>"& DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
764
            End If
765
         End If
119 ghuddy 766
 
123 ghuddy 767
         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
768
         relContentsSTR = relContentsSTR & "  <td width='1%' nowrap class='envPkg'>"& rsView.Fields("pkg_version") &"</td>" & VBNewLine
769
         relContentsSTR = relContentsSTR & "  <td width='1%'>"& IMG_locked &"</td>"
770
         relContentsSTR = relContentsSTR & "</tr>" & VBNewLine
771
      Else
772
         'relContentsSTR = relContentsSTR & "<tr><td><label class='form_txt' disabled>...</label></td></tr>"      ' Collapsed view displays dots
119 ghuddy 773
 
123 ghuddy 774
         viewCollapsed = TRUE
775
      End If
119 ghuddy 776
 
123 ghuddy 777
      rsView.MoveNext
119 ghuddy 778
 
123 ghuddy 779
      If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
780
         ' NOT end of the record set
781
         If curr_view_id <> rsView("view_id") Then
782
            '====== Draw buttons =================================
783
            'If InStrPipes( SSshowviews, curr_view_id ) Then
784
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
785
            'Else
786
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
787
            'End If
119 ghuddy 788
 
123 ghuddy 789
            '====== Print contents ===============================
790
            relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
791
            Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 792
 
123 ghuddy 793
            curr_view_id = rsView("view_id")
794
            view_name = rsView("view_name")
795
            relContentsSTR = ""      ' Empty the contents string
796
            viewCollapsed = FALSE
797
         End If
119 ghuddy 798
 
123 ghuddy 799
      Else
800
         ' End of the record set
119 ghuddy 801
 
123 ghuddy 802
         '====== Draw buttons =================================
803
         'If InStrPipes( SSshowviews, curr_view_id ) Then
804
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
805
         'Else
806
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
807
         'End If
119 ghuddy 808
 
123 ghuddy 809
         '====== Print contents ===============================
810
         relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
811
         Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 812
 
123 ghuddy 813
      End If
119 ghuddy 814
 
123 ghuddy 815
   WEnd
119 ghuddy 816
 
123 ghuddy 817
   If relContentsSTR <> "" Then
818
      Response.write "<a href='help/icons_F017.asp' target='_blank' class='body_scol'>Icon Legend...</a><br>"
819
   End If
119 ghuddy 820
 
123 ghuddy 821
   If nTrueRecordCount > 0 Then
822
      If rsView.RecordCount < 1 Then
823
         'If qstrPar = "Bshow" Then
824
         '   'Release is empty. Draw default box for Base view
825
         '   Call DisplayInfo ( "EMPTY_RELEASE_CONTENTS", "100%" )
826
         '
827
         'End If
119 ghuddy 828
 
123 ghuddy 829
         If qstrPar = "Pshow"  Then
830
            'Release is empty. Draw default box for Personal view
831
            Call DisplayInfo ( "PERSONAL_VIEW_NOT_SETUP", "100%" )
832
         End If
119 ghuddy 833
 
123 ghuddy 834
      End If
835
   End If
119 ghuddy 836
 
123 ghuddy 837
   ' Destroy
838
   rsView.Close
839
   Set rsView = nothing
119 ghuddy 840
End Sub
841
'------------------------------------------------------------------------------------------------------------------------------------------------
842
Sub PopulateGetShowViews ( ByRef outShowView )
843
 
123 ghuddy 844
   If Session(SESSION_SHOW_BASE_VIEW) <> "" Then
845
      Set outShowView = Session(SESSION_SHOW_BASE_VIEW)
119 ghuddy 846
 
123 ghuddy 847
   End If
119 ghuddy 848
End Sub
849
'------------------------------------------------------------------------------------------------------------------------------------------------
850
Function GetShowViewList ()
123 ghuddy 851
   'If SSparshow <> "" Then
852
   '   ' get list from query string
853
   '   ShowView = SSparshow
854
   'ElseIf Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype ) <> "" Then
855
   '   ' get list from cookie
856
   '   ShowView = Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype )
857
   'Else
858
   '   ' no list i.e. collapse all views
859
   '   ShowView = -1
860
   'End If
119 ghuddy 861
 
123 ghuddy 862
   'If oShowView.Count = 0 Then
863
   '   GetShowViewList = -1
864
   'Else
865
   '   GetShowViewList = Join( oShowView.Keys, "," )
866
   'End If
119 ghuddy 867
 
123 ghuddy 868
   If Request.Cookies(COOKIE_RELMGR_SHOW_VIEW) = "" Then
869
      GetShowViewList = -1
870
   Else
871
      GetShowViewList = Request.Cookies(COOKIE_RELMGR_SHOW_VIEW)
872
   End If
119 ghuddy 873
 
874
End Function
125 ghuddy 875
 
876
 
877
 
119 ghuddy 878
'------------------------------------------------------------------------------------------------------------------------------------------------
125 ghuddy 879
' 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.
880
' 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
881
' as yet, unknown reason).
882
'
883
Function RefreshedURL(NNdview, NNpview, NNpv_id, NNrtag_id)
884
   Dim url
885
 
886
   url = scriptName & "?Dview=" & NNdview & "&Pview=" & NNpview
887
 
888
   If NNpv_id Then
889
      url = url & "&pv_id=" & NNpv_id
890
   End If
891
 
892
   url = url & "&rtag_id=" & NNrtag_id
893
 
894
   RefreshedURL = url
895
End Function
896
 
897
 
898
'------------------------------------------------------------------------------------------------------------------------------------------------
119 ghuddy 899
%>
900
<%
901
 
902
'------------------------- MAIN LINE ---------------------------
903
%>
904
 
905
<%If parRtag_Id <> "" Then%>
906
<!-- RELEASE ACTION BUTTONS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
907
 
123 ghuddy 908
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
909
      <tr>
910
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="35"></td>
911
         <td width="100%" nowrap background="images/bg_action_norm.gif" >
912
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
913
               <tr>
914
                  <%
915
                  Dim rsTest
916
                  Set rsTest = OraDataBase.DbCreateDynaset( "SELECT PROJ_ID   FROM RELEASE_TAGS WHERE RTAG_ID ="&parRtag_id , ORADYN_DEFAULT )
119 ghuddy 917
 
123 ghuddy 918
                  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
919
                     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>"
920
                  Else
921
                     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>"
922
                  End If
119 ghuddy 923
 
123 ghuddy 924
                  If (pkgInfoHash.Item("dlocked") <> "Y") AND (objAccessControl.UserLogedIn) AND (Request("pv_id") <> "") Then
925
                     If ( (objAccessControl.UserName = pkgInfoHash.Item("creator")) OR (objAccessControl.IsActive("DestroyPackageFromRelease")) ) Then
926
                        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>"
927
                     End If
928
                  End If
119 ghuddy 929
 
123 ghuddy 930
                  If objAccessControl.IsActive("CreateNewRelease") Then
931
                     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>"
932
                  End If
119 ghuddy 933
 
123 ghuddy 934
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
935
                  If objAccessControl.UserLogedIn Then
936
                     If QStrPar("Pview") = "disable" Then
125 ghuddy 937
                        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 938
                     Else
125 ghuddy 939
                        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 940
                     End If
941
                  Else
942
                     Response.write "<td width='1'><img src='images/abtn_personal_view_off.gif' width='26' height='26' hspace='1' border='0'></td>"
943
                  End If
119 ghuddy 944
 
123 ghuddy 945
                  If QStrPar("Dview") = "enable" Then
125 ghuddy 946
                     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 947
                  Else
125 ghuddy 948
                     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 949
                  End If
119 ghuddy 950
 
123 ghuddy 951
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 952
 
123 ghuddy 953
                  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 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='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 958
 
123 ghuddy 959
                  If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
960
                     If objAccessControl.UserLogedIn Then
961
                        If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
962
                           If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
963
                              Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
964
                           End If
965
                        Else
966
                           Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
967
                        End If
968
                     End If
969
                  End If
4358 dpurdie 970
                  Response.write "<td width='1'><img src='images/spacer.gif' width='1' height='25'></td>"
971
                  If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
972
                     If objAccessControl.UserLogedIn Then
973
                        If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
974
                           If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
975
                              Response.write "<td width='1'><a href='#' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></td>"
976
                           End If
977
                        Else
978
                           Response.write "<td width='1'><a href='#' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></td>"
979
                        End If
980
                     End If
981
                  End If
123 ghuddy 982
                  rsTest.Close()
983
                  Set rsTest = nothing
984
                  %>
985
                  <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
986
               </tr>
987
            </table>
988
         </td>
989
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="8"></td>
990
      </tr>
991
   </table>
119 ghuddy 992
 
993
<!-- ADVANCED SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 994
   <DIV name="DIV_ADVANCED_SEARCH" id="DIV_ADVANCED_SEARCH" style="display:none;">
995
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
996
         <form name="advancedsearch" method="get" action="find.asp">
997
            <tr>
998
               <td nowrap  class="form_txt" valign="middle">
999
                  <%
1000
                  Dim FindPackageCheck, FindFileCheck
119 ghuddy 1001
 
123 ghuddy 1002
                  FindPackageCheck = ""
1003
                  FindFileCheck = ""
119 ghuddy 1004
 
123 ghuddy 1005
                  If Request("searchtype") = "2" Then
1006
                     FindFileCheck = "checked"
1007
                  Else
1008
                     FindPackageCheck = "checked"
1009
                  End If
119 ghuddy 1010
 
123 ghuddy 1011
                  %>
1012
                  <fieldset>
1013
                     <legend class="body_colb"><img src="images/i_mglass.gif" width="17" height="17" border="0" align="absmiddle">&nbsp;Advanced Search</legend>
1014
                     <input name="searchtype" id="searchtype1" type="radio" value="1" <%=FindPackageCheck%>>
1015
                     <a href="javascript:;" onClick="MM_findObj('searchtype1').checked=true;" class="body_txt">Find a Package</a><br>
1016
                     <input name="searchtype" id="searchtype2" type="radio" value="2" <%=FindFileCheck%>>
1017
                     <a href="javascript:;" onClick="MM_findObj('searchtype2').checked=true;" class="body_txt">Find a File</a><br><br>
1018
                     <%If CInt(nEnvTab) = enumENVTAB_WORK_IN_PROGRESS Then%>
1019
                        Find in Work In Progress<br>
1020
                     <%ElseIf CInt(nEnvTab) = enumENVTAB_PLANNED Then%>
1021
                        Find in Pending<br>
1022
                     <%ElseIf  CInt(nEnvTab) = enumENVTAB_RELEASED Then%>
1023
                        Find in Released<br>
1024
                     <%End If%>
1025
                     <input type="text" name="keyword" size="25" class="form_ivaluew" value="<%=Request("keyword")%>">
1026
                     <input type="submit" name="btn" value="Find" class="form_ivalue">
119 ghuddy 1027
 
123 ghuddy 1028
                     <input type="hidden" name="envtab" value="<%=nEnvTab%>">
1029
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
1030
                  </fieldset>
1031
                  <br>
1032
               </td>
1033
            </tr>
1034
         </form>
1035
      </table>
1036
   </DIV>
119 ghuddy 1037
 
123 ghuddy 1038
   <script language="JavaScript" type="text/javascript">
1039
      <!--
1040
      function ToggleAdvancedSearch( )
1041
      {
1042
         if ( MM_findObj("DIV_ADVANCED_SEARCH").style.display == 'none')
1043
         {
1044
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'block';
1045
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'none';
1046
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'block';
1047
         }
1048
         else
1049
         {
1050
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'none';
1051
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'block';
1052
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'none';
1053
         }
119 ghuddy 1054
 
123 ghuddy 1055
         document.cookie = 'RELMGR_DIV_ADVANCED_SEARCH' + '=' + MM_findObj("DIV_ADVANCED_SEARCH").style.display;
1056
      }
119 ghuddy 1057
 
123 ghuddy 1058
      // Run this on page render for default setting
1059
      if (GetCookie('RELMGR_DIV_ADVANCED_SEARCH') == 'block')
1060
      {
1061
         ToggleAdvancedSearch();
1062
      }
119 ghuddy 1063
 
123 ghuddy 1064
   //-->
1065
   </script>
119 ghuddy 1066
 
1067
<!-- RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 1068
   <DIV name="DIV_RELEASE_REFERENCES" id="DIV_RELEASE_REFERENCES" style="display:none;">
1069
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
1070
         <form name="relref" method="get" action="_remove_release_reference.asp" onSubmit="ToggleDisplay('RelRefProgressBar');">
1071
            <tr>
1072
               <td width="100%" nowrap class="form_txt">
1073
                  <fieldset>
1074
                     <legend class="body_colb"><img src="images/i_releaseref.gif" border="0" align="absmiddle">&nbsp;Release References</legend>
1075
                     <DIV id="RelRefProgressBar" name="RelRefProgressBar" style="display:none;" class="class="body_scol"">
1076
                        <img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...
1077
                     </DIV>
1078
                     <b>References</b>
1079
                     <hr noshade size="1">
1080
                     <%If (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE) Then%>
1081
                        <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')">
1082
                        &nbsp;<input <%=objAccessControl.IsComponentDisabled("RemoveReleaseReference")%> type="submit" name="btn" value="Remove" class="form_ivalue"><br><br>
1083
                     <%End If%>
119 ghuddy 1084
 
123 ghuddy 1085
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
119 ghuddy 1086
 
123 ghuddy 1087
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
1088
                        <tr>
1089
                           <td bgcolor="#999999">
119 ghuddy 1090
 
123 ghuddy 1091
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
1092
                                 <%
1093
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1094
 
123 ghuddy 1095
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferences.sql"), 0 )
119 ghuddy 1096
 
123 ghuddy 1097
                                 OraDatabase.Parameters.Remove "RTAG_ID"
1098
                                 %>
119 ghuddy 1099
 
123 ghuddy 1100
                                 <%If rsEnvQry.RecordCount = 0 Then%>
1101
                                 <tr>
1102
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1103
                                       No references used.
1104
                                    </td>
1105
                                 </tr>
1106
                                 <%End If%>
119 ghuddy 1107
 
123 ghuddy 1108
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
1109
                                    If rsEnvQry("official") = "Y" Then
1110
                                       IMG_locked = imgLocked
1111
                                    Else
1112
                                       IMG_locked = ""
1113
                                    End If%>
1114
                                    <tr>
1115
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>"></td>
1116
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
1117
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
1118
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
1119
                                       </td>
1120
                                    </tr>
1121
                                    <%rsEnvQry.MoveNext()
1122
                                 WEnd%>
1123
                                 <tr>
1124
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1125
                                       <br><br><br>
1126
                                    </td>
1127
                                 </tr>
1128
                              </table>
1129
                           </td>
1130
                        </tr>
1131
                     </table>
1132
                     <br><br>
119 ghuddy 1133
 
123 ghuddy 1134
                     <b>Referenced By</b>
1135
                     <hr noshade size="1">
119 ghuddy 1136
 
123 ghuddy 1137
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
1138
                        <tr>
1139
                           <td bgcolor="#999999">
119 ghuddy 1140
 
123 ghuddy 1141
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
1142
                                 <%
1143
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1144
 
123 ghuddy 1145
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferencedBy.sql"), 0 )
119 ghuddy 1146
 
123 ghuddy 1147
                                 OraDatabase.Parameters.Remove "RTAG_ID"
1148
                                 %>
119 ghuddy 1149
 
123 ghuddy 1150
                                 <%If rsEnvQry.RecordCount = 0 Then%>
1151
                                    <tr>
1152
                                       <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1153
                                          Not referenced anywhere.
1154
                                       </td>
1155
                                    </tr>
1156
                                 <%End If%>
119 ghuddy 1157
 
123 ghuddy 1158
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
1159
                                    If rsEnvQry("official") = "Y" Then
1160
                                       IMG_locked = imgLocked
1161
                                    Else
1162
                                       IMG_locked = ""
1163
                                    End If%>
1164
                                    <tr>
1165
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>" disabled></td>
1166
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
1167
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
1168
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
1169
                                       </td>
1170
                                    </tr>
1171
                                    <%rsEnvQry.MoveNext()
1172
                                 WEnd%>
1173
                                 <tr>
1174
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1175
                                       <br><br><br>
1176
                                    </td>
1177
                                 </tr>
1178
                              </table>
1179
                           </td>
1180
                        </tr>
1181
                     </table>
1182
                     <br>
1183
                  </fieldset>
1184
                  <br>
1185
               </td>
1186
            </tr>
1187
         </form>
1188
      </table>
1189
   </DIV>
119 ghuddy 1190
<!-- END OF RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1191
 
1192
<!-- PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
4389 dpurdie 1193
   <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 1194
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
1195
         <tr>
1196
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="25"></td>
1197
            <td width="100%" bgcolor="#999999" valign="bottom">
1198
               <!-- TAB CONTROLS ++++++++++++++++++++++ -->
1199
               <%
1200
               Set objTabControl = New TabControl
1201
               objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleDreamWeaver/dreamweaver_style.html") ) ' Supply tab style definition
1202
               objTabControl.TabStyle = "StyleDreamWeaver"
1203
               If   QStrPar("Dview") = "enable"   Then
1204
                  objTabControl.AddTabDefnition ( arrProductEnv )   '-   Integration/Test/Deploy
1205
               Else
1206
                  objTabControl.AddTabDefnition ( arrEnv )
1207
               End If
1208
               objTabControl.SelectByIndex ( nEnvTab )
1209
               objTabControl.Render ()
1210
               %>
1211
               <!-- END OF TAB CONTROLS +++++++++++++++ -->
1212
            </td>
1213
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="1"></td>
1214
         </tr>
1215
         <tr>
1216
            <td></td>
1217
            <td>
4388 dpurdie 1218
                <%Dim cb_selectall_display, cb_disabled
1219
                  If nEnvTab <> 1 Then cb_selectall_display = " style=display:none"
1220
                  If NOT objAccessControl.UserLogedIn Then cb_disabled = " disabled"%>
1221
                <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;">
1222
                <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>
1223
                <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 1224
                <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 1225
               <%
1226
               Dim tempTimer
1227
               tempTimer = Timer
1228
               %>
1229
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1230
               <%
119 ghuddy 1231
 
123 ghuddy 1232
               '--- Render Environment ---
1233
               If objAccessControl.UserLogedIn AND (parPview <> "disable") Then
1234
                  'Personal View
1235
                  Call Print_View( nEnvTab, "personal", parRtag_id, parPshow, objAccessControl.UserId )
1236
               Else
1237
                  ' Guest view
1238
                  Call Print_View( nEnvTab, "guest", parRtag_id, parBshow, empty )
1239
               End If
1240
               %>
119 ghuddy 1241
 
123 ghuddy 1242
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1243
               <br>
1244
            </td>
1245
            <td></td>
1246
         </tr>
4389 dpurdie 1247
       </table>
1248
   </form>
123 ghuddy 1249
   <!-- <input type="hidden" name="pv_id_list" value=<%=Request("pv_id_list")%>> -->
119 ghuddy 1250
<!--END OF PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1251
 
1252
<%End If%>