Aurélien Bompard has proposed merging lp:~abompard/postorius/link-to-hyperkitty into lp:postorius.
Requested reviews: Mailman Coders (mailman-coders) For more details, see: https://code.launchpad.net/~abompard/postorius/link-to-hyperkitty/+merge/256350 Add a link to HyperKitty as suggested by Sumana. Fixes bug #1444471. Right now it's just a link to HyperKitty. An improvement would be to check if the list settings allow public archiving, and if the user is allowed to see them (private or public list). At the moment it just links to HyperKitty and let it do this checking. -- Your team Mailman Coders is requested to review the proposed merge of lp:~abompard/postorius/link-to-hyperkitty into lp:postorius.
=== modified file 'src/postorius/context_processors.py' --- src/postorius/context_processors.py 2015-02-09 14:35:44 +0000 +++ src/postorius/context_processors.py 2015-04-15 15:48:53 +0000 @@ -15,8 +15,12 @@ # # You should have received a copy of the GNU General Public License along with # Postorius. If not, see <http://www.gnu.org/licenses/>. + import logging +from django.conf import settings +from django.core.urlresolvers import reverse, NoReverseMatch + logger = logging.getLogger(__name__) @@ -31,7 +35,16 @@ else: template_to_extend = "postorius/base.html" + # Find the HyperKitty URL if installed + hyperkitty_url = False + if "hyperkitty" in settings.INSTALLED_APPS: + try: + hyperkitty_url = reverse("hk_root") + except NoReverseMatch: + pass + return { 'postorius_base_template': template_to_extend, 'request': request, + 'hyperkitty_url': hyperkitty_url, } === modified file 'src/postorius/templates/postorius/lists/summary.html' --- src/postorius/templates/postorius/lists/summary.html 2015-03-22 14:57:17 +0000 +++ src/postorius/templates/postorius/lists/summary.html 2015-04-15 15:48:53 +0000 @@ -14,12 +14,20 @@ <h2>{% trans 'Description' %}</h2> <p>{{list.settings.description }}</p> - + + {% if hyperkitty_url %} + <h2>{% trans 'Archived messages' %}</h2> + {% blocktrans %} + To see the prior postings to this list, visit + <a href="{{ hyperkitty_url }}">the archives</a>. + {% endblocktrans %} + {% endif %} + + <h2>{% trans 'Subscription' %}</h2> {% if user.is_authenticated %} {% if userSubscribed %} <a href="{% url 'list_unsubscribe' list.list_id user.email %}" class="btn btn-danger">{% trans "Unsubscribe" %}</a> {% else %} - <h2>{% trans 'Subscribe to this list' %}</h2> <form action="{% url 'list_subscribe' list.list_id %}" method="post" class="list_subscribe"> {% csrf_token %} {{subscribe_form.as_p}} <input class="btn btn-success" type="submit" value="{% trans 'Subscribe' %}" />
_______________________________________________ Mailman-coders mailing list [email protected] https://mail.python.org/mailman/listinfo/mailman-coders
