lib/open_project/sympa/patches/project_patch.rb
# returns the xml needed for defining a mailing list
returns the xml needed for defining a mailing list
returns the xml needed for defining a mailing list
def sympa_mailing_list_xml_def
             <?xml version='1.0'?>
             <list>
               <listname>The list name</listname>
               <type>The list type</type>
               <subject>The project name</subject>
               <description>Project description</description>
               <status>open</status>
               <language>en_US</language>
               <topic>Computing</topic>
               <owner multiple="1">
                 <email>email1@example.com</email>
               </owner>
               <owner multiple="1">
                 <email>email2@example.com</email>
               </owner>
             </list>
            Nokogiri::XML::Builder.new(encoding: "UTF-8") do |xml|
              xml.list do
                xml.listname identifier
                xml.type sympa_list_type
                xml.subject name
                xml.description description
                xml.status 'open'
                xml.language 'en_US'
                xml.topic 'Computing'
                sympa_owner_emails.each do |email|
                  xml.owner('multiple' => '1') do
                    xml.email email
                  end
                end
              end
            end
          end
def sympa_mailing_list_xml_def Nokogiri :: XML :: Builder . new ( encoding : "UTF-8" ) do | xml | xml . list do xml . listname identifier xml . type sympa_list_type xml . subject name xml . description description xml . status 'open' xml . language 'en_US' xml . topic 'Computing' sympa_owner_emails . each do | email | xml . owner ( 'multiple' => '1' ) do xml . email email end end end end end
returns the xml needed for defining a mailing list
returns the xml needed for defining a mailing list
# Template of the generated xml: # # <?xml version='1.0'?> # <list> #   <listname>The list name</listname> #   <type>The list type</type> #   <subject>The project name</subject> #   <description>Project description</description> #   <status>open</status> #   <language>en_US</language> #   <topic>Computing</topic> #   <owner multiple="1"> #     <email>email1@example.com</email> #   </owner> #   <owner multiple="1"> #     <email>email2@example.com</email> #   </owner> # </list>