Commit 7ef23c1848e8a67c9fb0d9168f1cbe5708788305

Authored by Carlos Oliveira
1 parent 413e0d3b
Exists in thread_page

New label to thread dashboard

Signed-off-by: Carlos Oliveira <carlosoliveira@duzeru.org>
Signed-off-by: Bruna Moreira <brunanayaramlima@gmail.com>
src/colab-spb-theme-plugin/colab_spb_theme/templates/superarchives/thread-dashboard.html 0 → 100644
... ... @@ -0,0 +1,101 @@
  1 +{% extends 'base.html' %}
  2 +{% load i18n %}
  3 +
  4 +{% block title %}Listas de discussão{% endblock %}
  5 +
  6 +{% block main-content %}
  7 + <div class="colab-content container">
  8 + <h2>Listas de discussão</h2>
  9 + <hr/>
  10 +
  11 + {% for mailinglist in lists %}
  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>
  14 + <div class="btn-group btn-group-sm">
  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 + </div>
  17 + <hr/>
  18 +
  19 + <div class="row">
  20 + <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
  21 + <h4>{% trans 'latest'|title %}</h4>
  22 + <ul class="message-list">
  23 + {% for thread in mailinglist.get_latest %}
  24 + {% include "message-preview.html" with result=thread.latest_message %}
  25 + {% endfor %}
  26 + </ul>
  27 + <div class="text-right">
  28 + <a href="{% url 'haystack_search' %}?order=latest&list={{ mailinglist.name }}&type=thread">
  29 + {% trans "more..." %}
  30 + </a>
  31 + </div>
  32 + </div>
  33 +
  34 + <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
  35 + <h4>{% trans 'most relevant'|title %}</h4>
  36 + <ul class="message-list">
  37 + {% for thread in mailinglist.get_most_relevant %}
  38 + {% include "message-preview.html" with result=thread %}
  39 + {% endfor %}
  40 + </ul>
  41 + <div class="text-right">
  42 + <a href="{% url 'haystack_search' %}?list={{ mailinglist.name }}&type=thread">
  43 + {% trans "more..." %}
  44 + </a>
  45 + </div>
  46 + </div>
  47 + </div>
  48 +
  49 +
  50 + {% endif %}
  51 + {% endfor %}
  52 +
  53 + {% if page_obj.has_other_pages %}
  54 + <div class="text-center">
  55 + <ul class="pagination">
  56 + <li {% if page_obj.number == 1 %}class="disabled"{% endif %}>
  57 + <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>
  58 + </li>
  59 + <li {% if not page_obj.has_previous %}class="disabled"{% endif %}>
  60 + <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>
  61 + </li>
  62 +
  63 + {% if page_obj.has_previous %}
  64 + {% if page_obj.previous_page_number > 1 %}
  65 + <li>
  66 + <a href="?page={{page_obj.previous_page_number|add:-2 }}">{{ page_obj.number|add:-2 }}</a>
  67 + </li>
  68 + {% endif %}
  69 + <li>
  70 + <a href="?page={{page_obj.previous_page_number }}">{{ page_obj.number|add:-1 }}</a>
  71 + </li>
  72 + {% endif %}
  73 +
  74 + <li class="active">
  75 + <a href="javascript:void(0);">{{ page_obj.number }}</a>
  76 + </li>
  77 +
  78 + {% if page_obj.has_next %}
  79 + <li>
  80 + <a href="?page={{page_obj.next_page_number }}">{{ page_obj.number|add:1 }}</a>
  81 + </li>
  82 + {% if page_obj.next_page_number < page_obj.paginator.num_pages %}
  83 + <li>
  84 + <a href="?page={{page_obj.next_page_number|add:1 }}">{{ page_obj.number|add:2 }}</a>
  85 + </li>
  86 + {% endif %}
  87 + {% endif %}
  88 +
  89 + <li {% if not page_obj.has_next %}class="disabled"{% endif %}>
  90 + <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>
  91 + </li>
  92 +
  93 + <li {% if page_obj.number == page_obj.paginator.num_pages %}class="disabled"{% endif %}>
  94 + <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>
  95 + </li>
  96 +
  97 + </ul>
  98 + </div>
  99 + {% endif %}
  100 + </div>
  101 +{% endblock %}
... ...