summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorCranix <you@example.com>2013-03-27 19:34:27 -0400
committerCranix <you@example.com>2013-03-27 19:34:27 -0400
commit15412b11354431c6778efe9f69e78f608e75f159 (patch)
tree198c59a4e3719597b20ff6f13722d5b5debf3dd1 /views
parentf2e4f434e252375d23f760eaa6954585364dc315 (diff)
downloadBiblioteka-15412b11354431c6778efe9f69e78f608e75f159.tar.gz
Biblioteka-15412b11354431c6778efe9f69e78f608e75f159.tar.bz2
Biblioteka-15412b11354431c6778efe9f69e78f608e75f159.tar.xz
Biblioteka-15412b11354431c6778efe9f69e78f608e75f159.zip
Do template dodano formularz do rezerwacji ksiazek.
Nalezy napisac mechanizm obslogujacy rezerwacje ksiazek.
Diffstat (limited to 'views')
-rw-r--r--views/main_page.tt23
1 files changed, 19 insertions, 4 deletions
diff --git a/views/main_page.tt b/views/main_page.tt
index 6b45fac..c7ad6b0 100644
--- a/views/main_page.tt
+++ b/views/main_page.tt
@@ -1,17 +1,26 @@
<html>
<body>
% (my @tab) = @{$_[0]->{'table'}};
-
+ % my $pool_id=0;
+ % my $pool_isbn=1;
+ % my $pool_title=2;
+ % my $pool_author=3;
+ % my $pool_owner=4;
+ % my $pool_state=5;
+ % my $pool_who=6;
+ % my $pool_can_borrow=7;
+ % my $pool_reserved=8;
+ % my $pool_comment=9;
<table border=7>
- <tr><td>id</td><td>isbn</td><td>tytul</td><td>autor</td><td>wlasiciciel</td><td>jest?</td><td>mozna brac?</td></tr>
+ <tr><td>id</td><td>isbn</td><td>tytul</td><td>autor</td><td>wlasiciciel</td><td>jest?</td><td>kto?</td><td>mozna brac?</td><td>zarezerwowana?</td><td>komentarz</td></tr>
<tr>
% for (my $i=0;$i<$#tab+1;$i++)
% {
- % for (my $ii=0;$ii<7;$ii++) #Jest 7 pol w kazdym rekordzie
+ % for (my $ii=0;$ii<9;$ii++) #Jest 9 pol w kazdym rekordzie
% {
- % if ($ii==5 || $ii==6)
+ % if ($ii==$pool_state || $ii==$pool_can_borrow || $ii==$pool_reserved)
% {
% if ($tab[$i][$ii]==1)
% {
@@ -31,5 +40,11 @@
</table>
+ <br>
+ Rezerwacja ksiazek. Podaj id ksiazki do zarezerwowania. <br>
+ <form action="http://i.am-a.cat:3000/res" method="post">
+ <input type="text" name="book_id">
+ <input type="submit" value="zarezerwuj">
+ </form>
</body>
</html>