;ς
£)?Bc           @   sv   d  Z  d k l Z d k l Z d k l Z d k l Z d k l	 Z	 d d d d	 d
 f Z
 d e f d     YZ d S(   s<   GUI component for managing the non-digest delivery options.
(   s   mm_cfg(   s   Utils(   s   _(   s   GUIBase(   s   ALLOWEDSs   user_addresss   user_delivered_tos   user_passwords	   user_names   user_optionsurls	   NonDigestc           B   s&   t  Z d   Z e d  Z d   Z RS(   Nc         C   s   d t  d  f Sd  S(   Ns	   nondigests   Non-digest&nbsp;options(   s   _(   s   self(    (    s%   /var/mailman/Mailman/Gui/NonDigest.pys   GetConfigCategory!   s    c      	   C   sh  | d j o t Sn t i } t d  d t i t d  t d  f d t d  f g } t i oP | i	 d t i
 t d  t d  t d	  f d t d
  t d  f g  n t i d d | d d } t i o t d  } n d } | i	 d t i d | f d t d  t d  | | f d t i d | f d t d  t d  | | f g  | Sd  S(   Ns	   nondigests7   Policies concerning immediately delivered list traffic.s   nondigestables   Nos   Yesi   s`   Can subscribers choose to receive mail immediately, rather
             than in batched digests?s   personalizes   Full Personalizations"  Should Mailman personalize each non-digest delivery?
                 This is often useful for announce-only lists, but <a
                 href="?VARHELP=nondigest/personalize">read the details</a>
                 section for a discussion of important performance
                 issues.s;	  Normally, Mailman sends the regular delivery messages to
                 the mail server in batches.  This is much more efficent
                 because it reduces the amount of traffic between Mailman and
                 the mail server.

                 <p>However, some lists can benefit from a more personalized
                 approach.  In this case, Mailman crafts a new message for
                 each member on the regular delivery list.  Turning this
                 feature on may degrade the performance of your site, so you
                 need to carefully consider whether the trade-off is worth it,
                 or whether there are other ways to accomplish what you want.
                 You should also carefully monitor your system load to make
                 sure it is acceptable.

                 <p>Select <em>No</em> to disable personalization and send
                 messages to the members in batches.  Select <em>Yes</em> to
                 personalize deliveries and allow additional substitution
                 variables in message headers and footers (see below).  In
                 addition, by selecting <em>Full Personalization</em>, the
                 <code>To</code> header of posted messages will be modified to
                 include the member's address instead of the list's posting
                 address.

                 <p>When personalization is enabled, a few more expansion
                 variables that can be included in the <a
                 href="?VARHELP=nondigest/msg_header">message header</a> and
                 <a href="?VARHELP=nondigest/msg_footer">message footer</a>.

                 <p>These additional substitution variables will be available
                 for your headers and footers, when this feature is enabled:

                 <ul><li><b>user_address</b> - The address of the user,
                         coerced to lower case.
                     <li><b>user_delivered_to</b> - The case-preserved address
                         that the user is subscribed with.
                     <li><b>user_password</b> - The user's password.
                     <li><b>user_name</b> - The user's full name.
                     <li><b>user_optionsurl</b> - The url to the user's option
                         page.
                 </ul>
                 s   headfoot.htmls   mlists   raws  When <a href="?VARHELP=nondigest/personalize">personalization</a> is enabled
for this list, additional substitution variables are allowed in your headers
and footers:

<ul><li><b>user_address</b> - The address of the user,
        coerced to lower case.
    <li><b>user_delivered_to</b> - The case-preserved address
        that the user is subscribed with.
    <li><b>user_password</b> - The user's password.
    <li><b>user_name</b> - The user's full name.
    <li><b>user_optionsurl</b> - The url to the user's option
        page.
</ul>
s    s
   msg_headeri
   i    s1   Header added to mail sent to regular list memberssN   Text prepended to the top of every immediately-delivery
             message. s
   msg_footers1   Footer added to mail sent to regular list memberssP   Text appended to the bottom of every immediately-delivery
             message. (   s   categorys   Nones   mm_cfgs   TEXTFIELDWIDTHs   WIDTHs   _s   Toggles   infos!   OWNERS_CAN_ENABLE_PERSONALIZATIONs   extends   Radios   Utilss   maketexts   mlists   headfoots   extras   Text(   s   selfs   mlists   categorys   subcats   infos   extras   WIDTHs   headfoot(    (    s%   /var/mailman/Mailman/Gui/NonDigest.pys   GetConfigInfo$   s    	<
P9
q
c         C   s   t  t  } | i o | i t  n | d d f j o4 |  i	 | | | | |  } | t j o d  Sqn n t i |  | | | |  d  S(   Ns
   msg_headers
   msg_footer(   s   lists   ALLOWEDSs   allowedss   mlists   personalizes   extends   PERSONALIZED_ALLOWEDSs   propertys   selfs   _convertStrings   vals   docs   Nones   GUIBases	   _setValue(   s   selfs   mlists   propertys   vals   docs   alloweds(    (    s%   /var/mailman/Mailman/Gui/NonDigest.pys	   _setValue   s    
(   s   __name__s
   __module__s   GetConfigCategorys   Nones   GetConfigInfos	   _setValue(    (    (    s%   /var/mailman/Mailman/Gui/NonDigest.pys	   NonDigest    s   	gN(   s   __doc__s   Mailmans   mm_cfgs   Utilss   Mailman.i18ns   _s   Mailman.Gui.GUIBases   GUIBases   Mailman.Gui.Digests   ALLOWEDSs   PERSONALIZED_ALLOWEDSs	   NonDigest(   s   GUIBases   PERSONALIZED_ALLOWEDSs	   NonDigests   Utilss   ALLOWEDSs   mm_cfgs   _(    (    s%   /var/mailman/Mailman/Gui/NonDigest.pys   ?   s   