summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-08-21 09:38:06 +0800
committerJeremy Kerr <jk@ozlabs.org>2008-08-21 09:38:06 +0800
commitc561ebe710d6e6a43aa4afc6c2036a215378ce87 (patch)
tree7d4a56233ef53a0457646c47895ac5c6e7a65d31 /templates
downloadpatchwork-c561ebe710d6e6a43aa4afc6c2036a215378ce87.tar.bz2
patchwork-c561ebe710d6e6a43aa4afc6c2036a215378ce87.tar.xz
Inital commit
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/patchwork/base.html77
-rw-r--r--templates/patchwork/bundle-public.html12
-rw-r--r--templates/patchwork/bundle.html39
-rw-r--r--templates/patchwork/filters.html173
-rw-r--r--templates/patchwork/list.html24
-rw-r--r--templates/patchwork/login.html26
-rw-r--r--templates/patchwork/logout.html8
-rw-r--r--templates/patchwork/pagination.html45
-rw-r--r--templates/patchwork/patch-form.html87
-rw-r--r--templates/patchwork/patch-list.html185
-rw-r--r--templates/patchwork/patch.html214
-rw-r--r--templates/patchwork/patchlist.html36
-rw-r--r--templates/patchwork/profile.html114
-rw-r--r--templates/patchwork/project.html32
-rw-r--r--templates/patchwork/projects.html21
-rw-r--r--templates/patchwork/register-confirm.html13
-rw-r--r--templates/patchwork/register.html122
-rw-r--r--templates/patchwork/todo-list.html17
-rw-r--r--templates/patchwork/todo-lists.html29
-rw-r--r--templates/patchwork/user-link-confirm.html19
-rw-r--r--templates/patchwork/user-link.html30
21 files changed, 1323 insertions, 0 deletions
diff --git a/templates/patchwork/base.html b/templates/patchwork/base.html
new file mode 100644
index 0000000..c3a2206
--- /dev/null
+++ b/templates/patchwork/base.html
@@ -0,0 +1,77 @@
+{% load pwurl %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>{% block title %}Patchwork{% endblock %} - Patchwork</title>
+ <link rel="stylesheet" type="text/css" href="/css/style.css"/>
+{% block headers %}{% endblock %}
+ </head>
+ <body>
+ <div id="title">
+ <h1 style="float: left;">
+ <a
+ href="{% url patchwork.views.projects %}">Patchwork</a><span
+ class="beta">&alpha;</span>
+ {% block heading %}{% endblock %}</h1>
+ <div id="auth">
+{% if user.is_authenticated %}
+ Logged in as
+ <a href="{% url patchwork.views.user.profile %}"
+ ><strong>{{ user.username }}</strong></a>
+ <br/>
+ <a href="{% url patchwork.views.user.profile %}">profile</a> ::
+ <a href="{% url patchwork.views.user.todo_lists %}">todo
+ ({{ user.get_profile.n_todo_patches }})</a><br/>
+ <a href="{% url patchwork.views.user.logout %}">logout</a> ::
+ <a href="/help/">help</a>
+{% else %}
+ <a href="{% url patchwork.views.user.login %}">login</a>
+ <br/>
+ <a href="{% url patchwork.views.user.register %}">register</a>
+ <br/>
+ <a href="/help/">help</a>
+{% endif %}
+ </div>
+ <div style="clear: both;"></div>
+ </div>
+ <div id="nav">
+ {% if project %}
+ <strong>Project</strong>: {{ project.linkname }}
+ :
+ <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
+ >patches</a>
+ :
+ <a href="{% url patchwork.views.project project_id=project.linkname %}"
+ >project info</a>
+ {% if other_projects %}
+ :
+ <a href="{% url patchwork.views.projects %}"
+ >other projects</a>
+ {% endif %}
+ {% else %}
+ <a href="{% url patchwork.views.projects %}"
+ >project list</a>
+ {% endif %}
+ </div>
+{% if messages %}
+ <div id="messages">
+ {% for message in messages %}
+ <div class="message">{{ message }}</div>
+ {% endfor %}
+ </div>
+{% endif %}
+ <div id="content">
+{% block body %}
+{% endblock %}
+ </div>
+ <div id="footer">
+ <a href="http://ozlabs.org/~jk/projects/patchwork">patchwork</a>
+ patch tracking system
+ </div>
+ </body>
+</html>
+
+
+
diff --git a/templates/patchwork/bundle-public.html b/templates/patchwork/bundle-public.html
new file mode 100644
index 0000000..0ee57da
--- /dev/null
+++ b/templates/patchwork/bundle-public.html
@@ -0,0 +1,12 @@
+{% extends "patchwork/base.html" %}
+
+{% load person %}
+
+{% block title %}{{project.name}}{% endblock %}
+{% block heading %}Bundle: {{bundle.name}}{% endblock %}
+
+{% block body %}
+
+{% include "patchwork/patch-list.html" %}
+
+{% endblock %}
diff --git a/templates/patchwork/bundle.html b/templates/patchwork/bundle.html
new file mode 100644
index 0000000..8fa694a
--- /dev/null
+++ b/templates/patchwork/bundle.html
@@ -0,0 +1,39 @@
+{% extends "patchwork/base.html" %}
+
+{% load person %}
+
+{% block title %}{{project.name}}{% endblock %}
+{% block heading %}bundle: {{bundle.name}}{% endblock %}
+
+{% block body %}
+
+<p>This bundle contains patches for the {{ bundle.project.linkname }}
+project.</p>
+
+<p><a href="{% url patchwork.views.bundle.mbox bundle_id=bundle.id %}"
+>Download bundle as mbox</a></p>
+
+
+<form method="post">
+ <input type="hidden" name="form" value="bundle"/>
+<table class="form">
+
+ <tr>
+ <th colspan="2" class="headerrow">Bundle settings</th>
+ </tr>
+
+{{ bundleform }}
+ <tr>
+ <td colspan="2" class="submitrow">
+ <input type="submit" name="action" value="Update"/>
+ <input type="submit" name="action" value="Delete"/>
+ </td>
+ </tr>
+</table>
+</form>
+
+<div style="clear: both; padding: 1em;"></div>
+
+{% include "patchwork/patch-list.html" %}
+
+{% endblock %}
diff --git a/templates/patchwork/filters.html b/templates/patchwork/filters.html
new file mode 100644
index 0000000..482bc98
--- /dev/null
+++ b/templates/patchwork/filters.html
@@ -0,0 +1,173 @@
+
+<script type="text/javascript" language="JavaScript">
+var filterform_displayed = false;
+function filter_click()
+{
+ form = document.getElementById('filterform');
+ if (!form) {
+ return;
+ }
+
+ if (filterform_displayed) {
+ form.style['display'] = 'none';
+ filterform_displayed = false;
+ } else {
+ form.style['display'] = 'block';
+ filterform_displayed = true;
+ }
+
+
+}
+function enable_selected_submitter(select, input)
+{
+ select.name = 'submitter';
+ input.name = '';
+}
+function filter_form_submit(form)
+{
+ var i;
+
+ submitter_select = document.getElementById("submitter_select");
+ submitter_input = document.getElementById("submitter_input");
+ if (!submitter_select || !submitter_input) {
+ req = null;
+ return;
+ }
+
+ /* submitter handling. if possible, use the select box, otherwise leave
+ * as-is (and so the text box is used). */
+
+ if (submitter_select.options.length == 0) {
+ /* if there's no match, just use the input */
+
+ } else if (submitter_select.options.length == 1) {
+ /* if there's only one match, request by id */
+ submitter_select.selectedIndex = 0;
+ enable_selected_submitter(submitter_select, submitter_input);
+
+ } else if (submitter_select.selectedIndex != -1) {
+ /* if the user has explicitly selected, request by id */
+ enable_selected_submitter(submitter_select, submitter_input);
+
+ }
+
+ for (i = 0; i < form.elements.length; i++) {
+ var e = form.elements[i];
+ if (e.type == 'submit') {
+ continue;
+ }
+
+ /* handle submitter data */
+ if (e.type == 'select-one') {
+ if (e.name == '') {
+ e.disabled = true;
+ }
+ if (e.selectedIndex != -1
+ && e.options[e.selectedIndex].value == '') {
+ e.disabled = true;
+ }
+
+ continue;
+ }
+
+ if (e.value == '') {
+ e.disabled = true;
+ }
+ }
+}
+
+var req = null;
+
+function submitter_complete_response()
+{
+ if (req.readyState != 4) {
+ return
+ }
+
+ var completions;
+ eval("completions = " + req.responseText);
+
+ if (completions.length == 0) {
+ req = null;
+ return;
+ }
+
+ submitter_select = document.getElementById("submitter_select");
+ submitter_input = document.getElementById("submitter_input");
+ if (!submitter_select || !submitter_input) {
+ req = null;
+ return;
+ }
+
+ submitter_select.options = [];
+
+ for (i = 0; i < completions.length; i++) {
+ name = completions[i]['fields']['name'];
+ if (name) {
+ name = completions[i]['fields']['name'] +
+ ' <' + completions[i]['fields']['email'] + '>';
+ } else {
+ name = completions[i]['fields']['email'];
+ }
+ o = new Option(name, completions[i]['pk']);
+ submitter_select.options[i] = o;
+ }
+ submitter_select.disabled = false;
+ req = null;
+}
+
+function submitter_field_change(field)
+{
+ var value = field.value;
+ if (value.length < 4) {
+ return;
+ }
+
+ if (req) {
+ return;
+ }
+
+ var url = '{% url patchwork.views.submitter_complete %}?q=' + value;
+ req = new XMLHttpRequest();
+ req.onreadystatechange = submitter_complete_response;
+ req.open("GET", url, true);
+ req.send('');
+}
+</script>
+
+<div class="filters">
+ <div id="filtersummary">
+ <strong><a href="javascript:filter_click()">Filters</a>:</strong>
+ {% if filters.applied_filters %}
+ {% for filter in filters.applied_filters %}
+ {{ filter.name }} = {{ filter.condition }}
+ {% if not filter.forced %}
+ <a href="{{ filter.url_without_me }}"><img
+ src="/images/filter-remove.png"></a>
+ {% endif %}
+ {% if not forloop.last %}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{% endif %}
+ {% endfor %}
+ {% else %}
+ none
+ <a href="javascript:filter_click()"><img src="/images/filter-add.png"></a>
+ {% endif %}
+ </div>
+ <div id="filterform" style="padding-top: 1em; display: none">
+ <form action="" method="get" onSubmit="return filter_form_submit(this)">
+ <table>
+ {% for filter in filters.available_filters %}
+ <tr>
+ <td>{{ filter.name }}</td>
+ <td>{{ filter.form }}</td>
+ </tr>
+ {% endfor %}
+ <tr>
+ <td/>
+ <td><input type="submit" value="Apply"/></td>
+ </tr>
+ </table>
+ </form>
+ </div>
+</div>
+
+
diff --git a/templates/patchwork/list.html b/templates/patchwork/list.html
new file mode 100644
index 0000000..755c047
--- /dev/null
+++ b/templates/patchwork/list.html
@@ -0,0 +1,24 @@
+{% extends "patchwork/base.html" %}
+
+{% load person %}
+
+{% block title %}{{project.name}}{% endblock %}
+{% block heading %}{{project.name}}{% endblock %}
+
+{% block body %}
+
+<h2>Incoming patches</h2>
+
+{% if errors %}
+<p>The following error{{ errors|length|pluralize:" was,s were" }} encountered
+while updating patches:</p>
+<ul class="errorlist">
+{% for error in errors %}
+ <li>{{ error }}</li>
+{% endfor %}
+</ul>
+{% endif %}
+
+{% include "patchwork/patch-list.html" %}
+
+{% endblock %}
diff --git a/templates/patchwork/login.html b/templates/patchwork/login.html
new file mode 100644
index 0000000..4706dda
--- /dev/null
+++ b/templates/patchwork/login.html
@@ -0,0 +1,26 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}Patchwork Login{% endblock %}
+{% block heading %}Patchwork Login{% endblock %}
+
+
+{% block body %}
+<form method="post">
+<table class="form loginform">
+ <tr>
+ <th colspan="2" class="headerrow">login</th>
+ </tr>
+ {% if error %}
+ <tr>
+ <td colspan="2">{{ error }}</td>
+ </tr>
+ {% endif %}
+ {{ form }}
+ <tr>
+ <td colspan="2" class="submitrow">
+ <input type="submit" value="Login"/>
+ </td>
+ </tr>
+</table>
+</form>
+{% endblock %}
diff --git a/templates/patchwork/logout.html b/templates/patchwork/logout.html
new file mode 100644
index 0000000..737f1ce
--- /dev/null
+++ b/templates/patchwork/logout.html
@@ -0,0 +1,8 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}Patchwork{% endblock %}
+{% block heading %}Patchwork{% endblock %}
+
+{% block body %}
+<p>Logged out</p>
+{% endblock %}
diff --git a/templates/patchwork/pagination.html b/templates/patchwork/pagination.html
new file mode 100644
index 0000000..3e95126
--- /dev/null
+++ b/templates/patchwork/pagination.html
@@ -0,0 +1,45 @@
+{% load listurl %}
+
+{% ifnotequal page.paginator.num_pages 1 %}
+<div class="paginator">
+{% if page.has_previous %}
+ <span class="prev">
+ <a href="{% listurl page=page.previous_page_number %}"
+ title="Previous Page">&laquo; Previous</a></span>
+{% else %}
+ <span class="prev-na">&laquo; Previous</span>
+{% endif %}
+
+{% if page.paginator.trailing_set %}
+ {% for p in page.paginator.trailing_set %}
+ <span class="page"><a href="{% listurl page=p %}" >{{ p }}</a></span>
+ {% endfor %}
+ ...
+{% endif %}
+
+{% for p in page.paginator.adjacent_set %}
+ {% ifequal p page.number %}
+ <span class="curr" title="Current Page">{{ p }}</span>
+ {% else %}
+ <span class="page"><a href="{% listurl page=p %}"
+ title="Page {{ p }}">{{ p }}</a></span>
+ {% endifequal %}
+{% endfor %}
+
+{% if page.paginator.leading_set %}
+ ...
+ {% for p in page.paginator.leading_set %}
+ <span class="page"><a href="{% listurl page=p %}">{{ p }}</a></span>
+ {% endfor %}
+{% endif %}
+
+{% if page.has_next %}
+ <span class="next">
+ <a href="{% listurl page=page.next_page_number %}"
+ title="Next Page">Next &raquo;</a>
+ </span>
+{% else %}
+ <span class="next-na">Next &raquo;</span>
+{% endif %}
+</div>
+{% endifnotequal %}
diff --git a/templates/patchwork/patch-form.html b/templates/patchwork/patch-form.html
new file mode 100644
index 0000000..9d2c954
--- /dev/null
+++ b/templates/patchwork/patch-form.html
@@ -0,0 +1,87 @@
+
+<div class="patchform"
+ style="border: thin solid black; padding-left: 0.8em; margin-top: 2em;">
+
+ <div class="patchform-properties"
+ style="float: left; margin-right: 4em;">
+ <h3>Properties</h3>
+ <table class="form">
+ <tr>
+ <th>Change state:</th>
+ <td>{{ patchform.state }}</td>
+ </tr>
+ <tr>
+ <th>Delegate to:</td>
+ <td>{{ patchform.delegate }}</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <input type="submit" value="Update">
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+
+ <div class="patchform-actions" style="padding-left: 4em;">
+ <h3>Actions</h3>
+ <table class="form">
+ <tr>
+ <td>Ack:</td>
+ <td>
+ <form action="{% url patchwork.views.patch patch=patch.id %}"
+ method="post">
+ <input type="hidden" name="action" value="act"/>
+ <input type="submit" value="Ack"/>
+ </form>
+ </td>
+ </tr>
+ <tr>
+ <td>Create bundle:</td>
+ <td>
+ {% if createbundleform.name.errors %}
+ <span class="errors">{{createbundleform.errors}}</span>
+ {% endif %}
+ <form method="post">
+ <input type="hidden" name="action" value="createbundle"/>
+ {{ createbundleform.name }}
+ <input value="Create" type="submit"/>
+ </form>
+ </td>
+ </tr>
+{% if bundles %}
+ <tr>
+ <td>Add to bundle:</td>
+ <td>
+ <form action="{% url patchwork.views.bundle.setbundle %}" method="post">
+ <input type="hidden" name="action" value="add"/>
+ <input type="hidden" name="patch_id" value="{{ patch.id }}"/>
+ <select name="name"/>
+ {% for bundle in bundles %}
+ <option value="{{bundle.id}}">{{bundle.name}}</option>
+ {% endfor %}
+ </select>
+ <input value="Add" type="submit"/>
+ </form>
+ </td>
+ </tr>
+{% endif %}
+ <tr>
+ <td>Archive:</td>
+ <td>
+ <form method="post">
+ <input type="hidden" name="action" value="archive"/>
+ <input type="submit" value="Archive"/>
+ </form>
+ </td>
+ </tr>
+ </table>
+ </form>
+
+ </div>
+
+ <div style="clear: both;">
+ </div>
+</div>
+
diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html
new file mode 100644
index 0000000..0a15e9c
--- /dev/null
+++ b/templates/patchwork/patch-list.html
@@ -0,0 +1,185 @@
+{% load person %}
+{% load listurl %}
+
+{% include "patchwork/pagination.html" %}
+
+
+<table class="patchlist">
+ <tr>
+ <td class="patchlistfilters">
+ {% include "patchwork/filters.html" %}
+ </td>
+ </tr>
+</table>
+
+{% if page.paginator.long_page and user.is_authenticated %}
+<div class="floaty">
+ <a title="jump to form" href="#patchforms"><span
+ style="font-size: 120%">&#9662;</span></a>
+</div>
+{% endif %}
+
+<form method="post">
+<input type="hidden" name="form" value="patchlistform"/>
+<input type="hidden" name="project" value="{{project.id}}"/>
+<table class="patchlist">
+ <tr>
+ {% if patchform or bundle %}
+ <th/>
+ {% endif %}
+
+ <th>
+ {% ifequal order.name "name" %}
+ <a class="colactive"
+ href="{% listurl order=order.reversed_name %}">Patch</a>
+ {% else %}
+ <a class="colinactive" href="{% listurl order="name" %}">Patch</a>
+ {% endifequal %}
+ </th>
+
+ <th>
+ {% ifequal order.name "date" %}
+ <a class="colactive"
+ href="{% listurl order=order.reversed_name %}">Date</a>
+ {% else %}
+ <a class="colinactive" href="{% listurl order="date" %}">Date</a>
+ {% endifequal %}
+ </th>
+
+ <th>
+ {% ifequal order.name "submitter" %}
+ <a class="colactive"
+ href="{% listurl order=order.reversed_name %}">Submiter</a>
+ {% else %}
+ <a class="colinactive" href="{% listurl order="submitter" %}">Submitter</a>
+ {% endifequal %}
+ </th>
+
+ <th>
+ {% ifequal order.name "state" %}
+ <a class="colactive"
+ href="{% listurl order=order.reversed_name %}">State</a>
+ {% else %}
+ <a class="colinactive" href="{% listurl order="state" %}">State</a>
+ {% endifequal %}
+ </th>
+
+ </tr>
+
+{% if page %}
+ {% for patch in page.object_list %}
+ <tr>
+ {% if patchform or bundle %}
+ <td>
+ <input type="checkbox" name="patch_id:{{patch.id}}"/>
+ </td>
+ {% endif %}
+ <td><a href="{% url patchwork.views.patch.patch patch_id=patch.id %}"
+ >{{ patch.name }}</a></td>
+ <td>{{ patch.date|date:"Y-m-d" }}</td>
+ <td>{{ patch.submitter|personify }}</td>
+ <td>{{ patch.state }}</td>
+ </tr>
+ {% endfor %}
+</table>
+
+{% include "patchwork/pagination.html" %}
+
+<div class="patchforms" id="patchforms" name="patchforms">
+
+{% if patchform %}
+ <div class="patchform patchform-properties">
+ <h3>Properties</h3>
+ <table class="form">
+ <tr>
+ <th>Change state:</th>
+ <td>
+ {{ patchform.state }}
+ {{ patchform.state.errors }}
+ </td>
+ </tr>
+ <tr>
+ <th>Delegate to:</td>
+ <td>
+ {{ patchform.delegate }}
+ {{ patchform.delegate.errors }}
+ </td>
+ </tr>
+ <tr>
+ <th>Archive:</td>
+ <td>
+ {{ patchform.archived }}
+ {{ patchform.archived.errors }}
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <input type="submit" name="action" value="Update"/>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+{% endif %}
+
+{% if user.is_authenticated %}
+ <div class="patchform patchform-bundle">
+ <h3>Bundling</h3>
+ <table class="form">
+ <!--
+ <tr>
+ <td>Ack:</td>
+ <td>
+ <input type="submit" name="action" value="Ack"/>
+ </form>
+ </td>
+ </tr>
+ -->
+ <tr>
+ <td>Create bundle:</td>
+ <td>
+ <input type="text" name="bundle_name"/>
+ <input name="action" value="Create" type="submit"/>
+ </td>
+ </tr>
+ {% if bundles %}
+ <tr>
+ <td>Add to bundle:</td>
+ <td>
+ <select name="bundle_id"/>
+ {% for bundle in bundles %}
+ <option value="{{bundle.id}}">{{bundle.name}}</option>
+ {% endfor %}
+ </select>
+ <input name="action" value="Add" type="submit"/>
+ </td>
+ </tr>
+ {% endif %}
+ {% if bundle %}
+ <tr>
+ <td>Remove from bundle:</td>
+ <td>
+ <input type="hidden" name="removed_bundle_id" value="{{bundle.id}}"/>
+ <input name="action" value="Remove" type="submit"/>
+ </td>
+ </tr>
+ {% endif %}
+ </table>
+ </div>
+{% endif %}
+
+
+ <div style="clear: both;">
+ </div>
+</div>
+
+{% else %}
+ <tr>
+ <td colspan="5">No patches to display</td>
+ </tr>
+{% endif %}
+
+ </table>
+</form>
+
diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html
new file mode 100644
index 0000000..6ca6761
--- /dev/null
+++ b/templates/patchwork/patch.html
@@ -0,0 +1,214 @@
+{% extends "patchwork/base.html" %}
+
+{% load syntax %}
+{% load person %}
+{% load patch %}
+
+{% block title %}{{patch.name}} - Patchwork{% endblock %}
+{% block heading %}{{patch.name}}{%endblock%}
+
+{% block body %}
+<script language="JavaScript" type="text/javascript">
+function toggle_headers(link_id, headers_id)
+{
+ var link = document.getElementById(link_id)
+ var headers = document.getElementById(headers_id)
+
+ var hidden = headers.style['display'] == 'none';
+
+ if (hidden) {
+ link.innerHTML = 'hide';
+ headers.style['display'] = 'block';
+ } else {
+ link.innerHTML = 'show';
+ headers.style['display'] = 'none';
+ }
+
+}
+</script>
+
+<table class="patchmeta">
+ <tr>
+ <th>Submitter</th>
+ <td>{{ patch.submitter|personify }}</td></tr>
+ </tr>
+ <tr>
+ <th>Date</th>
+ <td>{{ patch.date }}</td>
+ </tr>
+ <tr>
+ <th>Message ID</th>
+ <td>{{ patch.msgid }}</td>
+ </tr>
+ <tr>
+ <th>Download</th>
+ <td>
+ <a href="{% url patchwork.views.patch.mbox patch_id=patch.id %}"
+ >mbox</a> |
+ <a href="{% url patchwork.views.patch.content patch_id=patch.id %}"
+ >patch</a>
+ </td>
+ </tr>
+ <tr>
+ <th>Permalink</th>
+ <td><a href="{{ patch.get_absolute_url }}">{{ patch.get_absolute_url }}</a>
+ </tr>
+ <tr>
+ <th>State</td>
+ <td>{{ patch.state.name }}{% if patch.archived %}, archived{% endif %}</td>
+ </tr>
+{% if patch.delegate %}
+ <tr>
+ <th>Delegated to:</td>
+ <td>{{ patch.delegate.get_profile.name }}</td>
+ </tr>
+{% endif %}
+ <tr>
+ <th>Headers</th>
+ <td><a id="togglepatchheaders"
+ href="javascript:toggle_headers('togglepatchheaders', 'patchheaders')"
+ >show</a>
+ <div id="patchheaders" class="patchheaders" style="display:none;">
+ <pre>{{patch.headers}}</pre>
+ </div>
+ </td>
+ </tr>
+</table>
+
+<div class="patchforms">
+
+{% if patchform %}
+ <div class="patchform patchform-properties">
+ <h3>Patch Properties</h3>
+ <form method="post">
+ <table class="form">
+ <tr>
+ <th>Change state:</th>
+ <td>
+ {{ patchform.state }}
+ {{ patchform.state.errors }}
+ </td>
+ </tr>
+ <tr>
+ <th>Delegate to:</td>
+ <td>
+ {{ patchform.delegate }}
+ {{ patchform.delegate.errors }}
+ </td>
+ </tr>
+ <tr>
+ <th>Archived:</td>
+ <td>
+ {{ patchform.archived }}
+ {{ patchform.archived.errors }}
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <input type="submit" value="Update">
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+{% endif %}
+
+{% if createbundleform %}
+ <div class="patchform patchform-bundle">
+ <h3>Bundling</h3>
+ <table class="form">
+ <!--
+ <tr>
+ <td>Ack:</td>
+ <td>
+ <form action="{% url patchwork.views.patch patch=patch.id %}"
+ method="post">
+ <input type="hidden" name="action" value="act"/>
+ <input type="submit" value="Ack"/>
+ </form>
+ </td>
+ </tr>
+ -->
+ <tr>
+ <td>Create bundle:</td>
+ <td>
+ {% if createbundleform.non_field_errors %}
+ <dd class="errors">{{createbundleform.non_field_errors}}</dd>
+ {% endif %}
+ <form method="post">
+ <input type="hidden" name="action" value="createbundle"/>
+ {% if createbundleform.name.errors %}
+ <dd class="errors">{{createbundleform.name.errors}}</dd>
+ {% endif %}
+ {{ createbundleform.name }}
+ <input value="Create" type="submit"/>
+ </form>
+ </td>
+ </tr>
+{% if bundles %}
+ <tr>
+ <td>Add to bundle:</td>
+ <td>
+ <form method="post">
+ <input type="hidden" name="action" value="addtobundle"/>
+ <select name="bundle_id"/>
+ {% for bundle in bundles %}
+ <option value="{{bundle.id}}">{{bundle.name}}</option>
+ {% endfor %}
+ </select>
+ <input value="Add" type="submit"/>
+ </form>
+ </td>
+ </tr>
+{% endif %}
+ </table>
+ </form>
+
+ </div>
+{% endif %}
+
+{% if actionsform %}
+ <div class="patchform patchform-actions">
+ <h3>Actions</h3>
+ <table class="form">
+ <tr>
+ <td>Ack:</td>
+ <td>
+ <form action="{% url patchwork.views.patch patch=patch.id %}"
+ method="post">
+ <input type="hidden" name="action" value="act"/>
+ <input type="submit" value="Ack"/>
+ </form>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+
+{% endif %}
+ <div style="clear: both;">
+ </div>
+</div>
+
+
+
+
+<h2>Comments</h2>
+{% for comment in patch.comments %}
+<div class="comment">
+<div class="meta">{{ comment.submitter|personify }} - {{comment.date}}</div>
+<pre class="content">
+{{ comment|commentsyntax }}
+</pre>
+</div>
+{% endfor %}
+
+<h2>Patch</h2>
+<div class="patch">
+<pre class="content">
+{{ patch|patchsyntax }}
+</pre>
+</div>
+
+{% endblock %}
diff --git a/templates/patchwork/patchlist.html b/templates/patchwork/patchlist.html
new file mode 100644
index 0000000..1bcd2c1
--- /dev/null
+++ b/templates/patchwork/patchlist.html
@@ -0,0 +1,36 @@
+
+{% load person %}
+
+{% if patches %}
+<form method="post">
+<table class="patchlist">
+ <tr>
+ {% if patchform %}
+ <th/>
+ {% endif %}
+ <th><a class="colinactive" href="list?person=846&order=patch">Patch</a></th>
+ <th><a class="colinactive" href="list?person=846&order=date">Date</a></th>
+ <th><a class="colinactive" href="list?person=846&order=submitter">Submitter</a></th>
+ <th><a class="colinactive" href="list?person=846&order=state">State</a></th>
+ </tr>
+ {% for patch in patches %}
+ <tr>
+ {% if patchform %}
+ <td>
+ <input type="hidden" name="patch_ids" value="{{ patch.id }}"/>
+ <input type="checkbox" name="patch-{{patch.id}}">
+ </td>
+ {% endif %}
+ <td><a href="{% url patchwork.views.patch.patch patch_id=patch.id %}">{{ patch.name }}</a></td>
+ <td>{{ patch.date|date:"Y-m-d" }}</td>
+ <td>{{ patch.submitter|personify }}</td>
+ <td>{{ patch.state }}</td>
+ </tr>
+ {% endfor %}
+</table>
+
+{% include "patchwork/patch-form.html" %}
+
+{% else %}
+ <p>No patches to display</p>
+{% endif %}
diff --git a/templates/patchwork/profile.html b/templates/patchwork/profile.html
new file mode 100644
index 0000000..35f3d4f
--- /dev/null
+++ b/templates/patchwork/profile.html
@@ -0,0 +1,114 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}User Profile: {{ user.username }}{% endblock %}
+{% block heading %}User Profile: {{ user.username }}{% endblock %}
+
+
+{% block body %}
+
+<p>
+{% if user.get_profile.maintainer_projects.count %}
+Maintainer of
+{% for project in user.get_profile.maintainer_projects.all %}
+<a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
+>{{ project.linkname }}</a>{% if not forloop.last %},{% endif %}{% endfor %}.
+{% endif %}
+
+{% if user.get_profile.contributor_projects.count %}
+Contributor to
+{% for project in user.get_profile.contributor_projects.all %}
+<a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
+>{{ project.linkname }}</a>{% if not forloop.last %},{% endif %}{% endfor %}.
+{% endif %}
+</p>
+
+<h2>Todo</h2>
+{% if user.get_profile.n_todo_patches %}
+<p>Your <a href="{% url patchwork.views.user.todo_lists %}">todo
+list</a> contains {{ user.get_profile.n_todo_patches }}
+patch{{ user.get_profile.n_todo_patches|pluralize:"es" }}.</p>
+{% else %}
+<p>Your todo list contains patches that have been delegated to you. You
+have no items in your todo list at present.</p>
+{% endif %}
+<h2>Bundles</h2>
+
+{% if bundles %}
+<table class="bundlelist">
+ <tr>
+ <th>Bundle name</th>
+ <th>Patches</td>
+ <th>Public Link</th>
+ </tr>
+{% for bundle in bundles %}
+ <tr>
+ <td><a href="{% url patchwork.views.bundle.bundle bundle_id=bundle.id %}"
+ >{{ bundle.name }}</a></td>
+ <td style="text-align: right">{{ bundle.n_patches }}</td>
+ <td>
+ {% if bundle.public %}
+ <a href="{{ bundle.public_url }}">{{ bundle.public_url }}</a>
+ {% endif %}
+ </td>
+ </tr>
+{% endfor %}
+</table>
+{% else %}
+<p>no bundles</p>
+{% endif %}
+
+
+<h2>Linked email addresses</h2>
+<p>The following email addresses are associated with this patchwork account.
+Adding alternative addresses allows patchwork to group contributions that
+you have made under different addressses.</p>
+<p>Adding a new email address will send a confirmation email to that
+address.</p>
+<table class="vertical" style="width: 20em;">
+ <tr>
+ <th>email</th>
+ <th/>
+ </tr>
+ <tr>
+ <td>{{ user.email }}</td>
+ <td></td>
+ </tr>
+{% for email in linked_emails %}
+ {% ifnotequal email.email user.email %}
+ <tr>
+ <td>{{ email.email }}</td>
+ <td>
+ {% ifnotequal user.email email.email %}
+ <form action="{% url patchwork.views.user.unlink person_id=email.id %}"
+ method="post">
+ <input type="submit" value="Unlink"/>
+ </form>
+ {% endifnotequal %}
+ </tr>
+ {% endifnotequal %}
+{% endfor %}
+ <tr>
+ <td colspan="2">
+ <form action="{% url patchwork.views.user.link %}" method="post">
+ {{ linkform.email }}
+ <input type="submit" value="Add"/>
+ </form>
+ </td>
+ </tr>
+</table>
+
+<h2>Settings</h2>
+
+<form method="post">
+ <table class="form">
+{{ profileform }}
+ <tr>
+ <td/>
+ <td>
+ <input type="submit" value="Apply"/>
+ </td>
+ </tr>
+ </table>
+</form>
+
+{% endblock %}
diff --git a/templates/patchwork/project.html b/templates/patchwork/project.html
new file mode 100644
index 0000000..4ea1009
--- /dev/null
+++ b/templates/patchwork/project.html
@@ -0,0 +1,32 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}{{ project.name }}{% endblock %}
+{% block heading %}{{ project.name }}{% endblock %}
+
+{% block body %}
+
+<table class="horizontal">
+ <tr>
+ <th>Name</th>
+ <td>{{project.name}}
+ </tr>
+ <tr>
+ <th>List address</th>
+ <td>{{project.listemail}}</td>
+ </tr>
+ <tr>
+ <th>Maintainer{{maintainers|length|pluralize}}</th>
+ <td>
+ {% for maintainer in maintainers %}
+ {{ maintainer.get_profile.name }}
+ &lt;<a href="mailto:{{maintainer.email}}">{{maintainer.email}}</a>&gt;
+ <br />
+ {% endfor %}
+ </tr>
+ <tr>
+ <th>Patch count</th>
+ <td>{{n_patches}} (+ {{n_archived_patches}} archived)</td>
+ </tr>
+</table>
+
+{% endblock %}
diff --git a/templates/patchwork/projects.html b/templates/patchwork/projects.html
new file mode 100644
index 0000000..349f314
--- /dev/null
+++ b/templates/patchwork/projects.html
@@ -0,0 +1,21 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}Project List{% endblock %}
+{% block heading %}Project List{% endblock %}
+
+{% block body %}
+
+{% if projects %}
+ <dl>
+ {% for p in projects %}
+ <dt>
+ <a href="{% url patchwork.views.patch.list project_id=p.linkname %}"
+ >{{p.linkname}}</a></dt>
+ <dd>{{p.name}}</dd>
+ {% endfor %}
+ </dl>
+{% else %}
+ <p>Patchwork doesn't have any projects to display!</p>
+{% endif %}
+
+{% endblock %}
diff --git a/templates/patchwork/register-confirm.html b/templates/patchwork/register-confirm.html
new file mode 100644
index 0000000..2af5744
--- /dev/null
+++ b/templates/patchwork/register-confirm.html
@@ -0,0 +1,13 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}Registration{% endblock %}
+{% block heading %}Registration{% endblock %}
+
+{% block body %}
+<p>Registraton confirmed!</p>
+
+<p>Your patchwork registration is complete. Head over to your <a
+ href="{% url patchwork.views.user.profile %}">profile</a> to start using
+patchwork's extra features.</p>
+
+{% endblock %}
diff --git a/templates/patchwork/register.html b/templates/patchwork/register.html
new file mode 100644
index 0000000..8bd422e
--- /dev/null
+++ b/templates/patchwork/register.html
@@ -0,0 +1,122 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}Patchwork Registration{% endblock %}
+{% block heading %}Patchwork Registration{% endblock %}
+
+
+{% block body %}
+
+{% if request %}
+ <p>Registration successful!</p>
+ <p>email sent to {{ request.email }}</p>
+ <p>Beta note: While we're testing, the confirmation email has been replaced
+ by a single link:
+ <a href="{% url patchwork.views.user.register_confirm key=request.key %}"
+ >{% url patchwork.views.user.register_confirm key=request.key %}</a>
+</p>
+{% else %}
+<p>By creating a patchwork account, you can:<p>
+<ul>
+ <li>create "bundles" of patches</li>
+ <li>update the state of your own patches</li>
+</ul>
+<form method="post">
+<table class="form registerform">
+ <tr>
+ <th colspan="2" class="headerrow">register</th>
+ </tr>
+ {% if error %}
+ <tr>
+ <td colspan="2">{{ error }}</td>
+ </tr>
+ {% endif %}
+
+ <tr>
+ <td>{{ form.first_name.label_tag }}</td>
+ <td>
+{% if form.first_name.errors %}
+ {{ form.first_name.errors }}
+{% endif %}
+ {{ form.first_name }}
+{% if form.first_name.help_text %}
+ <div class="help_text"/>{{ form.first_name.help_text }}</div>
+{% endif %}
+ </td>
+ </tr>
+
+ <tr>
+ <td>{{ form.last_name.label_tag }}</td>
+ <td>
+{% if form.last_name.errors %}
+ {{ form.last_name.errors }}
+{% endif %}
+ {{ form.last_name }}
+{% if form.last_name.help_text %}
+ <div class="help_text"/>{{ form.last_name.help_text }}</div>
+{% endif %}
+ </td>
+ </tr>
+
+ <tr>
+ <td></td>
+ <td class="form-help">
+ Your name is used to identify you on the site
+ </td>
+ </tr>
+
+ <tr>
+ <td>{{ form.email.label_tag }}</td>
+ <td>
+{% if form.email.errors %}
+ {{ form.email.errors }}
+{% endif %}
+ {{ form.email }}
+{% if form.email.help_text %}
+ <div class="help_text"/>{{ form.email.help_text }}</div>
+{% endif %}
+ </td>
+ </tr>
+
+ <tr>
+ <td></td>
+ <td class="form-help">
+ Patchwork will send a confirmation email to this address
+ </td>
+ </tr>
+
+ <tr>
+ <td>{{ form.username.label_tag }}</td>
+ <td>
+{% if form.username.errors %}
+ {{ form.username.errors }}
+{% endif %}
+ {{ form.username }}
+{% if form.username.help_text %}
+ <div class="help_text"/>{{ form.username.help_text }}</div>
+{% endif %}
+ </td>
+ </tr>
+
+ <tr>
+ <td>{{ form.password.label_tag }}</td>
+ <td>
+{% if form.password.errors %}
+ {{ form.password.errors }}
+{% endif %}
+ {{ form.password }}
+{% if form.password.help_text %}
+ <div class="help_text"/>{{ form.password.help_text }}</div>
+{% endif %}
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" class="submitrow">
+ <input type="submit" value="Register"/>
+ </td>
+ </tr>
+</table>
+</form>
+{% endif %}
+
+{% endblock %}
diff --git a/templates/patchwork/todo-list.html b/templates/patchwork/todo-list.html
new file mode 100644
index 0000000..8a5ab7a
--- /dev/null
+++ b/templates/patchwork/todo-list.html
@@ -0,0 +1,17 @@
+{% extends "patchwork/base.html" %}
+
+{% load person %}
+
+{% block title %}{{ user }}'s todo list{% endblock %}
+{% block heading %}{{user}}'s todo list for {{ project.linkname }}{% endblock %}
+
+{% block body %}
+
+<p>A Patchwork Todo-list contains patches that are assigned to you, and
+are in an "action required" state
+({% for state in action_required_states %}{% if forloop.last and not forloop.first %} or {% endif %}{{ state }}{% if not forloop.last and not forloop.first %}, {%endif %}{% endfor %}), and are not archived.
+</p>
+
+{% include "patchwork/patch-list.html" %}
+
+{% endblock %}
diff --git a/templates/patchwork/todo-lists.html b/templates/patchwork/todo-lists.html
new file mode 100644
index 0000000..8eb10cc
--- /dev/null
+++ b/templates/patchwork/todo-lists.html
@@ -0,0 +1,29 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}{{ user }}'s todo lists{% endblock %}
+{% block heading %}{{ user }}'s todo lists{% endblock %}
+
+{% block body %}
+
+{% if todo_lists %}
+<p>You have multiple todo lists. Each todo list contains patches for a single
+ project.</p>
+<table class="vertical">
+ <tr>
+ <th>project</th>
+ <th>patches</th>
+ </tr>
+{% for todo_list in todo_lists %}
+ <tr>
+ <td><a
+ href="{% url patchwork.views.user.todo_list project_id=todo_list.project.linkname %}"
+ >{{ todo_list.project.name }}</a></td>
+ <td class="numberformat">{{ todo_list.n_patches }}</td>
+ </tr>
+{% endfor %}
+</table>
+
+{% else %}
+ No todo lists
+{% endif %}
+{% endblock %}
diff --git a/templates/patchwork/user-link-confirm.html b/templates/patchwork/user-link-confirm.html
new file mode 100644
index 0000000..61979cf
--- /dev/null
+++ b/templates/patchwork/user-link-confirm.html
@@ -0,0 +1,19 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}{{ user.username }}{% endblock %}
+{% block heading %}link accounts for {{ user.username }}{% endblock %}
+
+
+{% block body %}
+
+{% if errors %}
+<p>{{ errors }}</p>
+{% else %}
+ <p>You have sucessfully linked the email address {{ person.email }} to
+ your patchwork account</p>
+
+{% endif %}
+<p>Back to <a href="{% url patchwork.views.user.profile %}">your
+ profile</a>.</p>
+
+{% endblock %}
diff --git a/templates/patchwork/user-link.html b/templates/patchwork/user-link.html
new file mode 100644
index 0000000..3eeb527
--- /dev/null
+++ b/templates/patchwork/user-link.html
@@ -0,0 +1,30 @@
+{% extends "patchwork/base.html" %}
+
+{% block title %}{{ user.username }}{% endblock %}
+{% block heading %}link accounts for {{ user.username }}{% endblock %}
+
+
+{% block body %}
+
+{% if confirmation %}
+<p>A confirmation email has been sent to {{ confirmation.email }}.</p>
+
+<p>beta link: <a
+ href="{% url patchwork.views.user.link_confirm key=confirmation.key %}"
+ >{% url patchwork.views.user.link_confirm key=confirmation.key %}</a></p>
+
+{% else %}
+
+ {% if form.errors %}
+ <p>There was an error submitting your link request.</p>
+ {{ form.non_field_errors }}
+ {% endif %}
+
+ <form action="{% url patchwork.views.user.link %}" method="post">
+ {{linkform.email.errors}}
+ Link an email address: {{ linkform.email }}
+ </form>
+
+{% endif %}
+
+{% endblock %}