shaped up routing: enabled explicit mode, and created some named routes
[zzz-floof.git] / floof / templates / base.mako
index 28003c5..654b8b3 100644 (file)
@@ -8,9 +8,32 @@
 </head>
 <body>
 <div id="header">
 </head>
 <body>
 <div id="header">
+<a href="${h.url_for("/")}">Home</a>
+
+% if c.user:
+| <a href="${h.url_for(controller="art", action="new")}">Add Art</a>
+| <a href="${h.url_for(controller="search", action="list")}">Your Searches</a>
+## | <a href="${h.url_for("/users/"+c.user}">Your Page</a>
+% endif
+
+${h.form(h.url_for('search'), method='GET')}
+${h.text('query', c.query)} 
+${h.submit('button', 'Search')} 
+
+% if c.user:
+${h.submit('button', 'Save')}
+% endif
+
+## Note: should probably only display "save" when we're on a results page
+## Also, what if we had it save a hidden form containing the search result that was
+## actually rendered?  Might be confusing though.
+${h.end_form()}
+
     <div id="user">
         % if c.user:
     <div id="user">
         % if c.user:
-        <p>Logged in as ${c.user.name}</p>
+        <form action="${url(controller='account', action='logout')}" method="POST">
+        <p>Logged in as ${c.user.name}.  ${h.submit(None, 'Log out')}</p>
+        </form>
         % else:
         <form action="${url(controller='account', action='login_begin')}" method="POST">
         <p>
         % else:
         <form action="${url(controller='account', action='login_begin')}" method="POST">
         <p>
@@ -20,6 +43,8 @@
         </form>
         % endif
     </div>
         </form>
         % endif
     </div>
+
+
 </div>
 <div id="body">
 ${next.body()}
 </div>
 <div id="body">
 ${next.body()}