Subversion Repositories DevTools

Rev

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

Rev 5930 Rev 5933
Line 1... Line 1...
1
<%
1
<%
2
'===============================================================
2
'===============================================================
3
'					 Version Browser
3
'                    Version Browser
4
'===============================================================
4
'===============================================================
5
%>
5
%>
6
<!--#include file="class/classSortHelper.asp"-->
6
<!--#include file="class/classSortHelper.asp"-->
7
<%
7
<%
8
'------------ Variable Definition -------------
8
'------------ Variable Definition -------------
9
Dim parFLpkg_version, parFLuser_name
9
Dim parFLpkg_version, parFLuser_name
10
Dim imgLock, fieldRelease_Date, fieldReleased_By, fieldDownloadFullReleaseNotes
10
Dim imgLock, fieldRelease_Date, fieldReleased_By, fieldDownloadFullReleaseNotes
11
Dim rsVB
11
Dim rsVB
12
Dim rowColor, imgPointer
12
Dim rowColor, imgPointer
13
Dim URLstring
13
Dim URLstring
14
Dim anchorName
14
Dim pvidName
-
 
15
Dim idxName
15
Dim filterInUse
16
Dim filterInUse
16
Dim hideRipple
17
Dim hideRipple
17
Dim rippleFilter
18
Dim rippleFilter
18
Dim DestroyPackage
19
Dim DestroyPackage
19
Dim CanDestroyProjectPackage
20
Dim CanDestroyProjectPackage
Line 26... Line 27...
26
Const IMG_PENDING = "<img src='icons/i_pending.gif' width='7' height='10' hspace='5' vspace='2' title='Package pending autobuild'>"
27
Const IMG_PENDING = "<img src='icons/i_pending.gif' width='7' height='10' hspace='5' vspace='2' title='Package pending autobuild'>"
27
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2' title='Package not yet released'>"
28
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2' title='Package not yet released'>"
28
Const IMG_DOWNLOAD = "<img src='images/i_download_small.gif' alt='Download full release notes.' width='16' height='16' hspace='2' border='0'>"
29
Const IMG_DOWNLOAD = "<img src='images/i_download_small.gif' alt='Download full release notes.' width='16' height='16' hspace='2' border='0'>"
29
'------------ Variable Init -------------------
30
'------------ Variable Init -------------------
30
If Request("filter_reset") <> "" Then 
31
If Request("filter_reset") <> "" Then 
31
	parFLpkg_version = "*"
32
    parFLpkg_version = "*"
32
	parFLuser_name	 = "*"
33
    parFLuser_name   = "*"
33
	filterInUse = FALSE
34
    filterInUse = FALSE
34
Else
35
Else
35
	parFLpkg_version = RequestDefault( "FLpkg_version", "*" )
36
    parFLpkg_version = RequestDefault( "FLpkg_version", "*" )
36
	parFLuser_name	 = RequestDefault( "FLuser_name","*" )
37
    parFLuser_name   = RequestDefault( "FLuser_name","*" )
37
	filterInUse = Is_Filter_In_Use ( "FLpkg_version, FLuser_name" )
38
    filterInUse = Is_Filter_In_Use ( "FLpkg_version, FLuser_name" )
38
End If
39
End If
39
 
40
 
40
If Request("hideRipple") = "True" Then 
41
If Request("hideRipple") = "True" Then 
41
	hideRipple = True
42
    hideRipple = True
42
    rippleFilter = "AND PV.BUILD_TYPE != 'Y'"
43
    rippleFilter = "AND PV.BUILD_TYPE != 'Y'"
43
Else
44
Else
44
	hideRipple = False
45
    hideRipple = False
45
    rippleFilter = ""
46
    rippleFilter = ""
46
End If
47
End If
47
 
48
 
48
'----------------------------------------------
49
'----------------------------------------------
49
%>
50
%>
50
<%
51
<%
51
'-----------------------------------------------------------------------------------------------------------------------------------
52
'-----------------------------------------------------------------------------------------------------------------------------------
52
Function Get_All_Versions ( nPkg_id )
53
Function Get_All_Versions ( nPkg_id )
53
	Get_All_Versions = _
54
    Get_All_Versions = _
54
	" SELECT DISTINCT PV.PV_ID," &_
55
    " SELECT DISTINCT PV.PV_ID," &_
55
    "   PV.PKG_VERSION," &_
56
    "   PV.PKG_VERSION," &_
56
    "   PV.DLOCKED," &_
57
    "   PV.DLOCKED," &_
57
    "   PV.MODIFIED_STAMP," &_
58
    "   PV.MODIFIED_STAMP," &_
58
    "   USR.FULL_NAME," &_
59
    "   USR.FULL_NAME," &_
59
    "   usr.user_name," &_
60
    "   usr.user_name," &_
Line 68... Line 69...
68
    "   NVL2(rc.rtag_id,1,0) as inuse," &_
69
    "   NVL2(rc.rtag_id,1,0) as inuse," &_
69
    "   trunc(SYSDATE - pv.CREATED_STAMP + 0.5) as age" &_
70
    "   trunc(SYSDATE - pv.CREATED_STAMP + 0.5) as age" &_
70
    " FROM PACKAGE_VERSIONS PV," &_
71
    " FROM PACKAGE_VERSIONS PV," &_
71
    "      USERS USR,"&_
72
    "      USERS USR,"&_
72
    "      RELEASE_CONTENT rc" &_
73
    "      RELEASE_CONTENT rc" &_
73
	" WHERE PV.MODIFIER_ID = USR.USER_ID(+) " &_
74
    " WHERE PV.MODIFIER_ID = USR.USER_ID(+) " &_
74
	"   AND PV.PKG_ID = :PKG_ID" &_
75
    "   AND PV.PKG_ID = :PKG_ID" &_
75
    "   AND pv.pv_id = rc.pv_id(+)" &_
76
    "   AND pv.pv_id = rc.pv_id(+)" &_
76
	"    /*-- Manual Filter --*/" &_
77
    "    /*-- Manual Filter --*/" &_
77
	"    "& Construct_Filter ( parFLpkg_version, "pv.pkg_version" ) &_
78
    "    "& Construct_Filter ( parFLpkg_version, "pv.pkg_version" ) &_
78
	"    "& Construct_Filter ( parFLuser_name, "usr.user_name" ) &_
79
    "    "& Construct_Filter ( parFLuser_name, "usr.user_name" ) &_
79
    "    "& rippleFilter &_
80
    "    "& rippleFilter &_
80
	"    /*------------------*/"
81
    "    /*------------------*/"
81
	
82
    
82
	Get_All_Versions = Replace( Get_All_Versions, ":PKG_ID", nPkg_id)
83
    Get_All_Versions = Replace( Get_All_Versions, ":PKG_ID", nPkg_id)
83
End Function
84
End Function
84
'-----------------------------------------------------------------------------------------------------------------------------------
85
'-----------------------------------------------------------------------------------------------------------------------------------
85
Function Construct_Filter ( sPar_val, sCol_name )
86
Function Construct_Filter ( sPar_val, sCol_name )
86
	Select Case sPar_val
87
    Select Case sPar_val
87
	Case Empty
88
    Case Empty
88
		Construct_Filter = "AND "& sCol_name &" IS NULL"
89
        Construct_Filter = "AND "& sCol_name &" IS NULL"
89
		
90
        
90
	Case "*"
91
    Case "*"
91
		Construct_Filter = ""
92
        Construct_Filter = ""
92
		
93
        
93
	Case Else
94
    Case Else
94
		If InStr( sPar_val, "*") > 0 Then
95
        If InStr( sPar_val, "*") > 0 Then
95
			' Asterisk found in string. Use LIKE
96
            ' Asterisk found in string. Use LIKE
96
			Construct_Filter = "AND "& sCol_name &" LIKE '"& Replace( sPar_val, "*", "%" ) &"'"
97
            Construct_Filter = "AND "& sCol_name &" LIKE '"& Replace( sPar_val, "*", "%" ) &"'"
97
		Else
98
        Else
98
			' No asterisk. Use =
99
            ' No asterisk. Use =
99
			Construct_Filter = "AND "& sCol_name &" = '"& sPar_val &"'"
100
            Construct_Filter = "AND "& sCol_name &" = '"& sPar_val &"'"
100
		End If
101
        End If
101
		
102
        
102
	End Select
103
    End Select
103
	
104
    
104
End Function
105
End Function
105
'-----------------------------------------------------------------------------------------------------------------------------------
106
'-----------------------------------------------------------------------------------------------------------------------------------
106
Function Is_Filter_In_Use ( sFilters )
107
Function Is_Filter_In_Use ( sFilters )
107
	Dim filters, filterName
108
    Dim filters, filterName
108
	Is_Filter_In_Use = FALSE
109
    Is_Filter_In_Use = FALSE
109
	
110
    
110
	filters = Split( Replace( sFilters, " ", "" ), "," )
111
    filters = Split( Replace( sFilters, " ", "" ), "," )
111
	
112
    
112
	For Each filterName In filters
113
    For Each filterName In filters
113
		If Request( filterName ) <> "*" Then 
114
        If Request( filterName ) <> "*" Then 
114
			Is_Filter_In_Use = TRUE
115
            Is_Filter_In_Use = TRUE
115
			Exit For
116
            Exit For
116
		End If
117
        End If
117
	Next
118
    Next
118
	
119
    
119
End Function
120
End Function
120
'-----------------------------------------------------------------------------------------------------------------------------------
121
'-----------------------------------------------------------------------------------------------------------------------------------
121
Function Set_Row_Style ( sLink, pvid )
122
Function Set_Row_Style ( sLink, pvid )
122
	Set_Row_Style = "onMouseOver='this.style.cursor=""pointer""' onClick='selectVersion("""& sLink &""",event)' "
123
    Set_Row_Style = "onMouseOver='this.style.cursor=""pointer""' onClick='selectVersion("""& sLink &""",event)' "
123
End Function
124
End Function
124
'-----------------------------------------------------------------------------------------------------------------------------------
125
'-----------------------------------------------------------------------------------------------------------------------------------
125
%>
126
%>
126
<!--#include file="_jquery_includes.asp"-->
127
<!--#include file="_jquery_includes.asp"-->
127
<script language="JavaScript" type="text/JavaScript">
128
<script language="JavaScript" type="text/JavaScript">
Line 169... Line 170...
169
{
170
{
170
    if (! $(event.target).closest('a').hasClass('nogo')) {
171
    if (! $(event.target).closest('a').hasClass('nogo')) {
171
        location.href = href;
172
        location.href = href;
172
    }
173
    }
173
}
174
}
-
 
175
 
-
 
176
//  Encode data into URL
-
 
177
function encodeData(data) {
-
 
178
    return Object.keys(data).map(function(key) {
-
 
179
        return [key, data[key]].map(encodeURIComponent).join("=");
-
 
180
    }).join("&");
-
 
181
} 
-
 
182
 
174
// Destroy a package version
183
// Destroy a package version
175
function DestroyVersion(pvid) {
184
function DestroyVersion(pvid, idx) {
-
 
185
    var data = {
-
 
186
        pv_id       : pvid,
-
 
187
        bfile       : "<%=ScriptName%>",
-
 
188
        rtag_id     : "<%=parRtag_id%>",
-
 
189
        FLuser_name : "<%=parFLuser_name%>",
-
 
190
        FLpkg_version : "<%=parFLpkg_version%>",
-
 
191
        rfile       : "<%=parRfile%>",
-
 
192
        pkg_id      : "<%=parPkg_id%>",
-
 
193
        OLDpv_id    : "<%=parOLDpv_id%>",
-
 
194
        index       : idx 
-
 
195
         
-
 
196
    };
176
    MM_openVixIFrame('_destroy_package.asp?pv_id=' + pvid + '&bfile="& ScriptName &"&rtag_id="& parRtag_id &"&FLuser_name="& parFLuser_name &"&FLpkg_version="& parFLpkg_version &"&rfile="& parRfile &"&pkg_id="& parPkg_id &"&OLDpv_id="& parOLDpv_id &"','Destroy Package Version') &_
197
    MM_openVixIFrame('_destroy_package.asp?' + encodeData(data), 'Destroy Package Version')
-
 
198
}
-
 
199
 
-
 
200
//  Scroll to package
-
 
201
//  Order of preference
-
 
202
//      index   - location of last package deleted
-
 
203
//      index-1 - Near last pakage deleted
-
 
204
//      pvid    - PVID being viewed
-
 
205
//      oldPVID - PVID Deleted
-
 
206
function scrollToPvId() {
-
 
207
    var oldpvid = Number('<%=parOLDpv_id%>');
-
 
208
    var pvid    = Number('<%=parPv_id%>'); 
-
 
209
    var idx     = Number('<%=parIndex%>');
-
 
210
    var els;
-
 
211
 
-
 
212
    if (idx > 0) {
-
 
213
        els = document.getElementById('IDX_' + idx.toString() );
-
 
214
        if (!els) {
-
 
215
            idx = idx -1;
-
 
216
            els = document.getElementById('IDX_' + idx.toString() );
-
 
217
        }
-
 
218
    }
-
 
219
 
-
 
220
    if (!els) els = document.getElementById('PVID_' + pvid.toString() );
-
 
221
    if (!els)els = document.getElementById('PVID_' + oldpvid.toString() );
-
 
222
    if (els) els.scrollIntoView();
177
}
223
}
178
 
224
 
-
 
225
//  Set the height of the two areas in the History Window
-
 
226
//  Note: Divs may not always be available.
-
 
227
function setLayerHeight () {
-
 
228
    try {
-
 
229
        var h = screen.height;
-
 
230
        MM_findObj("LayerVersions").style.height = (h-300)/2 +"px";
-
 
231
        MM_findObj("LayerDetails").style.height = (h-300)/2 +"px";
-
 
232
    } catch(e) {
-
 
233
    }
-
 
234
}   
-
 
235
 
179
//# sourceURL=_version_browser_1.asp	
236
//# sourceURL=_version_browser_1.asp
180
</script>
237
</script>
181
 
238
 
182
	  <!--------------- ACTION BUTTONS -------------------------->
239
      <!--------------- ACTION BUTTONS -------------------------->
183
      <div  style="width:100vw;">
240
      <div  style="width:100vw;">
184
	  <form name="filter" method="get" action="<%=scriptName%>">
241
      <form name="filter" method="get" action="<%=scriptName%>">
185
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
242
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
186
        <tr>
243
        <tr>
187
          <td width="1" valign="middle" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="5" height="35"></td>
244
          <td width="1" valign="middle" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="5" height="35"></td>
188
          <td width="100%" valign="middle" background="images/bg_action_norm.gif"><%
245
          <td width="100%" valign="middle" background="images/bg_action_norm.gif"><%
189
          Dim bEnableUse : bEnableUse = FALSE
246
          Dim bEnableUse : bEnableUse = FALSE
190
		  If Request("rtag_id") = ""  OR  _
247
          If Request("rtag_id") = ""  OR  _
191
		  	 Request("pv_id") = "" OR _
248
             Request("pv_id") = "" OR _
192
             parOLDpv_id = ParPv_id OR _
249
             parOLDpv_id = ParPv_id OR _
193
			 bIsPatch OR _
250
             bIsPatch OR _
194
             (NOT bCanInsertPkg) OR _
251
             (NOT bCanInsertPkg) OR _
195
			 (NOT objAccessControl.UserLogedIn) OR _
252
             (NOT objAccessControl.UserLogedIn) OR _
196
             (NOT releaseIsWritable(ReleaseMode))  _
253
             (NOT releaseIsWritable(ReleaseMode))  _
197
		  Then
254
          Then
198
                bEnableUse = FALSE
255
                bEnableUse = FALSE
199
		  Else
256
          Else
200
                bEnableUse = TRUE
257
                bEnableUse = TRUE
201
		  End If
258
          End If
202
 
259
 
203
          If bEnableUse Then
260
          If bEnableUse Then
204
          %>
261
          %>
205
          <div id='dialog-confirm' title="Confirm version change" style="display:none">
262
          <div id='dialog-confirm' title="Confirm version change" style="display:none">
206
          <p>Replace the current version of package <%=sPkg_Name%> with Version <%=sPkg_Version%>.
263
          <p>Replace the current version of package <%=sPkg_Name%> with Version <%=sPkg_Version%>.
207
          <p>The new version may be added directly into the release or the change may be made pending. 
264
          <p>The new version may be added directly into the release or the change may be made pending. 
208
          </div>
265
          </div>
209
          <%
266
          <%
210
            Response.write "<a href=';' onClick='return useThisVersion("""& sPkg_Name &""","""& sPkg_Version & """,""" & parRtag_id & ""","""& parOLDpv_id & """,""" & parPv_id & """);'><img src='images/abtn_use_this_version.gif' title='Use this version in project release.' width='107' height='25' hspace='1' border='0'></a>"
267
            Response.write "<a href=';' onClick='return useThisVersion("""& sPkg_Name &""","""& sPkg_Version & """,""" & parRtag_id & ""","""& parOLDpv_id & """,""" & parPv_id & """);'><img src='images/abtn_use_this_version.gif' title='Use this version in project release.' width='107' height='25' hspace='1' border='0'></a>"
211
          Else
268
          Else
212
		    Response.write "<img src='images/abtn_use_this_version_off.gif' width='108' height='26' hspace='1' border='0'>"
269
            Response.write "<img src='images/abtn_use_this_version_off.gif' width='108' height='26' hspace='1' border='0'>"
213
          End If
270
          End If
214
		  
271
          
215
		  Response.write "<img src='images/spacer.gif' width='25' height='25'>"
272
          Response.write "<img src='images/spacer.gif' width='25' height='25'>"
216
		  If filterInUse Then
273
          If filterInUse Then
217
		  	Response.write "<input type='image' name='btn' src='images/abtn_filter_on.gif' width='25' height='25' border='0' alt='Apply filter. (Filter is in use!)'>"
274
            Response.write "<input type='image' name='btn' src='images/abtn_filter_on.gif' width='25' height='25' border='0' alt='Apply filter. (Filter is in use!)'>"
218
		  Else
275
          Else
219
		    Response.write "<input type='image' name='btn' src='images/abtn_filter.gif' width='25' height='25' border='0' alt='Apply filter'>"
276
            Response.write "<input type='image' name='btn' src='images/abtn_filter.gif' width='25' height='25' border='0' alt='Apply filter'>"
220
		  End If
277
          End If
221
		  Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "filter_reset=true" ) &"'><img src='images/abtn_remove_filter.gif' alt='Remove filter' width='25' height='25' hspace='2' border='0'></a>"
278
          Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "filter_reset=true" ) &"'><img src='images/abtn_remove_filter.gif' alt='Remove filter' width='25' height='25' hspace='2' border='0'></a>"
222
 
279
 
223
		  Response.write "<img src='images/spacer.gif' width='25' height='25'>"
280
          Response.write "<img src='images/spacer.gif' width='25' height='25'>"
224
          Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "hideRipple=" & not hideRipple ) &"'>"
281
          Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "hideRipple=" & not hideRipple ) &"'>"
225
    		  If hideRipple Then
282
              If hideRipple Then
226
    		  	Response.write "<img src='images/RippleSquareOff.gif' width='25' height='25' border='0' title='Rippled Versions Hidden. Toggle'>"
283
                Response.write "<img src='images/RippleSquareOff.gif' width='25' height='25' border='0' title='Rippled Versions Hidden. Toggle'>"
227
    		  Else
284
              Else
228
    		    Response.write "<img src='images/RippleSquare.gif' width='25' height='25' border='0' title='Rippled Versions Shown. Toggle'>"
285
                Response.write "<img src='images/RippleSquare.gif' width='25' height='25' border='0' title='Rippled Versions Shown. Toggle'>"
229
    		  End If
286
              End If
230
          Response.write "</a>"
287
          Response.write "</a>"
231
 
288
 
232
		  %></td>
289
          %></td>
233
		  <td width="1" valign="middle" background="images/bg_action_norm.gif"><a href="javascript:;" onClick="window.opener.document.location='dependencies.asp?pv_id=<%=parPv_id%>';self.close();"><img src="images/abtn_open.gif" width="46" height="25" hspace="5" border="0" alt="Open In Parent Window."></a></td>
290
          <td width="1" valign="middle" background="images/bg_action_norm.gif"><a href="javascript:;" onClick="window.opener.document.location='dependencies.asp?pv_id=<%=parPv_id%>';self.close();"><img src="images/abtn_open.gif" width="46" height="25" hspace="5" border="0" alt="Open In Parent Window."></a></td>
234
		  <td width="1" valign="middle" background="images/bg_action_norm.gif"><a href="javascript:;" onClick="self.close();"><img src="images/abtn_close.gif" width="46" height="25" hspace="5" border="0" alt="Close this window."></a></td>
291
          <td width="1" valign="middle" background="images/bg_action_norm.gif"><a href="javascript:;" onClick="self.close();"><img src="images/abtn_close.gif" width="46" height="25" hspace="5" border="0" alt="Close this window."></a></td>
235
        </tr>
292
        </tr>
236
      </table>
293
      </table>
237
	  <!--------------------- CAPTION ---------------------------->
294
      <!--------------------- CAPTION ---------------------------->
238
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
295
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
239
	    <tr>
296
        <tr>
240
	      <td class="lbox_ttl_b" background="images/bg_action_dark.gif" align="center"><%=sPkg_Name%></td>
297
          <td class="lbox_ttl_b" background="images/bg_action_dark.gif" align="center"><%=sPkg_Name%></td>
241
		</tr>
298
        </tr>
242
      </table>
299
      </table>
243
	  <!------------------ VERSION LIST -------------------------->
300
      <!------------------ VERSION LIST -------------------------->
244
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
301
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
245
        <tr>
302
        <tr>
246
          <td background="images/bg_action_norm.gif"> 
303
          <td background="images/bg_action_norm.gif"> 
247
            <div id="LayerVersions" style="height: 350px; width:100vw; overflow: auto;" name="LayerVersions"> 
304
            <div id="LayerVersions" style="height: 350px; width:100vw; overflow: auto;" name="LayerVersions"> 
248
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
305
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
Line 250... Line 307...
250
                  <td width="1" nowrap background="images/bg_action_dark.gif"><img src="images/spacer.gif" width="15" height="10"></td>
307
                  <td width="1" nowrap background="images/bg_action_dark.gif"><img src="images/spacer.gif" width="15" height="10"></td>
251
                  <td width="1" nowrap background="images/bg_action_dark.gif">&nbsp;</td>
308
                  <td width="1" nowrap background="images/bg_action_dark.gif">&nbsp;</td>
252
                  <td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Version&nbsp;&nbsp;<br><input name="FLpkg_version" type="text" class="form_ifilter" value="<%=parFLpkg_version%>" size="15"></td>
309
                  <td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Version&nbsp;&nbsp;<br><input name="FLpkg_version" type="text" class="form_ifilter" value="<%=parFLpkg_version%>" size="15"></td>
253
                  <td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Last Mod. Date&nbsp;&nbsp;</td>
310
                  <td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Last Mod. Date&nbsp;&nbsp;</td>
254
                  <td width="100%" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Reason for this version</td>
311
                  <td width="100%" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Reason for this version</td>
255
				  <td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Last Modified&nbsp;&nbsp;<br><input name="FLuser_name" type="text" class="form_ifilter" value="<%=parFLuser_name%>" size="15"></td>
312
                  <td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Last Modified&nbsp;&nbsp;<br><input name="FLuser_name" type="text" class="form_ifilter" value="<%=parFLuser_name%>" size="15"></td>
-
 
313
                  <td width="1" nowrap background="images/bg_action_dark.gif"></td>
256
                  <td width="1" nowrap background="images/bg_action_dark.gif"></td>
314
                  <td width="1" nowrap background="images/bg_action_dark.gif"></td>
257
				  <td width="1" nowrap background="images/bg_action_dark.gif"></td>
-
 
258
                </tr>
315
                </tr>
259
				<%
316
                <%
260
				Dim aVersions, lastRow, i, objSortHelper
317
                Dim aVersions, lastRow, i, objSortHelper, idx
261
				
-
 
262
				
318
                
263
				Set rsVB = OraDatabase.DbCreateDynaset( Get_All_Versions ( parPkg_id ), cint(0))
319
                Set rsVB = OraDatabase.DbCreateDynaset( Get_All_Versions ( parPkg_id ), cint(0))
264
				
-
 
265
				
-
 
266
				
-
 
267
				
320
                
268
			  	' Descending order
321
                ' Descending order
269
				If rsVB.RecordCount > 0 Then
322
                If rsVB.RecordCount > 0 Then
270
				aVersions = rsVB.GetRows()
323
                aVersions = rsVB.GetRows()
271
				lastRow = UBound( aVersions, 2 )
324
                lastRow = UBound( aVersions, 2 )
272
				
325
                
273
				Set objSortHelper = New SortHelper
326
                Set objSortHelper = New SortHelper
274
				
327
                
275
				
328
                
276
				' Sort versions
329
                ' Sort versions
277
				Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsVB.FieldIndex("pkg_version") )
330
                Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsVB.FieldIndex("pkg_version") )
278
				
331
                
279
				CanDestroyProjectPackage = canShowControlInProject ( "DestroyPackage" )
332
                CanDestroyProjectPackage = canShowControlInProject ( "DestroyPackage" )
280
				
333
                
281
			  	' Descending order
334
                ' Descending order
-
 
335
                idx = 0
282
				For i = lastRow To 0 Step -1
336
                For i = lastRow To 0 Step -1
-
 
337
                    idx = idx + 1
283
 
338
 
284
				%>
339
                %>
285
				<%	' Highlight row case
340
                <%  ' Highlight row case
286
					rowColor = IMGBG_ROW
341
                    rowColor = IMGBG_ROW
287
					imgPointer = ""
342
                    imgPointer = ""
288
					If CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) ) = parPv_id Then 
343
                    If CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) ) = parPv_id Then 
289
						rowColor = IMGBG_ROW_HI
344
                        rowColor = IMGBG_ROW_HI
290
						imgPointer = IMG_PONTER
345
                        imgPointer = IMG_PONTER
291
					End If
346
                    End If
292
					
347
                    
293
					' Official/Unofficial case
348
                    ' Official/Unofficial case
294
					imgLock = IMG_NOT_OFFICIAL
349
                    imgLock = IMG_NOT_OFFICIAL
295
					'fieldRelease_Date = ""
350
                    'fieldRelease_Date = ""
296
					'fieldReleased_By = ""
351
                    'fieldReleased_By = ""
297
					If (aVersions( rsVB.FieldIndex("dlocked"), i ) = "Y")  Then
352
                    If (aVersions( rsVB.FieldIndex("dlocked"), i ) = "Y")  Then
298
						imgLock = IMG_OFFICIAL
353
                        imgLock = IMG_OFFICIAL
299
                    ElseIf (aVersions( rsVB.FieldIndex("dlocked"), i ) = "A") Then 
354
                    ElseIf (aVersions( rsVB.FieldIndex("dlocked"), i ) = "A") Then 
300
						imgLock = IMG_PENDING
355
                        imgLock = IMG_PENDING
301
					End If
356
                    End If
302
					
357
                    
303
					fieldRelease_Date = DisplayShortDateTime ( aVersions( rsVB.FieldIndex("modified_stamp"), i ) )
358
                    fieldRelease_Date = DisplayShortDateTime ( aVersions( rsVB.FieldIndex("modified_stamp"), i ) )
304
					fieldReleased_By = "<a href='mailto:"& aVersions( rsVB.FieldIndex("user_email"), i ) &"' class='txt_linked'><img src='images/i_user.gif' width='10' height='13' hspace='2' border='0' align='absmiddle' alt='"& aVersions( rsVB.FieldIndex("full_name"), i ) &" &lt;"& aVersions( rsVB.FieldIndex("user_email"), i ) &"&gt;'>"& aVersions( rsVB.FieldIndex("user_name"), i ) &"</a>"
359
                    fieldReleased_By = "<a href='mailto:"& aVersions( rsVB.FieldIndex("user_email"), i ) &"' class='txt_linked'><img src='images/i_user.gif' width='10' height='13' hspace='2' border='0' align='absmiddle' alt='"& aVersions( rsVB.FieldIndex("full_name"), i ) &" &lt;"& aVersions( rsVB.FieldIndex("user_email"), i ) &"&gt;'>"& aVersions( rsVB.FieldIndex("user_name"), i ) &"</a>"
305
					
360
                    
306
					' Full Release Notes availability
361
                    ' Full Release Notes availability
307
					fieldDownloadFullReleaseNotes = ""
362
                    fieldDownloadFullReleaseNotes = ""
308
					If NOT IsNull( aVersions( rsVB.FieldIndex("release_notes_info"), i ) ) OR ( InStr( aVersions( rsVB.FieldIndex("release_notes_info"), i ), "MGS:") < 1)  Then
363
                    If NOT IsNull( aVersions( rsVB.FieldIndex("release_notes_info"), i ) ) OR ( InStr( aVersions( rsVB.FieldIndex("release_notes_info"), i ), "MGS:") < 1)  Then
309
						fieldDownloadFullReleaseNotes = "<a href='"& HTTP_PKG_ARCHIVE & aVersions( rsVB.FieldIndex("release_notes_info"), i ) &"' target='_blank'><img src='images/i_download_small.gif' alt='Download full release notes.' width='16' height='16' hspace='2' border='0'></a>"
364
                        fieldDownloadFullReleaseNotes = "<a href='"& HTTP_PKG_ARCHIVE & aVersions( rsVB.FieldIndex("release_notes_info"), i ) &"' target='_blank'><img src='images/i_download_small.gif' alt='Download full release notes.' width='16' height='16' hspace='2' border='0'></a>"
310
					End If
365
                    End If
311
					
366
                    
312
					anchorName = "ANC_"& aVersions( rsVB.FieldIndex("pv_id"), i )
367
                    pvidName = "PVID_"& aVersions( rsVB.FieldIndex("pv_id"), i )
-
 
368
                    idxName = "IDX_" & idx
313
					If aVersions( rsVB.FieldIndex("is_patch"), i ) = "Y" Then
369
                    If aVersions( rsVB.FieldIndex("is_patch"), i ) = "Y" Then
314
						URLstring = "_wform_versions_history_release_notes.asp?"& Persists_Query_String( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ) ) &"#"& anchorName
370
                        URLstring = "_wform_versions_history_release_notes.asp?"& Persists_Query_String_Trim( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ), "index" )
315
					Else
371
                    Else
316
						URLstring = scriptName &"?"& Persists_Query_String( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ) ) &"#"& anchorName
372
                        URLstring = scriptName &"?"& Persists_Query_String_Trim( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ), "index" )
317
					End If
373
                    End If
318
					
374
                    
319
                    ' User can try to delete package iff
375
                    ' User can try to delete package iff
320
                    '   Have suffiecient access (unusual)
376
                    '   Have suffiecient access (unusual)
321
                    '   They created it or own it
377
                    '   They created it or own it
322
                    '   The version is not in use by any release (allow to be in pending or WIP)
378
                    '   The version is not in use by any release (allow to be in pending or WIP)
323
                    '   [Not at the moment] The package was created less than xxxx days ago
379
                    '   [Not at the moment] The package was created less than xxxx days ago
Line 334... Line 390...
334
                                    End If
390
                                    End If
335
                                'End If
391
                                'End If
336
                            End If
392
                            End If
337
                        End If
393
                        End If
338
                    End If
394
                    End If
339
					
395
                    
340
					' Set destroy package action
396
                    ' Set destroy package action
341
					If CanDestroyPackage Then
397
                    If CanDestroyPackage Then
342
						DestroyPackage = "<a class='nogo' href='javascript:;'"&_
398
                        DestroyPackage = "<a class='nogo' href='javascript:;'"&_
343
										 " title='Destroy this package from the database.' "&_
399
                                         " title='Destroy this package from the database.' "&_
344
                                         " onClick=DestroyVersion("& aVersions( rsVB.FieldIndex("pv_id"), i )  &")>" &_
400
                                         " onClick=DestroyVersion("& aVersions( rsVB.FieldIndex("pv_id"), i ) &"," & idx  &")>" &_
345
                                         " <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><a>"
401
                                         " <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><a>"
346
                    Else
402
                    Else
347
                        DestroyPackage = ""
403
                        DestroyPackage = ""
348
					End If
404
                    End If
349
				%>
405
                %>
350
                <tr <%=Set_Row_Style ( URLstring, CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) ) )%>> 
406
                <tr id="<%=idxName%>" <%=Set_Row_Style ( URLstring, CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) ) )%>> 
351
                  <td align="right" background="images/bg_action_dark.gif"><%=imgPointer%></td>
407
                  <td align="right" background="images/bg_action_dark.gif"><%=imgPointer%><span id="<%=pvidName%>"></span></td>
352
                  <td align="center" valign="top" <%=rowColor%>><%=imgLock%></td>
408
                  <td align="center" valign="top" <%=rowColor%>><%=imgLock%></td>
353
                  <td valign="top" nowrap <%=rowColor%>><a name="<%=anchorName%>"></a><a href="<%=URLstring%>" class="txt_linked"><%=aVersions( rsVB.FieldIndex("pkg_version"), i )%></a></td>
409
                  <td valign="top" nowrap <%=rowColor%>><a href="<%=URLstring%>" class="txt_linked"><%=aVersions( rsVB.FieldIndex("pkg_version"), i )%></a></td>
354
                  <td valign="top" nowrap <%=rowColor%> class="form_item"><%=fieldRelease_Date%></td>
410
                  <td valign="top" nowrap <%=rowColor%> class="form_item"><%=fieldRelease_Date%></td>
355
                  <td valign="top" <%=rowColor%> class="form_item"><%=NewLine_To_BR ( To_HTML( aVersions( rsVB.FieldIndex("comments"), i ) ) )%></td>
411
                  <td valign="top" <%=rowColor%> class="form_item"><%=NewLine_To_BR ( To_HTML( aVersions( rsVB.FieldIndex("comments"), i ) ) )%></td>
356
                  <td valign="top" nowrap <%=rowColor%> class="form_item"><%=fieldReleased_By%></td>
412
                  <td valign="top" nowrap <%=rowColor%> class="form_item"><%=fieldReleased_By%></td>
357
                  <td align="center" valign="top" <%=rowColor%>><%=fieldDownloadFullReleaseNotes%></td>
413
                  <td align="center" valign="top" <%=rowColor%>><%=fieldDownloadFullReleaseNotes%></td>
358
				  <td align="center" valign="top" class="nogo" <%=rowColor%>><%=DestroyPackage%></td>
414
                  <td align="center" valign="top" class="nogo" <%=rowColor%>><%=DestroyPackage%></td>
359
                </tr>
415
                </tr>
360
				<%
416
                <%
361
				Next
417
                Next
362
				End If
418
                End If
363
				%>
419
                %>
364
              </table>
420
              </table>
365
            </div></td>
421
            </div></td>
366
        </tr>
422
        </tr>
367
      </table> 
423
      </table> 
368
	  <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
424
      <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
369
	  <input type="hidden" name="pkg_id" value="<%=parPkg_id%>">
425
      <input type="hidden" name="pkg_id" value="<%=parPkg_id%>">
370
	  <input type="hidden" name="rfile" value="<%=parRfile%>">
426
      <input type="hidden" name="rfile" value="<%=parRfile%>">
371
	  <input type="hidden" name="OLDpv_id" value="<%=parOLDpv_id%>">
427
      <input type="hidden" name="OLDpv_id" value="<%=parOLDpv_id%>">
372
	  <input type="hidden" name="pv_id" value="<%=parPv_id%>">
428
      <input type="hidden" name="pv_id" value="<%=parPv_id%>">
373
	  <input type="hidden" name="filter_reset" value="">
429
      <input type="hidden" name="filter_reset" value="">
374
	  </form>
430
      </form>
375
      </div>
431
      </div>
376
 
432
 
377
	  
433
      
378
 
434