| 119 |
ghuddy |
1 |
<%
|
|
|
2 |
'===============================================================
|
| 5933 |
dpurdie |
3 |
' Version Browser
|
| 119 |
ghuddy |
4 |
'===============================================================
|
|
|
5 |
%>
|
|
|
6 |
<!--#include file="class/classSortHelper.asp"-->
|
|
|
7 |
<%
|
|
|
8 |
'------------ Variable Definition -------------
|
|
|
9 |
Dim parFLpkg_version, parFLuser_name
|
|
|
10 |
Dim imgLock, fieldRelease_Date, fieldReleased_By, fieldDownloadFullReleaseNotes
|
|
|
11 |
Dim rsVB
|
| 6986 |
dpurdie |
12 |
Dim imgPointer
|
| 119 |
ghuddy |
13 |
Dim URLstring
|
| 5933 |
dpurdie |
14 |
Dim pvidName
|
|
|
15 |
Dim idxName
|
| 119 |
ghuddy |
16 |
Dim filterInUse
|
| 4703 |
dpurdie |
17 |
Dim hideRipple
|
|
|
18 |
Dim rippleFilter
|
| 119 |
ghuddy |
19 |
Dim DestroyPackage
|
| 5902 |
dpurdie |
20 |
Dim CanDestroyProjectPackage
|
| 119 |
ghuddy |
21 |
Dim CanDestroyPackage
|
|
|
22 |
'------------ Constants Declaration -----------
|
|
|
23 |
Const IMG_PONTER = "<img src='images/i_pointer.gif' width='6' height='11' hspace='3'>"
|
| 5384 |
dpurdie |
24 |
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' title='Package has been Released'>"
|
| 5902 |
dpurdie |
25 |
Const IMG_PENDING = "<img src='icons/i_pending.gif' width='7' height='10' hspace='5' vspace='2' title='Package pending autobuild'>"
|
| 5384 |
dpurdie |
26 |
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2' title='Package not yet released'>"
|
| 6873 |
dpurdie |
27 |
Const IMG_NOT_BUILDABLE = "<img src='icons/s_unbuildable.png' width='14' height='14' hspace='5' vspace='0' title='Package is not buildable'>"
|
| 119 |
ghuddy |
28 |
Const IMG_DOWNLOAD = "<img src='images/i_download_small.gif' alt='Download full release notes.' width='16' height='16' hspace='2' border='0'>"
|
|
|
29 |
'------------ Variable Init -------------------
|
|
|
30 |
If Request("filter_reset") <> "" Then
|
| 5933 |
dpurdie |
31 |
parFLpkg_version = "*"
|
|
|
32 |
parFLuser_name = "*"
|
|
|
33 |
filterInUse = FALSE
|
| 119 |
ghuddy |
34 |
Else
|
| 5933 |
dpurdie |
35 |
parFLpkg_version = RequestDefault( "FLpkg_version", "*" )
|
|
|
36 |
parFLuser_name = RequestDefault( "FLuser_name","*" )
|
|
|
37 |
filterInUse = Is_Filter_In_Use ( "FLpkg_version, FLuser_name" )
|
| 119 |
ghuddy |
38 |
End If
|
| 4703 |
dpurdie |
39 |
|
|
|
40 |
If Request("hideRipple") = "True" Then
|
| 5933 |
dpurdie |
41 |
hideRipple = True
|
| 4703 |
dpurdie |
42 |
rippleFilter = "AND PV.BUILD_TYPE != 'Y'"
|
|
|
43 |
Else
|
| 5933 |
dpurdie |
44 |
hideRipple = False
|
| 4703 |
dpurdie |
45 |
rippleFilter = ""
|
|
|
46 |
End If
|
|
|
47 |
|
| 119 |
ghuddy |
48 |
'----------------------------------------------
|
|
|
49 |
%>
|
|
|
50 |
<%
|
|
|
51 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
52 |
Function Get_All_Versions ( nPkg_id )
|
| 5933 |
dpurdie |
53 |
Get_All_Versions = _
|
|
|
54 |
" SELECT DISTINCT PV.PV_ID," &_
|
| 5759 |
dpurdie |
55 |
" PV.PKG_VERSION," &_
|
|
|
56 |
" PV.DLOCKED," &_
|
|
|
57 |
" PV.MODIFIED_STAMP," &_
|
|
|
58 |
" USR.FULL_NAME," &_
|
|
|
59 |
" usr.user_name," &_
|
|
|
60 |
" USR.USER_EMAIL," &_
|
|
|
61 |
" PV.COMMENTS," &_
|
|
|
62 |
" PV.PKG_LABEL," &_
|
|
|
63 |
" PV.IS_PATCH," &_
|
|
|
64 |
" PV.RELEASE_NOTES_INFO," &_
|
|
|
65 |
" PV.BUILD_TYPE," &_
|
|
|
66 |
" pv.CREATOR_ID," &_
|
|
|
67 |
" pv.OWNER_ID," &_
|
| 6873 |
dpurdie |
68 |
" pv.BUILD_TYPE," &_
|
| 5759 |
dpurdie |
69 |
" NVL2(rc.rtag_id,1,0) as inuse," &_
|
|
|
70 |
" trunc(SYSDATE - pv.CREATED_STAMP + 0.5) as age" &_
|
|
|
71 |
" FROM PACKAGE_VERSIONS PV," &_
|
|
|
72 |
" USERS USR,"&_
|
|
|
73 |
" RELEASE_CONTENT rc" &_
|
| 5933 |
dpurdie |
74 |
" WHERE PV.MODIFIER_ID = USR.USER_ID(+) " &_
|
|
|
75 |
" AND PV.PKG_ID = :PKG_ID" &_
|
| 5759 |
dpurdie |
76 |
" AND pv.pv_id = rc.pv_id(+)" &_
|
| 5933 |
dpurdie |
77 |
" /*-- Manual Filter --*/" &_
|
|
|
78 |
" "& Construct_Filter ( parFLpkg_version, "pv.pkg_version" ) &_
|
|
|
79 |
" "& Construct_Filter ( parFLuser_name, "usr.user_name" ) &_
|
| 4703 |
dpurdie |
80 |
" "& rippleFilter &_
|
| 5933 |
dpurdie |
81 |
" /*------------------*/"
|
|
|
82 |
|
|
|
83 |
Get_All_Versions = Replace( Get_All_Versions, ":PKG_ID", nPkg_id)
|
| 119 |
ghuddy |
84 |
End Function
|
|
|
85 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
86 |
Function Construct_Filter ( sPar_val, sCol_name )
|
| 5933 |
dpurdie |
87 |
Select Case sPar_val
|
|
|
88 |
Case Empty
|
|
|
89 |
Construct_Filter = "AND "& sCol_name &" IS NULL"
|
|
|
90 |
|
|
|
91 |
Case "*"
|
|
|
92 |
Construct_Filter = ""
|
|
|
93 |
|
|
|
94 |
Case Else
|
|
|
95 |
If InStr( sPar_val, "*") > 0 Then
|
|
|
96 |
' Asterisk found in string. Use LIKE
|
|
|
97 |
Construct_Filter = "AND "& sCol_name &" LIKE '"& Replace( sPar_val, "*", "%" ) &"'"
|
|
|
98 |
Else
|
|
|
99 |
' No asterisk. Use =
|
|
|
100 |
Construct_Filter = "AND "& sCol_name &" = '"& sPar_val &"'"
|
|
|
101 |
End If
|
|
|
102 |
|
|
|
103 |
End Select
|
|
|
104 |
|
| 119 |
ghuddy |
105 |
End Function
|
|
|
106 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
107 |
Function Is_Filter_In_Use ( sFilters )
|
| 5933 |
dpurdie |
108 |
Dim filters, filterName
|
|
|
109 |
Is_Filter_In_Use = FALSE
|
|
|
110 |
|
|
|
111 |
filters = Split( Replace( sFilters, " ", "" ), "," )
|
|
|
112 |
|
|
|
113 |
For Each filterName In filters
|
|
|
114 |
If Request( filterName ) <> "*" Then
|
|
|
115 |
Is_Filter_In_Use = TRUE
|
|
|
116 |
Exit For
|
|
|
117 |
End If
|
|
|
118 |
Next
|
|
|
119 |
|
| 119 |
ghuddy |
120 |
End Function
|
|
|
121 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
122 |
%>
|
| 5173 |
dpurdie |
123 |
<!--#include file="_jquery_includes.asp"-->
|
|
|
124 |
<script language="JavaScript" type="text/JavaScript">
|
|
|
125 |
function useThisVersion (pkgName, pkgVersion, rtagId, oldPvid, newPvid) {
|
|
|
126 |
console.log("useThisVersion:", pkgName, pkgVersion);
|
|
|
127 |
debugger;
|
|
|
128 |
//alert ("Use this version");
|
|
|
129 |
$( "#dialog-confirm" ).dialog({
|
|
|
130 |
position: { my: "top", at: "top+100", of: window },
|
|
|
131 |
modal: true,
|
|
|
132 |
draggable: true,
|
|
|
133 |
resizable: true,
|
|
|
134 |
dialogClass: "rounded_box",
|
|
|
135 |
height:250,
|
|
|
136 |
width:350,
|
|
|
137 |
buttons: {
|
|
|
138 |
"Direct": function() {
|
|
|
139 |
window.opener.document.location="_new_version.asp?OLDpv_id=" + oldPvid + "&rtag_id=" + rtagId + "&pv_id=" + newPvid
|
|
|
140 |
self.close();
|
|
|
141 |
$( this ).dialog( "close" );
|
|
|
142 |
},
|
|
|
143 |
"Pending": function() {
|
|
|
144 |
window.opener.document.location="_new_version.asp?OLDpv_id=" + oldPvid + "&rtag_id=" + rtagId + "&pv_id=" + newPvid + '&iMode=pending';
|
|
|
145 |
self.close();
|
|
|
146 |
$( this ).dialog( "close" );
|
|
|
147 |
},
|
|
|
148 |
Cancel: function() {
|
|
|
149 |
$( this ).dialog( "close" );
|
|
|
150 |
}
|
|
|
151 |
},
|
|
|
152 |
open: function() {
|
|
|
153 |
$(this).siblings('.ui-dialog-buttonpane').find('button:eq(2)').focus();
|
|
|
154 |
}
|
|
|
155 |
});
|
|
|
156 |
|
|
|
157 |
return false;
|
|
|
158 |
}
|
| 5190 |
dpurdie |
159 |
|
| 5933 |
dpurdie |
160 |
// Scroll to package
|
|
|
161 |
// Order of preference
|
|
|
162 |
// index - location of last package deleted
|
|
|
163 |
// index-1 - Near last pakage deleted
|
|
|
164 |
// pvid - PVID being viewed
|
|
|
165 |
// oldPVID - PVID Deleted
|
|
|
166 |
function scrollToPvId() {
|
|
|
167 |
var oldpvid = Number('<%=parOLDpv_id%>');
|
|
|
168 |
var pvid = Number('<%=parPv_id%>');
|
|
|
169 |
var idx = Number('<%=parIndex%>');
|
| 6986 |
dpurdie |
170 |
var els = $();
|
| 5933 |
dpurdie |
171 |
|
|
|
172 |
if (idx > 0) {
|
| 6986 |
dpurdie |
173 |
els = $('[data-idx='+idx+']');
|
|
|
174 |
if (els.length==0) {
|
|
|
175 |
els = $('[data-idx='+(idx-1)+']');
|
| 5933 |
dpurdie |
176 |
}
|
|
|
177 |
}
|
|
|
178 |
|
| 6986 |
dpurdie |
179 |
if (els.length==0) els = $('[data-pvid='+pvid+']');
|
|
|
180 |
if (els.length==0) els = $('[data-pvid='+oldpvid+']');
|
|
|
181 |
if (els.length) {
|
|
|
182 |
els[0].scrollIntoView();
|
|
|
183 |
els.addClass('highlightRow');
|
|
|
184 |
}
|
| 5933 |
dpurdie |
185 |
}
|
|
|
186 |
|
|
|
187 |
// Set the height of the two areas in the History Window
|
|
|
188 |
// Note: Divs may not always be available.
|
|
|
189 |
function setLayerHeight () {
|
|
|
190 |
try {
|
|
|
191 |
var h = screen.height;
|
|
|
192 |
MM_findObj("LayerVersions").style.height = (h-300)/2 +"px";
|
|
|
193 |
MM_findObj("LayerDetails").style.height = (h-300)/2 +"px";
|
|
|
194 |
} catch(e) {
|
|
|
195 |
}
|
| 6977 |
dpurdie |
196 |
}
|
|
|
197 |
|
|
|
198 |
// Attach events
|
|
|
199 |
$(document).ready(function() {
|
| 5933 |
dpurdie |
200 |
|
| 6977 |
dpurdie |
201 |
// This function is invoked when the user clicks within a row
|
|
|
202 |
// The click will re-load and reposition the version history to the selected version
|
|
|
203 |
// The problem is that the 'Destroy Version' interacts with this.
|
|
|
204 |
// Also the mailto operation interacts with this
|
|
|
205 |
// Solution: The DestroyVersion is an image within a 'td'.
|
|
|
206 |
// If the 'td' has a class of nogo, then don't navigate
|
|
|
207 |
$('.selectVersion').on('click', function () {
|
|
|
208 |
|
|
|
209 |
if ($(event.target).closest('td').hasClass('nogo') || $(event.target).closest('span').hasClass('mailto') ) {
|
|
|
210 |
return;
|
|
|
211 |
}
|
|
|
212 |
|
|
|
213 |
var tr = $(this).closest('tr');
|
|
|
214 |
var pvid = $(tr).data('pvid');
|
|
|
215 |
var isaPatch = $(tr).hasClass('isaPatch');
|
|
|
216 |
var URLstring = <%="'" & Persists_Query_String_Trim( "","index,pv_id" ) & "'" %>;
|
|
|
217 |
var script;
|
|
|
218 |
|
|
|
219 |
if ( isaPatch ) {
|
|
|
220 |
script = '_wform_versions_history_release_notes.asp';
|
|
|
221 |
} else {
|
|
|
222 |
script = <%= "'" & scriptName & "'" %>
|
|
|
223 |
}
|
|
|
224 |
URLstring = script + '?' + URLstring + 'pv_id=' + pvid;
|
|
|
225 |
location.href = URLstring;
|
|
|
226 |
});
|
|
|
227 |
|
|
|
228 |
// This function will add a listener to allow a user to download the Release Notes
|
|
|
229 |
// If the target does not exist, then it will redirect to a 404 error :(
|
|
|
230 |
$('.downloadNotes').on('click', function (){
|
|
|
231 |
var notes = $(this).data('rnote');
|
|
|
232 |
var tr = $(this).closest('tr');
|
|
|
233 |
var pvid = $(tr).data('pvid');
|
|
|
234 |
var URLstring = <%="'" & HTTP_PKG_ARCHIVE & "'" %> + notes;
|
|
|
235 |
|
|
|
236 |
// Open in a new window
|
|
|
237 |
window.open(URLstring, '_blank');
|
|
|
238 |
});
|
|
|
239 |
|
|
|
240 |
// Add a listener for destroyVersion events
|
|
|
241 |
$('.destroyVersion').on('click', function (){
|
|
|
242 |
var tr = $(this).closest('tr');
|
|
|
243 |
var pvid = $(tr).data('pvid');
|
|
|
244 |
var idx = $(tr).data('idx');
|
|
|
245 |
|
|
|
246 |
var data = {
|
|
|
247 |
pv_id : pvid,
|
|
|
248 |
bfile : "<%=ScriptName%>",
|
|
|
249 |
rtag_id : "<%=parRtag_id%>",
|
|
|
250 |
FLuser_name : "<%=parFLuser_name%>",
|
|
|
251 |
FLpkg_version : "<%=parFLpkg_version%>",
|
|
|
252 |
rfile : "<%=parRfile%>",
|
|
|
253 |
pkg_id : "<%=parPkg_id%>",
|
|
|
254 |
OLDpv_id : "<%=parOLDpv_id%>",
|
|
|
255 |
index : idx };
|
|
|
256 |
var param = $.param(data);
|
|
|
257 |
MM_openVixIFrame('_destroy_package.asp?' + param, 'Destroy Package Version')
|
|
|
258 |
});
|
|
|
259 |
|
|
|
260 |
});
|
|
|
261 |
|
| 5933 |
dpurdie |
262 |
//# sourceURL=_version_browser_1.asp
|
| 5173 |
dpurdie |
263 |
</script>
|
| 6986 |
dpurdie |
264 |
<style type="text/css">
|
|
|
265 |
table.stdBrown {border:inherit}
|
|
|
266 |
table.stdBrown tbody tr.highlightRow {background-color : #FAF3d9}
|
|
|
267 |
table.stdBrown tbody tr {vertical-align:top}
|
|
|
268 |
table.stdBrown tbody tr td {padding-right: 2px}
|
|
|
269 |
table.stdBrown thead th {background-color : #cac5b8;padding-right: 0em;vertical-align:top}
|
|
|
270 |
table.stdBrown>tbody>tr>:nth-child(1) {background-color: #cac5b8; padding-right: 0em;}
|
|
|
271 |
table.stdBrown>tbody>tr>:nth-child(2) {padding-right: 0em;}
|
|
|
272 |
.pkgTitle {background-color : #cac5b8}
|
|
|
273 |
}
|
|
|
274 |
</style>
|
| 5933 |
dpurdie |
275 |
<!--------------- ACTION BUTTONS -------------------------->
|
| 5904 |
dpurdie |
276 |
<div style="width:100vw;">
|
| 5933 |
dpurdie |
277 |
<form name="filter" method="get" action="<%=scriptName%>">
|
|
|
278 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 119 |
ghuddy |
279 |
<tr>
|
| 6877 |
dpurdie |
280 |
<td width="1" valign="middle" class='bg_dialog'><img src="images/spacer.gif" width="5" height="35"></td>
|
|
|
281 |
<td width="100%" valign="middle" class='bg_dialog'><%
|
| 5082 |
dpurdie |
282 |
Dim bEnableUse : bEnableUse = FALSE
|
| 5933 |
dpurdie |
283 |
If Request("rtag_id") = "" OR _
|
|
|
284 |
Request("pv_id") = "" OR _
|
| 5173 |
dpurdie |
285 |
parOLDpv_id = ParPv_id OR _
|
| 5933 |
dpurdie |
286 |
bIsPatch OR _
|
| 5082 |
dpurdie |
287 |
(NOT bCanInsertPkg) OR _
|
| 5933 |
dpurdie |
288 |
(NOT objAccessControl.UserLogedIn) OR _
|
| 5178 |
dpurdie |
289 |
(NOT releaseIsWritable(ReleaseMode)) _
|
| 5933 |
dpurdie |
290 |
Then
|
| 5082 |
dpurdie |
291 |
bEnableUse = FALSE
|
| 5933 |
dpurdie |
292 |
Else
|
| 5082 |
dpurdie |
293 |
bEnableUse = TRUE
|
| 5933 |
dpurdie |
294 |
End If
|
| 5082 |
dpurdie |
295 |
|
|
|
296 |
If bEnableUse Then
|
| 5173 |
dpurdie |
297 |
%>
|
|
|
298 |
<div id='dialog-confirm' title="Confirm version change" style="display:none">
|
|
|
299 |
<p>Replace the current version of package <%=sPkg_Name%> with Version <%=sPkg_Version%>.
|
|
|
300 |
<p>The new version may be added directly into the release or the change may be made pending.
|
|
|
301 |
</div>
|
|
|
302 |
<%
|
|
|
303 |
Response.write "<a href=';' onClick='return useThisVersion("""& sPkg_Name &""","""& sPkg_Version & """,""" & parRtag_id & ""","""& parOLDpv_id & """,""" & parPv_id & """);'><img src='images/abtn_use_this_version.gif' title='Use this version in project release.' width='107' height='25' hspace='1' border='0'></a>"
|
| 5082 |
dpurdie |
304 |
Else
|
| 5933 |
dpurdie |
305 |
Response.write "<img src='images/abtn_use_this_version_off.gif' width='108' height='26' hspace='1' border='0'>"
|
| 5082 |
dpurdie |
306 |
End If
|
| 5933 |
dpurdie |
307 |
|
|
|
308 |
Response.write "<img src='images/spacer.gif' width='25' height='25'>"
|
|
|
309 |
If filterInUse Then
|
| 6827 |
dpurdie |
310 |
Response.write "<input type='image' name='btn' src='images/abtn_filter_on.gif' width='25' height='25' border='0' title='Apply filter. (Filter is in use!)'>"
|
| 5933 |
dpurdie |
311 |
Else
|
| 6827 |
dpurdie |
312 |
Response.write "<input type='image' name='btn' src='images/abtn_filter.gif' width='25' height='25' border='0' title='Apply filter'>"
|
| 5933 |
dpurdie |
313 |
End If
|
| 6879 |
dpurdie |
314 |
Response.write "<span class=pointer onClick=""location.href='"& scriptName &"?"& Persists_Query_String( "filter_reset=true" ) &"'""><img src='images/abtn_remove_filter.gif' title='Remove filter' width='25' height='25' hspace='2' border='0'></span>"
|
| 4703 |
dpurdie |
315 |
|
| 5933 |
dpurdie |
316 |
Response.write "<img src='images/spacer.gif' width='25' height='25'>"
|
| 6827 |
dpurdie |
317 |
Response.write "<span class=pointer onClick=""location.href='"& scriptName &"?"& Persists_Query_String( "hideRipple=" & not hideRipple ) &"'"">"
|
| 5933 |
dpurdie |
318 |
If hideRipple Then
|
|
|
319 |
Response.write "<img src='images/RippleSquareOff.gif' width='25' height='25' border='0' title='Rippled Versions Hidden. Toggle'>"
|
|
|
320 |
Else
|
|
|
321 |
Response.write "<img src='images/RippleSquare.gif' width='25' height='25' border='0' title='Rippled Versions Shown. Toggle'>"
|
|
|
322 |
End If
|
| 6827 |
dpurdie |
323 |
Response.write "</span>"
|
| 4703 |
dpurdie |
324 |
|
| 5933 |
dpurdie |
325 |
%></td>
|
| 6877 |
dpurdie |
326 |
<td width="1" valign="middle" class='bg_dialog pointer' onClick="window.opener.document.location='dependencies.asp?pv_id=<%=parPv_id%>';self.close();"><img src="images/abtn_open.gif" width="46" height="25" hspace="5" border="0" alt="Open In Parent Window."></td>
|
|
|
327 |
<td width="1" valign="middle" class='bg_dialog pointer' onClick="self.close();"><img src="images/abtn_close.gif" width="46" height="25" hspace="5" border="0" alt="Close this window."></td>
|
| 119 |
ghuddy |
328 |
</tr>
|
|
|
329 |
</table>
|
| 5933 |
dpurdie |
330 |
<!--------------------- CAPTION ---------------------------->
|
|
|
331 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
332 |
<tr>
|
| 6986 |
dpurdie |
333 |
<td class="lbox_ttl_b pkgTitle" align="center"><%=sPkg_Name%></td>
|
| 5933 |
dpurdie |
334 |
</tr>
|
| 119 |
ghuddy |
335 |
</table>
|
| 5933 |
dpurdie |
336 |
<!------------------ VERSION LIST -------------------------->
|
| 119 |
ghuddy |
337 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
338 |
<tr>
|
| 6877 |
dpurdie |
339 |
<td class='bg_dialog'>
|
| 5904 |
dpurdie |
340 |
<div id="LayerVersions" style="height: 350px; width:100vw; overflow: auto;" name="LayerVersions">
|
| 6986 |
dpurdie |
341 |
<table width="100%" border="0" cellspacing="1" cellpadding="2" class=stdBrown>
|
| 6977 |
dpurdie |
342 |
<thead>
|
| 6986 |
dpurdie |
343 |
<th width="1" nowrap></th>
|
|
|
344 |
<th width="1" nowrap> </th>
|
|
|
345 |
<th width="1" nowrap>Version <br><input name="FLpkg_version" type="text" class="form_ifilter" value="<%=parFLpkg_version%>" size="15"></th>
|
|
|
346 |
<th width="1" nowrap>Last Mod. Date </th>
|
|
|
347 |
<th width="100%" nowrap>Reason for this version</th>
|
|
|
348 |
<th width="1" nowrap>Last Modified <br><input name="FLuser_name" type="text" class="form_ifilter" value="<%=parFLuser_name%>" size="15"></th>
|
|
|
349 |
<th width="1" nowrap></th>
|
|
|
350 |
<th width="1" nowrap></th>
|
| 6977 |
dpurdie |
351 |
</thead>
|
| 5933 |
dpurdie |
352 |
<%
|
| 6986 |
dpurdie |
353 |
Dim aVersions, lastRow, i, objSortHelper, idx, rowClass
|
|
|
354 |
|
| 5933 |
dpurdie |
355 |
Set rsVB = OraDatabase.DbCreateDynaset( Get_All_Versions ( parPkg_id ), cint(0))
|
|
|
356 |
|
|
|
357 |
' Descending order
|
|
|
358 |
If rsVB.RecordCount > 0 Then
|
|
|
359 |
aVersions = rsVB.GetRows()
|
|
|
360 |
lastRow = UBound( aVersions, 2 )
|
|
|
361 |
|
|
|
362 |
Set objSortHelper = New SortHelper
|
|
|
363 |
|
|
|
364 |
|
|
|
365 |
' Sort versions
|
|
|
366 |
Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsVB.FieldIndex("pkg_version") )
|
|
|
367 |
CanDestroyProjectPackage = canShowControlInProject ( "DestroyPackage" )
|
|
|
368 |
|
|
|
369 |
' Descending order
|
|
|
370 |
idx = 0
|
|
|
371 |
For i = lastRow To 0 Step -1
|
|
|
372 |
idx = idx + 1
|
| 4703 |
dpurdie |
373 |
|
| 5933 |
dpurdie |
374 |
%>
|
|
|
375 |
<% ' Highlight row case
|
|
|
376 |
imgPointer = ""
|
| 6986 |
dpurdie |
377 |
rowClass = "pointer selectVersion "
|
|
|
378 |
If CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) ) = parPv_id Then
|
|
|
379 |
rowClass = rowClass & " highlightRow"
|
| 5933 |
dpurdie |
380 |
imgPointer = IMG_PONTER
|
|
|
381 |
End If
|
|
|
382 |
|
|
|
383 |
' Official/Unofficial case
|
|
|
384 |
imgLock = IMG_NOT_OFFICIAL
|
|
|
385 |
'fieldRelease_Date = ""
|
|
|
386 |
'fieldReleased_By = ""
|
| 6873 |
dpurdie |
387 |
If (aVersions( rsVB.FieldIndex("build_type"), i ) = "U") Then
|
|
|
388 |
imgLock = IMG_NOT_BUILDABLE
|
|
|
389 |
ElseIf (aVersions( rsVB.FieldIndex("dlocked"), i ) = "Y") Then
|
| 5933 |
dpurdie |
390 |
imgLock = IMG_OFFICIAL
|
| 5902 |
dpurdie |
391 |
ElseIf (aVersions( rsVB.FieldIndex("dlocked"), i ) = "A") Then
|
| 5933 |
dpurdie |
392 |
imgLock = IMG_PENDING
|
|
|
393 |
End If
|
|
|
394 |
|
|
|
395 |
fieldRelease_Date = DisplayShortDateTime ( aVersions( rsVB.FieldIndex("modified_stamp"), i ) )
|
| 6612 |
dpurdie |
396 |
fieldReleased_By = emailField(enum_imgUser & aVersions( rsVB.FieldIndex("full_name"), i ), aVersions( rsVB.FieldIndex("user_email"), i ))
|
| 5933 |
dpurdie |
397 |
|
|
|
398 |
' Full Release Notes availability
|
|
|
399 |
fieldDownloadFullReleaseNotes = ""
|
|
|
400 |
If NOT IsNull( aVersions( rsVB.FieldIndex("release_notes_info"), i ) ) OR ( InStr( aVersions( rsVB.FieldIndex("release_notes_info"), i ), "MGS:") < 1) Then
|
| 6977 |
dpurdie |
401 |
fieldDownloadFullReleaseNotes = "<img src='images/i_download_small.gif' title='Download full release notes.' width='16' height='16' hspace='2' border='0' class='pointer downloadNotes' data-rnote='"&aVersions( rsVB.FieldIndex("release_notes_info"), i )&"'>"
|
| 5933 |
dpurdie |
402 |
End If
|
|
|
403 |
|
|
|
404 |
pvidName = "PVID_"& aVersions( rsVB.FieldIndex("pv_id"), i )
|
|
|
405 |
idxName = "IDX_" & idx
|
|
|
406 |
If aVersions( rsVB.FieldIndex("is_patch"), i ) = "Y" Then
|
| 6986 |
dpurdie |
407 |
rowClass = rowClass & " isaPatch"
|
| 5933 |
dpurdie |
408 |
End If
|
|
|
409 |
|
| 5759 |
dpurdie |
410 |
' User can try to delete package iff
|
|
|
411 |
' Have suffiecient access (unusual)
|
|
|
412 |
' They created it or own it
|
| 5902 |
dpurdie |
413 |
' The version is not in use by any release (allow to be in pending or WIP)
|
| 5759 |
dpurdie |
414 |
' [Not at the moment] The package was created less than xxxx days ago
|
| 5902 |
dpurdie |
415 |
' Is not locked or [Not at the moment] Approved for Autobuild
|
|
|
416 |
CanDestroyPackage = CanDestroyProjectPackage
|
|
|
417 |
If NOT CanDestroyPackage Then
|
|
|
418 |
If (objAccessControl.UserId = aVersions( rsVB.FieldIndex("CREATOR_ID"), i )) OR (objAccessControl.UserId = aVersions( rsVB.FieldIndex("OWNER_ID"), i ))Then
|
| 5759 |
dpurdie |
419 |
If aVersions( rsVB.FieldIndex("inuse"), i ) = 0 Then
|
|
|
420 |
'If aVersions( rsVB.FieldIndex("age") , i ) < 1000 Then
|
|
|
421 |
If aVersions( rsVB.FieldIndex("dlocked"), i ) <> "Y" Then
|
| 5902 |
dpurdie |
422 |
'If aVersions( rsVB.FieldIndex("dlocked"), i ) <> "A" Then
|
| 5759 |
dpurdie |
423 |
CanDestroyPackage = true
|
| 5902 |
dpurdie |
424 |
'End If
|
| 5759 |
dpurdie |
425 |
End If
|
|
|
426 |
'End If
|
|
|
427 |
End If
|
|
|
428 |
End If
|
|
|
429 |
End If
|
| 5933 |
dpurdie |
430 |
|
|
|
431 |
' Set destroy package action
|
|
|
432 |
If CanDestroyPackage Then
|
| 6977 |
dpurdie |
433 |
DestroyPackage = "<span class='destroyVersion'"&_
|
|
|
434 |
" title='Destroy this version of the package.'> "&_
|
| 6827 |
dpurdie |
435 |
" <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><span>"
|
| 5759 |
dpurdie |
436 |
Else
|
|
|
437 |
DestroyPackage = ""
|
| 5933 |
dpurdie |
438 |
End If
|
|
|
439 |
%>
|
| 6986 |
dpurdie |
440 |
<tr id='<%=idxName%>' data-idx='<%=idx%>' data-pvid='<%=CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) )%>' class='<%=rowClass%>'>
|
|
|
441 |
<td align="center"><%=imgPointer%></td>
|
|
|
442 |
<td align="center" ><%=imgLock%></td>
|
|
|
443 |
<td nowrap ><a class="txt_linked"><%=aVersions( rsVB.FieldIndex("pkg_version"), i )%></a></td>
|
|
|
444 |
<td nowrap ><%=fieldRelease_Date%></td>
|
|
|
445 |
<td ><%=NewLine_To_BR ( To_HTML( aVersions( rsVB.FieldIndex("comments"), i ) ) )%></td>
|
|
|
446 |
<td nowrap ><%=fieldReleased_By%></td>
|
|
|
447 |
<td align="center" class="nogo" ><%=fieldDownloadFullReleaseNotes%></td>
|
|
|
448 |
<td align="center" class="nogo" ><%=DestroyPackage%></td>
|
| 119 |
ghuddy |
449 |
</tr>
|
| 5933 |
dpurdie |
450 |
<%
|
|
|
451 |
Next
|
|
|
452 |
End If
|
|
|
453 |
%>
|
| 119 |
ghuddy |
454 |
</table>
|
|
|
455 |
</div></td>
|
|
|
456 |
</tr>
|
|
|
457 |
</table>
|
| 5933 |
dpurdie |
458 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
|
|
459 |
<input type="hidden" name="pkg_id" value="<%=parPkg_id%>">
|
|
|
460 |
<input type="hidden" name="rfile" value="<%=parRfile%>">
|
|
|
461 |
<input type="hidden" name="OLDpv_id" value="<%=parOLDpv_id%>">
|
|
|
462 |
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
|
|
|
463 |
<input type="hidden" name="filter_reset" value="">
|
|
|
464 |
</form>
|
| 5904 |
dpurdie |
465 |
</div>
|
| 119 |
ghuddy |
466 |
|
| 5173 |
dpurdie |
467 |
|