diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-08-10 17:47:49 -0400 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-08-15 11:11:22 +0000 |
commit | 6103bcf05feeddace63fcc5857665d3762e25c8b (patch) | |
tree | 8c025f22fa12d9927850d04e628c379e66eb9f91 /hyperkitty/templates | |
parent | 5ad794b6425a08550a7d68f76e201ebfdad13dfc (diff) | |
download | hyperkitty-6103bcf05feeddace63fcc5857665d3762e25c8b.tar.gz hyperkitty-6103bcf05feeddace63fcc5857665d3762e25c8b.tar.xz hyperkitty-6103bcf05feeddace63fcc5857665d3762e25c8b.zip |
Add email and subscriptions to the user profile
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r-- | hyperkitty/templates/fragments/user_subscriptions.html | 39 | ||||
-rw-r--r-- | hyperkitty/templates/user_profile.html | 16 | ||||
-rw-r--r-- | hyperkitty/templates/user_public_profile.html | 36 |
3 files changed, 56 insertions, 35 deletions
diff --git a/hyperkitty/templates/fragments/user_subscriptions.html b/hyperkitty/templates/fragments/user_subscriptions.html new file mode 100644 index 0000000..ef661c2 --- /dev/null +++ b/hyperkitty/templates/fragments/user_subscriptions.html @@ -0,0 +1,39 @@ +{% load url from future %} +{% load hk_generic %} + + {% if subscriptions %} + <table class="table table-striped table-bordered table-condensed subscriptions"> + <thead> + <tr> + <th>List</th> + <th>Time of first activity</th> + <th>First post</th> + <th>Posts to this list</th> + <th>Votes</th> + </tr> + </thead> + <tbody> + {% for sub in subscriptions %} + <tr> + <td> + <a href="{% url 'list_overview' sub.list_name %}">{{ sub.list_name }}</a> + </td> + {% if sub.first_post %} + <td> + {{ sub.first_post|get_date|date:"l, j F Y H:i:s" }} + {{ sub.first_post|get_date|timesince }} + </td> + <td>{{ sub.first_post.subject }}</td> + <td><a href="{{ sub.all_posts_url }}">{{ sub.posts_count }} post{{ sub.posts_count|pluralize }}</a></td> + <td><span class="likestatus {{ sub.likestatus }}">+{{ sub.likes }}/-{{ sub.dislikes }}</span></td> + {% else %} + <td colspan="4" style="text-align:center"><em>no post yet</em></td> + {% endif %} + </tr> + {% endfor %} + </tbody> + </table> + {% else %} + <p><em>no subscriptions</em></p> + {% endif %} + diff --git a/hyperkitty/templates/user_profile.html b/hyperkitty/templates/user_profile.html index c7d7550..1d25499 100644 --- a/hyperkitty/templates/user_profile.html +++ b/hyperkitty/templates/user_profile.html @@ -21,6 +21,7 @@ <li><a href="#favorites">Favorites</a></li> <li><a href="#views">Threads you have read</a></li> <li><a href="#votes">Votes</a></li> + <li><a href="#subscriptions">Subscriptions</a></li> </ul> <div id="account"> @@ -37,6 +38,16 @@ <th>{% trans 'Email:' %}</th> <td>{{ user.email }}</td> </tr> + {% if emails %} + <tr> + <th>{% trans 'Other emails:' %}</th> + <td><ul> + {% for email in emails %} + <li>{{ email }}</li> + {% endfor %} + </ul></td> + </tr> + {% endif %} {% if use_mockups %} <tr> <th>{% trans 'Karma:' %}</th> @@ -91,6 +102,11 @@ <div class="ajaxcontent"></div> </div> + + <div id="subscriptions"> + {% include "fragments/user_subscriptions.html" %} + </div> + </div> </div> diff --git a/hyperkitty/templates/user_public_profile.html b/hyperkitty/templates/user_public_profile.html index 4172969..d949270 100644 --- a/hyperkitty/templates/user_public_profile.html +++ b/hyperkitty/templates/user_public_profile.html @@ -41,41 +41,7 @@ <div class="clearfix"></div> <h3>Subscriptions</h3> - {% if subscriptions %} - <table class="table table-striped table-bordered table-condensed subscriptions"> - <thead> - <tr> - <th>List</th> - <th>Time of first activity</th> - <th>First post</th> - <th>Posts to this list</th> - <th>Votes</th> - </tr> - </thead> - <tbody> - {% for sub in subscriptions %} - <tr> - <td> - <a href="{% url 'list_overview' sub.list_name %}">{{ sub.list_name }}</a> - </td> - {% if sub.first_post %} - <td> - {{ sub.first_post|get_date|date:"l, j F Y H:i:s" }} - {{ sub.first_post|get_date|timesince }} - </td> - <td>{{ sub.first_post.subject }}</td> - <td><a href="{{ sub.all_posts_url }}">{{ sub.posts_count }} post{{ sub.posts_count|pluralize }}</a></td> - <td><span class="likestatus {{ sub.likestatus }}">+{{ sub.likes }}/-{{ sub.dislikes }}</span></td> - {% else %} - <td colspan="4" style="text-align:center"><em>no post yet</em></td> - {% endif %} - </tr> - {% endfor %} - </tbody> - </table> - {% else %} - <p><em>no subscriptions</em></p> - {% endif %} + {% include "fragments/user_subscriptions.html" %} </div> |