Subversion Repositories DevTools

Rev

Rev 5632 | Rev 5901 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5632 Rev 5759
Line 47... Line 47...
47
%>
47
%>
48
<%
48
<%
49
'-----------------------------------------------------------------------------------------------------------------------------------
49
'-----------------------------------------------------------------------------------------------------------------------------------
50
Function Get_All_Versions ( nPkg_id )
50
Function Get_All_Versions ( nPkg_id )
51
	Get_All_Versions = _
51
	Get_All_Versions = _
-
 
52
	" SELECT DISTINCT PV.PV_ID," &_
-
 
53
    "   PV.PKG_VERSION," &_
-
 
54
    "   PV.DLOCKED," &_
-
 
55
    "   PV.MODIFIED_STAMP," &_
-
 
56
    "   USR.FULL_NAME," &_
-
 
57
    "   usr.user_name," &_
-
 
58
    "   USR.USER_EMAIL," &_
-
 
59
    "   PV.COMMENTS," &_
-
 
60
    "   PV.PKG_LABEL," &_
-
 
61
    "   PV.IS_PATCH," &_
-
 
62
    "   PV.RELEASE_NOTES_INFO," &_
-
 
63
    "   PV.BUILD_TYPE," &_
-
 
64
    "   pv.CREATOR_ID," &_
-
 
65
    "   pv.OWNER_ID," &_
-
 
66
    "   NVL2(rc.rtag_id,1,0) as inuse," &_
52
	" SELECT PV.PV_ID, PV.PKG_VERSION, PV.DLOCKED, PV.MODIFIED_STAMP, USR.FULL_NAME, usr.user_name, USR.USER_EMAIL, PV.COMMENTS, PV.PKG_LABEL, PV.IS_PATCH, PV.RELEASE_NOTES_INFO, PV.BUILD_TYPE "&_
67
    "   trunc(SYSDATE - pv.CREATED_STAMP + 0.5) as age" &_
53
	"   FROM PACKAGE_VERSIONS PV, USERS USR "&_
68
    " FROM PACKAGE_VERSIONS PV," &_
-
 
69
    "      USERS USR,"&_
-
 
70
    "      RELEASE_CONTENT rc" &_
54
	"  WHERE PV.MODIFIER_ID = USR.USER_ID "&_
71
	" WHERE PV.MODIFIER_ID = USR.USER_ID(+) " &_
55
	"    AND PV.PKG_ID = :PKG_ID"&_
72
	"   AND PV.PKG_ID = :PKG_ID" &_
-
 
73
    "   AND pv.pv_id = rc.pv_id(+)" &_
56
	"    /*-- Manual Filer --*/"&_
74
	"    /*-- Manual Filter --*/" &_
57
	"    "& Construct_Filter ( parFLpkg_version, "pv.pkg_version" ) &_
75
	"    "& Construct_Filter ( parFLpkg_version, "pv.pkg_version" ) &_
58
	"    "& Construct_Filter ( parFLuser_name, "usr.user_name" ) &_
76
	"    "& Construct_Filter ( parFLuser_name, "usr.user_name" ) &_
59
    "    "& rippleFilter &_
77
    "    "& rippleFilter &_
60
	"    /*------------------*/"
78
	"    /*------------------*/"
61
	
79
	
Line 249... Line 267...
249
				
267
				
250
				
268
				
251
				' Sort versions
269
				' Sort versions
252
				Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsVB.FieldIndex("pkg_version") )
270
				Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsVB.FieldIndex("pkg_version") )
253
				
271
				
254
				
-
 
255
				DestroyPackage = ""
-
 
256
				CanDestroyPackage = canShowControlInProject ( "DestroyPackage" )
272
				CanDestroyPackage = canShowControlInProject ( "DestroyPackage" )
257
				
273
				
258
			  	' Descending order
274
			  	' Descending order
259
				For i = lastRow To 0 Step -1
275
				For i = lastRow To 0 Step -1
260
 
276
 
Line 289... Line 305...
289
						URLstring = "_wform_versions_history_release_notes.asp?"& Persists_Query_String( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ) ) &"#"& anchorName
305
						URLstring = "_wform_versions_history_release_notes.asp?"& Persists_Query_String( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ) ) &"#"& anchorName
290
					Else
306
					Else
291
						URLstring = scriptName &"?"& Persists_Query_String( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ) ) &"#"& anchorName
307
						URLstring = scriptName &"?"& Persists_Query_String( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ) ) &"#"& anchorName
292
					End If
308
					End If
293
					
309
					
-
 
310
                    ' User can try to delete package iff
-
 
311
                    '   Have suffiecient access (unusual)
-
 
312
                    '   They created it or own it
-
 
313
                    '   The version is not in use by any release (allow to be in pendinf or WIP)
-
 
314
                    '   [Not at the moment] The package was created less than xxxx days ago
-
 
315
                    '   Is not locked or Approved for Autobuild
-
 
316
                    If CanDestroyPackage = false Then
-
 
317
                        If  objAccessControl.UserId = aVersions( rsVB.FieldIndex("CREATOR_ID"), i ) OR objAccessControl.UserId = aVersions( rsVB.FieldIndex("OWNER_ID"), i )Then
-
 
318
                            If aVersions( rsVB.FieldIndex("inuse"), i ) = 0 Then
-
 
319
                                'If aVersions( rsVB.FieldIndex("age") , i ) < 1000 Then
-
 
320
                                    If aVersions( rsVB.FieldIndex("dlocked"), i ) <> "Y" Then
-
 
321
                                        If aVersions( rsVB.FieldIndex("dlocked"), i ) <> "A" Then
-
 
322
                                            CanDestroyPackage = true
-
 
323
                                        End If
-
 
324
                                    End If
-
 
325
                                'End If
-
 
326
                            End If
-
 
327
                        End If
-
 
328
                    End If
294
					
329
					
295
					' Set destroy package action
330
					' Set destroy package action
296
					If CanDestroyPackage Then
331
					If CanDestroyPackage Then
297
						DestroyPackage = "<a class='nogo' href='javascript:;'"&_
332
						DestroyPackage = "<a class='nogo' href='javascript:;'"&_
298
										 " title='Destroy this package from the database.' "&_
333
										 " title='Destroy this package from the database.' "&_
299
										 " onClick=""return vixConfirm('You are about to destroy ["& sPkg_Name &" "& aVersions( rsVB.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( rsVB.FieldIndex("pv_id"), i )  &"&bfile="& ScriptName &"&rtag_id="& parRtag_id &"&FLuser_name="& parFLuser_name &"&FLpkg_version="& parFLpkg_version &"&rfile="& parRfile &"&pkg_id="& parPkg_id &"&OLDpv_id="& parOLDpv_id &"'});"" >" &_
334
										 " onClick=""return vixConfirm('You are about to destroy ["& sPkg_Name &" "& aVersions( rsVB.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( rsVB.FieldIndex("pv_id"), i )  &"&bfile="& ScriptName &"&rtag_id="& parRtag_id &"&FLuser_name="& parFLuser_name &"&FLpkg_version="& parFLpkg_version &"&rfile="& parRfile &"&pkg_id="& parPkg_id &"&OLDpv_id="& parOLDpv_id &"'});"" >" &_
300
                                         " <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><a>"
335
                                         " <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><a>"
301
 
-
 
-
 
336
                    Else
-
 
337
                        DestroyPackage = ""
302
					End If
338
					End If
303
				%>
339
				%>
304
                <tr <%=Set_Row_Style ( URLstring, CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) ) )%>> 
340
                <tr <%=Set_Row_Style ( URLstring, CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) ) )%>> 
305
                  <td align="right" background="images/bg_action_dark.gif"><%=imgPointer%></td>
341
                  <td align="right" background="images/bg_action_dark.gif"><%=imgPointer%></td>
306
                  <td align="center" valign="top" <%=rowColor%>><%=imgLock%></td>
342
                  <td align="center" valign="top" <%=rowColor%>><%=imgLock%></td>