20546db1527ab1b415fcf561b2edd1aa5ac6ba5d
[platal.git] / templates / newsletter / nl.default.mail.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2013 Polytechnique.org                             *}
4 {*  http://opensource.polytechnique.org/                                  *}
5 {*                                                                        *}
6 {*  This program is free software; you can redistribute it and/or modify  *}
7 {*  it under the terms of the GNU General Public License as published by  *}
8 {*  the Free Software Foundation; either version 2 of the License, or     *}
9 {*  (at your option) any later version.                                   *}
10 {*                                                                        *}
11 {*  This program is distributed in the hope that it will be useful,       *}
12 {*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
13 {*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
14 {*  GNU General Public License for more details.                          *}
15 {*                                                                        *}
16 {*  You should have received a copy of the GNU General Public License     *}
17 {*  along with this program; if not, write to the Free Software           *}
18 {*  Foundation, Inc.,                                                     *}
19 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
20 {*                                                                        *}
21 {**************************************************************************}
22
23 {config_load file="mails.conf" section="group_newsletter"}
24 {if $mail_part eq 'head'}
25 {from full=#from#}
26 {subject text=$issue->title(true)}
27 {if isset(#replyto#)}{add_header name='Reply-To' value=#replyto#}{/if}
28 {if isset(#retpath#)}{add_header name='Return-Path' value=#retpath#}{/if}
29 {elseif $mail_part eq 'text'}
30 {if !$is_mail}
31 <pre style="width : 72ex; margin: auto">
32 {/if}
33 ====================================================================
34 {$issue->title()}
35 ====================================================================
36
37 {$issue->head($user, 'text')}
38
39
40 {foreach from=$issue->arts key=cid item=arts name=cats}
41 {$smarty.foreach.cats.iteration} *{$issue->category($cid)}*
42 {foreach from=$arts item=art}
43 - {$art->title()}
44 {/foreach}
45
46 {/foreach}
47
48 {foreach from=$issue->arts key=cid item=arts}
49 --------------------------------------------------------------------
50 *{$issue->category($cid)}*
51 --------------------------------------------------------------------
52
53 {foreach from=$arts item=art}
54 {$art->toText($hash, $user->login())}
55
56 {/foreach}
57 {/foreach}
58
59 --------------------------------------------------------------------
60 Cette lettre est envoyée aux membres du groupe {$nl->group} par
61 l'intermédiaire de Polytechnique.org.
62
63 {if $is_mail}
64 archives         : <http://www.polytechnique.net/{$nl->prefix()}>
65 ne plus recevoir : <http://www.polytechnique.org/{$nl->prefix()}/out/nohash/{$issue->id}>
66 {else}
67 archives         : &lt;http://www.polytechnique.net/{$nl->prefix()}&gt;
68 ne plus recevoir : &lt;http://www.polytechnique.org/{$nl->prefix()}/out/nohash/{$issue->id}&gt;
69 {/if}
70 {if !$is_mail}
71 </pre>
72 {/if}
73 {elseif $mail_part eq 'html'}
74 {if $is_mail}
75 <?xml version="1.0" encoding="UTF-8"?>
76 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
77 <html xmlns="http://www.w3.org/1999/xhtml">
78   <head>
79     <title>{$nl->name}</title>
80     <style type="text/css">
81       {literal}
82       body      { background-color: #ddd; color: #000; }
83       {/literal}
84     <!--
85       {$issue->css()}
86     -->
87     </style>
88   </head>
89   <body>
90     <div class='nl_background'>
91 {/if}
92     <div class='nl'>
93       <div class="title" style="background-image: url({$globals->baseurl}/{$nl->group}/logo);"><a href="{$globals->baseurl}">{$issue->title()}</a></div>
94       <div class="intro">{$issue->head($user, 'html')|smarty:nodefaults}</div>
95       <a id="top_lnk"></a>
96       {foreach from=$issue->arts key=cid item=arts name=cats}
97       <div class="lnk">
98         <a href="{$prefix}#cat{$cid}"><strong>{$smarty.foreach.cats.iteration}. {$issue->category($cid)}</strong></a><br />
99         {foreach from=$arts item=art}
100         <a href="{$prefix}#art{$art->aid}">&nbsp;&nbsp;- {$art->title()}</a><br />
101         {/foreach}
102       </div>
103       {/foreach}
104
105       {foreach from=$issue->arts key=cid item=arts name=cats}
106       <h1 class="xorg_nl"><a id="cat{$cid}"></a>
107         {$issue->category($cid)}
108       </h1>
109       {foreach from=$arts item=art}
110         {$art->toHtml($hash, $user->login())|smarty:nodefaults}
111         <div class="top_lnk"><a href="{$prefix}#top_lnk">Revenir au sommaire</a></div>
112       {/foreach}
113       {/foreach}
114       <div class="foot1">
115         Cette lettre est envoyée à tous les membres du groupe {$nl->group}
116         par l'intermédiaire de Polytechnique.org.
117       </div>
118       <div class="foot2">
119         [<a href="http://www.polytechnique.net/{$nl->prefix()}">archives</a>&nbsp;|
120          <a href="http://www.polytechnique.net/{$nl->prefix()}/out/nohash/{$issue->id}">ne plus recevoir</a>]
121       </div>
122       </div>
123 {if $is_mail}
124     </div>
125   </body>
126 </html>
127 {/if}
128 {/if}
129
130 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
131