Skip to content
Browse files

Added psgi server and template improvements

  • Loading branch information...
1 parent 00a37d6 commit 4430dd4ef4ef8f34268b69ad899bb39c47e74f03 @kthakore committed Feb 19, 2011
View
1 implementation/SIMS/SIMS/root/header.tt
@@ -81,5 +81,6 @@
<span style="float: right" />
[% PROCESS navigation.tt %]
</span>
+<div id="header-bottom" > </div>
</div>
View
87 implementation/SIMS/SIMS/root/login.tt
@@ -1,44 +1,55 @@
[% PROCESS header.tt %]
-<div id="content">
+<div id="dashboard" class="dashboard>
- <!-- Login form -->
- <form method="post" action="[% c.uri_for('/login') %]">
- [%IF c.flash.error_msg %]
- <p> Error: [%c.flash.error_msg%] </p>
- [%END %]
- <table>
- <tr>
- <td>Username:</td>
- <td><input type="text" name="username" size="40" /></td>
- </tr>
- <tr>
- <td>Password:</td>
- <td><input type="password" name="password" size="40" /></td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" name="submit" value="Submit" /></td>
- </tr>
- </table>
- </form>
+<div id="dashboard-header" > </div>
+<div id="dashboard-content">
- <p>
- [%
- # This code illustrates how certain parts of the TT
- # template will only be shown to users who have logged in
- %]
- [% IF c.user_exists %]
- [% c.response.redirect(c.uri_for('/')); %]
- [% ELSE %]
- You need to log in to use this application.
- [% END %]
- [%#
- Note that this whole block is a comment because the "#" appears
- immediate after the "[%" (with no spaces in between). Although it
- can be a handy way to temporarily "comment out" a whole block of
- TT code, it's probably a little too subtle for use in "normal"
- comments.
- %]
- </p>
+ <div id="gadget-0-renderbox" class="gadget" style="left: 5px; top: 5px; width: 99%;">
+ <div class="shadow"><div class="tl"></div><div class="tr"></div><div class="l"></div><div class="r"></div><div class="bl"></div><div class="br"></div><div class="b"></div></div>
+ <div class="dashboard-item-header">
+ <div class="dashboard-item-content">
+ <h3 class="dashboard-item-title" id="gadget-0-title" style="background-color:ddddff">Login</h3>
+ <!-- Login form -->
+ <form method="post" action="[% c.uri_for('/login') %]">
+ [%IF c.flash.error_msg %]
+ <p> Error: [%c.flash.error_msg%] </p>
+ [%END %]
+ <table>
+ <tr>
+ <td>Username:</td>
+ <td><input type="text" name="username" size="40" /></td>
+ </tr>
+ <tr>
+ <td>Password:</td>
+ <td><input type="password" name="password" size="40" /></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" name="submit" value="Submit" /></td>
+ </tr>
+ </table>
+ </form>
+ <p>
+ [%
+ # This code illustrates how certain parts of the TT
+ # template will only be shown to users who have logged in
+ %]
+ [% IF c.user_exists %]
+ [% c.response.redirect(c.uri_for('/')); %]
+ [% ELSE %]
+ You need to log in to use this application.
+ [% END %]
+ [%#
+ Note that this whole block is a comment because the "#" appears
+ immediate after the "[%" (with no spaces in between). Although it
+ can be a handy way to temporarily "comment out" a whole block of
+ TT code, it's probably a little too subtle for use in "normal"
+ comments.
+ %]
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
[% PROCESS footer.tt %]
View
8 implementation/SIMS/SIMS/script/sims.psgi
@@ -0,0 +1,8 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use SIMS;
+
+SIMS->setup_engine('PSGI');
+my $app = sub { SIMS->run(@_) };
+
View
BIN implementation/SIMS/SIMS/sims.db
Binary file not shown.

0 comments on commit 4430dd4

Please sign in to comment.
Something went wrong with that request. Please try again.