show currently loaded file
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 12 May 2010 20:45:47 +0000 (22:45 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 12 May 2010 20:45:47 +0000 (22:45 +0200)
templates/data/index.html.ep

index 0cc07ea..10e202b 100644 (file)
@@ -4,11 +4,15 @@
 <form method=post action=/data/load >
 
 <ul>
+% my $current = session('path');
 % foreach my $n ( @$files ) {
 <li>
 <label>
-<input type=radio name=path value=<%= $n %> >
-<%= $n %>
+%  if ( $n eq $current ) {
+<input type=radio disabled> <b><%= $n %></b>
+%  } else {
+<input type=radio name=path value=<%= $n %> > <%= $n %>
+%  }
 </label>
 % }
 </ul>