Commit 180db4e76e551bb6b15cf50b3c8ba5b9dc4c27b2
1 parent
2de9cb34
Exists in
master
and in
9 other branches
Mailing list summary page
Signed-off-by: Carlos Oliveira <carlospecter@gmail.com>
Showing
3 changed files
with
167 additions
and
2 deletions
Show diff stats
src/colab-spb-theme-plugin/colab_spb_theme/static/css/screen.css
| ... | ... | @@ -588,3 +588,56 @@ form.signup { |
| 588 | 588 | a.btn { |
| 589 | 589 | margin: 2px 0 2px 0; |
| 590 | 590 | } |
| 591 | + | |
| 592 | +.colab-mailinglist-name { | |
| 593 | + font-size: 34px; | |
| 594 | +} | |
| 595 | + | |
| 596 | +.colab-thread-modified-time, | |
| 597 | +.colab-thread-modified-author { | |
| 598 | + color: #999; | |
| 599 | + font-size: 12px | |
| 600 | +} | |
| 601 | + | |
| 602 | +.colab-thread-modified-author:hover, | |
| 603 | +.colab-thread-modified-author:focus { | |
| 604 | + color: #999; | |
| 605 | + text-decoration: none; | |
| 606 | +} | |
| 607 | + | |
| 608 | +.colab-thread-subject { | |
| 609 | + font-weight: bold; | |
| 610 | + font-size: 18px; | |
| 611 | + color: #172738; | |
| 612 | +} | |
| 613 | + | |
| 614 | +.colab-thread-subject:hover, | |
| 615 | +.colab-thread-subject:focus { | |
| 616 | + color: #172738; | |
| 617 | + text-decoration: none; | |
| 618 | +} | |
| 619 | + | |
| 620 | +.colab-thread-latest-message { | |
| 621 | + font-size: 14px; | |
| 622 | + font-weight: normal; | |
| 623 | +} | |
| 624 | + | |
| 625 | +.colab-thread-order, | |
| 626 | +.colab-thread-total { | |
| 627 | + position: relative; | |
| 628 | + top: 15px; | |
| 629 | +} | |
| 630 | + | |
| 631 | +.colab-thread-order { | |
| 632 | + float: left; | |
| 633 | + margin-right: 10px; | |
| 634 | +} | |
| 635 | + | |
| 636 | +.colab-thread-order-select { | |
| 637 | + position: relative; | |
| 638 | + top: 10px; | |
| 639 | +} | |
| 640 | + | |
| 641 | +.btn-colab-mailinglist-members { | |
| 642 | + margin-bottom: 40px; | |
| 643 | +} | ... | ... |
src/colab-spb-theme-plugin/colab_spb_theme/templates/mailinglist-summary.html
0 → 100644
| ... | ... | @@ -0,0 +1,112 @@ |
| 1 | +{% extends 'base.html' %} | |
| 2 | +{% load i18n tz superarchives %} | |
| 3 | + | |
| 4 | +{% block main-content %} | |
| 5 | + <div class="colab-content container"> | |
| 6 | + {% block mailinglist_view_title %} | |
| 7 | + <div class="row"> | |
| 8 | + <div class="col-md-12"> | |
| 9 | + <h2>Listas de discussão</h2> | |
| 10 | + </div> | |
| 11 | + </div> | |
| 12 | + | |
| 13 | + <div class="row"> | |
| 14 | + <div class="col-md-12"> | |
| 15 | + <h3><b class="colab-mailinglist-name">{{ mailinglist.name|title }} {% if mailinglist.description %}({{ mailinglist.description }}){% endif %}</b></h3> | |
| 16 | + <div class="btn-group btn-group-sm btn-colab-mailinglist-members"> | |
| 17 | + <a href="#" class="btn btn-default" disabled="disabled">{% blocktrans with number_of_users=mailinglist.get_number_of_users %}{{ number_of_users }} members{% endblocktrans %}</a> | |
| 18 | + </div> | |
| 19 | + </div> | |
| 20 | + </div> | |
| 21 | + | |
| 22 | + <div class="row"> | |
| 23 | + <div class="col-md-8"> | |
| 24 | + {% with total=page_obj.paginator.count %} | |
| 25 | + <span class="colab-thread-total"><b>Total de {{ total }} tópico{{ total|pluralize }} na lista de discussão</b></span> | |
| 26 | + {% endwith %} | |
| 27 | + </div> | |
| 28 | + <div class="col-md-4"> | |
| 29 | + <form method="get" class="pull-right"> | |
| 30 | + <span class="colab-thread-order"><b>{% trans "Order by" %}:</b></span> | |
| 31 | + <select name="order" class="colab-thread-order-select" id="order_option" onchange="this.form.submit()"> | |
| 32 | + {% for option, dict_order in order_data.items %} | |
| 33 | + {% ifequal selected option %} | |
| 34 | + <option value="{{option}}" selected>{% trans dict_order.name %}</option> | |
| 35 | + {% else %} | |
| 36 | + <option value="{{option}}">{% trans dict_order.name %}</option> | |
| 37 | + {% endifequal %} | |
| 38 | + {% endfor %} | |
| 39 | + </select> | |
| 40 | + </form> | |
| 41 | + </div> | |
| 42 | + </div> | |
| 43 | + <hr/> | |
| 44 | + {% endblock %} | |
| 45 | + | |
| 46 | + {% block mailinglist_view_thread_list %} | |
| 47 | + {% for thread in thread_list %} | |
| 48 | + <div class="row colab-thread"> | |
| 49 | + <div class="col-md-12 colab-thread"> | |
| 50 | + <small class="colab-thread-modified-time">{{ thread.latest_message.received_time|date:"d F Y" }} {% trans "at" %} {{thread.latest_message.received_time|date:"h:m" }} - <a class="colab-thread-modified-author" href="{{thread.latest_message.author_url}}">{{thread.latest_message.author }}</a> | |
| 51 | + </small><br> | |
| 52 | + <h4><a class="colab-thread-subject" href="{{thread.get_absolute_url}}">{{ thread.latest_message.subject_clean }}</h4> | |
| 53 | + {% with thread.latest_message.body|truncatechars:"85" as description %} | |
| 54 | + <span class="colab-thread-latest-message">{{description | default_if_none:"a"}}</span></a><br> | |
| 55 | + {% endwith %} | |
| 56 | + <hr/> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 59 | + {% endfor %} | |
| 60 | + {% endblock %} | |
| 61 | + | |
| 62 | + {% block mailinglist_view_paginator %} | |
| 63 | + {% if page_obj.has_other_pages %} | |
| 64 | + <div class="text-center"> | |
| 65 | + <ul class="pagination"> | |
| 66 | + <li {% if page_obj.number == 1 %}class="disabled"{% endif %}> | |
| 67 | + <a href="{% if page_obj.number == 1 %}javascript:void(0);{% else %}?page={{1}}{% endif %}"><span class="glyphicon glyphicon-chevron-left small-icon"></span><span class="glyphicon glyphicon-chevron-left small-icon"></span></a> | |
| 68 | + </li> | |
| 69 | + <li {% if not page_obj.has_previous %}class="disabled"{% endif %}> | |
| 70 | + <a href="{% if page_obj.has_previous %}?page={{page_obj.previous_page_number }}{% else %}javascript:void(0);{% endif %}"><span class="glyphicon glyphicon-chevron-left small-icon"></span></a> | |
| 71 | + </li> | |
| 72 | + | |
| 73 | + {% if page_obj.has_previous %} | |
| 74 | + {% if page_obj.previous_page_number > 1 %} | |
| 75 | + <li> | |
| 76 | + <a href="?page={{page_obj.previous_page_number|add:-1 }}">{{ page_obj.number|add:-2 }}</a> | |
| 77 | + </li> | |
| 78 | + {% endif %} | |
| 79 | + <li> | |
| 80 | + <a href="?page={{page_obj.previous_page_number }}">{{ page_obj.number|add:-1 }}</a> | |
| 81 | + </li> | |
| 82 | + {% endif %} | |
| 83 | + | |
| 84 | + <li class="active"> | |
| 85 | + <a href="javascript:void(0);">{{ page_obj.number }}</a> | |
| 86 | + </li> | |
| 87 | + | |
| 88 | + {% if page_obj.has_next %} | |
| 89 | + <li> | |
| 90 | + <a href="?page={{page_obj.next_page_number }}">{{ page_obj.number|add:1 }}</a> | |
| 91 | + </li> | |
| 92 | + {% if page_obj.next_page_number < page_obj.paginator.num_pages %} | |
| 93 | + <li> | |
| 94 | + <a href="?page={{page_obj.next_page_number|add:1 }}">{{ page_obj.number|add:2 }}</a> | |
| 95 | + </li> | |
| 96 | + {% endif %} | |
| 97 | + {% endif %} | |
| 98 | + | |
| 99 | + <li {% if not page_obj.has_next %}class="disabled"{% endif %}> | |
| 100 | + <a href="{% if page_obj.has_next %}?page={{page_obj.next_page_number }}{% else %}javascript:void(0);{% endif %}"><span class="glyphicon glyphicon-chevron-right small-icon"></span></a> | |
| 101 | + </li> | |
| 102 | + | |
| 103 | + <li {% if page_obj.number == page_obj.paginator.num_pages %}class="disabled"{% endif %}> | |
| 104 | + <a href="{% if page_obj.number == page_obj.paginator.num_pages %}javascript:void(0);{% else %}?page={{page_obj.paginator.num_pages }}{% endif %}"><span class="glyphicon glyphicon-chevron-right small-icon"></span><span class="glyphicon glyphicon-chevron-right small-icon"></span></a> | |
| 105 | + </li> | |
| 106 | + | |
| 107 | + </ul> | |
| 108 | + </div> | |
| 109 | + {% endif %} | |
| 110 | + {% endblock %} | |
| 111 | + </div> | |
| 112 | +{% endblock %} | ... | ... |
src/colab-spb-theme-plugin/colab_spb_theme/templates/superarchives/thread-dashboard.html
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | |
| 11 | 11 | {% for mailinglist in lists %} |
| 12 | 12 | {% if mailinglist.get_latest or mailinglist.get_most_relevant %} |
| 13 | - <h3><b>{{ mailinglist.name|title|lower }} {% if mailinglist.description %} ({{ mailinglist.description }}){% endif %}</b></h3> | |
| 13 | + <h3><b><a href="{% url 'mailinglist_view' mailinglist.name %}">{{ mailinglist.name|title|lower }}</a> {% if mailinglist.description %} ({{ mailinglist.description }}){% endif %}</b></h3> | |
| 14 | 14 | <div class="btn-group btn-group-sm"> |
| 15 | 15 | <a href="#" class="btn btn-default" disabled="disabled">{% blocktrans with number_of_users=mailinglist.get_number_of_users %}{{ number_of_users }} members{% endblocktrans %}</a> |
| 16 | 16 | </div> |
| ... | ... | @@ -63,7 +63,7 @@ |
| 63 | 63 | {% if page_obj.has_previous %} |
| 64 | 64 | {% if page_obj.previous_page_number > 1 %} |
| 65 | 65 | <li> |
| 66 | - <a href="?page={{page_obj.previous_page_number|add:-2 }}">{{ page_obj.number|add:-2 }}</a> | |
| 66 | + <a href="?page={{page_obj.previous_page_number|add:-1 }}">{{ page_obj.number|add:-2 }}</a> | |
| 67 | 67 | </li> |
| 68 | 68 | {% endif %} |
| 69 | 69 | <li> | ... | ... |