diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-09-23 20:52:53 +1000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-09-23 20:52:53 +1000 |
commit | 750c03f854ace16cd013c189369aa0cf9d3bdd9d (patch) | |
tree | 91415c0436e8e901461fe65a88a3504b102b2e57 /templates | |
parent | dff684304a35c14e23d89783d18e1664222b3fcb (diff) | |
download | patchwork-750c03f854ace16cd013c189369aa0cf9d3bdd9d.tar patchwork-750c03f854ace16cd013c189369aa0cf9d3bdd9d.tar.gz |
[views] Restructure profile view, simplify bundle access
Make bundles more like todo lists - the list itself has its own page,
accessible from the top user links.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 9 | ||||
-rw-r--r-- | templates/patchwork/bundles.html | 62 | ||||
-rw-r--r-- | templates/patchwork/profile.html | 71 |
3 files changed, 106 insertions, 36 deletions
diff --git a/templates/base.html b/templates/base.html index b9b359f..896b939 100644 --- a/templates/base.html +++ b/templates/base.html @@ -21,11 +21,12 @@ <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 auth_logout %}">logout</a> :: - <a href="{% url patchwork.views.help path="about/" %}">about</a> + ({{ user.get_profile.n_todo_patches }})</a> :: + <a href="{% url patchwork.views.bundle.bundles %}">bundles</a> + <br/> + <a href="{% url patchwork.views.user.profile %}">profile</a> :: + <a href="{% url auth_logout %}">logout</a> {% else %} <a href="{% url auth_login %}">login</a> <br/> diff --git a/templates/patchwork/bundles.html b/templates/patchwork/bundles.html new file mode 100644 index 0000000..7f87f6f --- /dev/null +++ b/templates/patchwork/bundles.html @@ -0,0 +1,62 @@ +{% extends "base.html" %} + +{% block title %}Bundles{% endblock %} +{% block heading %}Bundles{% endblock %} + +{% block headers %} + <script language="JavaScript" type="text/javascript" src="/js/confirm.js"> + </script> +{% endblock %} + +{% block body %} + +{% if bundles %} +<table class="bundlelist"> + <tr> + <th>Name</th> + <th>Project</th> + <th>Public Link</th> + <th>Patches</td> + <th>Download</th> + <th>Delete</th> + </tr> +{% for bundle in bundles %} + <tr> + <td><a href="{% url patchwork.views.bundle.bundle bundle_id=bundle.id %}" + >{{ bundle.name }}</a></td> + <td>{{ bundle.project.linkname }}</td> + <td> + {% if bundle.public %} + <a href="{{ bundle.public_url }}">{{ bundle.public_url }}</a> + {% endif %} + </td> + <td style="text-align: right">{{ bundle.n_patches }}</td> + <td style="text-align: center;"><a + href="{% url patchwork.views.bundle.mbox bundle_id=bundle.id %}" + ><img src="/images/16-em-down.png" width="16" height="16" alt="download" + title="download"/></a></td> + <td style="text-align: center;"> + <form method="post" + onsubmit="return confirm_delete('bundle', '{{bundle.name|escapejs}}');"> + {{ bundle.delete_form.as_p }} + <input type="image" + src="/images/16-em-cross.png" width="16" height="16" alt="delete" + title="delete" border="0" style="border: none;"/> + </form> + </td> + + </tr> +{% endfor %} +</table> +{% endif %} + +<p>Bundles are groups of related patches. You can create bundles by +selecting patches from a project, then using the 'create bundle' form +to give your bundle a name. Each bundle can be public or private; public +bundles are given a persistent URL, based you your username and the name +of the bundle. Private bundles are only visible to you.</p> + +{% if not bundles %} +<p>You have no bundles.</p> +{% endif %} +{% endblock %} diff --git a/templates/patchwork/profile.html b/templates/patchwork/profile.html index 81005a3..c204183 100644 --- a/templates/patchwork/profile.html +++ b/templates/patchwork/profile.html @@ -22,42 +22,20 @@ Contributor to {% endif %} </p> -<h2>Todo</h2> +<div class="leftcol"> +<div class="box"> + <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> + <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> + <p>Your todo list contains patches that have been delegated to you. You + have no items in your todo list at present.</p> {% endif %} +</div> - +<div class="box"> <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 @@ -96,7 +74,31 @@ address.</p> </td> </tr> </table> +</div> +</div> + +<div class="rightcol"> + +<div class="box"> +<h2>Bundles</h2> +{% if bundles %} +<p>You have the following bundle{{ bundle|length|pluralize }}:</p> +<ul> +{% for bundle in bundles %} + <li><a href="{% url patchwork.views.bundle.bundle bundle_id=bundle.id %}" + >{{ bundle.name }}</a></li> +{% endfor %} +</ul> +<p>Visit the <a href="{%url patchwork.views.bundle.bundles %}">bundles + page</a> to manage your bundles.</p> +{% else %} +<p>You have no bundles.</p> +{% endif %} +</div> + + +<div class="box"> <h2>Settings</h2> <form method="post"> @@ -110,5 +112,10 @@ address.</p> </tr> </table> </form> +</div> + +</div> + +<p style="clear: both"></p> {% endblock %} |