starts
authorsenator <lebbeous@esilibrary.com>
Tue, 25 Jan 2011 23:48:41 +0000 (18:48 -0500)
committersenator <lebbeous@esilibrary.com>
Tue, 25 Jan 2011 23:48:41 +0000 (18:48 -0500)
Open-ILS/web/templates/default/opac/myopac.tt2 [deleted file]
Open-ILS/web/templates/default/opac/myopac/_links.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/opac/myopac/main.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/opac/results.tt2
Open-ILS/web/templates/default/opac/welcome.tt2

diff --git a/Open-ILS/web/templates/default/opac/myopac.tt2 b/Open-ILS/web/templates/default/opac/myopac.tt2
deleted file mode 100644 (file)
index fc8c74c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-[% BLOCK html_head %]
-<style>
-    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
-    table { border-collapse: collapse; }
-    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
-    table tr:nth-child(odd) { background-color:#ded; }
-</style>
-[% END %]
-
-[% 
-    WRAPPER "default/opac/base.tt2"; 
-    ctx.page_title = "My Account";
-%]
-
-<table>
-    <tr>
-        <td>First Name</td>
-        <td>[% ctx.user.first_given_name %]</td>
-    </tr>
-    <tr>
-        <td>Middle Name</td>
-        <td>[% ctx.user.second_given_name %]</td>
-    </tr>
-    <tr>
-        <td>Last Name</td>
-        <td>[% ctx.user.family_name %]</td>
-    </tr>
-    <tr>
-        <td>Library Card</td>
-        <td>[% ctx.user.card.barcode %]</td>
-    </tr>
-    <tr>
-        <td>Email Address</td>
-        <td>[% ctx.user.email %]</td>
-    </tr>
-    <tr>
-        <td>Phone</td>
-        <td>[% ctx.user.day_phone %]</td>
-    </tr>
-</table>
-
-
-
-[% END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/_links.tt2 b/Open-ILS/web/templates/default/opac/myopac/_links.tt2
new file mode 100644 (file)
index 0000000..4ab11d4
--- /dev/null
@@ -0,0 +1,17 @@
+[%
+pages = [
+    {url => "main", name => "My Account"},
+    {url => "items_out", name => "Items Out"},
+    {url => "items_held", name => "Items on Hold"},
+    {url => "fines", name => "Fines"},
+    {url => "prefs", name => "Account Preferences"},
+    {url => "bookbags", name => "My Bookbags"}
+];
+FOREACH page IN pages;
+    IF page.url != myopac_page %] <a href="[% page.url %]">[% END;
+        page.name;
+        IF page.url != myopac_page %]</a>
+    [% ELSE;
+        ctx.page_title = page.name;
+    END;
+END %]
diff --git a/Open-ILS/web/templates/default/opac/myopac/main.tt2 b/Open-ILS/web/templates/default/opac/myopac/main.tt2
new file mode 100644 (file)
index 0000000..dc86a48
--- /dev/null
@@ -0,0 +1,39 @@
+[% BLOCK html_head %]
+<style>
+    table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
+    table { border-collapse: collapse; }
+    table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
+    table tr:nth-child(odd) { background-color:#ded; }
+</style>
+[% END %]
+
+[% WRAPPER "default/opac/base.tt2" %]
+[% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "main" %]
+<table>
+    <tr>
+        <td>First Name</td>
+        <td>[% ctx.user.first_given_name %]</td>
+    </tr>
+    <tr>
+        <td>Middle Name</td>
+        <td>[% ctx.user.second_given_name %]</td>
+    </tr>
+    <tr>
+        <td>Last Name</td>
+        <td>[% ctx.user.family_name %]</td>
+    </tr>
+    <tr>
+        <td>Library Card</td>
+        <td>[% ctx.user.card.barcode %]</td>
+    </tr>
+    <tr>
+        <td>Email Address</td>
+        <td>[% ctx.user.email %]</td>
+    </tr>
+    <tr>
+        <td>Phone</td>
+        <td>[% ctx.user.day_phone %]</td>
+    </tr>
+</table>
+
+[% END %]
index 2a495f5..fa09cca 100644 (file)
@@ -37,7 +37,7 @@
                 [% IF ctx.user; %]
                     <div id='links_div'>
                         <div><a href='home'>Home</a></div>
-                        <div><a href='myopac'>Account</a></div>
+                        <div><a href='myopac/main'>Account</a></div>
                         <div><a href='logout'>Logout</a></div>
                     </div>
                     <hr/>
index 85d19ac..0cccd3f 100644 (file)
@@ -18,7 +18,7 @@
             </tr>
             <tr>
                 <td><a href='logout'>Logout</a></td>
-                <td><a href='myopac'>Account</a></td>
+                <td><a href='myopac/main'>Account</a></td>
             </tr>
         </table>
     [% ELSE %]