Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 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
4704 dpurdie 33
Dim CanDestroyPackage
34
Dim hideRipple
35
Dim rippleFilter
119 ghuddy 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")
4704 dpurdie 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
119 ghuddy 51
 
4704 dpurdie 52
 
119 ghuddy 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
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
87
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
88
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
89
<link rel="stylesheet" href="images/navigation.css" type="text/css">
90
<script language="JavaScript" src="images/common.js"></script>
5190 dpurdie 91
<!--#include file="_jquery_includes.asp"-->
119 ghuddy 92
<!-- DROPDOWN MENUS -->
93
<!--#include file="_menu_def.asp"-->
94
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
95
</head>
96
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
97
<!-- MENU LAYERS -------------------------------------->
98
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"> 
99
</div>
100
<!-- HEADER -->
2365 dpurdie 101
<!--#include file="_header.asp"-->
119 ghuddy 102
<!-- BODY ---->
103
<table width="100%" border="0" cellspacing="0" cellpadding="0">
104
  <tr> 
105
    <td width="1%" background="images/bg_home_orange.gif" valign="top">
106
      <!--#include file="_front_explorer.asp"-->
107
    </td>
108
    <td rowspan="2" valign="top"> 
109
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
110
        <tr> 
111
          <td >
112
 
113
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
114
			<tr> 
115
			  <td width="1%"></td>
116
			  <td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
117
			  <td width="1%"></td>
118
			</tr>
119
			<tr> 
120
			  <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td>
121
			  <td bgcolor="#FFFFFF" valign="top"> 
122
				<!-- PACKAGE SEARCH ------------------------------------------------>
123
				<%
124
 
125
				Dim aVersions
126
				Dim lastRow
127
				Dim objSortHelper
128
				Dim i
129
 
130
				OraDatabase.Parameters.Add "PKG_VERSION", 	Replace( parFPkgVersion, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2
131
				OraDatabase.Parameters.Add "PKG_ID", 	parPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
132
 
4704 dpurdie 133
			  	Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("FindPackageVersion.sql") & rippleFilter, 0 )
119 ghuddy 134
 
135
				OraDatabase.Parameters.Remove "PKG_ID"
136
				OraDatabase.Parameters.Remove "PKG_VERSION"
137
 
138
 
139
				%>
140
 
141
				<table width="100%"  border="0" cellspacing="0" cellpadding="5">
142
				  <tr>
143
                    <td class="body_sect">Package Versions</td>
144
                  </tr>
145
                  <tr>
146
                    <td nowrap bgcolor="#E4E9EC" class="body_txt">
147
						Results for <b><%=PackageName%></b>
148
					</td>
149
                  </tr>
150
                </table>
151
 
152
 
153
 
154
				<table width="100%" border="0" cellspacing="1" cellpadding="5">
155
				<form name="versions" method="get" action="<%=ScriptName%>">
156
				  <input type="hidden" name="pkg_id" value="<%=parPkgId%>">
157
				  <input type="hidden" name="listby" value="<%=parListBy%>">
158
				 <tr>
159
                    <td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
160
					<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
161
					<td width="60%" nowrap class="body_col" bgcolor="#E4E9EC">Reason for Release</td>
162
					<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Last Modified</td>
163
					<td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
164
                  </tr>
165
				  <tr>
166
                    <td nowrap bgcolor="#E4E9EC"></td>
167
					<td nowrap bgcolor="#E4E9EC"><input name="fpkgversion" type="text" class="form_item" size="15" value="<%=parFPkgVersion%>"></td>
4704 dpurdie 168
					<td nowrap bgcolor="#E4E9EC">
169
                      <%
170
                      Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "hideRipple=" & not hideRipple ) &"'>"
171
                          If hideRipple Then
172
                            Response.write "<img src='images/RippleSquareOff.gif' width='20' height='20' border='0' title='Rippled Versions Hidden. Toggle'>"
173
                          Else
174
                            Response.write "<img src='images/RippleSquare.gif' width='20' height='20' border='0' title='Rippled Versions Shown. Toggle'>"
175
                          End If
176
                      Response.write "</a>"
177
                      %>
178
                    </td>
119 ghuddy 179
					<td nowrap bgcolor="#E4E9EC"></td>
180
					<td nowrap bgcolor="#E4E9EC"></td>
181
                  </tr>
182
				  <%
183
				  ' Descending order
184
				If rsRep.RecordCount = 0 Then
185
 
186
					With Response
187
						.write "<tr>"
188
						.write "<td colspan='5' class='body_row'>Found 0 records.</td>"
189
						.write "</tr>"
190
					End With
191
 
192
				Else
193
 
194
					aVersions = rsRep.GetRows()
195
					lastRow = UBound( aVersions, 2 )
196
 
197
					Set objSortHelper = New SortHelper
198
 
199
 
200
					' Sort versions
201
					Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
202
 
203
 
204
					DestroyPackage = ""
5061 dpurdie 205
					CanDestroyPackage = canShowControlInProject( "DestroyPackage" )
119 ghuddy 206
 
207
 
208
				  ' Descending order
209
				  For i = lastRow To 0 Step -1
210
				  	imgLock = IMG_NOT_OFFICIAL
211
					If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y")  OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
212
						imgLock = IMG_OFFICIAL
213
					End If
214
 
215
				  	sLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )
216
 
217
					' Set destroy package action
218
					If CanDestroyPackage Then
5190 dpurdie 219
						DestroyPackage = "<a href='javascript:;'"&_
119 ghuddy 220
										 " title='Destroy this package from the database.' "&_
5190 dpurdie 221
										 " 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 &"'});"" >" &_
222
                                         " <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><a>"
119 ghuddy 223
					End If
224
				  %>
225
					  <tr> 
226
					    <td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td>
227
						<td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=aVersions( rsRep.FieldIndex("pkg_version"), i )%></a></td>
228
						<td class="body_txt_gray" valign="top"  bgcolor="#F5F5F5"><%=NewLine_To_BR ( To_HTML( aVersions( rsRep.FieldIndex("comments"), i ) ) )%></td>
229
						<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>
230
						<td valign="top" bgcolor="#F5F5F5"><%=DestroyPackage%></td>
231
					  </tr>
232
				  <%  
233
 
234
				  Next
235
 
236
				  rsRep.Close()
237
 
238
				End If
239
				  %>
240
				  <tr> 
241
					<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
242
				  </tr>
243
 
244
				  </form>
245
				</table>
246
				<br>
247
				<!------------------------------------------------------------>			
248
 
249
 
250
				</td>
251
			  <td background="images/lbox_bgside_white.gif">&nbsp;</td>
252
			</tr>
253
		  </table>
254
 
255
		  </td>
256
        </tr>
257
      </table>
258
    </td>
259
    <td width="11%">&nbsp;</td>
260
  </tr>
261
  <tr> 
262
    <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>
263
    <td>&nbsp;</td>
264
  </tr>
265
</table>
266
<!-- FOOTER -->
267
<!--#include file="_footer.asp"-->
268
</body>
269
</html>