Subversion Repositories DevTools

Rev

Rev 169 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 169 Rev 171
Line 502... Line 502...
502
   Get_Pkg_Vcs_Tag = OraDatabase.Parameters("RETURN_CODE").Value
502
   Get_Pkg_Vcs_Tag = OraDatabase.Parameters("RETURN_CODE").Value
503
   OraDatabase.Parameters.Remove "PV_ID"
503
   OraDatabase.Parameters.Remove "PV_ID"
504
   OraDatabase.Parameters.Remove "RETURN_CODE"
504
   OraDatabase.Parameters.Remove "RETURN_CODE"
505
End Function
505
End Function
506
 
506
 
-
 
507
 
-
 
508
'----------------------------------------------------------------------------------------------------------------------------------------
-
 
509
' Returns true if the specified package is released
-
 
510
Function Is_Released(artag_id, apv_id)
-
 
511
  Dim rsQry: Set rsQry = OraDatabase.DbCreateDynaset( "SELECT rc. pv_id FROM release_content rc WHERE rc.rtag_id = " & artag_id & " AND rc.pv_id = " & apv_id, cint(0))
-
 
512
  Is_Released = rsQry.RecordCount <> 0
-
 
513
  rsQry.Close()
-
 
514
End Function
507
'----------------------------------------------------------------------------------------------------------------------------------------
515
'----------------------------------------------------------------------------------------------------------------------------------------
508
 
516
 
509
 
517
 
510
'----------------------------------------------------------------------------------------------------------------------------------------
518
'----------------------------------------------------------------------------------------------------------------------------------------
511
%>
519
%>
Line 534... Line 542...
534
      %>
542
      %>
535
 
543
 
536
      <%
544
      <%
537
        ' State
545
        ' State
538
        Dim sstate
546
        Dim sstate
539
        Dim bcan_edit
547
        Dim bcan_unlock
540
        Dim stitle
548
        Dim stitle
-
 
549
        Dim bis_patch
-
 
550
        Dim spkgtype
-
 
551
        Dim slockonclick: slockonclick=""
-
 
552
        Dim bis_released
-
 
553
 
-
 
554
        bis_released = is_Released(parRtag_id, parPv_id)
-
 
555
 
-
 
556
        bis_patch = not IsNull(pkgInfoHash.Item ("is_patch")) 
-
 
557
        If bis_patch Then
-
 
558
          'patch
-
 
559
          ' the user can unlock a patch if they have permission
-
 
560
          bcan_unlock = objAccessControl.IsDataActive ("PROJECTS", DB_PROJ_ID, "EditProjects") AND (objAccessControl.IsActive("UnlockPatch"))
-
 
561
          spkgtype = "patch"
-
 
562
        Else
-
 
563
          ' package
-
 
564
          ' the user can only unlock a package if it is released and they have permission
-
 
565
          bcan_unlock = bis_released AND objAccessControl.IsDataActive ("PROJECTS", DB_PROJ_ID, "EditProjects") AND (objAccessControl.IsActive("UnlockPackage"))
-
 
566
          spkgtype = "package"
-
 
567
        End If
541
 
568
 
542
        If (pkgInfoHash.Item ("dlocked") = "Y") Then
569
        If (pkgInfoHash.Item ("dlocked") = "Y") Then
543
          sstate = "Released"
570
          sstate = "Released"
544
        Else
571
        Else
545
          sstate = "Not released"
572
          sstate = "Not released"
546
        End If        
573
        End If
547
 
574
       
548
        bcan_edit = (not IsNull(pkgInfoHash.Item ("is_patch"))) and objAccessControl.IsDataActive ("PROJECTS", DB_PROJ_ID, "EditProjects") AND (objAccessControl.IsActive("UnlockPatch"))
-
 
549
        If bcan_edit  Then
575
        If bcan_unlock  Then
550
          If (pkgInfoHash.Item ("dlocked") = "Y") Then
576
          If (pkgInfoHash.Item ("dlocked") = "Y") Then
551
            ' Unlock patch.
577
            ' Unlock patch or package.
-
 
578
            stitle="Unlock the " & spkgtype
552
            shref="_s_unlock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id
579
            shref="_s_unlock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id
-
 
580
            ' allow unlocking of package after confirmation.  Note: Unlocking of a package is intended for the administrators
553
            stitle="Unlock the patch"
581
            If not bis_patch Then slockonclick="'return confirmAction(""Do you want to unlock this package?"");'"
554
          ElseIf (pkgInfoHash.Item ("dlocked") = "N") Then
582
          ElseIf (pkgInfoHash.Item ("dlocked") = "N") Then
555
            ' lock patch.
583
            ' lock patch or package.
556
            shref="_s_lock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id
584
            shref="_s_lock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id
557
            stitle="Lock the patch. Release requirements are not applied."
585
            stitle="Lock the " & spkgtype & ". Release requirements are not applied."
-
 
586
            ' allow locking of package after confirmation.  Note: locking of a package is intended for the administrators
-
 
587
            If not bis_patch Then slockonclick="'return confirmAction(""Do you want to lock this package?"");'"
558
          End If
588
          End If
559
        End if
589
        End if
-
 
590
 
560
      %>
591
      %>
561
 
592
 
562
      <tr>
593
      <tr>
563
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top">
594
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top">
564
         <% If bcan_edit then %>
595
         <% If bcan_unlock Then
-
 
596
              If (slockonclick = "") Then%>
565
           <a href=<%=shref%> class='body_txt' title=<%=stitle%>><strong>Status:</strong><img src='images/i_edit.gif' width='12' height='12' border='0' ></a>
597
                <a href=<%=shref%> class='body_txt' title=<%=stitle%>><strong>Status:</strong><img src='images/i_edit.gif' width='12' height='12' border='0' ></a>
-
 
598
         <%   Else %>
-
 
599
                <a href=<%=shref%> onClick=<%=slockonclick%> class='body_txt' title=<%=stitle%>><strong>Status:</strong><img src='images/i_edit.gif' width='12' height='12' border='0' ></a>
-
 
600
         <%   End If %>
566
         <% else %>
601
         <% Else %>
567
           <b><strong>Status:</strong></b>
602
              <b><strong>Status:</strong></b>
568
         <% end if %>
603
         <% End If %>
569
         </td>
604
         </td>
570
         <td bgcolor=#f5f5f5 class="sublbox_txt"><%=sstate%></td>
605
         <td bgcolor=#f5f5f5 class="sublbox_txt"><%=sstate%></td>
571
      </tr>
606
      </tr>
572
 
607
 
573
      <tr>
608
      <tr>