summaryrefslogtreecommitdiff
path: root/templates/patchwork/profile.html
blob: d4759c7bb3cf87edeb60aeeb5daf1291f69876d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{% extends "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>

<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>
{% 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 %}
</div>

<div class="box">
<h2>Patches for which you are waiting feedback</h2>
 {% if patches_waiting_for_feedback %}
  {% for project, patches in patches_waiting_for_feedback.items %}
   <p><a href="{% url patchwork.views.user.submitted_patches_list project.linkname %}">
    {{ patches.count }} <strong>{{ project.linkname }}</strong> patches</a>
   </p>
  {% endfor %}
 {% else %}
  <p>There doesn't seem to be any patches for which you are waiting feedback.</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
you have made under different addresses.</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">
    {% csrf_token %}
    <input type="submit" value="Unlink"/>
   </form>
    {% endifnotequal %}
 </tr>
 {% endifnotequal %}
{% endfor %}
 <tr>
  <td colspan="2">
   <form action="{% url patchwork.views.user.link %}" method="post">
    {% csrf_token %}
    {{ linkform.email }}
    <input type="submit" value="Add"/>
   </form>
  </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">
 {% csrf_token %}
 <table class="form">
{{ profileform }}
  <tr>
   <td/>
   <td>
    <input type="submit" value="Apply"/>
   </td>
  </tr>
 </table>
</form>
</div>

<div class="box">
<h2>Authentication</h2>
<a href="{% url django.contrib.auth.views.password_change %}">Change password</a>
</div>

</div>

<p style="clear: both"></p>

{% endblock %}