Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|				        view by version			     |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0	' always load the page, dont store
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="class/classSortHelper.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_general.asp"-->
24
<%
25
'------------ Variable Definition -------------
26
Dim rsRep
27
Dim parFPkgVersion
28
Dim sLink
29
Dim parPkgId
30
Dim PackageName
31
Dim imgLock
32
Dim DestroyPackage
33
Dim CanDestroyPackage
34
Dim hideRipple
35
Dim rippleFilter
36
'------------ Constants Declaration -----------
37
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"
38
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2'>"
39
'------------ Variable Init -------------------
40
parFPkgVersion = Request("fpkgversion")
41
If parFPkgVersion = "" Then  parFPkgVersion = "*"
42
 
43
parPkgId = Request("pkg_id")
44
If Request("hideRipple") = "True" Then 
45
	hideRipple = True
46
    rippleFilter = " AND PV.BUILD_TYPE != 'Y'"
47
Else
48
	hideRipple = False
49
    rippleFilter = ""
50
End If
51
 
52
 
53
'----------------------------------------------
54
%>
55
<%
56
'-----------------------------------------------------------------------------------------------------------------------
57
Function GetPackageName ( nPkgId )
58
	Dim rsQry, query
59
 
60
	query = _
61
	" SELECT PKG_NAME  FROM PACKAGES  WHERE PKG_ID = :PKG_ID"
62
 
63
	OraDatabase.Parameters.Add "PKG_ID", nPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
64
 
65
  	Set rsQry = OraDatabase.DbCreateDynaset( query, 0 )
66
 
67
	OraDatabase.Parameters.Remove "PKG_ID"
68
 
69
	GetPackageName = rsQry("pkg_name")
70
 
71
	rsQry.Close()
72
	Set rsQry = nothing
73
End Function
74
'-----------------------------------------------------------------------------------------------------------------------
75
%>
76
<%
77
'==================== MAIN LINE ===============================
78
If (parPkgId = "") Then Response.Redirect ("index.asp")
79
 
80
PackageName = GetPackageName ( parPkgId )
81
'==============================================================
82
%>
83
<html>
84
<head>
85
<title>Release Manager</title>
86
<link rel="shortcut icon" href="<%=FavIcon%>"/>
87
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
88
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
89
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
90
<link rel="stylesheet" href="images/navigation.css" type="text/css">
91
<script language="JavaScript" src="images/common.js"></script>
92
<!--#include file="_jquery_includes.asp"-->
93
<!-- DROPDOWN MENUS -->
94
<!--#include file="_menu_def.asp"-->
95
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
96
</head>
97
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
98
<!-- MENU LAYERS -------------------------------------->
99
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"> 
100
</div>
101
<!-- HEADER -->
102
<!--#include file="_header.asp"-->
103
<!-- BODY ---->
104
<table width="100%" border="0" cellspacing="0" cellpadding="0">
105
  <tr> 
106
    <td width="1%" background="images/bg_home_orange.gif" valign="top">
107
      <!--#include file="_front_explorer.asp"-->
108
    </td>
109
    <td rowspan="2" valign="top"> 
110
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
111
        <tr> 
112
          <td >
113
 
114
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
115
			<tr> 
116
			  <td width="1%"></td>
117
			  <td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
118
			  <td width="1%"></td>
119
			</tr>
120
			<tr> 
121
			  <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td>
122
			  <td bgcolor="#FFFFFF" valign="top"> 
123
				<!-- PACKAGE SEARCH ------------------------------------------------>
124
				<%
125
 
126
				Dim aVersions
127
				Dim lastRow
128
				Dim objSortHelper
129
				Dim i
130
 
131
				OraDatabase.Parameters.Add "PKG_VERSION", 	Replace( parFPkgVersion, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2
132
				OraDatabase.Parameters.Add "PKG_ID", 	parPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
133
 
134
			  	Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("FindPackageVersion.sql") & rippleFilter, 0 )
135
 
136
				OraDatabase.Parameters.Remove "PKG_ID"
137
				OraDatabase.Parameters.Remove "PKG_VERSION"
138
 
139
 
140
				%>
141
 
142
				<table width="100%"  border="0" cellspacing="0" cellpadding="5">
143
				  <tr>
144
                    <td class="body_sect">Package Versions</td>
145
                  </tr>
146
                  <tr>
147
                    <td nowrap bgcolor="#E4E9EC" class="body_txt">
148
						Results for <b><%=PackageName%></b>
149
					</td>
150
                  </tr>
151
                </table>
152
 
153
 
154
 
155
				<table width="100%" border="0" cellspacing="1" cellpadding="5">
156
				<form name="versions" method="get" action="<%=ScriptName%>">
157
				  <input type="hidden" name="pkg_id" value="<%=parPkgId%>">
158
				  <input type="hidden" name="listby" value="<%=parListBy%>">
159
				 <tr>
160
                    <td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
161
					<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
162
					<td width="60%" nowrap class="body_col" bgcolor="#E4E9EC">Reason for Release</td>
163
					<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Last Modified</td>
164
					<td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
165
                  </tr>
166
				  <tr>
167
                    <td nowrap bgcolor="#E4E9EC"></td>
168
					<td nowrap bgcolor="#E4E9EC"><input name="fpkgversion" type="text" class="form_item" size="15" value="<%=parFPkgVersion%>"></td>
169
					<td nowrap bgcolor="#E4E9EC">
170
                      <%
171
                      Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "hideRipple=" & not hideRipple ) &"'>"
172
                          If hideRipple Then
173
                            Response.write "<img src='images/RippleSquareOff.gif' width='20' height='20' border='0' title='Rippled Versions Hidden. Toggle'>"
174
                          Else
175
                            Response.write "<img src='images/RippleSquare.gif' width='20' height='20' border='0' title='Rippled Versions Shown. Toggle'>"
176
                          End If
177
                      Response.write "</a>"
178
                      %>
179
                    </td>
180
					<td nowrap bgcolor="#E4E9EC"></td>
181
					<td nowrap bgcolor="#E4E9EC"></td>
182
                  </tr>
183
				  <%
184
				  ' Descending order
185
				If rsRep.RecordCount = 0 Then
186
 
187
					With Response
188
						.write "<tr>"
189
						.write "<td colspan='5' class='body_row'>Found 0 records.</td>"
190
						.write "</tr>"
191
					End With
192
 
193
				Else
194
 
195
					aVersions = rsRep.GetRows()
196
					lastRow = UBound( aVersions, 2 )
197
 
198
					Set objSortHelper = New SortHelper
199
 
200
 
201
					' Sort versions
202
					Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
203
 
204
 
205
					DestroyPackage = ""
206
					CanDestroyPackage = canShowControlInProject( "DestroyPackage" )
207
 
208
 
209
				  ' Descending order
210
				  For i = lastRow To 0 Step -1
211
				  	imgLock = IMG_NOT_OFFICIAL
212
					If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y")  OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
213
						imgLock = IMG_OFFICIAL
214
					End If
215
 
216
				  	sLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )
217
 
218
					' Set destroy package action
219
					If CanDestroyPackage Then
220
						DestroyPackage = "<a href='javascript:;'"&_
221
										 " title='Destroy this package from the database.' "&_
222
										 " onClick=""return vixConfirm('You are about to destroy ["& PackageName &" "& aVersions( rsRep.FieldIndex("pkg_version"), i ) &"].<p>You cannot undo this operation.<br>Do you want to proceed?', {button : 'Destroy', url : '_destroy_package.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )  &"&bfile="& ScriptName &"&pkg_id="& parPkgId &"&listby="& parListBy &"'});"" >" &_
223
                                         " <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><a>"
224
					End If
225
				  %>
226
					  <tr> 
227
					    <td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td>
228
						<td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=aVersions( rsRep.FieldIndex("pkg_version"), i )%></a></td>
229
						<td class="body_txt_gray" valign="top"  bgcolor="#F5F5F5"><%=NewLine_To_BR ( To_HTML( aVersions( rsRep.FieldIndex("comments"), i ) ) )%></td>
230
						<td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><%= "<a href='mailto:"& aVersions( rsRep.FieldIndex("user_email"), i ) &"' class='txt_linked'><img src='images/i_user.gif' width='10' height='13' hspace='2' border='0' align='absmiddle' alt='"& aVersions( rsRep.FieldIndex("full_name"), i ) &" &lt;"& aVersions( rsRep.FieldIndex("user_email"), i ) &"&gt;'>"& aVersions( rsRep.FieldIndex("full_name"), i ) &"</a> "& EuroDateTime ( aVersions( rsRep.FieldIndex("modified_stamp"), i ) )%></td>
231
						<td valign="top" bgcolor="#F5F5F5"><%=DestroyPackage%></td>
232
					  </tr>
233
				  <%  
234
 
235
				  Next
236
 
237
				  rsRep.Close()
238
 
239
				End If
240
				  %>
241
				  <tr> 
242
					<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
243
				  </tr>
244
 
245
				  </form>
246
				</table>
247
				<br>
248
				<!------------------------------------------------------------>			
249
 
250
 
251
				</td>
252
			  <td background="images/lbox_bgside_white.gif">&nbsp;</td>
253
			</tr>
254
		  </table>
255
 
256
		  </td>
257
        </tr>
258
      </table>
259
    </td>
260
    <td width="11%">&nbsp;</td>
261
  </tr>
262
  <tr> 
263
    <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_gear.gif" width="107" height="107" vspace="20" hspace="30"></td>
264
    <td>&nbsp;</td>
265
  </tr>
266
</table>
267
<!-- FOOTER -->
268
<!--#include file="_footer.asp"-->
269
</body>
270
</html>