Subversion Repositories DevTools

Rev

Rev 5357 | Rev 5590 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0    ' always load the page, dont store
%>
<%
'=====================================================
'                                       Import Release
'=====================================================
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim parFRpkg_id                     ' Currently selected Package
Dim parFRpv_id                      ' Currently selected Package-Version
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parFRpkg_id = QStrPar("FRpkg_id")
parFRpv_id = QStrPar("FRpv_id")
If parFRpkg_id = "" Then parFRpkg_id = "-1"
If parFRpv_id = "" Then parFRpv_id = "-1"
'----------------------------------------------
%>
<%
'-------------------------------------------------
' Function:         Get_Packages   
' Description:      Generate a List Box of all package names in the system
'                   Select the 'current' package
' Arguments:        NNpkg_id - Currently selected pkg_id
'
Sub Get_Packages ( NNpkg_id )
        Dim rsTemp, Query_String, tempLINK
        Query_String = _
        "SELECT * FROM packages ORDER BY pkg_name ASC"
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
        
        Response.write "<select name='FRpkg_id' onChange=""MM_jumpMenu('parent',this,0)"" class='form_item'>"
                Response.write "<option value=''>Select Package</option>"
                While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                        tempLINK = scriptName &"?FRpkg_id="& rsTemp.Fields("pkg_id") & "&"& objPMod.ComposeURL()
                        If NNpkg_id = Cstr(rsTemp.Fields("pkg_id")) Then
                        Response.write "<option value='"& tempLINK &"' selected>"& (rsTemp.Fields("pkg_name")) &"</option>"
                Else
                                Response.write "<option value='"& tempLINK &"'>"& (rsTemp.Fields("pkg_name")) &"</option>"
            End If
                        rsTemp.MoveNext
                WEnd
        Response.write "</select>"
        
        rsTemp.Close
        Set rsTemp = nothing
End Sub

'-------------------------------------------------
' Function:         Get_Package_Versions
' Description:      Create a list box for all versions of a specified pakage
' Arguments:        NNpkg_id   - pkg_id of the base package
'                   NNrtag_id   - pv_id of the currently selected package-vesrion
'
Sub Get_Package_Versions ( NNpkg_id, NNrtag_id )
        Dim rsTemp, Query_String, tempLINK, productId
        Query_String = _
        "SELECT pv_id, pkg_version FROM package_versions WHERE pkg_id = "& NNpkg_id &" ORDER BY pkg_version ASC"
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
        
        Response.write "<select name='FRpv_id' onChange=""MM_jumpMenu('parent',this,0)"" class='form_item'>"
                If NNpkg_id <> "-1" Then
                        Response.write "<option value=''>Select Package Version</option>"
                        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                tempLINK = scriptName &"?FRpv_id="& rsTemp.Fields("pv_id") &"&FRpkg_id="& NNpkg_id &"&"& objPMod.ComposeURL()
                                
                                If NNrtag_id = Cstr(rsTemp.Fields("pv_id")) Then
                                Response.write "<option value='"& tempLINK &"' selected>"& (rsTemp.Fields("pkg_version")) &"</option>"
                        Else
                                        Response.write "<option value='"& tempLINK &"'>"& (rsTemp.Fields("pkg_version")) &"</option>"
                                End If
                                rsTemp.MoveNext
                        WEnd
                End If
        Response.write "</select>"
        
        rsTemp.Close
        Set rsTemp = nothing
End Sub
%>
<%
'Process submition
If CBool(QStrPar("action")) Then
        %>
        <script language="JavaScript" type="text/javascript">
        window.opener.location='_import_dependency.asp?FromPv_id=<%=Request.Form("FromPv_id")%>&<%=objPMod.ComposeURL()%>';
        </script>               
        <%
        Call CloseWindow
End If
%>
<html>
<head>
<title>Release Manager</title>
<link rel="shortcut icon" href="<%=FavIcon%>"/>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
<link rel="stylesheet" href="images/navigation.css" type="text/css">
<script language="JavaScript" src="images/common.js"></script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
<form name="importrel" method="post" action="<%=scriptName%>">
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
    <tr> 
      <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_change_group_off.gif" width="22" height="25" hspace="5"></td>
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">Import Package Dependencies</td>
      <td background="images/lbox_bg_blue.gif" align="right" width="50%"> 
        <input type="submit" name="btn" value="Import" class="form_btn_comp" onClick="MM_validateForm('FRpkg_id','Package Name','R','FRpv_id','Package Version','R');return document.MM_returnValue">
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
      </td>
      <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap> 
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
    </tr>
    <tr> 
      <td height="100%" width="1%">&nbsp;</td>
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif"> 
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
          <tr> 
            <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
            <td width="1%" nowrap class="form_group" valign="bottom"></td>
            <td nowrap width="100%">&nbsp; </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package</td>
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
              <%Call Get_Packages ( parFRpkg_id )%>
            </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package Version </td>
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
              <%Call Get_Package_Versions ( parFRpkg_id, parFRpv_id )%>
                          <input type="hidden" name="FromPv_id" value="<%=parFRpv_id%>">
                          <input type="hidden" name="rtag_id" value="<%=Request("rtag_id")%>">
              <input type="hidden" name="action" value="true">
            </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
            <td width="100%" class="form_txt"> 
              <p>Import all the dependencies of the specified package into the current Release in a recursive manner.
               <br>The specified package will also be import - if it is not already present.
               <p>Package Versions will be added to the 'Pending' tab of the Release. Duplicates <bold>MUST</bold> be removed from this list
                  before the versions are 'Released' into the body of the Release.
              </p>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr> 
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
    </tr>
  </table>
</form>
</body>
</html>


<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->