Subversion Repositories DevTools

Rev

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

Rev 5632 Rev 5759
Line 200... Line 200...
200
					
200
					
201
					' Sort versions
201
					' Sort versions
202
					Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
202
					Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
203
					
203
					
204
					
204
					
205
					DestroyPackage = ""
205
                    ' Not in a project context
-
 
206
                    ' Only god-like users will have this permission
206
					CanDestroyPackage = canShowControlInProject( "DestroyPackage" )
207
					CanDestroyPackage = canShowControl( "DestroyPackage" )
207
					
-
 
208
					
208
					
209
				  ' Descending order
209
				  ' Descending order
210
				  For i = lastRow To 0 Step -1
210
				  For i = lastRow To 0 Step -1
211
				  	imgLock = IMG_NOT_OFFICIAL
211
				  	imgLock = IMG_NOT_OFFICIAL
212
					If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y")  OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
212
					If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y")  OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
213
						imgLock = IMG_OFFICIAL
213
						imgLock = IMG_OFFICIAL
214
					End If
214
					End If
215
					
215
					
216
				  	sLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )
216
				  	sLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )
-
 
217
 
-
 
218
                    ' User can try to delete package iff
-
 
219
                    '   Have suffiecient access (unusual)
-
 
220
                    '   They created it or is its owner
-
 
221
                    '   The version is not in use by any release (allow to be in pendinf or WIP)
-
 
222
                    '   [Not at the moment] The package was created less than xxxx days ago
-
 
223
                    '   Is not locked or Approved for Autobuild
-
 
224
                    If CanDestroyPackage = false Then
-
 
225
                        If  objAccessControl.UserId = aVersions( rsVB.FieldIndex("CREATOR_ID"), i ) OR objAccessControl.UserId = aVersions( rsVB.FieldIndex("OWNER_ID"), i )Then
-
 
226
                            If aVersions( rsRep.FieldIndex("inuse"), i ) = 0 Then
-
 
227
                                'If aVersions( rsRep.FieldIndex("age") , i ) < 1000 Then
-
 
228
                                    If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "Y" Then
-
 
229
                                        If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "A" Then
-
 
230
                                            CanDestroyPackage = true
-
 
231
                                        End If
-
 
232
                                    End If
-
 
233
                                'End If
-
 
234
                            End If
-
 
235
                        End If
-
 
236
                    End If
217
					
237
					
218
					' Set destroy package action
238
					' Set destroy package action
219
					If CanDestroyPackage Then
239
					If CanDestroyPackage Then
220
						DestroyPackage = "<a href='javascript:;'"&_
240
						DestroyPackage = "<a href='javascript:;'"&_
221
										 " title='Destroy this package from the database.' "&_
241
										 " 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 &"'});"" >" &_
242
										 " 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>"
243
                                         " <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><a>"
-
 
244
                    Else
-
 
245
					    DestroyPackage = ""
224
					End If
246
					End If
225
				  %>
247
				  %>
226
					  <tr> 
248
					  <tr> 
227
					    <td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td>
249
					    <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>
250
						<td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=aVersions( rsRep.FieldIndex("pkg_version"), i )%></a></td>