]> git.ozlabs.org Git - patchwork/blob - templates/base.html
[views] Restructure profile view, simplify bundle access
[patchwork] / templates / base.html
1 {% load pwurl %}
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml">
5  <head>
6   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
7   <title>{% block title %}Patchwork{% endblock %} - Patchwork</title>
8   <link rel="stylesheet" type="text/css" href="/css/style.css"/>
9 {% block headers %}{% endblock %}
10  </head>
11  <body>
12   <div id="title">
13   <h1 style="float: left;">
14      <a
15       href="{% url patchwork.views.projects %}">Patchwork</a><span
16       class="beta">&beta;</span>
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      <br/>
35      <a href="{% url patchwork.views.help path="about/" %}">about</a>
36 {% endif %}
37    </div>
38    <div style="clear: both;"></div>
39   </div>
40   <div id="nav">
41   {% if project %}
42    <strong>Project</strong>: {{ project.linkname }}
43     :
44     <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
45      >patches</a>
46     :
47     <a href="{% url patchwork.views.project project_id=project.linkname %}"
48      >project info</a>
49    {% if other_projects %}
50     :
51     <a href="{% url patchwork.views.projects %}"
52     >other projects</a>
53     {% endif %}
54    {% else %}
55     <a href="{% url patchwork.views.projects %}"
56     >project list</a>
57    {% endif %}
58   </div>
59 {% if messages %}
60   <div id="messages">
61   {% for message in messages %}
62    <div class="message">{{ message }}</div>
63   {% endfor %}
64   </div>
65 {% endif %}
66   <div id="content">
67 {% block body %}
68 {% endblock %}
69   </div>
70   <div id="footer">
71    <a href="http://ozlabs.org/~jk/projects/patchwork">patchwork</a>
72    patch tracking system
73   </div>
74  </body>
75 </html>
76
77
78