summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-02-14 16:28:50 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-02-14 16:28:50 +0100
commit3ae10864b6289edbc4d756bad5d6a4276f0ab368 (patch)
treed45c71fa3daf5c8451aaf64723afb29f2480b887 /hyperkitty/templates
parenta5a7c229d1cd45d51a09133f2355f4d26618c4fa (diff)
downloadhyperkitty-3ae10864b6289edbc4d756bad5d6a4276f0ab368.tar.gz
hyperkitty-3ae10864b6289edbc4d756bad5d6a4276f0ab368.tar.xz
hyperkitty-3ae10864b6289edbc4d756bad5d6a4276f0ab368.zip
The user profile page is now editable (#32)
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r--hyperkitty/templates/base.html8
-rw-r--r--hyperkitty/templates/thread_list.html6
-rw-r--r--hyperkitty/templates/user_profile.html30
3 files changed, 25 insertions, 19 deletions
diff --git a/hyperkitty/templates/base.html b/hyperkitty/templates/base.html
index 6af6d1e..8af354c 100644
--- a/hyperkitty/templates/base.html
+++ b/hyperkitty/templates/base.html
@@ -55,6 +55,14 @@
</div>
</header>
+ {% if flash_messages %}
+ <div class="flashmsg">
+ {% for flash_msg in flash_messages %}
+ <div class="alert alert-{{ flash_msg.type }}">{{ flash_msg.msg }}</div>
+ {% endfor %}
+ </div>
+ {% endif %}
+
{% block content %} {% endblock %}
{% block footer %} {% endblock %}
diff --git a/hyperkitty/templates/thread_list.html b/hyperkitty/templates/thread_list.html
index 2b61792..9188f51 100644
--- a/hyperkitty/templates/thread_list.html
+++ b/hyperkitty/templates/thread_list.html
@@ -15,12 +15,6 @@
<div id="thread-list" class="span8">
- {% if flash_msg %}
- <div class="flashmsg">
- <div class="alert alert-success">{{ flash_msg }}</div>
- </div>
- {% endif %}
-
<div class="thread-list-header page-header">
<a href="{% url message_new mlist_fqdn=mlist.name %}"
class="thread-new btn{% if not user.is_authenticated %} disabled" title="You must be logged-in to create a thread.{% endif %}"
diff --git a/hyperkitty/templates/user_profile.html b/hyperkitty/templates/user_profile.html
index 8052bce..10f8a04 100644
--- a/hyperkitty/templates/user_profile.html
+++ b/hyperkitty/templates/user_profile.html
@@ -8,38 +8,41 @@
{% endblock %}
{% block content %}
- <h1>{{ user }}</h1>
+<div id="user-profile">
+
+ <h1>User profile <small>for {{ user }}</small></h1>
+
+ <form method="post" action="{% url user_profile %}">
+ {% csrf_token %}
<table class="table table-bordered table-striped user-data">
<tbody>
<tr>
- <th>{% trans 'User name' %}</th>
+ <th>{% trans 'User name:' %}</th>
<td>{{ user.username}}</td>
</tr>
+ {{ form.as_table }}
<tr>
- <th>{% trans 'Firstname' %}</th>
- <td>{{ user.first_name }}</td>
- </tr>
- <tr>
- <th>{% trans 'Lastname' %}</th>
- <td>{{ user.last_name }}</td>
- </tr>
- <tr>
- <th>{% trans 'Email' %}</th>
+ <th>{% trans 'Email:' %}</th>
<td>{{ user.email }}</td>
</tr>
{% if use_mockups %}
<tr>
- <th>{% trans 'Karma' %}</th>
+ <th>{% trans 'Karma:' %}</th>
<td>{{ user_profile.karma }}</td>
</tr>
{% endif %}
<tr>
- <th>{% trans 'Date Joined' %}</th>
+ <th>{% trans 'Date joined:' %}</th>
<td>{{ user.date_joined }}</td>
</tr>
</tbody>
</table>
+ <p class="buttons">
+ <button type="submit" class="submit btn btn-primary">Update</button>
+ or <a href="#" class="cancel" onclick="document.forms[0].reset(); return false;">cancel</a>
+ </p>
+ </form>
<h3>Favorites</h3>
@@ -97,6 +100,7 @@
<p>No down vote yet.</p>
{% endif %}
+</div>
{% endblock %}