new templates
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Sep 2005 15:47:23 +0000 (15:47 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Sep 2005 15:47:23 +0000 (15:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1861 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/reporter/templates/footer.ttk [new file with mode: 0644]
Open-ILS/src/reporter/templates/header.ttk [new file with mode: 0644]
Open-ILS/src/reporter/templates/login.ttk
Open-ILS/src/reporter/templates/logout.ttk [new file with mode: 0644]
Open-ILS/src/reporter/templates/stage1.ttk

diff --git a/Open-ILS/src/reporter/templates/footer.ttk b/Open-ILS/src/reporter/templates/footer.ttk
new file mode 100644 (file)
index 0000000..cafa17e
--- /dev/null
@@ -0,0 +1,3 @@
+
+<!-- Maybe put some other stuff here -->
+
diff --git a/Open-ILS/src/reporter/templates/header.ttk b/Open-ILS/src/reporter/templates/header.ttk
new file mode 100644 (file)
index 0000000..a0bee08
--- /dev/null
@@ -0,0 +1,14 @@
+
+<head>
+
+       <!-- Load our JS libs -->
+       <script language='javascript' src='/opac/common/js/Cookie.js'> </script>
+       <script language='javascript' src='/opac/common/js/md5.js'> </script>
+       <script language='javascript' src='/opac/common/js/utils.js'> </script>
+       <script language='javascript' src='/opac/common/js/JSON.js'> </script>
+       <script language='javascript' src='/opac/common/js/RemoteRequest.js'> </script>
+
+       <title>[% title %]</title>
+
+</head>
+
index 1f94e82..f196330 100644 (file)
@@ -1,19 +1,17 @@
 <html>
 
-       <head>
-
-               <script language='javascript' src='/opac/common/js/Cookie.js'> </script>
-               <script language='javascript' src='/opac/common/js/md5.js'> </script>
-               <script language='javascript' src='/opac/common/js/utils.js'> </script>
-               <script language='javascript' src='/opac/common/js/JSON.js'> </script>
-               <script language='javascript' src='/opac/common/js/RemoteRequest.js'> </script>
+       [% INCLUDE header.ttk title="Login" %]
 
+       <body>
 
                <script language='javascript'>
 
                        var COOKIE_SES = "ses";
                        var cookie = new cookieObject("ses", 1, "/", COOKIE_SES);
 
+                       function checkInputClicks() {
+                       }
+
 
                        function doLogin() {
 
@@ -51,9 +49,7 @@
                        }
 
                </script>
-       </head>
 
-       <body>
                <br/><br/>
                <h3> Reports Login </h3>
                <table style='padding: 4px; border: 2px solid #E0E0E0;'>
@@ -70,5 +66,9 @@
                        </tr>
                </table>
        </body>
+
+       [% INCLUDE footer.ttk %]
+
 </html>
 
+
diff --git a/Open-ILS/src/reporter/templates/logout.ttk b/Open-ILS/src/reporter/templates/logout.ttk
new file mode 100644 (file)
index 0000000..f325b74
--- /dev/null
@@ -0,0 +1,28 @@
+<script language='javascript'>
+
+       var COOKIE_SES = "ses";
+       var cookie = new cookieObject("ses", 1, "/", COOKIE_SES);
+
+       function doLogout() {
+
+               var ses = cookie.get(COOKIE_SES);
+
+               if(ses) {
+       var req = new RemoteRequest(
+                               "open-ils.auth",
+                               "open-ils.auth.session.remove", ses );
+       req.send(true);
+               }
+
+   cookie.remove(COOKIE_SES);
+
+       location.href="login";
+
+}
+
+</script>
+
+<span>
+       <a href='javascript:void(0);' onclick='doLogout();'>Logout</a>
+</span>
+
index 033cd56..0e8bbee 100644 (file)
@@ -32,10 +32,14 @@ MACRO logme(a) PROCESS logme_block x = a.list.join(', ');
        DBI.connect(dsn,d_u,d_p);
 %]
 
+
 <html>
+       [% INCLUDE header.ttk title="Basic Report Types" %]     
        <body>
+               [% INCLUDE logout.ttk %]
                [% PROCESS PRINT_STAGE1 %]
        </body>
+       [% INCLUDE footer.ttk %]        
 </html>