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, subtitle=>'<button type="button" class="btn btn-primary" name="custom_barcode_link" id="custom_barcode_link">Design Custom Barcode</button>'&>
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 jQuery('#custom_barcode_link').click(function () {
167 location.href = '/tools/label_designer';
170 $(document).on('change', '#select_print_format', function () {
171 var format = jQuery("#select_print_format").val();
172 if (format == "32A4") {
175 var tops_margin = 12;
176 var left_margin = 17;
177 var bottom_margin = 12;
178 var right_margin = 10;
180 if (format == "32_unique") {
183 var tops_margin = 12;
184 var left_margin = 17;
185 var bottom_margin = 12;
186 var right_margin = 10;
188 else if (format == "CASS") {
191 var tops_margin = 10;
192 var left_margin = 112;
193 var bottom_margin = 13;
194 var right_margin = 20;
196 else if (format == "MUSA") {
199 var tops_margin = 10;
200 var left_margin = 112;
201 var bottom_margin = 13;
202 var right_margin = 20;
204 else if (format == "NCSU") {
207 var tops_margin = 12;
208 var left_margin = 10;
209 var bottom_margin = 12;
210 var right_margin = 10;
211 var text = 'year,location';
213 else if (format == "20A4") {
216 var tops_margin = 12;
217 var left_margin = 10;
218 var bottom_margin = 12;
219 var right_margin = 10;
221 else if (format == "IITA-3") {
224 var tops_margin = 13;
225 var left_margin = 130;
226 var bottom_margin = 11;
227 var right_margin = 10;
229 else if (format == "IITA-2") {
232 var tops_margin = 13;
233 var left_margin = 130;
234 var bottom_margin = 11;
235 var right_margin = 10;
237 else if (format == "crossing") {
242 var bottom_margin = 0;
243 var right_margin = 0;
245 jQuery("#text_margin").empty();
246 jQuery("#text_margin").val(text);
247 jQuery("#label_rows").empty();
248 jQuery("#label_rows").val(label_row);
249 jQuery("#label_cols").empty();
250 jQuery("#label_cols").val(label_cols);
251 jQuery("#select_barcode_type").prop('selectedIndex',1);
252 jQuery("#page_format").prop('selectedIndex',0);
253 jQuery("#tops_margin").empty();
254 jQuery("#tops_margin").val(tops_margin);
255 jQuery("#left_margin").empty();
256 jQuery("#left_margin").val(left_margin);
257 jQuery("#bottom_margin").empty();
258 jQuery("#bottom_margin").val(bottom_margin);
259 jQuery("#right_margin").empty();
260 jQuery("#right_margin").val(right_margin);
267 <div class="form-group form-group-sm">
268 <label class="col-sm-4 control-label">Barcode Type: </label>
269 <div class="col-sm-8">
270 <select class="form-control" id="select_barcode_type" name="select_barcode_type">
271 <option value="2D">2D Barcode</option>
272 <option value="1D">1D Barcode</option>
277 <div id="2D_fieldbook_option" >
278 <div class="form-group form-group-sm" >
279 <label class="col-sm-4 control-label">Enable 2D Barcode For FieldBook: </label>
280 <div class="col-sm-8">
281 <input type="checkbox" id="enable_fieldbook_2d_barcode" name="enable_fieldbook_2d_barcode" value="enable_fieldbook_2d_barcode" checked/>
286 <div class="form-group form-group-sm">
287 <label class="col-sm-4 control-label">Printing Format (Optional): </label>
288 <div class="col-sm-8">
289 <select class="form-control" id="select_print_format" name="select_print_format">
290 <!--<option selected disabled>select printing format</option>-->
291 <option value="">select printing format</option>
292 <option value="CASS">CASS printing format</option>
293 <option value="MUSA">MUSA printing format</option>
294 <option value="32A4">32 label Size Sticker Paper</option>
295 <option value="32_unique">32 Unique label Size Sticker Paper</option>
296 <option value="20A4">20 label Size Sticker Paper</option>
297 <option value="NCSU">NCSU printing format</option>
298 <option value="IITA-3">IITA-3-barcode</option>
299 <option value="IITA-2">IITA-2-barcode</option>
300 <option value="crossing">CROSS</option>
305 <div class="form-group form-group-sm">
306 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Stock Names: </label>
307 <div class="col-sm-8">
308 <input type="file" name="stock_names_file" />
311 <div class="form-group form-group-sm" style="display: none">
312 <label class="col-sm-4 control-label">Print Duplicate Labels Per Row: </label>
313 <div class="col-sm-8">
314 <input type="checkbox" name="duplicate_labels_per_row" checked="1" disabled="1" />
317 <!--<div class="form-group form-group-sm">
318 <label class="col-sm-4 control-label">Print Field Information For Plots: </label>
319 <div class="col-sm-8">
320 <input type="checkbox" name="plots" value="plots" /> Useful for Printing Field Information of Trials.
323 <!--<div class="form-group form-group-sm">
324 <label class="col-sm-4 control-label">Print Parents For Nurseries: </label>
325 <div class="col-sm-8">
326 <input type="checkbox" name="nursery" value="nursery" /> Useful for Printing Pedigree Information for Nurseries.
330 <& /barcode/printer_settings.mas &>
332 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
333 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
339 <div class="col-md-1 col-lg-1">
348 <!-- phenotyping barcode -->
350 <&| /page/info_section.mas, title=>'Download Plot Phenotyping Barcodes', collapsible=>1, collapsed=>0 &>
352 <div class="well well-sm">
354 <div class="col-md-1 col-lg-1">
356 <div class="col-md-10 col-lg-10">
358 <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/barcode/stock/download/plot_QRcode" >
359 <div class="form-group form-group-sm">
360 <label class="col-sm-4 control-label">Enter a List of Stock Names: </label>
361 <div class="col-sm-8">
362 <textarea class="form-control" id="stock_names_2" name="stock_names_2" ></textarea>
365 <div class="form-group form-group-sm">
366 <label class="col-sm-4 control-label">Or Paste From a List: </label>
367 <div class="col-sm-8">
368 <div id="list_menu_location_2"></div>
369 <script defer="defer">
370 jQuery(document).ready(function() {
371 pasteListMenu('stock_names_2', 'list_menu_location_2', 'paste', 'plots');
377 <div class="form-group form-group-sm">
378 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Stock Names: </label>
379 <div class="col-sm-8">
380 <input type="file" name="stock_names_file_2" />
384 <div class="form-group form-group-sm">
385 <label class="col-sm-4 control-label">Add Text to Label, e.g. location: </label>
386 <div class="col-sm-8">
387 <input class="form-control" id="select_barcode_text" name="select_barcode_text"></input>
391 <!-- <div class="form-group form-group-sm">
392 <label class="col-sm-4 control-label">Print Duplicate Labels Per Row: </label>
393 <div class="col-sm-8">
394 <input type="checkbox" name="duplicate_labels_per_row" checked="1" disabled="1" />
398 %# <& /barcode/printer_settings.mas &> #%
400 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
401 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
407 <div class="col-md-1 col-lg-1">
416 <!-- Trial barcode -->
418 <&| /page/info_section.mas, title=>'Download Trial Barcodes', collapsible=>1, collapsed=>0 &>
420 <div class="well well-sm">
422 <div class="col-md-1 col-lg-1">
424 <div class="col-md-10 col-lg-10">
426 <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/barcode/trial/download/trial_QRcode" >
427 <div class="form-group form-group-sm">
428 <label class="col-sm-4 control-label">Enter a List of Trial Names: </label>
429 <div class="col-sm-8">
430 <textarea class="form-control" id="trial_names_2" name="trial_names_2" ></textarea>
433 <div class="form-group form-group-sm">
434 <label class="col-sm-4 control-label">Or Paste From a List: </label>
435 <div class="col-sm-8">
436 <div id="list_menu_location_3"></div>
437 <script defer="defer">
438 jQuery(document).ready(function() {
439 pasteListMenu('trial_names_2', 'list_menu_location_3', 'paste', 'trials');
445 <div class="form-group form-group-sm">
446 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Trial Names: </label>
447 <div class="col-sm-8">
448 <input type="file" name="trial_names_file_2" />
452 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
453 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
459 <div class="col-md-1 col-lg-1">
468 %#<&| /page/info_section.mas, title=>'Generate unique barcodes', collapsible=>1, collapsed=>0 &>
470 %#<form action="/barcode/unique" >
472 %# Number of label pages to print <input type="text" name="label_pages" /><br /><br />
474 %# <& /barcode/printer_settings.mas &>
476 %# <input type="submit" value="Generate barcodes" />