]> git.ozlabs.org Git - patchwork/blob - templates/patchwork/profile.html
[views] Restructure profile view, simplify bundle access
[patchwork] / templates / patchwork / profile.html
1 {% extends "base.html" %}
2
3 {% block title %}User Profile: {{ user.username }}{% endblock %}
4 {% block heading %}User Profile: {{ user.username }}{% endblock %}
5
6
7 {% block body %}
8
9 <p>
10 {% if user.get_profile.maintainer_projects.count %}
11 Maintainer of
12 {% for project in user.get_profile.maintainer_projects.all %}
13 <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
14 >{{ project.linkname }}</a>{% if not forloop.last %},{% endif %}{% endfor %}.
15 {% endif %}
16
17 {% if user.get_profile.contributor_projects.count %}
18 Contributor to
19 {% for project in user.get_profile.contributor_projects.all %}
20 <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
21 >{{ project.linkname }}</a>{% if not forloop.last %},{% endif %}{% endfor %}.
22 {% endif %}
23 </p>
24
25 <div class="leftcol">
26 <div class="box">
27  <h2>Todo</h2>
28 {% if user.get_profile.n_todo_patches %}
29  <p>Your <a href="{% url patchwork.views.user.todo_lists %}">todo
30   list</a> contains {{ user.get_profile.n_todo_patches }}
31   patch{{ user.get_profile.n_todo_patches|pluralize:"es" }}.</p>
32 {% else %}
33  <p>Your todo list contains patches that have been delegated to you. You
34   have no items in your todo list at present.</p>
35 {% endif %}
36 </div>
37
38 <div class="box">
39 <h2>Linked email addresses</h2>
40 <p>The following email addresses are associated with this patchwork account.
41 Adding alternative addresses allows patchwork to group contributions that
42 you have made under different addressses.</p>
43 <p>Adding a new email address will send a confirmation email to that
44 address.</p>
45 <table class="vertical" style="width: 20em;">
46  <tr>
47   <th>email</th>
48   <th/>
49  </tr>
50  <tr>
51   <td>{{ user.email }}</td>
52   <td></td>
53  </tr>
54 {% for email in linked_emails %}
55  {% ifnotequal email.email user.email %}
56  <tr>
57   <td>{{ email.email }}</td>
58   <td>
59    {% ifnotequal user.email email.email %}
60    <form action="{% url patchwork.views.user.unlink person_id=email.id %}"
61     method="post">
62     <input type="submit" value="Unlink"/>
63    </form>
64     {% endifnotequal %}
65  </tr>
66  {% endifnotequal %}
67 {% endfor %}
68  <tr>
69   <td colspan="2">
70    <form action="{% url patchwork.views.user.link %}" method="post">
71     {{ linkform.email }}
72     <input type="submit" value="Add"/>
73    </form>
74   </td>
75  </tr>
76 </table>
77 </div>
78 </div>
79
80 <div class="rightcol">
81
82 <div class="box">
83 <h2>Bundles</h2>
84
85 {% if bundles %}
86 <p>You have the following bundle{{ bundle|length|pluralize }}:</p>
87 <ul>
88 {% for bundle in bundles %}
89  <li><a href="{% url patchwork.views.bundle.bundle bundle_id=bundle.id %}"
90    >{{ bundle.name }}</a></li>
91 {% endfor %}
92 </ul>
93 <p>Visit the <a href="{%url patchwork.views.bundle.bundles %}">bundles
94  page</a> to manage your bundles.</p>
95 {% else %}
96 <p>You have no bundles.</p>
97 {% endif %}
98 </div>
99
100
101 <div class="box">
102 <h2>Settings</h2>
103
104 <form method="post">
105  <table class="form">
106 {{ profileform }}
107   <tr>
108    <td/>
109    <td>
110     <input type="submit" value="Apply"/>
111    </td>
112   </tr>
113  </table>
114 </form>
115 </div>
116
117 </div>
118
119 <p style="clear: both"></p>
120
121 {% endblock %}