1957 |
30 Apr 13 |
olle |
1 |
<%@ page |
1957 |
30 Apr 13 |
olle |
2 |
pageEncoding="UTF-8" |
1957 |
30 Apr 13 |
olle |
3 |
session="false" |
1957 |
30 Apr 13 |
olle |
4 |
import="net.sf.basedb.core.Application" |
1957 |
30 Apr 13 |
olle |
5 |
import="net.sf.basedb.core.User" |
1957 |
30 Apr 13 |
olle |
6 |
import="net.sf.basedb.core.DbControl" |
1957 |
30 Apr 13 |
olle |
7 |
import="net.sf.basedb.core.SessionControl" |
1957 |
30 Apr 13 |
olle |
8 |
import="net.sf.basedb.clients.web.Base" |
1957 |
30 Apr 13 |
olle |
9 |
import="net.sf.basedb.clients.web.util.HTML" |
1957 |
30 Apr 13 |
olle |
10 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
1957 |
30 Apr 13 |
olle |
11 |
import="net.sf.basedb.util.Values" |
1957 |
30 Apr 13 |
olle |
12 |
import="net.sf.basedb.util.formatter.DateFormatter" |
1957 |
30 Apr 13 |
olle |
13 |
import="java.util.Calendar" |
1957 |
30 Apr 13 |
olle |
14 |
import="java.util.Locale" |
1957 |
30 Apr 13 |
olle |
15 |
import="java.text.SimpleDateFormat" |
1957 |
30 Apr 13 |
olle |
16 |
%> |
1957 |
30 Apr 13 |
olle |
17 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1957 |
30 Apr 13 |
olle |
18 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
1957 |
30 Apr 13 |
olle |
19 |
<% |
3976 |
26 May 16 |
nicklas |
20 |
final SessionControl sc = Base.getExistingSessionControl(request, "net.sf.basedb.reggie", true); |
1957 |
30 Apr 13 |
olle |
21 |
final String ID = sc.getId(); |
1957 |
30 Apr 13 |
olle |
22 |
final float scale = Base.getScale(sc); |
1957 |
30 Apr 13 |
olle |
23 |
final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie"); |
1957 |
30 Apr 13 |
olle |
24 |
DbControl dc = null; |
1957 |
30 Apr 13 |
olle |
25 |
try |
1957 |
30 Apr 13 |
olle |
26 |
{ |
1957 |
30 Apr 13 |
olle |
27 |
dc = sc.newDbControl(); |
1957 |
30 Apr 13 |
olle |
28 |
final User user = User.getById(dc, sc.getLoggedInUserId()); |
1957 |
30 Apr 13 |
olle |
29 |
%> |
1957 |
30 Apr 13 |
olle |
30 |
<base:page type="default" > |
2604 |
27 Aug 14 |
nicklas |
31 |
<base:head |
2604 |
27 Aug 14 |
nicklas |
32 |
scripts="~export-inca.js,~../reggie-2.js" |
2624 |
02 Sep 14 |
nicklas |
33 |
styles="path.css,~../css/reggie-2.css,~export.css" |
2604 |
27 Aug 14 |
nicklas |
34 |
/> |
2217 |
10 Feb 14 |
nicklas |
35 |
<base:body> |
1957 |
30 Apr 13 |
olle |
36 |
|
1957 |
30 Apr 13 |
olle |
37 |
<p:path><p:pathelement |
1957 |
30 Apr 13 |
olle |
38 |
title="Reggie" href="<%="../index.jsp?ID="+ID%>" |
1957 |
30 Apr 13 |
olle |
39 |
/><p:pathelement title="INCA export" |
1957 |
30 Apr 13 |
olle |
40 |
/></p:path> |
1957 |
30 Apr 13 |
olle |
41 |
|
1957 |
30 Apr 13 |
olle |
42 |
<div class="content"> |
2603 |
27 Aug 14 |
nicklas |
43 |
<form name="reggie" id="wizard" class="wizard"> |
1957 |
30 Apr 13 |
olle |
44 |
|
1957 |
30 Apr 13 |
olle |
<!-- 1. Select month --> |
2603 |
27 Aug 14 |
nicklas |
46 |
<div class="step" id="step-1"> |
2603 |
27 Aug 14 |
nicklas |
47 |
<div class="step-no">1</div> |
2603 |
27 Aug 14 |
nicklas |
48 |
<div class="step-title">Select month or year</div> |
2603 |
27 Aug 14 |
nicklas |
49 |
<div class="step-content"> |
2603 |
27 Aug 14 |
nicklas |
50 |
<table class="step-form"> |
1957 |
30 Apr 13 |
olle |
51 |
<tr> |
1957 |
30 Apr 13 |
olle |
52 |
<td class="prompt">Month/Year</td> |
1957 |
30 Apr 13 |
olle |
53 |
<td class="input"> |
1957 |
30 Apr 13 |
olle |
54 |
<select name="time"> |
2374 |
23 Apr 14 |
nicklas |
55 |
<option class="fullyear" value="1" selected>all</option> |
1957 |
30 Apr 13 |
olle |
56 |
<% |
1957 |
30 Apr 13 |
olle |
57 |
Calendar month = Calendar.getInstance(Locale.ENGLISH); |
1957 |
30 Apr 13 |
olle |
58 |
DateFormatter monthly = new DateFormatter(new SimpleDateFormat("yyyy MMMM", Locale.ENGLISH)); |
1957 |
30 Apr 13 |
olle |
59 |
DateFormatter yearly = new DateFormatter(new SimpleDateFormat("yyyy", Locale.ENGLISH)); |
1957 |
30 Apr 13 |
olle |
60 |
int index = 0; |
1957 |
30 Apr 13 |
olle |
61 |
while (month.get(Calendar.YEAR) > 2009) |
1957 |
30 Apr 13 |
olle |
62 |
{ |
1957 |
30 Apr 13 |
olle |
63 |
%> |
1957 |
30 Apr 13 |
olle |
64 |
<option value="<%=month.getTimeInMillis()%>"><%=monthly.format(month.getTime())%> |
1957 |
30 Apr 13 |
olle |
65 |
<% |
1957 |
30 Apr 13 |
olle |
66 |
if (month.get(Calendar.MONTH) == 0) |
1957 |
30 Apr 13 |
olle |
67 |
{ |
1957 |
30 Apr 13 |
olle |
68 |
%> |
1957 |
30 Apr 13 |
olle |
69 |
<option class="fullyear" value="-<%=month.getTimeInMillis()%>"><%=yearly.format(month.getTime()) %> (all) |
1957 |
30 Apr 13 |
olle |
70 |
<% |
1957 |
30 Apr 13 |
olle |
71 |
} |
1957 |
30 Apr 13 |
olle |
72 |
index++; |
1957 |
30 Apr 13 |
olle |
73 |
month.add(Calendar.MONTH, -1); |
1957 |
30 Apr 13 |
olle |
74 |
} |
1957 |
30 Apr 13 |
olle |
75 |
%> |
1957 |
30 Apr 13 |
olle |
76 |
</select> |
1957 |
30 Apr 13 |
olle |
77 |
</td> |
2603 |
27 Aug 14 |
nicklas |
78 |
<td class="help"><span id="time.message" class="message"></span></td> |
1957 |
30 Apr 13 |
olle |
79 |
</tr> |
1957 |
30 Apr 13 |
olle |
80 |
</table> |
2603 |
27 Aug 14 |
nicklas |
81 |
</div> |
2603 |
27 Aug 14 |
nicklas |
82 |
</div> |
1957 |
30 Apr 13 |
olle |
83 |
|
2603 |
27 Aug 14 |
nicklas |
84 |
<div id="wizard-status"></div> |
3904 |
29 Apr 16 |
nicklas |
85 |
<div id="wizard-progress"></div> |
1957 |
30 Apr 13 |
olle |
86 |
|
2603 |
27 Aug 14 |
nicklas |
87 |
<table class="navigation" id="navigation"> |
1957 |
30 Apr 13 |
olle |
88 |
<tr> |
2374 |
23 Apr 14 |
nicklas |
89 |
<td><base:button id="gopreview" title="Preview" image="<%=home+"/images/export.png"%>" /></td> |
2374 |
23 Apr 14 |
nicklas |
90 |
<td><base:button id="goexport" title="Download" image="<%=home+"/images/download.png"%>" /></td> |
2603 |
27 Aug 14 |
nicklas |
91 |
<td id="gonext-message" class="message"></td> |
1957 |
30 Apr 13 |
olle |
92 |
</tr> |
1957 |
30 Apr 13 |
olle |
93 |
</table> |
1957 |
30 Apr 13 |
olle |
94 |
|
2603 |
27 Aug 14 |
nicklas |
95 |
<div id="previewWrapper" style="display: none;"> |
1957 |
30 Apr 13 |
olle |
96 |
<div> |
1957 |
30 Apr 13 |
olle |
97 |
<span id="previewTitle">Preview</span> |
1957 |
30 Apr 13 |
olle |
98 |
<span id="previewWarning"></span> |
1957 |
30 Apr 13 |
olle |
99 |
</div> |
1957 |
30 Apr 13 |
olle |
100 |
<div id="previewList"></div> |
2603 |
27 Aug 14 |
nicklas |
101 |
</div> |
2603 |
27 Aug 14 |
nicklas |
102 |
</div> |
1957 |
30 Apr 13 |
olle |
103 |
</div> |
1957 |
30 Apr 13 |
olle |
104 |
|
1957 |
30 Apr 13 |
olle |
105 |
</base:body> |
1957 |
30 Apr 13 |
olle |
106 |
</base:page> |
1957 |
30 Apr 13 |
olle |
107 |
<% |
1957 |
30 Apr 13 |
olle |
108 |
} |
1957 |
30 Apr 13 |
olle |
109 |
finally |
1957 |
30 Apr 13 |
olle |
110 |
{ |
1957 |
30 Apr 13 |
olle |
111 |
if (dc != null) dc.close(); |
1957 |
30 Apr 13 |
olle |
112 |
} |
1957 |
30 Apr 13 |
olle |
113 |
%> |