Redirects to error pages for most pages work. Still todo: adding/editing sandwiches...
[~kgodey/maayanwich.git] / templates / base.html
1 <html>
2         <head>
3                 <link rel="stylesheet" href="{{ media_url }}sandwiches/style.css" type="text/css">
4                 <title>{% block title %}Ma'ayanwich Tracker{% endblock %}</title>
5                 {% block extrahead %}{% endblock %}
6         </head>
7         <body>
8                 <div id="wrapper">
9                         <div id="header">
10                                 <h1 class="header">Ma'ayanwich Tracker</h1>
11                         </div>
12                         <div id="sidebar">
13                                 <h3 class="navtitle">Account</h3>
14                                 <ul class="nav">
15                                         {% if user.is_authenticated %}
16                                                 <li><a href="{% url add_sandwich %}" class="navlink">Add sandwich</a></li>
17                                                 <li><a href="{% url edit_user gusername=request.user.username %}" class="navlink">User Settings</a></li>
18                                                 <li><a href="{% url logout %}" class="navlink">Logout</a></li>
19                                         {% else %}
20                                                 <li><a href="{% url login %}" class="navlink">Login</a></li>
21                                                 <li><a href="{% url signup %}" class="navlink">Signup</a></li>
22                                         {% endif %}
23                                 </ul>
24                                 <h3 class="navtitle">Newest</h3>
25                                 <ul class="newest">
26                                         {% for s in sandwiches %}
27                                                 <li><a href="{{ s.get_absolute_url }}">{{ s.adjective }}</a></li>
28                                         {% endfor %}
29                                 </ul>
30                                 <h3 class="navtitle">Sandwiches</h3>
31                                 <ul class="newest">
32                                         {% for m in monthly %}
33                                         <li><a href="{% url sandwich_by_month year=m.year, month=m.month %}"> {{ m|date:"F" }} {{m.year}} </a></li>
34                                         {% endfor %}
35                                 </ul>
36                                 <ul class="newest">
37                                         <li><a href="{% url all_sandwiches %}" class="navlink">All sandwiches</a></li>
38                                 </ul>
39                         </div>
40                         <div id="content">
41                                 {% block content %}     
42                                 {% endblock %}
43                         </div>
44                 </div>
45         <body>
46 </html>