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