Subversion Repositories DevTools

Rev

Rev 119 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0    ' always load the page, dont store
%>
<%
'=====================================================
'                                       Reference 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 parFRproj_id
Dim parFRrtag_id
Dim parToRtag_id
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parFRproj_id = QStrPar("FRproj_id")
parFRrtag_id = QStrPar("FRrtag_id")
parToRtag_id = QStrPar("ToRtag_id")
If parFRproj_id = "" Then parFRproj_id = "-1"
If parFRrtag_id = "" Then parFRrtag_id = "-1"
'----------------------------------------------
%>
<%
Sub Get_Projects ( NNproj_id )
        Dim rsTemp, Query_String, tempLINK
        Query_String = _
        "SELECT * FROM projects ORDER BY  UPPER( proj_name ) "
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
        
        Response.write "<select name='FRproj_id' onChange=""MM_jumpMenu('parent',this,0)"" class='form_item'>"
                Response.write "<option value=''>Select Project</option>"
                While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                        tempLINK = scriptName &"?FRproj_id="& rsTemp.Fields("proj_id") &"&FRrtag_id=&ToRtag_id="& parToRtag_id &"&"& objPMod.ComposeURL()
                        
                        If NNproj_id = Cstr(rsTemp.Fields("proj_id")) Then
                        Response.write "<option value='"& tempLINK &"' selected>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
                Else
                                Response.write "<option value='"& tempLINK &"'>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
                        End If
                        rsTemp.MoveNext
                WEnd
        Response.write "</select>"
        
        rsTemp.Close
        Set rsTemp = nothing
End Sub



Sub Get_Release_Labels ( NNproj_id, NNrtag_id )
        Dim rsTemp, Query_String, tempLINK
        Query_String = _
        "SELECT rtag_id, rtag_name FROM release_tags WHERE proj_id = "& NNproj_id &"  AND  OFFICIAL='Y' ORDER BY UPPER(rtag_name)"
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
        
        Response.write "<select name='FRrtag_id' onChange=""MM_jumpMenu('parent',this,0)"" class='form_item'>"
                If NNproj_id <> "-1" Then
                        Response.write "<option value=''>Select Release Name</option>"
                        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                tempLINK = scriptName &"?FRrtag_id="& rsTemp.Fields("rtag_id") &"&FRproj_id="& NNproj_id  &"&ToRtag_id="& parToRtag_id &"&"& objPMod.ComposeURL()
                                
                                If NNrtag_id = Cstr(rsTemp.Fields("rtag_id")) Then
                                Response.write "<option value='"& tempLINK &"' selected>"& (rsTemp.Fields("rtag_name")) &"</option>"
                        Else
                                        Response.write "<option value='"& tempLINK &"'>"& (rsTemp.Fields("rtag_name")) &"</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='_add_release_reference.asp?RefRtag_id=<%=Request.Form("RefRtag_id")%>&ToRtag_id=<%=Request.Form("ToRtag_id")%>&<%=objPMod.ComposeURL()%>';
        </script>               
        <%
        Call CloseWindow
End If
%>
<html>
<head>
<title>Release Manager</title>
<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="refrelease" 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">Reference a Release </td>
      <td background="images/lbox_bg_blue.gif" align="right" width="50%"> 
        <input type="submit" name="btn" value="Add" class="form_btn_comp" onClick="MM_validateForm('FRproj_id','Project','R','FRrtag_id','Release Name','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 colspan="2" valign="middle" nowrap class="form_group"><strong>NOTE:</strong> You can only reference locked releases.</td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Project</td>
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
              <%Call Get_Projects ( parFRproj_id )%>
            </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Release 
              Name </td>
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
              <%Call Get_Release_Labels ( parFRproj_id,  parFRrtag_id )%>
              <input type="hidden" name="ToRtag_id" value="<%=parToRtag_id%>">
                          <input type="hidden" name="RefRtag_id" value="<%=parFRrtag_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 nowrap width="100%"> 
              <p>&nbsp;</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"-->