Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
157 ghuddy 5
'|                        RTREE                      |
119 ghuddy 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
157 ghuddy 12
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/_rtree_common.asp"-->
20
<%
21
' Make sure rtag_id is always present
22
If Request("proj_id") = "" Then
157 ghuddy 23
   Response.Redirect("index.asp")
119 ghuddy 24
End If
25
'------------ ACCESS CONTROL ------------------
26
%>
27
<!--#include file="_access_control_general.asp"-->
28
<%
29
'------------ Variable Definition -------------
30
Dim objSortHelper
31
Dim ViewType
157 ghuddy 32
Dim rsQryStr
119 ghuddy 33
Dim rsQry
34
Dim parProjId
157 ghuddy 35
Dim parShowFilter
119 ghuddy 36
Dim nProjTreeVersion
37
Dim objBtnControl
38
Dim currLevel, lastLevel, lastRow, aVersions, i
157 ghuddy 39
Dim dListFilter
40
 
119 ghuddy 41
'------------ Constants Declaration -----------
42
'Const LIMG_TREE_I_HALF = "<img src='images/spacer.gif' width='5' height='1'><img src='icons/tree_i_half.gif' align='absmiddle'>"
43
'Const LIMG_TREE_I_FULL = "<img src='images/spacer.gif' width='5' height='1'><img src='icons/tree_i.gif' align='absmiddle'>"
44
'Const LIMG_TREE_T = "<img src='images/spacer.gif' width='5' height='1'><img src='icons/tree_t.gif' align='absmiddle'>"
45
Const LIMG_TREE_I_HALF = "<img src='images/spacer.gif' width='20' height='1'>"
46
Const LIMG_TREE_I_FULL = "<img src='images/dot1.gif' width='30' height='15'>"
157 ghuddy 47
Const LIMG_TREE_T      = "<img src='images/dot1.gif' width='30' height='15'>"
48
Const LIMG_LIST_VIEW   = "<img src='images/abtn_list_view.gif' border='0' align=absmiddle' name='imgviewtype' usemap='#mapviewtype' id='imgviewtype'>"
49
Const LIMG_TREE_VIEW   = "<img src='images/abtn_tree_view.gif' border='0' align=absmiddle' name='imgviewtype' usemap='#mapviewtype' id='imgviewtype'>"
119 ghuddy 50
Const LCONST_LIST_VIEW = 1
51
Const LCONST_TREE_VIEW = 2
157 ghuddy 52
Const DEFAULT_SHOW_FILTER = "'N','R','C'"
53
Const LIMG_FILTER_ON  = "<img src='images/i_data_table.gif' border='0' align='absmiddle' hspace='0' title='Filter in use.'>"
54
Const LIMG_FILTER_OFF = "<img src='images/i_data_table_off.gif' border='0' align='absmiddle' hspace='0' title='Filter not in use.'>"
55
Const LIMG_DROP_DOWN_ARROW = "<img src='images/i_drop_down_arrow.gif' width='5' height='15' hspace='1' border='0' align='absmiddle'>"
56
 
119 ghuddy 57
'------------ Variable Init -------------------
58
parProjId = Request("proj_id")
157 ghuddy 59
 
60
' Get show_filter from query string or failing that, from the cookie.
61
' Make sure that if neither supplies it, use the default
62
parShowFilter = Request("show_filter")
63
If NOT IsNull(parShowFilter) AND parShowFilter <> "" Then
64
   Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") = parShowFilter
65
Else
66
   parShowFilter = Request.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter")
67
   If IsNull(parShowFilter) OR parShowFilter = "" Then
68
      parShowFilter = DEFAULT_SHOW_FILTER
69
      Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") = parShowFilter
70
   End If
71
End If
72
 
73
Set dListFilter = CreateObject("Scripting.Dictionary")
74
 
119 ghuddy 75
nProjTreeVersion = GetProjTreeVersion( parProjId )
76
Set objBtnControl = New ActionButtonControl
77
objPMod.PersistInQryString("proj_id")
78
'----------------------------------------------
79
%>
80
<%
157 ghuddy 81
'--------------------------------------------------------------------------------------------------------------------------
82
' Determines icon that precedes the drop down arrow in the filter box
83
Function GetIsListFilterInUseIcon()
84
   GetIsListFilterInUseIcon = LIMG_FILTER_ON & LIMG_DROP_DOWN_ARROW
85
 
86
   If dListFilter.Count > 0 Then
87
      GetIsListFilterInUseIcon = LIMG_FILTER_OFF & LIMG_DROP_DOWN_ARROW
88
   End If
89
End Function
90
'--------------------------------------------------------------------------------------------------------------------------
91
' Determines if the specified filter is on/off and returns a string to use to check the associated checkbox accordingly
92
Function GetIsListFilterChecked( nFilterId )
93
   GetIsListFilterChecked = ""
94
   If dListFilter.Exists ( "'" & CStr(nFilterId) & "'"  ) Then
95
      GetIsListFilterChecked = "checked"
96
   End If
97
End Function
98
'--------------------------------------------------------------------------------------------------------------------------
99
' Reads the cookie for the filter and creats a dictionary element for each item therein. the dictionary
100
' is used by the GetIsListFilterChecked function to determine checkbox state in the filter options
101
Sub GetListFilterValues ( outDepFilter )
102
   Dim FilterVal, aFilterValues
103
 
104
   If Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") <> "" Then
105
      aFilterValues = Split( Replace( Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("show_filter"), " ", ""), ",")
106
 
107
      For Each FilterVal In aFilterValues
108
         outDepFilter.Item (CStr( FilterVal )) = ""
109
      Next
110
   End If
111
End Sub
112
 
119 ghuddy 113
'----------------------------------------------------------------------------------------------------------------------------------------------
114
Function GetProjTreeVersion ( nProjId )
157 ghuddy 115
   Dim rsTemp, QueryString
116
 
117
   QueryString = _
118
   " SELECT rt.RTAG_VERSION "&_
119
   "   FROM RELEASE_TAGS rt "&_
120
   "  WHERE rt.PROJ_ID = :PROJ_ID "&_
121
   "    AND rt.RTAG_ID = rt.PARENT_RTAG_ID"
122
 
123
   OraDatabase.Parameters.Add "PROJ_ID",  nProjId,    ORAPARM_INPUT, ORATYPE_NUMBER
124
 
125
   Set rsTemp = OraDatabase.DbCreateDynaset( QueryString, cint(0))
126
 
127
   OraDatabase.Parameters.Remove "PROJ_ID"
128
 
129
 
130
 
131
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
132
      GetProjTreeVersion = rsTemp("rtag_version")
133
   Else
134
      GetProjTreeVersion = NULL
135
   End If
136
 
137
   rsTemp.Close
138
   Set rsTemp = nothing
119 ghuddy 139
End Function
140
'----------------------------------------------------------------------------------------------------------------------------------------------
141
Sub RenderRowConnectors ( nLastLevel, nCurrLevel )
157 ghuddy 142
   Dim i, LastLine
143
 
144
   '-- Initial Draw --
145
   If nLastLevel = 0 Then
146
      nLastLevel = nCurrLevel
147
      Exit Sub
148
   End If
149
 
150
   '-- Calculate number of half lines rendered
151
   If nLastLevel < nCurrLevel Then
152
      LastLine = nLastLevel
153
   Else
154
      LastLine = nCurrLevel
155
   End If
156
 
157
 
158
   '-- Render half lines
159
   For i = 1 To LastLine
160
      Response.write LIMG_TREE_I_HALF
161
   Next
162
 
119 ghuddy 163
End Sub
164
'----------------------------------------------------------------------------------------------------------------------------------------------
165
Sub RenderIndent ( nLastLevel, nCurrLevel )
157 ghuddy 166
   Dim i
167
 
168
   If nCurrLevel <= 1 Then Exit Sub
169
 
170
 
171
   '-- Render half lines
172
   If nCurrLevel > 2 Then
173
      For i = 1 To nCurrLevel - 2
174
         Response.write LIMG_TREE_I_FULL
175
      Next
176
   End If
177
 
178
 
179
   '-- Render branch or line
180
   If nLastLevel < nCurrLevel Then
181
      Response.write LIMG_TREE_T
182
   Else
183
      Response.write LIMG_TREE_I_FULL
184
   End If
185
 
186
 
187
 
188
 
119 ghuddy 189
End Sub
190
'----------------------------------------------------------------------------------------------------------------------------------------------
191
Function GetLevel ( sRtagVersion )
157 ghuddy 192
   Dim tempArr
193
 
194
   If InStr( sRtagVersion, "." ) > 0 Then
195
      '-- Dot separator found --
196
 
197
      '-- Split version --
198
      tempArr = Split( sRtagVersion, "." )
199
 
200
      GetLevel = UBound( tempArr ) + 1
201
 
202
   Else
203
      GetLevel = 1
204
 
205
   End If
206
 
119 ghuddy 207
End Function
208
'----------------------------------------------------------------------------------------------------------------------------------------------
209
Sub NewRelease ()
157 ghuddy 210
   On Error Resume Next
211
 
212
   objEH.Try
213
      If NOT IsNumeric(Request("rtag_id_list")) Then
214
         Err.Raise 8, "Please select one release only.", "No further details available."
215
 
216
      Else
217
         Call OpenInWindow ( "new_release.asp?rtag_id_list="& Replace( Request("rtag_id_list"), " ","" ) &"&"& objPMod.ComposeURL() )
218
 
219
      End If
220
 
221
   objEH.Catch
222
 
119 ghuddy 223
End Sub
224
'----------------------------------------------------------------------------------------------------------------------------------------------
225
Sub DestroyRelease ()
157 ghuddy 226
   On Error Resume Next
227
 
228
   objEH.Try
229
      If NOT IsNumeric(Request("rtag_id_list")) Then
230
         Err.Raise 8, "Please select one release only.", "No further details available."
231
 
232
      Else
233
         If Request("rtag_id_list") = "" Then
234
            Err.Raise 8, "Please select one release.", "No further details available."
235
         Else
236
            Call OpenInWindow ( "_destroy_release.asp?rtag_id_list="& Replace( Request("rtag_id_list"), " ","" ) &"&"& objPMod.ComposeURL() )
237
         End If
238
 
239
      End If
240
 
241
   objEH.Catch
242
 
119 ghuddy 243
End Sub
244
'----------------------------------------------------------------------------------------------------------------------------------------------
245
Sub EditRelease ()
157 ghuddy 246
   On Error Resume Next
247
 
248
   objEH.Try
249
      If NOT IsNumeric(Request("rtag_id_list")) Then
250
         Err.Raise 8, "Please select one release only.", "No further details available."
251
 
252
      Else
253
         If Request("rtag_id_list") = "" Then
254
            Err.Raise 8, "Please select one release.", "No further details available."
255
         Else
256
            Call OpenInWindow ( "form_edit_release.asp?rtag_id_list="& Replace( Request("rtag_id_list"), " ","" ) &"&"& objPMod.ComposeURL() )
257
         End If
258
 
259
      End If
260
 
261
   objEH.Catch
262
 
119 ghuddy 263
End Sub
264
'----------------------------------------------------------------------------------------------------------------------------------------------
265
Sub MoveRelease ()
157 ghuddy 266
   On Error Resume Next
267
 
268
   objEH.Try
269
      If NOT IsNumeric(Request("rtag_id_list")) Then
270
         Err.Raise 8, "Please select one release only.", "No further details available."
271
 
272
      Else
273
         If Request("rtag_id_list") = "" Then
274
            Err.Raise 8, "Please select one release.", "No further details available."
275
         Else
276
            Call OpenInWindow ( "form_move_release.asp?rtag_id_list="& Replace( Request("rtag_id_list"), " ","" ) &"&"& objPMod.ComposeURL() )
277
         End If
278
 
279
      End If
280
 
281
   objEH.Catch
282
 
119 ghuddy 283
End Sub
284
'----------------------------------------------------------------------------------------------------------------------------------------------
285
Sub MergeManager ()
157 ghuddy 286
   Dim aReleases
287
   On Error Resume Next
288
 
289
   objEH.Try
290
 
291
      If Request("rtag_id_list") <> "" Then
292
         aReleases = Split ( Replace( Request("rtag_id_list"), " ", ""), "," )
293
 
294
         If UBound(aReleases) = 0 Then
295
            ' Open Merge Manager
296
            Call OpenInWindow ( "diff.asp?rtagA="& aReleases(0)  )
297
 
298
 
299
         ElseIf UBound(aReleases) = 1 Then
300
            ' Open Merge Manager
301
            Call OpenInWindow ( "diff.asp?rtagA="& aReleases(0) &"&rtagB="& aReleases(1) )
302
 
303
 
304
         Else
305
            Err.Raise 8, "Please select maximum two release.", "No further details available."
306
 
307
         End If
308
 
309
      Else
310
         ' Open Merge Manager without parameters
311
         Call OpenInWindow ( "diff.asp" )
312
 
313
      End If
314
 
315
   objEH.Catch
316
 
119 ghuddy 317
End Sub
318
'----------------------------------------------------------------------------------------------------------------------------------------------
319
Function GetViewType ()
157 ghuddy 320
   Dim CookieViewType
321
 
322
   CookieViewType = Request.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("RELEASE_VIEW")
323
 
324
   If CookieViewType <> "" Then
325
      ' Get current view type from cookie
326
      GetViewType = CInt(CookieViewType)
327
   Else
328
      ' Set current view to list view
329
      Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("RELEASE_VIEW") = LCONST_LIST_VIEW
330
      GetViewType = LCONST_LIST_VIEW
331
   End If
332
 
119 ghuddy 333
End Function
334
'----------------------------------------------------------------------------------------------------------------------------------------------
335
Sub SetViewType ()
157 ghuddy 336
   If Request("viewtype") = "" Then Exit Sub    ' Nothing to do
337
 
338
   Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("RELEASE_VIEW") = Request("viewtype")
119 ghuddy 339
End Sub
340
'----------------------------------------------------------------------------------------------------------------------------------------------
341
%>
342
<%
343
'------------ RUN BEFORE PAGE RENDER ----------
344
If (Request("action") <> "") Then
121 hknight 345
 
157 ghuddy 346
   If Request("btn") = "Show" Then
347
      ' Store filter in cookie
348
      Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") = Request("listFilter")
349
      parShowFilter = Request("listFilter")
350
   Else
351
      '-- Select Action
352
      Select Case Request("action")
353
      Case "btnNewRelease"
354
         Call NewRelease()
121 hknight 355
 
157 ghuddy 356
      Case "btnDestroyRelease"
357
         Call DestroyRelease()
121 hknight 358
 
157 ghuddy 359
      Case "btnEditRelease"
360
         Call EditRelease()
121 hknight 361
 
157 ghuddy 362
      Case "btnMoveRelease"
363
         Call MoveRelease()
364
 
365
      Case "btnMergeManager"
366
         Call MergeManager()
367
 
368
      Case "btnAdminView"
369
         Dim Query_String
370
         Query_String = _
371
         "   SELECT DISTINCT vi.view_id, vi.view_name"&_
372
         "   FROM VIEWS vi"&_
373
         "   WHERE vi.view_name = 'PROJECT WIDE'"
374
         Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
375
 
376
         Dim viewRecordCount
377
         Dim id
378
         viewRecordCount=0
379
         viewRecordCount = rsQry.RecordCount
380
 
381
         While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
382
            id=rsQry.Fields("view_id")
383
            rsQry.MoveNext
384
         WEnd
385
 
386
          rsQry.Close()
387
         Set rsQry = nothing
388
 
389
         If viewRecordCount = 0 Then
390
            OraDatabase.Parameters.Add "PROJ_ID", parProjId,    ORAPARM_INPUT, ORATYPE_NUMBER
391
            Query_String = _
392
            " SELECT DISTINCT vi.view_id, vi.view_name"&_
393
            " FROM VIEWS vi, RELEASE_CONTENT rc, RELEASE_TAGS rt"&_
394
            " WHERE rc.BASE_VIEW_ID = vi.VIEW_ID AND rt.proj_id = "& parProjId &"AND rc.rtag_id = rt.rtag_id"&_
395
            " ORDER BY ( vi.view_name )"
396
 
397
            Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
398
 
399
            OraDatabase.Parameters.Remove "PROJ_ID"
400
            viewRecordCount = rsQry.RecordCount
401
 
402
            While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
403
               id=rsQry.Fields("view_id")
404
               rsQry.MoveNext
405
            WEnd
406
 
407
            rsQry.Close()
408
            Set rsQry = nothing
409
         End If
410
         If viewRecordCount = 0 Then
411
            Call OpenInWindow ( "form_edit_project_view.asp?proj_id="&Request("proj_id"))
412
         Else
413
            Call OpenInWindow ( "form_edit_project_view.asp?proj_id="&Request("proj_id")&"&FRview_id="&id)
414
         End If
415
      End Select
416
   End If
417
 
119 ghuddy 418
End If
419
 
420
' Set view type if required
421
Call SetViewType ()
422
 
423
' Get current view type
424
ViewType = GetViewType()
157 ghuddy 425
 
426
 
119 ghuddy 427
'----------------------------------------------
428
%>
429
 
430
<html>
431
<head>
432
<%
157 ghuddy 433
   Set rsQry = OraDatabase.DbCreateDynaset( "SELECT PROJ_NAME FROM PROJECTS WHERE PROJ_ID="& Request("proj_id"), ORADYN_DEFAULT )
119 ghuddy 434
%>
435
<title><%=rsQry("proj_name")%></title>
436
<%
157 ghuddy 437
   rsQry.Close
438
   Set rsQry = Nothing
119 ghuddy 439
%>
440
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
441
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
442
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
443
<link rel="stylesheet" href="images/navigation.css" type="text/css">
444
<script language="JavaScript" src="images/common.js"></script>
445
 
446
<!-- DROPDOWN MENUS -->
447
<!--#include file="_menu_def.asp"-->
448
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
449
 
450
</head>
451
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
452
<!-- MENU LAYERS -------------------------------------->
157 ghuddy 453
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 454
</div>
455
<!-- TIPS LAYERS -------------------------------------->
456
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
457
<!----------------------------------------------------->
458
<!-- HEADER -->
459
<!--#include file="_header.asp"-->
460
<!-- BODY ---->
461
 
462
<table width="100%" border="0" cellspacing="0" cellpadding="0">
157 ghuddy 463
   <tr>
464
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
465
      <td rowspan="2" valign="top" width="100%">
119 ghuddy 466
 
157 ghuddy 467
         <!-- ACTION BUTTONS ---------------------------------------------->
468
         <table width="100%"  border="0" cellspacing="0" cellpadding="7">
469
            <tr>
470
               <td width="1" bgcolor="#DAD7C8">
471
                  <%
472
                  If ViewType = LCONST_TREE_VIEW Then
473
                     Response.write LIMG_TREE_VIEW
474
                  Else
475
                     Response.write LIMG_LIST_VIEW
476
                  End If
477
                  %>
478
               </td>
479
               <td width="100%" bgcolor="#DAD7C8">
480
                  <%
481
                  Dim aBtnsDef
482
                  ' Define action buttons
483
                  aBtnsDef = Array("btnNewRelease", "btnEditRelease", "btnMoveRelease", "width=20", "btnDestroyRelease", "width=20", "btnMergeManager", "width=20", "btnAdminView")
119 ghuddy 484
 
157 ghuddy 485
                  ' Load action buttons from database
486
                  Call objBtnControl.LoadActionButtons ( aBtnsDef, OraDatabase )
119 ghuddy 487
 
157 ghuddy 488
                  ' Set spacing to minimum between buttons
489
                  objBtnControl.ButtonSpacer = 0
490
                  objBtnControl.ImageHspace = 2
119 ghuddy 491
 
157 ghuddy 492
                  ' Access Control
493
                  If NOT objAccessControl.IsActive("CreateNewRelease") Then Call objBtnControl.Active ( "btnNewRelease", "N" )
494
                  If NOT objAccessControl.IsActive("DestroyRelease") Then Call objBtnControl.Active ( "btnDestroyRelease", "N" )
495
                  If NOT objAccessControl.IsActive("CreateNewRelease") Then Call objBtnControl.Active ( "btnMoveRelease", "N" )
119 ghuddy 496
 
157 ghuddy 497
                  ' -- Render Buttons
498
                  Call objBtnControl.Render  ( aBtnsDef, objAccessControl )
499
                  %>
500
               </td>
501
            </tr>
502
         </table>
503
         <!-- ACTION BUTTONS END  ------------------------------------------>
119 ghuddy 504
 
157 ghuddy 505
         <table width="100%"  border="0" cellspacing="10" cellpadding="0">
506
            <form name="FormName" method="post" action="<%=ScriptName%>">
507
               <tr>
508
                  <td>
119 ghuddy 509
 
157 ghuddy 510
                     <!-- TREE VIEW ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
511
                     <%If ViewType = LCONST_TREE_VIEW Then%>
119 ghuddy 512
 
157 ghuddy 513
                        <table width="100%"  border="0" cellspacing="1" cellpadding="1">
514
                           <tr>
515
                              <td width="40%" bgcolor="#E4E9EC" class="body_txt">Release Name </td>
119 ghuddy 516
 
157 ghuddy 517
                              <%If parProjId <> 2 Then %>
518
                                 <td width="15%" bgcolor="#E4E9EC" class="body_txt">Associated MASS_REF </td>
519
                                 <td width="45%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
520
                              <%Else%>
521
                                 <td width="30%" bgcolor="#E4E9EC" class="body_txt">Used By </td>
522
                                 <td width="30%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
523
                              <%End If%>
524
                           </tr>
525
                           <%
526
                           'OraDatabase.Parameters.Add "TREE_VERSION",  nProjTreeVersion,    ORAPARM_INPUT, ORATYPE_NUMBER
527
                           OraDatabase.Parameters.Add "PROJ_ID",  parProjId,  ORAPARM_INPUT, ORATYPE_NUMBER
528
 
529
                           Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ReleaseVersionTree.sql") , ORADYN_DEFAULT )
530
                           lastLevel = 0
531
 
532
                           'OraDatabase.Parameters.Remove "TREE_VERSION"
533
                           OraDatabase.Parameters.Remove "PROJ_ID"
534
 
535
                           Dim lastRtagId, parentRtag_id
536
 
537
                           If rsQry.RecordCount > 0 Then
538
 
539
                              'aVersions = rsQry.GetRows()
540
                              'lastRow = UBound( aVersions, 2 )
541
 
542
                              'Set objSortHelper = New SortHelper
543
 
544
                              ' Sort versions
545
                              'Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("version") )
546
 
547
                              'For i = 0 To lastRow   ' Ascending order
548
                              While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
549
 
550
                                 'currLevel = GetLevel (  aVersions( rsQry.FieldIndex("rtag_version"), i )  )
551
                                 currLevel = CInt(rsQry("hierarchy"))
552
                                 'lastLevel = currLevel - 1
553
                                 %>
554
                                 <tr>
555
                                    <td bgcolor="#F5F5F5" class="body_rowg">
556
                                       <%Call RenderIndent( lastLevel, currLevel )%>
557
                                       <input type="checkbox" name="rtag_id_list" value="<%=rsQry("rtag_id")%>" style="vertical-align:middle;">
558
                                       <%If rsQry("official") <> "A" Then%>
559
                                          <a href="dependencies.asp?rtag_id=<%=rsQry("rtag_id")%>" class="body_link" title="<%=HTMLEncode( rsQry("description") ) %>" >
560
                                       <%End If%>
561
                                       <%=ReleaseIcon( rsQry("official") )%>&nbsp;<%=rsQry("rtag_name")%></a>
562
 
563
                                       <%
564
                                       If parProjId <> 2 Then
565
                                          Dim assocMASSREF, rsQryAssoc, assocMASSREFName, link
566
                                          assocMASSREF =  rsQry("assoc_mass_ref")
567
                                          If assocMASSREF <> "" Then
568
                                             Set rsQryAssoc = OraDatabase.DbCreateDynaset("SELECT RTAG_NAME, RTAG_ID FROM RELEASE_TAGS WHERE RTAG_ID="&assocMASSREF , ORADYN_DEFAULT)
569
                                             assocMASSREFName = rsQryAssoc("RTAG_NAME")
570
                                             link = "dependencies.asp?rtag_id="&rsQryAssoc("rtag_id")
571
                                             rsQryAssoc.Close
572
                                             Set rsQryAssoc = Nothing
573
                                          Else
574
                                             assocMASSREFName = "None."
575
                                          End If
576
                                       End If%>
577
 
578
                                       <%If parProjId <> 2 Then%>
579
                                          <%If assocMASSREFName <> "None." Then%>
580
                                          <td bgcolor="#F5F5F5" class="body_rowg"><a href=<%=link%>><%=assocMASSREFName%></a></td>
581
                                          <%Else%>
582
                                          <td bgcolor="#F5F5F5" class="body_rowg"><%=assocMASSREFName%></td>
583
                                          <%End If%>
584
                                       <%Else
585
                                          Dim UsedBy, rsQryUse, comment, linkB
586
                                          UsedBy =  rsQry("rtag_id")
587
                                          If UsedBy <> "" Then
588
                                             Set rsQryUse = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_TAGS RT, PROJECTS P WHERE RT.ASSOC_MASS_REF="&rsQry("rtag_id")&" AND RT.PROJ_ID=P.PROJ_ID", ORADYN_DEFAULT)
589
 
590
                                             While ((NOT rsQryUse.BOF) AND (NOT rsQryUse.EOF))
591
                                                If rsQryUse("assoc_mass_ref") = UsedBy Then
592
                                                   linkB = "dependencies.asp?rtag_id="&rsQryUse("rtag_id")
593
                                                   If comment = "" Then
594
                                                      comment = rsQryUse("proj_name") & " -> <a href="&linkB&">"& rsQryUse("rtag_name") &"</a>"
595
                                                   Else
596
                                                   comment = comment &" <br> " & rsQryUse("proj_name") & " -> <a href="&linkB&">"& rsQryUse("rtag_name") &"</a>"
597
                                                   End If
598
                                                   rsQryUse.MoveNext
599
                                                End If
600
                                             WEnd
601
                                          End If
602
                                          %>
603
                                          <%If comment <> "" Then %>
604
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=comment%></td>
605
                                          <%Else%>
606
                                             <td bgcolor="#F5F5F5" class="body_rowg">None.</td>
607
                                          <%End If%>
608
                                       <%End If%>
609
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=NewLine_To_BR(rsQry("description"))%></td>
610
 
611
                                 </tr>
612
                                 <%
613
                                 lastLevel = currLevel
614
                                 rsQry.MoveNext
615
                                 comment = ""
616
                              WEnd
617
                              'Next
618
                           End If
619
                           rsQry.Close
620
                           Set rsQry = Nothing
621
                           %>
622
                        </table>
623
 
624
                     <!-- LIST VIEW ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
625
                     <%Else%>
626
                        <%
627
                        Call GetListFilterValues ( dListFilter )
628
                        %>
629
 
630
                        <!-- RELEASE LIST FILTER +++++++++++++++++++++++++++++++++++++++++++ -->
631
                        <fieldset style="width:200px;">
632
                           <legend><a href="javascript:;" class="body_scol" onClick="ToggleDisplay('divListFilter');" ><%=GetIsListFilterInUseIcon() %>&nbsp;Show&nbsp;Release Types...</a></legend>
633
                           <div name="divListFilter" id="divListFilter" class="body_txt" style="display:none;">
634
                              <br>
635
                              <table width="100%"  border="0" cellspacing="1" cellpadding="3">
636
                                 <tr>
637
                                    <td width="10" background="images/bg_action_norm.gif">
638
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_OPEN_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_OPEN_MODE)%>>
639
                                    </td>
640
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
641
                                       <img src="images/i_rtag_open_mode.gif" width="15" height="13">&nbsp;Open&nbsp;Mode
642
                                    </td>
643
                                 </tr>
644
                                 <tr>
645
                                    <td width="10" background="images/bg_action_norm.gif">
646
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_RESTRICTIVE_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_RESTRICTIVE_MODE)%>>
647
                                    </td>
648
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
649
                                       <img src="images/i_rtag_restrictive_mode.gif" width="15" height="13">&nbsp;Restrictive&nbsp;Mode
650
                                    </td>
651
                                 </tr>
652
                                 <tr>
653
                                    <td width="10" background="images/bg_action_norm.gif">
654
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_CCB_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_CCB_MODE)%>>
655
                                    </td>
656
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
657
                                       <img src="images/i_rtag_ccb_mode.gif" width="15" height="13">&nbsp;CCB&nbsp;Mode
658
                                    </td>
659
                                 </tr>
660
                                 <tr>
661
                                    <td width="10" background="images/bg_action_norm.gif">
662
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_CLOSED_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_CLOSED_MODE)%>>
663
                                    </td>
664
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
665
                                       <img src="images/i_rtag_closed_mode.gif" width="15" height="13">&nbsp;Closed&nbsp;Mode
666
                                    </td>
667
                                 </tr>
668
                                 <tr>
669
                                    <td width="10" background="images/bg_action_norm.gif">
670
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_ARCHIVE_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_ARCHIVE_MODE)%>>
671
                                    </td>
672
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
673
                                       <img src="images/i_rtag_archive_mode.gif" width="15" height="13">&nbsp;Archive&nbsp;Mode
674
                                    </td>
675
                                 </tr>
676
                                 <tr>
677
                                    <td background="images/bg_action_norm.gif">&nbsp;</td>
678
                                    <td background="images/bg_action_norm.gif"><input name="btn" type="submit" class="form_btn" value="Show"></td>
679
                                 </tr>
680
                              </table>
681
                           </div>
682
                        </fieldset>
683
 
684
                        <table width="100%"  border="0" cellspacing="1" cellpadding="3">
685
                           <tr>
686
                              <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
687
                              <td width="30%" bgcolor="#E4E9EC" class="body_txt">Release Name </td>
688
 
689
                              <%If parProjId <> 2 Then %>
690
                                 <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
691
                                 <td width="15%" bgcolor="#E4E9EC" class="body_txt">Associated MASS_REF </td>
692
                                 <td width="55%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
693
                              <%Else%>
694
                                 <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
695
                                 <td width="30%" bgcolor="#E4E9EC" class="body_txt">Used By </td>
696
                                 <td width="40%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
697
                              <%End If%>
698
 
699
                           </tr>
700
                           <%
701
                           If NOT IsEmpty(parShowFilter) Then
702
                              OraDatabase.Parameters.Add "PROJ_ID",  parProjId,  ORAPARM_INPUT, ORATYPE_NUMBER
703
 
704
                              rsQryStr = GetQuery ("ReleaseVersionList.sql")
705
                              rsQryStr = Replace(rsQryStr, "/*SHOW_FILTER*/", parShowFilter)
706
 
707
                              Set rsQry = OraDatabase.DbCreateDynaset( rsQryStr, ORADYN_DEFAULT )
708
                              lastLevel = 0
709
 
710
                              OraDatabase.Parameters.Remove "PROJ_ID"
711
 
712
 
713
                              If rsQry.RecordCount > 0 Then
714
 
715
                                 aVersions = rsQry.GetRows()
716
                                 lastRow = UBound( aVersions, 2 )
717
 
718
                                 'Set objSortHelper = New SortHelper
719
 
720
                                 ' Sort versions
721
                                 'Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("version") )
722
 
723
                                 For i = 0 To lastRow ' Ascending order
724
 
725
                                    'currLevel = GetLevel (  aVersions( rsQry.FieldIndex("rtag_version"), i )  )
726
                                    %>
727
                                    <tr>
728
                                       <td bgcolor="#F5F5F5" class="body_txt" valign="top">
729
                                          <input type="checkbox" name="rtag_id_list" value="<%=aVersions( rsQry.FieldIndex("rtag_id"), i )%>">
730
                                       </td>
731
                                       <td bgcolor="#F5F5F5" valign="top">
732
                                          <%If aVersions( rsQry.FieldIndex("official"), i ) <> "A" Then%>
733
                                             <a href="dependencies.asp?rtag_id=<%=aVersions( rsQry.FieldIndex("rtag_id"), i )%>" class="body_link" title="Open Release...">
734
                                          <%End If%>
735
                                          <%=ReleaseIcon( aVersions( rsQry.FieldIndex("official"), i ) )%>&nbsp;<%=aVersions( rsQry.FieldIndex("rtag_name"), i )%></a>
736
                                       </td>
737
 
738
                                       <%
739
                                       If parProjId <> 2 Then
740
                                          assocMASSREF = aVersions( rsQry.FieldIndex("assoc_mass_ref"), i )
741
                                          If assocMASSREF <> "" Then
742
                                             Set rsQryAssoc = OraDatabase.DbCreateDynaset("SELECT RTAG_NAME, RTAG_ID FROM RELEASE_TAGS WHERE RTAG_ID="&assocMASSREF , ORADYN_DEFAULT)
743
                                             assocMASSREFName = rsQryAssoc("RTAG_NAME")
744
                                             link = rsQryAssoc("rtag_id")
745
                                             rsQryAssoc.Close
746
                                             Set rsQryAssoc = Nothing
747
                                          Else
748
                                             assocMASSREFName = "None."
749
                                          End If
750
                                       End If%>
751
                                       <%If parProjId <> 2 Then%>
752
                                          <%If assocMASSREFName <> "None." Then%>
753
                                             <td bgcolor="#F5F5F5" class="body_txt" valign="top">
754
                                                <input type="checkbox" name="rtag_id_list" value="<%=link%>">
755
                                             </td>
756
                                             <td bgcolor="#F5F5F5" class="body_rowg"><a href=dependencies.asp?rtag_id=<%=link%>><%=assocMASSREFName%></a></td>
757
                                          <%Else%>
758
                                             <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
759
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=assocMASSREFName%></td>
760
                                          <%End If%>
761
                                       <%Else
762
 
763
                                          UsedBy = aVersions( rsQry.FieldIndex("rtag_id"), i )
764
                                          If UsedBy <> "" Then
765
                                          Set rsQryUse = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_TAGS RT, PROJECTS P WHERE RT.ASSOC_MASS_REF="&aVersions( rsQry.FieldIndex("rtag_id"), i )&" AND RT.PROJ_ID=P.PROJ_ID", ORADYN_DEFAULT)
766
 
767
                                             While ((NOT rsQryUse.BOF) AND (NOT rsQryUse.EOF))
768
                                                If rsQryUse("assoc_mass_ref") = UsedBy Then
769
                                                linkB = rsQryUse("rtag_id")
770
                                                   If comment = "" Then
771
                                                      comment = rsQryUse("proj_name") & " -> <a href=dependencies.asp?rtag_id="&linkB&">"& rsQryUse("rtag_name") &"</a>"
772
                                                   Else
773
                                                   comment = comment &" <br> " & rsQryUse("proj_name") & " -> <a href=dependencies.asp?rtag_id="&linkB&">"& rsQryUse("rtag_name") &"</a>"
774
                                                   End If
775
                                                   rsQryUse.MoveNext
776
                                                End If
777
                                             WEnd
778
                                          End If
779
                                          %>
780
                                          <%If comment <> "" Then %>
781
                                             <td bgcolor="#F5F5F5" class="body_txt" valign="top">
782
                                                <input type="checkbox" name="rtag_id_list" value="<%=linkB%>">
783
                                                </td>
784
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=comment%></td>
785
                                          <%Else%>
786
                                             <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
787
                                             <td bgcolor="#F5F5F5" class="body_rowg">None.</td>
788
                                          <%End If%>
789
                                       <%End If%>
790
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=NewLine_To_BR(  aVersions( rsQry.FieldIndex("description"), i )   )%></td>
791
                                    </tr>
792
                                    <%
793
                                    'lastLevel = currLevel
794
                                    comment = ""
795
                                 Next
796
                              End If
797
 
798
                              rsQry.Close
799
                              Set rsQry = Nothing
800
                           End If
801
                           %>
802
                        </table>
803
                        <br>
804
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
805
                        <!--#include file="messages/_msg_inline.asp"-->
806
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
807
 
808
                     <%End If%>
809
                     <!-- LIST VIEW END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
810
 
811
                     <hr noshade color="#CAC5B8" width="100%" size="1">
812
                  </td>
813
               </tr>
814
               <%=objPMod.ComposeHiddenTags()%>
815
               <input type="hidden" name="action" value="true">
816
            </form>
817
         </table>
818
 
819
         <table width="118" border="0" align="left">
820
            <tr>
821
               <td bgcolor="#E4E9EC" width="26"><span class="body_txt">Icon</span></td>
822
               <td bgcolor="#E4E9EC" width="82"><span class="body_txt">Release State </span></td>
823
            </tr>
824
            <tr>
825
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_open_mode.gif" width="15" height="13"></td>
826
               <td bgcolor="#F5F5F5"><span class="body_txt">Open Mode</span></td>
827
            </tr>
828
            <tr>
829
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_restrictive_mode.gif" width="15" height="15"></td>
830
               <td bgcolor="#F5F5F5"><span class="body_txt">Restrictive Mode</span></td>
831
            </tr>
832
            <tr>
833
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_ccb_mode.gif" width="15" height="15"></td>
834
               <td bgcolor="#F5F5F5"><span class="body_txt">CCB Mode</span></td>
835
            </tr>
836
            <tr>
837
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_closed_mode.gif" width="15" height="14"></td>
838
               <td bgcolor="#F5F5F5"><span class="body_txt">Closed Mode</span></td>
839
            </tr>
840
            <tr>
841
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_archive_mode.gif" width="15" height="14"></td>
842
               <td bgcolor="#F5F5F5"><span class="body_txt">Archive Mode</span></td>
843
            </tr>
844
         </table>
845
         <p>&nbsp;</p>
846
      </td>
847
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
848
   </tr>
849
   <tr>
850
      <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
851
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
852
   </tr>
119 ghuddy 853
</table>
854
 
855
 
856
<!-- FOOTER -->
857
<!--#include file="_footer.asp"-->
858
<map name="mapviewtype">
859
  <area shape="rect" coords="2,2,69,23" href="<%=ScriptName%>?viewtype=1&<%=objPMod.ComposeURL()%>" title="Switch to List View">
860
  <area shape="rect" coords="73,2,143,23" href="<%=ScriptName%>?viewtype=2&<%=objPMod.ComposeURL()%>" title="Switch to Tree View">
861
</map>
862
</body>
863
</html>
864
<%
865
Call Destroy_All_Objects
157 ghuddy 866
%>