source: extensions/net.sf.basedb.reggie/trunk/resources/allprep_protocol2.jsp @ 1637

Last change on this file since 1637 was 1637, checked in by Nicklas Nordborg, 10 years ago

References #388: Lysate wizard

It is possible to select 12 lysate items and then generate a printable lab protocol. We do not suggest or store a date yet.

File size: 3.7 KB
Line 
1<%@ page
2  pageEncoding="UTF-8"
3  session="false"
4  import="net.sf.basedb.core.User"
5  import="net.sf.basedb.core.DbControl"
6  import="net.sf.basedb.core.SessionControl"
7  import="net.sf.basedb.core.Application"
8  import="net.sf.basedb.core.Extract"
9  import="net.sf.basedb.core.BioPlate"
10  import="net.sf.basedb.core.BioWell"
11  import="net.sf.basedb.core.PermissionDeniedException"
12  import="net.sf.basedb.util.Values"
13  import="net.sf.basedb.util.extensions.Extension"
14  import="net.sf.basedb.clients.web.Base" 
15  import="net.sf.basedb.clients.web.util.HTML"
16  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
17  import="java.util.List"
18  import="java.util.ArrayList"
19%>
20<%
21final SessionControl sc = Base.getExistingSessionControl(request, true);
22final String ID = sc.getId();
23final float scale = Base.getScale(sc);
24final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie");
25final int BLOCKS_PER_PAGE = 3;
26DbControl dc = null;
27try
28{
29  dc = sc.newDbControl();
30  final Extension reggie = ExtensionsControl.get(dc).getExtension("net.sf.basedb.reggie");
31  final User user = User.getById(dc, sc.getLoggedInUserId());
32  List<Extract> lysates = new ArrayList<Extract>();
33  for (String id : request.getParameterValues("lysates"))
34  {
35    lysates.add(Extract.getById(dc, Values.getInt(id)));
36  }
37%>
38<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
39<html>
40<head>
41  <title>Lab Tracking Protocol for Allprep isolation</title>
42  <link rel="stylesheet" type="text/css" href="<%=home %>/css/printable.css">
43  <style>
44 
45  table.protocolheader
46  {
47    width: 100%;
48  }
49
50  table.protocolheader > tbody > tr
51  {
52    height: 2em;
53  }
54
55  table.protocolheader > tbody > tr > th
56  {
57    width: 50%;
58    text-align: left;
59    font-size: 1.25em;
60  }
61 
62  table.samplelist
63  {
64    width: 100%;
65    border-collapse: collapse;
66    border: 1px solid #000000;
67  }
68 
69  table.samplelist > tbody > tr
70  {
71    height: 1.75cm;
72  }
73 
74  table.samplelist > tbody > tr > th
75  {
76    border: 1px solid #000000;
77    font-size: 1.25em;
78  }
79 
80  table.samplelist > tbody > tr > td
81  {
82    vertical-align: top;
83    border: 1px solid #000000;
84    vertical-align: middle;
85    font-size: 1.25em;
86    padding: 0.5em;
87  }
88 
89  .name
90  {
91    font-weight: bold;
92    width: 20%;
93  }
94  .box
95  {
96    width: 20%;
97  }
98  .qiacube
99  {
100    width: 15%;
101    text-align: center;
102  }
103  .remark
104  {
105    width: 45%;
106  }
107 
108 
109  </style>
110</head>
111<body>
112  <div class="noprint fullwidth" style="border-bottom: 1px dashed #A0A0A0; padding-left: 1em; padding-bottom: 1em;">
113    <a href="javascript:window.print()"><img src="images/print.png" style="padding-right: 4px;">Print</a>
114  </div>
115 
116  <h1>Lab Tracking Protocol for Allprep isolation v.1.2</h1>
117
118  <table style="width: 100%; border: 0px;" class="protocolheader">
119  <tr>
120    <td colspan="2">Reggie <%=reggie.getAbout().getVersion() %>; Page 1 of 1</td>
121  </tr>
122  <tr>
123    <th style="width: 50%;">Date for lysis:</th>
124    <th style="width: 50%;">Operator:</th>
125  </tr>
126  <tr>
127    <th style="width: 50%;">Date for isolation:</th>
128    <th style="width: 50%;">Operator:</th>
129  </tr>
130  </table>
131
132  <table style="width: 100%;" class="samplelist">
133  <tr>
134    <th class="name">Sample</th>
135    <th class="box">Storage box</th>
136    <th class="qiacube">Position in Qiacube</th>
137    <th class="remark">Remark</th>
138  </tr>
139  <%
140  int index = 1;
141  for (Extract lysate : lysates)
142  {
143    BioWell well = lysate.getBioWell();
144    BioPlate plate = well.getPlate();
145    %>
146    <tr>
147      <td class="name"><%=lysate.getName() %></td>
148      <td class="box"><%=plate.getName() %> <%=well.getCoordinate() %></td>
149      <td class="qiacube"><%=index %></td>
150      <td class="remark"></td>
151    </tr>
152    <%
153    ++index;
154  }
155  %>
156  </table>
157 
158</body>
159</html>
160<%
161}
162finally
163{
164  if (dc != null) dc.close();
165}
166%>
Note: See TracBrowser for help on using the repository browser.