------------------------------------------------------------
revno: 1269
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.2
timestamp: Fri 2013-07-19 14:40:31 -0700
message:
  Enable setting a default grouping/sorting for the admindb held message
  summary via a DISPLAY_HELD_SUMMARY_SORT_BUTTONS setting.
modified:
  Mailman/Cgi/admindb.py
  Mailman/Defaults.py.in
  NEWS


--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2

Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/Cgi/admindb.py'
--- Mailman/Cgi/admindb.py	2013-07-19 03:20:26 +0000
+++ Mailman/Cgi/admindb.py	2013-07-19 21:40:31 +0000
@@ -50,10 +50,13 @@
 
 EXCERPT_HEIGHT = 10
 EXCERPT_WIDTH = 76
-SSENDER = 0
-SSENDERTIME = 1
-STIME = 2
-ssort = SSENDER
+SSENDER = mm_cfg.SSENDER
+SSENDERTIME = mm_cfg.SSENDERTIME
+STIME = mm_cfg.STIME
+if mm_cfg.DISPLAY_HELD_SUMMARY_SORT_BUTTONS in (SSENDERTIME, STIME):
+    ssort = mm_cfg.DISPLAY_HELD_SUMMARY_SORT_BUTTONS
+else:
+    ssort = SSENDER
 
 
 

=== modified file 'Mailman/Defaults.py.in'
--- Mailman/Defaults.py.in	2013-07-19 19:39:28 +0000
+++ Mailman/Defaults.py.in	2013-07-19 21:40:31 +0000
@@ -253,7 +253,10 @@
                               }
 #
 # Shall the admindb held message summary display the grouping and sorting
-# option radio buttons?
+# option radio buttons?  Set this in mm_cfg.py to one of the following:
+# SSENDER -> Default to grouped and sorted by sender.
+# SSENDERTIME -> Default to grouped by sender and sorted by time.
+# STIME -> Default to ungrouped and sorted by time.
 DISPLAY_HELD_SUMMARY_SORT_BUTTONS = No
 
 
@@ -1415,6 +1418,11 @@
 ACCEPT = 6
 HOLD = 7
 
+# admindb summary sort button settings.  All must evaluate to True.
+SSENDER = 1
+SSENDERTIME = 2
+STIME = 3
+
 # Standard text field width
 TEXTFIELDWIDTH = 40
 

=== modified file 'NEWS'
--- NEWS	2013-07-19 19:39:28 +0000
+++ NEWS	2013-07-19 21:40:31 +0000
@@ -62,9 +62,10 @@
       enabled by setting ALLOW_AUTHOR_IS_LIST to Yes in mm_cfg.py.
 
     - There is a new DISPLAY_HELD_SUMMARY_SORT_BUTTONS setting which if set
-      to Yes in mm_cfg.py will display a set of radio buttons in the admindb
-      held message summary to select how the held messages are sorted and
-      grouped for display.
+      in mm_cfg.py will display a set of radio buttons in the admindb held
+      message summary to select how the held messages are sorted and grouped
+      for display. The exact setting determines the default grouping and
+      sorting.  See the description in Defaults.py for details.
 
     - Setting digest_size_threshhold to zero now means no digests will be
       sent based on size instead of a digest being sent with every post.

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to