diff --git a/src/postorius/templates/postorius/lists/summary.html b/src/postorius/templates/postorius/lists/summary.html index fc76ac0..fc5a594 100644 --- a/src/postorius/templates/postorius/lists/summary.html +++ b/src/postorius/templates/postorius/lists/summary.html @@ -15,13 +15,16 @@
{{list.settings.description }}
-To subscribe or unsubscribe this list you have to be logged in.
diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py index 5605773..221f6ac 100644 --- a/src/postorius/views/list.py +++ b/src/postorius/views/list.py @@ -170,10 +170,18 @@ def get(self, request, fqdn_listname): user_email = getattr(request.user, 'email', None) + userSubscribed = False + try: + userMember = self.mailing_list.get_member(user_email) + except ValueError: + pass + else: + userSubscribed = True return render_to_response( 'postorius/lists/summary.html', {'list': self.mailing_list, - 'subscribe_form': ListSubscribe(initial={'email': user_email})}, + 'subscribe_form': ListSubscribe(initial={'email': user_email}), + 'userSubscribed': userSubscribed}, context_instance=RequestContext(request))