]> git.ozlabs.org Git - patchwork/blob - templates/patchwork/profile.html
e2d0b9039bfdbd98927880b6914fa8a4bfa87187
[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     {% csrf_token %}
63     <input type="submit" value="Unlink"/>
64    </form>
65     {% endifnotequal %}
66  </tr>
67  {% endifnotequal %}
68 {% endfor %}
69  <tr>
70   <td colspan="2">
71    <form action="{% url patchwork.views.user.link %}" method="post">
72     {% csrf_token %}
73     {{ linkform.email }}
74     <input type="submit" value="Add"/>
75    </form>
76   </td>
77  </tr>
78 </table>
79 </div>
80 </div>
81
82 <div class="rightcol">
83
84 <div class="box">
85 <h2>Bundles</h2>
86
87 {% if bundles %}
88 <p>You have the following bundle{{ bundle|length|pluralize }}:</p>
89 <ul>
90 {% for bundle in bundles %}
91  <li><a href="{% url patchwork.views.bundle.bundle bundle_id=bundle.id %}"
92    >{{ bundle.name }}</a></li>
93 {% endfor %}
94 </ul>
95 <p>Visit the <a href="{%url patchwork.views.bundle.bundles %}">bundles
96  page</a> to manage your bundles.</p>
97 {% else %}
98 <p>You have no bundles.</p>
99 {% endif %}
100 </div>
101
102
103 <div class="box">
104 <h2>Settings</h2>
105
106 <form method="post">
107  {% csrf_token %}
108  <table class="form">
109 {{ profileform }}
110   <tr>
111    <td/>
112    <td>
113     <input type="submit" value="Apply"/>
114    </td>
115   </tr>
116  </table>
117 </form>
118 </div>
119
120 </div>
121
122 <p style="clear: both"></p>
123
124 {% endblock %}