]> git.ozlabs.org Git - patchwork/blob - templates/patchwork/profile.html
bundles: Remove separate public bundle views
[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 addresses.</p>
43 <p>The "notify?" column allows you to opt-in or -out of automated
44 patchwork notification emails. Setting it to "no" will disable automated
45 notifications for that address.</p>
46 <p>Adding a new email address will send a confirmation email to that
47 address.</p>
48 <table class="vertical">
49  <tr>
50   <th>email</th>
51   <th>action</th>
52   <th>notify?</th>
53  </tr>
54 {% for email in linked_emails %}
55  <tr>
56   <td>{{ email.email }}</td>
57   <td>
58   {% ifnotequal user.email email.email %}
59    <form action="{% url patchwork.views.user.unlink person_id=email.id %}"
60     method="post">
61     {% csrf_token %}
62     <input type="submit" value="Unlink"/>
63    </form>
64     {% endifnotequal %}
65   </td>
66   <td>
67    {% if email.is_optout %}
68    <form method="post" action="{% url patchwork.views.mail.optin %}">
69     No,
70      {% csrf_token %}
71      <input type="hidden" name="email" value="{{email.email}}"/>
72      <input type="submit" value="Opt-in"/>
73     </form>
74    {% else %}
75     <form method="post" action="{% url patchwork.views.mail.optout %}">
76     Yes,
77      {% csrf_token %}
78      <input type="hidden" name="email" value="{{email.email}}"/>
79      <input type="submit" value="Opt-out"/>
80     </form>
81    {% endif %}
82   </td>
83  </tr>
84 {% endfor %}
85  <tr>
86   <td colspan="3">
87    <form action="{% url patchwork.views.user.link %}" method="post">
88     {% csrf_token %}
89     {{ linkform.email }}
90     <input type="submit" value="Add"/>
91    </form>
92   </td>
93  </tr>
94 </table>
95 </div>
96 </div>
97
98 <div class="rightcol">
99
100 <div class="box">
101 <h2>Bundles</h2>
102
103 {% if bundles %}
104 <p>You have the following bundle{{ bundle|length|pluralize }}:</p>
105 <ul>
106 {% for bundle in bundles %}
107  <li><a href="{{ bundle.get_absolute_url }}">{{ bundle.name }}</a></li>
108 {% endfor %}
109 </ul>
110 <p>Visit the <a href="{%url patchwork.views.bundle.bundles %}">bundles
111  page</a> to manage your bundles.</p>
112 {% else %}
113 <p>You have no bundles.</p>
114 {% endif %}
115 </div>
116
117
118 <div class="box">
119 <h2>Settings</h2>
120
121 <form method="post">
122  {% csrf_token %}
123  <table class="form">
124 {{ profileform }}
125   <tr>
126    <td/>
127    <td>
128     <input type="submit" value="Apply"/>
129    </td>
130   </tr>
131  </table>
132 </form>
133 </div>
134
135 <div class="box">
136 <h2>Authentication</h2>
137 <a href="{% url django.contrib.auth.views.password_change %}">Change password</a>
138 </div>
139
140 </div>
141
142 <p style="clear: both"></p>
143
144 {% endblock %}