6 /util/barcode.mas - generate a barcode from an identifier and prints text alongside the barcode
10 This mason component calls SGN::Controller::Barcode.
14 $identifier (required) - will be converted to barcode
15 $text - what's printed alongside barcode (human readable)
20 Lukas Mueller <lam87@cornell.edu>
37 my $encoded_id = $urlencode{$identifier};
38 my $encoded_text = $urlencode{$text};
41 if ($format eq "code128") {
42 $link = "/barcode/code128png/$encoded_id/$encoded_text";
45 if ($format eq "qrcode") {
46 my $info = "http://solgenomics.net/stock/$identifier/view";
47 $link = "/barcode/qrcodepng/$info/$encoded_text";
48 #$link = "/barcode/qrcodepng/$identifier/$encoded_text";
54 <center><img src="<% $link %>" /></center>