summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
author-m <example.com>2013-03-19 19:52:26 +0100
committer-m <example.com>2013-03-19 19:52:26 +0100
commitebd870b596a67a55ef3411765fd69504d95fad09 (patch)
tree96deed663f473f212fad4a0ef78bb8adc1b289ef /views
downloadBiblioteka-ebd870b596a67a55ef3411765fd69504d95fad09.tar.gz
Biblioteka-ebd870b596a67a55ef3411765fd69504d95fad09.tar.bz2
Biblioteka-ebd870b596a67a55ef3411765fd69504d95fad09.tar.xz
Biblioteka-ebd870b596a67a55ef3411765fd69504d95fad09.zip
initial version
Diffstat (limited to 'views')
-rw-r--r--views/a.tt24
-rw-r--r--views/a.tt.backup25
-rw-r--r--views/a.tt.backup112
-rw-r--r--views/b.tt10
-rw-r--r--views/c.tt6
-rw-r--r--views/index.tt148
-rw-r--r--views/ksiazki.db0
-rw-r--r--views/layouts/main.tt20
-rw-r--r--views/q.tt7
9 files changed, 252 insertions, 0 deletions
diff --git a/views/a.tt b/views/a.tt
new file mode 100644
index 0000000..781a145
--- /dev/null
+++ b/views/a.tt
@@ -0,0 +1,24 @@
+<html>
+ <body>
+ % (my @tab) = @{$_[0]->{'table'}};
+
+ <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>
+
+ % for (my $i=0;$i<$#tab;$i++)
+ % {
+ % for (my $ii=0;$ii<7;$ii++) #Jest 7 pol w kazdym rekordzie
+ % {
+
+ <td> <%= $tab[$i][$ii] %> </td>
+ % }
+ %= "\n"
+ </tr>
+ <tr>
+ % }
+
+ </table>
+
+ </body>
+</html>
diff --git a/views/a.tt.backup b/views/a.tt.backup
new file mode 100644
index 0000000..bfc8433
--- /dev/null
+++ b/views/a.tt.backup
@@ -0,0 +1,25 @@
+<html>
+ <body>
+ % (my @tab) = @{$_[0]->{'table'}};
+ % my $max_index = $#tab;
+ % my @pool_names = ('id','isbn', 'tytul', 'autor', 'wlasciciel', 'jest?', 'mozna brac?');
+
+ <table border=7>
+ <tr>id<td>isbn<td>tytul<td>autor<td>wlasiciciel<td>jest?<td>mozna brac?
+ <tr>
+ % for (my $i=0;$i<$max_index;$i++)
+ % {
+ % for (my $ii=0;$ii<7;$ii++) #Jest 7 pol w kazdym rekordzie
+ % {
+ %# = $pool_names[$ii].':'.$tab[$i][$ii]
+ %# <tr> <%= $pool_names[$ii] %> <td> <%= $tab[$i][$ii] %>
+ <td> <%= $tab[$i][$ii] %>
+ % }
+ %= "\n"
+ <tr>
+ % }
+
+ </table>
+
+ </body>
+</html>
diff --git a/views/a.tt.backup1 b/views/a.tt.backup1
new file mode 100644
index 0000000..44f9a38
--- /dev/null
+++ b/views/a.tt.backup1
@@ -0,0 +1,12 @@
+<html>
+ <body>
+ % my ($x) = @_;
+ % my @tab = $x->{'table'};
+
+ %# my $max_index = $#tab;
+ %# for (my $i=0;$i<$max_index;$i++)
+ %# {
+ %= $tab[0][1][3]
+ %# }
+ </body>
+</html>
diff --git a/views/b.tt b/views/b.tt
new file mode 100644
index 0000000..92ace34
--- /dev/null
+++ b/views/b.tt
@@ -0,0 +1,10 @@
+<html>
+ <body>
+ <table>
+ <table border=7>
+ <tr>
+ <td> <%=5*5%> </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/views/c.tt b/views/c.tt
new file mode 100644
index 0000000..d93cbce
--- /dev/null
+++ b/views/c.tt
@@ -0,0 +1,6 @@
+<html>
+ <body>
+ %my ($x) = @_;
+ %= $x->{'number'};
+ </body>
+</html>
diff --git a/views/index.tt b/views/index.tt
new file mode 100644
index 0000000..b830a9c
--- /dev/null
+++ b/views/index.tt
@@ -0,0 +1,148 @@
+
+<!--
+ Credit goes to the Ruby on Rails team for this page
+ has been heavily based on the default Rails page that is
+ built with a scaffolded application.
+
+ Thanks a lot to them for their work.
+
+ See Ruby on Rails if you want a kickass framework in Ruby:
+ http://www.rubyonrails.org/
+-->
+
+<div id="page">
+ <div id="sidebar">
+ <ul id="sidebar-items">
+ <li>
+ <h3>Join the community</h3>
+ <ul class="links">
+
+ <li><a href="http://perldancer.org/">PerlDancer</a></li>
+ <li><a href="http://twitter.com/PerlDancer/">Official Twitter</a></li>
+ <li><a href="https://github.com/sukria/Dancer/">GitHub Community</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <h3>Browse the documentation</h3>
+
+ <ul class="links">
+ <li><a
+ href="http://search.cpan.org/dist/Dancer/lib/Dancer/Introduction.pod">Introduction</a></li>
+ <li><a href="http://search.cpan.org/dist/Dancer/lib/Dancer/Cookbook.pod">Cookbook</a></li>
+ <li><a href="http://search.cpan.org/dist/Dancer/lib/Dancer/Deployment.pod">Deployment Guide</a></li>
+ <li><a
+ href="http://search.cpan.org/dist/Dancer/lib/Dancer/Tutorial.pod"
+ title="a tutorial to build a small blog engine with Dancer">Tutorial</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <h3>Your application's environment</h3>
+
+ <ul>
+ <li>Location: <code>/home/cranix/Biblioteka/biblioteka</code></li>
+ <li>Template engine: <code><% settings.template %></code></li>
+ <li>Logger: <code><% settings.logger %></code></li>
+ <li>Environment: <code><% settings.environment %></code></li>
+ </ul>
+
+ </li>
+ </ul>
+
+ </div>
+
+ <div id="content">
+ <div id="header">
+ <h1>Perl is dancing</h1>
+ <h2>You&rsquo;ve joined the dance floor!</h2>
+ </div>
+
+ <div id="getting-started">
+ <h1>Getting started</h1>
+ <h2>Here&rsquo;s how to get dancing:</h2>
+
+ <h3><a href="#" id="about_env_link">About your application's environment</a></h3>
+
+ <div id="about-content" style="display: none;">
+ <table>
+ <tbody>
+ <tr>
+ <td>Perl version</td>
+ <td><tt><% perl_version %></tt></td>
+ </tr>
+ <tr>
+ <td>Dancer version</td>
+ <td><tt><% dancer_version %></tt></td>
+ </tr>
+ <tr>
+ <td>Backend</td>
+ <td><tt><% settings.apphandler %></tt></td>
+ </tr>
+ <tr>
+ <td>Appdir</td>
+ <td><tt>/home/cranix/Biblioteka/biblioteka</tt></td>
+ </tr>
+ <tr>
+ <td>Template engine</td>
+ <td><tt><% settings.template %></tt></td>
+ </tr>
+ <tr>
+ <td>Logger engine</td>
+ <td><tt><% settings.logger %></tt></td>
+ </tr>
+ <tr>
+ <td>Running environment</td>
+ <td><tt><% settings.environment %></tt></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <script type="text/javascript">
+ $('#about_env_link').click(function() {
+ $('#about-content').slideToggle('fast', function() {
+ // ok
+ });
+ return( false );
+ });
+ </script>
+
+
+ <ol>
+ <li>
+ <h2>Tune your application</h2>
+
+ <p>
+ Your application is configured via a global configuration file,
+ <tt>config.yml</tt> and an "environment" configuration file,
+ <tt>environments/development.yml</tt>. Edit those files if you
+ want to change the settings of your application.
+ </p>
+ </li>
+
+ <li>
+ <h2>Add your own routes</h2>
+
+ <p>
+ The default route that displays this page can be removed,
+ it's just here to help you get started. The template used to
+ generate this content is located in
+ <code>views/index.tt</code>.
+ You can add some routes to <tt>lib/biblioteka.pm</tt>.
+ </p>
+ </li>
+
+ <li>
+ <h2>Enjoy web development again</h2>
+
+ <p>
+ Once you've made your changes, restart your standalone server
+ (bin/app.pl) and you're ready to test your web application.
+ </p>
+ </li>
+
+ </ol>
+ </div>
+ </div>
+ </div>
diff --git a/views/ksiazki.db b/views/ksiazki.db
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/views/ksiazki.db
diff --git a/views/layouts/main.tt b/views/layouts/main.tt
new file mode 100644
index 0000000..f85e493
--- /dev/null
+++ b/views/layouts/main.tt
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-type" content="text/html; charset=<% settings.charset %>" />
+<title>biblioteka</title>
+<link rel="stylesheet" href="<% request.uri_base %>/css/style.css" />
+
+<script type="text/javascript">/* <![CDATA[ */
+ !window.jQuery && document.write('<script type="text/javascript" src="<% request.uri_base %>/javascripts/jquery.js"><\/script>')
+/* ]]> */</script>
+
+</head>
+<body>
+<% content %>
+<div id="footer">
+Powered by <a href="http://perldancer.org/">Dancer</a> <% dancer_version %>
+</div>
+</body>
+</html>
diff --git a/views/q.tt b/views/q.tt
new file mode 100644
index 0000000..7af7630
--- /dev/null
+++ b/views/q.tt
@@ -0,0 +1,7 @@
+<html>
+ <body>
+ % my ($x) = @_;
+ % my @tab = $x->{'tablica'};
+ %= ${$tab[0]}[0]
+ </body>
+</html>