Merge lp:~danci-emanuel/postorius/UI_dlists_support into lp:~danci-emanuel/postorius/postorius_orig

Proposed by Emanuel Danci
Status: Needs review
Proposed branch: lp:~danci-emanuel/postorius/UI_dlists_support
Merge into: lp:~danci-emanuel/postorius/postorius_orig
Diff against target: 77 lines (+25/-3)
2 files modified
src/postorius/forms.py (+24/-2)
src/postorius/views.py (+1/-1)
To merge this branch: bzr merge lp:~danci-emanuel/postorius/UI_dlists_support
Reviewer Review Type Date Requested Status
Terri (community) Disapprove
Robin J Pending
Emanuel Danci Pending
Review via email: mp+114174@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robin J (robin-jeffries) wrote :

Again, I haven't seen these files before, so I'm a bit in the dark, but the changes are simple, and they look sensible.

At line 43, I think that your message should be different -- based on the other example, the format seems to be a question. How about: Allow list members to (un)subscribe to individual threads?

Also change line ll to say: Enable individual thread subscribe/unsubscribe for this list?

I'm betting that line 74 is more than 80 chars long, and you should break it -- see how it is done at line 72?

It looks good, but I'll leave this as a comment, in case someone else wants to chime in.

Revision history for this message
Emanuel Danci (danci-emanuel) wrote :

> Again, I haven't seen these files before, so I'm a bit in the dark, but the
> changes are simple, and they look sensible.
>
> At line 43, I think that your message should be different -- based on the
> other example, the format seems to be a question. How about: Allow list
> members to (un)subscribe to individual threads?
>
> Also change line ll to say: Enable individual thread subscribe/unsubscribe for
> this list?
>
> I'm betting that line 74 is more than 80 chars long, and you should break it
> -- see how it is done at line 72?
>
> It looks good, but I'll leave this as a comment, in case someone else wants to
> chime in.

I changed the text and I also took care of the line 74. Do you think I should change anything else
to these files before I push the changed code?

Thank you,
Emanuel

Revision history for this message
Terri (terriko) wrote :

I'm clearing up some of the old merge requests to make sure their statuses are correct, and I'm marking this one as disapprove since the associated mailman core code never happened.

review: Disapprove

Unmerged revisions

71. By Emanuel Danci

Contains the UI changes needed for enabling/disabling Dynamic sublists.

70. By Emanuel Danci

Contains the UI changes needed for enabling/disabling Dynamic sublists.

69. By Emanuel Danci

Contains the UI changes needed for enabling/disabling Dynamic sublists.

68. By Emanuel Danci

Contains the UI changes needed for enabling/disabling Dynamic sublists.

67. By Emanuel Danci

Contains the UI changes needed for supporing Dynamic sublists

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/postorius/forms.py'
2--- src/postorius/forms.py 2012-03-23 23:22:16 +0000
3+++ src/postorius/forms.py 2012-07-10 12:02:18 +0000
4@@ -96,6 +96,19 @@
5 'required': _("Please enter the list owner's email address."),
6 },
7 required = True)
8+
9+ dlists_enabled = forms.ChoiceField(
10+ widget = forms.RadioSelect(),
11+ label = _("Enable Dynamic sublists feature for this list?"),
12+ error_messages = {
13+ 'required': _("Please choose an option."),
14+ },
15+ required = True,
16+ choices = (
17+ (True, _("Enable.")),
18+ (False, _("Do not enable."))
19+ ))
20+
21 advertised = forms.ChoiceField(
22 widget = forms.RadioSelect(),
23 label = _('Advertise this list?'),
24@@ -142,7 +155,8 @@
25 "mail_host",
26 "list_owner",
27 "description",
28- "advertised"],]
29+ "advertised",
30+ "dlists_enabled"],]
31
32 class ListSubscribe(FieldsetForm):
33 """Form fields to join an existing list.
34@@ -302,6 +316,13 @@
35 widget = forms.RadioSelect,
36 label = _('Advertise the existance of this list?'),
37 )
38+
39+ dlists_enabled = forms.TypedChoiceField(
40+ coerce=lambda x: x =='True',
41+ choices=((True, _('Enabled')), (False, _('Disabled'))),
42+ widget = forms.RadioSelect,
43+ label = _("Status of the Dynamic sublists feature"),
44+ )
45 filter_content = forms.TypedChoiceField(
46 coerce=lambda x: x =='True',
47 choices=((True, _('Yes')), (False, _('No'))),
48@@ -780,7 +801,8 @@
49 # just a really temporary layout to see that it works. -- Anna
50 layout = [
51 ["List Identity", "display_name", "mail_host", "description",
52- "advertised"],
53+ "advertised",
54+ "dlists_enabled"],
55 #"info", "list_name", "host_name", "list_id", "fqdn_listname",
56 #"http_etag", "volume", "web_host"
57 ["Automatic Responses", "autorespond_owner",
58
59=== modified file 'src/postorius/views.py'
60--- src/postorius/views.py 2012-05-25 22:37:22 +0000
61+++ src/postorius/views.py 2012-07-10 12:02:18 +0000
62@@ -45,7 +45,6 @@
63
64 logger = logging.getLogger(__name__)
65
66-
67 @login_required
68 @user_passes_test(lambda u: u.is_superuser)
69 def site_settings(request):
70@@ -123,6 +122,7 @@
71 list_settings["description"] = form.cleaned_data['description']
72 list_settings["owner_address"] = \
73 form.cleaned_data['list_owner']
74+ list_settings["dlists_enabled"] = form.cleaned_data['dlists_enabled']
75 list_settings["advertised"] = form.cleaned_data['advertised']
76 list_settings.save()
77 messages.success(request, _("List created"))

Subscribers

People subscribed via source and target branches

to all changes: