7 @projects => () # [ id, name, description ]
8 @locations => () # [ id, description ]
13 my $dt = DateTime->from_epoch( epoch=>time );
14 my $date = join "/", ($dt->year, $dt->month, $dt->day);
17 <& /page/page_title.mas, title=>"Barcode Tools" &>
19 <&| /page/info_section.mas, title=>'Generate Barcode', collapsible=>1, collapsed=>1 &>
21 <div class="well well-sm">
23 <div class="col-md-1 col-lg-1">
25 <div class="col-md-10 col-lg-10">
27 <form class="form-horizontal" role="form" action="/barcode/generate">
28 <div class="form-group form-group-sm">
29 <label class="col-sm-2 control-label">Barcode Text: </label>
30 <div class="col-sm-10">
31 <input type="text" class="form-control" name="text" />
34 <div class="form-group form-group-sm">
35 <label class="col-sm-2 control-label">Small: </label>
36 <div class="col-sm-10">
37 <input type="radio" name="size" value="small" checked="1" />
40 <div class="form-group form-group-sm">
41 <label class="col-sm-2 control-label">Large: </label>
42 <div class="col-sm-10">
43 <input type="radio" name="size" value="large" />
47 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Generate barcode">Generate Barcode</button>
53 <div class="col-md-1 col-lg-1">
60 <&| /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>'&>
62 <div class="well well-sm">
64 <div class="col-md-1 col-lg-1">
66 <div class="col-md-10 col-lg-10">
68 <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/barcode/stock/download/pdf" >
69 <div class="form-group form-group-sm">
70 <label class="col-sm-4 control-label">Enter a List of Stock Names: </label>
71 <div class="col-sm-8">
72 <textarea class="form-control" id="stock_names" name="stock_names" ></textarea>
75 <div class="form-group form-group-sm">
76 <label class="col-sm-4 control-label">Or Paste From a List: </label>
77 <div class="col-sm-8">
78 <div id="list_menu_location_1"></div>
79 <script defer="defer">
80 jQuery(document).ready(function() {
81 pasteListMenu('stock_names', 'list_menu_location_1');
83 $(document).on('change', '#select_barcode_type', function () {
84 var barcode_type = jQuery("#select_barcode_type").val();
85 if (barcode_type == "2D") {
86 jQuery("#2D_fieldbook_option").show();
88 else if (barcode_type == "1D") {
89 jQuery("#2D_fieldbook_option").hide();
93 jQuery('#custom_barcode_link').click(function () {
94 location.href = '/tools/label_designer';
97 $(document).on('change', '#select_print_format', function () {
98 var format = jQuery("#select_print_format").val();
99 if (format == "32A4") {
102 var tops_margin = 12;
103 var left_margin = 17;
104 var bottom_margin = 12;
105 var right_margin = 10;
107 if (format == "32_unique") {
110 var tops_margin = 12;
111 var left_margin = 17;
112 var bottom_margin = 12;
113 var right_margin = 10;
115 else if (format == "CASS") {
118 var tops_margin = 10;
119 var left_margin = 112;
120 var bottom_margin = 13;
121 var right_margin = 20;
123 else if (format == "MUSA") {
126 var tops_margin = 10;
127 var left_margin = 112;
128 var bottom_margin = 13;
129 var right_margin = 20;
131 else if (format == "NCSU") {
134 var tops_margin = 12;
135 var left_margin = 10;
136 var bottom_margin = 12;
137 var right_margin = 10;
138 var text = 'year,location';
140 else if (format == "20A4") {
143 var tops_margin = 12;
144 var left_margin = 10;
145 var bottom_margin = 12;
146 var right_margin = 10;
148 else if (format == "IITA-3") {
151 var tops_margin = 13;
152 var left_margin = 130;
153 var bottom_margin = 11;
154 var right_margin = 10;
156 else if (format == "IITA-2") {
159 var tops_margin = 13;
160 var left_margin = 130;
161 var bottom_margin = 11;
162 var right_margin = 10;
164 else if (format == "crossing") {
169 var bottom_margin = 0;
170 var right_margin = 0;
172 jQuery("#text_margin").empty();
173 jQuery("#text_margin").val(text);
174 jQuery("#label_rows").empty();
175 jQuery("#label_rows").val(label_row);
176 jQuery("#label_cols").empty();
177 jQuery("#label_cols").val(label_cols);
178 jQuery("#select_barcode_type").prop('selectedIndex',1);
179 jQuery("#page_format").prop('selectedIndex',0);
180 jQuery("#tops_margin").empty();
181 jQuery("#tops_margin").val(tops_margin);
182 jQuery("#left_margin").empty();
183 jQuery("#left_margin").val(left_margin);
184 jQuery("#bottom_margin").empty();
185 jQuery("#bottom_margin").val(bottom_margin);
186 jQuery("#right_margin").empty();
187 jQuery("#right_margin").val(right_margin);
194 <div class="form-group form-group-sm">
195 <label class="col-sm-4 control-label">Barcode Type: </label>
196 <div class="col-sm-8">
197 <select class="form-control" id="select_barcode_type" name="select_barcode_type">
198 <option value="2D">2D Barcode</option>
199 <option value="1D">1D Barcode</option>
204 <div id="2D_fieldbook_option" >
205 <div class="form-group form-group-sm" >
206 <label class="col-sm-4 control-label">Enable 2D Barcode For FieldBook: </label>
207 <div class="col-sm-8">
208 <input type="checkbox" id="enable_fieldbook_2d_barcode" name="enable_fieldbook_2d_barcode" value="enable_fieldbook_2d_barcode" checked/>
213 <div class="form-group form-group-sm">
214 <label class="col-sm-4 control-label">Printing Format (Optional): </label>
215 <div class="col-sm-8">
216 <select class="form-control" id="select_print_format" name="select_print_format">
217 <!--<option selected disabled>select printing format</option>-->
218 <option value="">select printing format</option>
219 <option value="20A4">20 label Size Sticker Paper</option>
220 <option value="32A4">32 label Size Sticker Paper</option>
221 <option value="32_unique">32 Unique label Size Sticker Paper</option>
222 <option value="CASS">CASS printing format</option>
223 <option value="crossing">CROSS</option>
224 <option value="IITA-2">IITA-2-barcode</option>
225 <option value="IITA-3">IITA-3-barcode</option>
226 <option value="MUSA">MUSA printing format</option>
227 <option value="NCSU">NCSU printing format</option>
232 <div class="form-group form-group-sm">
233 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Stock Names: </label>
234 <div class="col-sm-8">
235 <input type="file" name="stock_names_file" />
238 <div class="form-group form-group-sm" style="display: none">
239 <label class="col-sm-4 control-label">Print Duplicate Labels Per Row: </label>
240 <div class="col-sm-8">
241 <input type="checkbox" name="duplicate_labels_per_row" checked="1" disabled="1" />
244 <!--<div class="form-group form-group-sm">
245 <label class="col-sm-4 control-label">Print Field Information For Plots: </label>
246 <div class="col-sm-8">
247 <input type="checkbox" name="plots" value="plots" /> Useful for Printing Field Information of Trials.
250 <!--<div class="form-group form-group-sm">
251 <label class="col-sm-4 control-label">Print Parents For Nurseries: </label>
252 <div class="col-sm-8">
253 <input type="checkbox" name="nursery" value="nursery" /> Useful for Printing Pedigree Information for Nurseries.
257 <& /barcode/printer_settings.mas &>
259 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
260 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
266 <div class="col-md-1 col-lg-1">
275 <!-- phenotyping barcode -->
277 <&| /page/info_section.mas, title=>'Download Plot Phenotyping Barcodes', collapsible=>1, collapsed=>0 &>
279 <div class="well well-sm">
281 <div class="col-md-1 col-lg-1">
283 <div class="col-md-10 col-lg-10">
285 <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/barcode/stock/download/plot_QRcode" >
286 <div class="form-group form-group-sm">
287 <label class="col-sm-4 control-label">Enter a List of Stock Names: </label>
288 <div class="col-sm-8">
289 <textarea class="form-control" id="stock_names_2" name="stock_names_2" ></textarea>
292 <div class="form-group form-group-sm">
293 <label class="col-sm-4 control-label">Or Paste From a List: </label>
294 <div class="col-sm-8">
295 <div id="list_menu_location_2"></div>
296 <script defer="defer">
297 jQuery(document).ready(function() {
298 pasteListMenu('stock_names_2', 'list_menu_location_2', 'paste', 'plots');
304 <div class="form-group form-group-sm">
305 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Stock Names: </label>
306 <div class="col-sm-8">
307 <input type="file" name="stock_names_file_2" />
311 <div class="form-group form-group-sm">
312 <label class="col-sm-4 control-label">Add Text to Label, e.g. location: </label>
313 <div class="col-sm-8">
314 <input class="form-control" id="select_barcode_text" name="select_barcode_text"></input>
318 <!-- <div class="form-group form-group-sm">
319 <label class="col-sm-4 control-label">Print Duplicate Labels Per Row: </label>
320 <div class="col-sm-8">
321 <input type="checkbox" name="duplicate_labels_per_row" checked="1" disabled="1" />
325 %# <& /barcode/printer_settings.mas &> #%
327 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
328 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
334 <div class="col-md-1 col-lg-1">
343 <!-- Trial barcode -->
345 <&| /page/info_section.mas, title=>'Download Trial Barcodes', collapsible=>1, collapsed=>0 &>
347 <div class="well well-sm">
349 <div class="col-md-1 col-lg-1">
351 <div class="col-md-10 col-lg-10">
353 <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/barcode/trial/download/trial_QRcode" >
354 <div class="form-group form-group-sm">
355 <label class="col-sm-4 control-label">Enter a List of Trial Names: </label>
356 <div class="col-sm-8">
357 <textarea class="form-control" id="trial_names_2" name="trial_names_2" ></textarea>
360 <div class="form-group form-group-sm">
361 <label class="col-sm-4 control-label">Or Paste From a List: </label>
362 <div class="col-sm-8">
363 <div id="list_menu_location_3"></div>
364 <script defer="defer">
365 jQuery(document).ready(function() {
366 pasteListMenu('trial_names_2', 'list_menu_location_3', 'paste', 'trials');
372 <div class="form-group form-group-sm">
373 <label class="col-sm-4 control-label">Or Upload <font size="3" color="#5bc0de">Tab-delimited Text File</font> With Trial Names: </label>
374 <div class="col-sm-8">
375 <input type="file" name="trial_names_file_2" />
379 <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="Download Barcodes">Download Barcodes</button>
380 <button style="float:right" class="btn btn-default btn-sm" type="reset" >Clear</button>
386 <div class="col-md-1 col-lg-1">
395 %#<&| /page/info_section.mas, title=>'Generate unique barcodes', collapsible=>1, collapsed=>0 &>
397 %#<form action="/barcode/unique" >
399 %# Number of label pages to print <input type="text" name="label_pages" /><br /><br />
401 %# <& /barcode/printer_settings.mas &>
403 %# <input type="submit" value="Generate barcodes" />