summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2015-01-10 21:40:16 +0100
committercos <cos>2015-01-10 21:58:04 +0100
commit31ee33ca4c14c03f5e1a2530735bda50d235de36 (patch)
tree5e0224b0acb971cc62409f4e91d7a941e22dc901
parent8df944e4320ae7c8d63569ba11379a72afe338f7 (diff)
downloadmat-31ee33ca4c14c03f5e1a2530735bda50d235de36.zip
Add storage links on relocate page.
-rwxr-xr-xcgi-bin/mat.cgi18
1 files changed, 15 insertions, 3 deletions
diff --git a/cgi-bin/mat.cgi b/cgi-bin/mat.cgi
index d6e3d2d..793671a 100755
--- a/cgi-bin/mat.cgi
+++ b/cgi-bin/mat.cgi
@@ -40,7 +40,7 @@ sub unauthorized()
sub send_cookie()
{
- print $session->header(-type => 'text/plain', -charset => 'utf8');
+ print $session->header(-type => 'text/html', -charset => 'utf8');
}
sub cmd_view($)
@@ -54,8 +54,20 @@ sub cmd_view($)
"recipes AS r JOIN inventory AS i ON i.recipe_id=r.id WHERE i.id=".$id.
";");
- print $id, "\n", $$recipe_row[0], "\n", $$recipe_row[1], "\n",
- $$recipe_row[2], "\n";
+ print $id, "<br />", $$recipe_row[0], "<br />", $$recipe_row[1], "<br />";
+ if(substr($$recipe_row[2], 0, 4) eq "http") {
+ print '<a href="'.$$recipe_row[2].'">'.$$recipe_row[2].'</a>', "<br />";
+ } else {
+ print $$recipe_row[2], "<br />";
+ }
+ if ($session->param('authenticated') eq "yes") {
+ print "<font size=20>\n";
+ for my $store ( split(" ", $Config{'relocate_stores'}) ) {
+ print " <a href=".$Config{'label_id_prefix'}."$id/relocate/$store>".
+ "$store</a> \n";
+ }
+ print "</font>";
+ }
}
sub cmd_relocate($$)