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