]> git.ozlabs.org Git - patchwork/blob - templates/base.html
views: Refactor generic_list() to make it less complicated
[patchwork] / templates / base.html
1 {% load pwurl %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6   <title>{% block title %}Patchwork{% endblock %} - Patchwork</title>
7   <link rel="stylesheet" type="text/css" href="/css/style.css"/>
8   <script language="JavaScript" type="text/javascript" src="/js/common.js">
9   </script>
10 {% block headers %}{% endblock %}
11  </head>
12  <body>
13   <div id="title">
14   <h1 style="float: left;">
15      <a
16       href="{% url patchwork.views.projects %}">Patchwork</a>
17     {% block heading %}{% endblock %}</h1>
18   <div id="auth">
19 {% if user.is_authenticated %}
20    Logged in as
21     <a href="{% url patchwork.views.user.profile %}"
22      ><strong>{{ user.username }}</strong></a>
23     <br/>
24      <a href="{% url patchwork.views.user.todo_lists %}">todo
25       ({{ user.get_profile.n_todo_patches }})</a> ::
26      <a href="{% url patchwork.views.bundle.bundles %}">bundles</a>
27      <br/>
28      <a href="{% url patchwork.views.user.profile %}">profile</a> ::
29      <a href="{% url auth_logout %}">logout</a>
30 {% else %}
31      <a href="{% url auth_login %}">login</a>
32      <br/>
33      <a href="{% url registration_register %}">register</a>
34 {% endif %}
35    </div>
36    <div style="clear: both;"></div>
37   </div>
38   <div id="nav">
39    <div id="navleft">
40    {% if project %}
41     <strong>Project</strong>: {{ project.linkname }}
42      :
43      <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
44       >patches</a>
45      :
46      <a href="{% url patchwork.views.project.project project_id=project.linkname %}"
47       >project info</a>
48     {% if other_projects %}
49      :
50      <a href="{% url patchwork.views.projects %}"
51      >other projects</a>
52      {% endif %}
53     {% else %}
54      <a href="{% url patchwork.views.projects %}"
55      >project list</a>
56     {% endif %}
57    </div>
58    <div id="navright">
59     <a href="{% url patchwork.views.help path="about/" %}">about</a>
60    </div>
61    <div style="clear: both"></div>
62   </div>
63 {% if messages %}
64   <div id="messages">
65   {% for message in messages %}
66    <div class="message">{{ message }}</div>
67   {% endfor %}
68   </div>
69 {% endif %}
70   <div id="content">
71 {% block body %}
72 {% endblock %}
73   </div>
74   <div id="footer">
75    <a href="http://ozlabs.org/~jk/projects/patchwork">patchwork</a>
76    patch tracking system
77   </div>
78  </body>
79 </html>
80
81
82