8 @projects => () # [ id, name, description ]
9 @locations => () # [ id, description ]
14 my $dt = DateTime->from_epoch( epoch=>time );
15 my $date = join "/", ($dt->year, $dt->month, $dt->day);
18 <& /page/page_title.mas, title=>"Barcode Tools" &>
22 %#<&| /page/info_section.mas, title=>'Generate Metadata Barcode', collapsible=>1, %#collapsed=>0 &>
24 %#<form action="/barcode/metadata" >
26 %# <tr><td>Operator name</td><td><input name="operator" /></td></tr>
27 %# <tr><td>Date</td><td><input name="date" value="<% $date %>" /> (FORMAT: YYYY/MM/DD)</td></tr>
28 %# <tr><td>Location</td><td><& /page/html_select.mas, name=>'location', choices=>\@locations &> [<a href="/breeders/home">Add new location</a>]</td></tr>
29 %# <tr><td>Project</td><td><& /page/html_select.mas, name=>'project', choices=>\@projects &> [<a href="/breeders/home">Add new project</a>]</td></tr>
33 %# <input type="radio" name="image_size" value="small" checked="1" /> small<br />
34 %# <input type="radio" name="image_size" value="large" /> large<br />
36 %# <input type="submit" value="Generate barcode" />
41 %#<&| /page/info_section.mas, title=>'Excel Sheet Download', collapsible=>1, collapsed=>0 &>
43 %#<div class="well well-sm">
45 %# <div class="col-md-1 col-lg-1">
47 %# <div class="col-md-10 col-lg-10">
48 %#<& /barcode/excel_download.mas, locations=>\@locations, projects=>\@projects, available_cvterms => \@tools_def &>
50 %# <div class="col-md-1 col-lg-1">
58 %#<&| /page/info_section.mas, title=>'Metadata & Multibarcode Tool', collapsible=>1, collapsed=>0 &>
60 %#<div class="well well-sm">
62 %# <div class="col-md-1 col-lg-1">
64 %# <div class="col-md-10 col-lg-10">
65 %# <& /barcode/multi_tool_input.mas, locations=>\@locations, projects=>\@projects, available_cvterms => \@tools_def &>
67 %# <div class="col-md-1 col-lg-1">
75 %#<&| /page/info_section.mas, title=>'Generate Continuous Barcode', collapsible=>1, collapsed=>1 &>
77 %#<h3>Note: This tool is experimental</h3>
78 %#<form action="/barcode/continuous_scale" >
80 %#<tr><td>Start value</td><td> <input name="start" value="0" size="4" /></td></tr>
81 %#<tr><td>End value</td><td><input name="end" value="1000" size="4" /></td></tr>
82 %#<tr><td>Step</td><td><input name="step" value="10" size="4" /></td></tr>
83 %#<tr><td>Step height </td><td><input name="height" value="10" size="4" /></td></tr>
85 %#<input type="submit" value="Create continuous barcode" />
92 <&| /page/info_section.mas, title=>'Generate Barcode', collapsible=>1, collapsed=>1 &>
94 <div class="well well-sm">
96 <div class="col-md-1 col-lg-1">
98 <div class="col-md-10 col-lg-10">
100 <form class="form-horizontal" role="form" action="/barcode/generate">
101 <div class="form-group form-group-sm">
102 <label class="col-sm-2 control-label">Barcode Text: </label>
103 <div class="col-sm-10">
104 <input type="text" class="form-control" name="text" />
107 <div class="form-group form-group-sm">
108 <label class="col-sm-2 control-label">Small: </label>
109 <div class="col-sm-10">
110 <input type="radio" name="size" value="small" checked="1" />
113 <div class="form-group form-group-sm">
114 <label class="col-sm-2 control-label">Large: </label>
115 <div class="col-sm-10">
116 <input type="radio" name="size" value="large" />
120 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Generate barcode">Generate Barcode</button>
126 <div class="col-md-1 col-lg-1">
133 <&| /page/info_section.mas, title=>'Download Stock Barcodes', collapsible=>1, collapsed=>0 &>
135 <div class="well well-sm">
137 <div class="col-md-1 col-lg-1">
139 <div class="col-md-10 col-lg-10">
141 <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/barcode/stock/download/pdf" >
142 <div class="form-group form-group-sm">
143 <label class="col-sm-4 control-label">Enter a List of Stock Names: </label>
144 <div class="col-sm-8">
145 <textarea class="form-control" id="stock_names" name="stock_names" ></textarea>
148 <div class="form-group form-group-sm">
149 <label class="col-sm-4 control-label">Or Paste From a List: </label>
150 <div class="col-sm-8">
151 <div id="list_menu_location_1"></div>
152 <script defer="defer">
153 jQuery(document).ready(function() {
154 pasteListMenu('stock_names', 'list_menu_location_1');
156 $(document).on('change', '#select_barcode_type', function () {
157 var barcode_type = jQuery("#select_barcode_type").val();
158 if (barcode_type == "2D") {
159 jQuery("#2D_fieldbook_option").show();
161 else if (barcode_type == "1D") {
162 jQuery("#2D_fieldbook_option").hide();
166 $(document).on('change', '#select_print_format', function () {
167 var format = jQuery("#select_print_format").val();
168 if (format == "32A4") {
171 var tops_margin = 12;
172 var left_margin = 17;
173 var bottom_margin = 12;
174 var right_margin = 10;
176 if (format == "32_unique") {
179 var tops_margin = 12;
180 var left_margin = 17;
181 var bottom_margin = 12;
182 var right_margin = 10;
184 else if (format == "CASS") {
187 var tops_margin = 10;
188 var left_margin = 112;
189 var bottom_margin = 13;
190 var right_margin = 20;
192 else if (format == "MUSA") {
195 var tops_margin = 10;
196 var left_margin = 112;
197 var bottom_margin = 13;
198 var right_margin = 20;
200 else if (format == "NCSU") {
203 var tops_margin = 12;
204 var left_margin = 10;
205 var bottom_margin = 12;
206 var right_margin = 10;
207 var text = 'year,location';
209 else if (format == "20A4") {
212 var tops_margin = 12;
213 var left_margin = 10;
214 var bottom_margin = 12;
215 var right_margin = 10;
217 else if (format == "IITA-3") {
220 var tops_margin = 13;
221 var left_margin = 130;
222 var bottom_margin = 11;
223 var right_margin = 10;
225 else if (format == "IITA-2") {
228 var tops_margin = 13;
229 var left_margin = 130;
230 var bottom_margin = 11;
231 var right_margin = 10;
233 else if (format == "crossing") {
238 var bottom_margin = 0;
239 var right_margin = 0;
241 jQuery("#text_margin").empty();
242 jQuery("#text_margin").val(text);
243 jQuery("#label_rows").empty();
244 jQuery("#label_rows").val(label_row);
245 jQuery("#label_cols").empty();
246 jQuery("#label_cols").val(label_cols);
247 jQuery("#select_barcode_type").prop('selectedIndex',1);
248 jQuery("#page_format").prop('selectedIndex',0);
249 jQuery("#tops_margin").empty();
250 jQuery("#tops_margin").val(tops_margin);
251 jQuery("#left_margin").empty();
252 jQuery("#left_margin").val(left_margin);
253 jQuery("#bottom_margin").empty();
254 jQuery("#bottom_margin").val(bottom_margin);
255 jQuery("#right_margin").empty();
256 jQuery("#right_margin").val(right_margin);
263 <div class="form-group form-group-sm">
264 <label class="col-sm-4 control-label">Barcode Type: </label>
265 <div class="col-sm-8">
266 <select class="form-control" id="select_barcode_type" name="select_barcode_type">
267 <option value="1D">1D Barcode</option>
268 <option value="2D">2D Barcode</option>
273 <div id="2D_fieldbook_option" style="display: none">
274 <div class="form-group form-group-sm" >
275 <label class="col-sm-4 control-label">Enable 2D Barcode For FieldBook: </label>
276 <div class="col-sm-8">
277 <input type="checkbox" id="enable_fieldbook_2d_barcode" name="enable_fieldbook_2d_barcode" value="enable_fieldbook_2d_barcode" />
282 <div class="form-group form-group-sm">
283 <label class="col-sm-4 control-label">Printing Format (Optional): </label>
284 <div class="col-sm-8">
285 <select class="form-control" id="select_print_format" name="select_print_format">
286 <!--<option selected disabled>select printing format</option>-->
287 <option value="">select printing format</option>
288 <option value="CASS">CASS printing format</option>
289 <option value="MUSA">MUSA printing format</option>
290 <option value="32A4">32 label Size Sticker Paper</option>
291 <option value="32_unique">32 Unique label Size Sticker Paper</option>
292 <option value="20A4">20 label Size Sticker Paper</option>
293 <option value="NCSU">NCSU printing format</option>
294 <option value="IITA-3">IITA-3-barcode</option>
295 <option value="IITA-2">IITA-2-barcode</option>
296 <option value="crossing">CROSS</option>
301 <div class="form-group form-group-sm">
302 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Stock Names: </label>
303 <div class="col-sm-8">
304 <input type="file" name="stock_names_file" />
307 <div class="form-group form-group-sm">
308 <label class="col-sm-4 control-label">Print Duplicate Labels Per Row: </label>
309 <div class="col-sm-8">
310 <input type="checkbox" name="duplicate_labels_per_row" checked="1" disabled="1" />
313 <!--<div class="form-group form-group-sm">
314 <label class="col-sm-4 control-label">Print Field Information For Plots: </label>
315 <div class="col-sm-8">
316 <input type="checkbox" name="plots" value="plots" /> Useful for Printing Field Information of Trials.
319 <!--<div class="form-group form-group-sm">
320 <label class="col-sm-4 control-label">Print Parents For Nurseries: </label>
321 <div class="col-sm-8">
322 <input type="checkbox" name="nursery" value="nursery" /> Useful for Printing Pedigree Information for Nurseries.
326 <& /barcode/printer_settings.mas &>
328 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
329 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
335 <div class="col-md-1 col-lg-1">
344 <!-- phenotyping barcode -->
346 <&| /page/info_section.mas, title=>'Download Plot Phenotyping Barcodes', collapsible=>1, collapsed=>0 &>
348 <div class="well well-sm">
350 <div class="col-md-1 col-lg-1">
352 <div class="col-md-10 col-lg-10">
354 <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/barcode/stock/download/plot_QRcode" >
355 <div class="form-group form-group-sm">
356 <label class="col-sm-4 control-label">Enter a List of Stock Names: </label>
357 <div class="col-sm-8">
358 <textarea class="form-control" id="stock_names_2" name="stock_names_2" ></textarea>
361 <div class="form-group form-group-sm">
362 <label class="col-sm-4 control-label">Or Paste From a List: </label>
363 <div class="col-sm-8">
364 <div id="list_menu_location_2"></div>
365 <script defer="defer">
366 jQuery(document).ready(function() {
367 pasteListMenu('stock_names_2', 'list_menu_location_2', 'paste', 'plots');
373 <div class="form-group form-group-sm">
374 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Stock Names: </label>
375 <div class="col-sm-8">
376 <input type="file" name="stock_names_file_2" />
380 <div class="form-group form-group-sm">
381 <label class="col-sm-4 control-label">Add Text to Label, e.g. location: </label>
382 <div class="col-sm-8">
383 <input class="form-control" id="select_barcode_text" name="select_barcode_text"></input>
387 <!-- <div class="form-group form-group-sm">
388 <label class="col-sm-4 control-label">Print Duplicate Labels Per Row: </label>
389 <div class="col-sm-8">
390 <input type="checkbox" name="duplicate_labels_per_row" checked="1" disabled="1" />
394 %# <& /barcode/printer_settings.mas &> #%
396 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
397 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
403 <div class="col-md-1 col-lg-1">
412 <!-- Trial barcode -->
414 <&| /page/info_section.mas, title=>'Download Trial Barcodes', collapsible=>1, collapsed=>0 &>
416 <div class="well well-sm">
418 <div class="col-md-1 col-lg-1">
420 <div class="col-md-10 col-lg-10">
422 <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/barcode/trial/download/trial_QRcode" >
423 <div class="form-group form-group-sm">
424 <label class="col-sm-4 control-label">Enter a List of Trial Names: </label>
425 <div class="col-sm-8">
426 <textarea class="form-control" id="trial_names_2" name="trial_names_2" ></textarea>
429 <div class="form-group form-group-sm">
430 <label class="col-sm-4 control-label">Or Paste From a List: </label>
431 <div class="col-sm-8">
432 <div id="list_menu_location_3"></div>
433 <script defer="defer">
434 jQuery(document).ready(function() {
435 pasteListMenu('trial_names_2', 'list_menu_location_3', 'paste', 'trials');
441 <div class="form-group form-group-sm">
442 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Trial Names: </label>
443 <div class="col-sm-8">
444 <input type="file" name="trial_names_file_2" />
448 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
449 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
455 <div class="col-md-1 col-lg-1">
464 %#<&| /page/info_section.mas, title=>'Generate unique barcodes', collapsible=>1, collapsed=>0 &>
466 %#<form action="/barcode/unique" >
468 %# Number of label pages to print <input type="text" name="label_pages" /><br /><br />
470 %# <& /barcode/printer_settings.mas &>
472 %# <input type="submit" value="Generate barcodes" />