Commit | Line | Data |
---|---|---|
11f44323 | 1 | {**************************************************************************} |
2 | {* *} | |
12262f13 | 3 | {* Copyright (C) 2003-2011 Polytechnique.org *} |
11f44323 | 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 | ||
11f44323 | 23 | {config_load file="mails.conf" section="newsletter"} |
5b21237d | 24 | {if $mail_part eq 'head'} |
11f44323 | 25 | {from full=#from#} |
84163d58 | 26 | {subject text=$issue->title(true)} |
5bc6e9e6 | 27 | {if isset(#replyto#)}{add_header name='Reply-To' value=#replyto#}{/if} |
28 | {if isset(#retpath#)}{add_header name='Return-Path' value=#retpath#}{/if} | |
3ad44e08 | 29 | {elseif $mail_part eq 'text'} |
5b21237d | 30 | {if !$is_mail} |
11f44323 | 31 | <pre style="width : 72ex; margin: auto"> |
32 | {/if} | |
33 | ==================================================================== | |
84163d58 | 34 | {$issue->title()} |
11f44323 | 35 | ==================================================================== |
36 | ||
84163d58 | 37 | {$issue->head($user, 'text')} |
11f44323 | 38 | |
39 | ||
84163d58 RB |
40 | {foreach from=$issue->arts key=cid item=arts name=cats} |
41 | {$smarty.foreach.cats.iteration} *{$issue->category($cid)}* | |
11f44323 | 42 | {foreach from=$arts item=art} |
43 | - {$art->title()} | |
44 | {/foreach} | |
45 | ||
46 | {/foreach} | |
47 | ||
84163d58 | 48 | {foreach from=$issue->arts key=cid item=arts} |
11f44323 | 49 | -------------------------------------------------------------------- |
84163d58 | 50 | *{$issue->category($cid)}* |
11f44323 | 51 | -------------------------------------------------------------------- |
52 | ||
53 | {foreach from=$arts item=art} | |
d5e60905 | 54 | {$art->toText($hash, $user->login())} |
11f44323 | 55 | |
56 | {/foreach} | |
57 | {/foreach} | |
58 | ||
59 | -------------------------------------------------------------------- | |
a7de4ef7 | 60 | Cette lettre est envoyée à tous les Polytechniciens sur Internet par |
61 | l'intermédiaire de Polytechnique.org. | |
11f44323 | 62 | |
ec896627 | 63 | {if $is_mail} |
71b21455 | 64 | archives : <https://www.polytechnique.org/nl> |
65 | écrire : <https://www.polytechnique.org/nl/submit> | |
602119a2 | 66 | ne plus recevoir : <https://www.polytechnique.org/nl/out/nohash/{$issue->id}> |
ec896627 FB |
67 | {else} |
68 | archives : <https://www.polytechnique.org/nl> | |
69 | écrire : <https://www.polytechnique.org/nl/submit> | |
602119a2 | 70 | ne plus recevoir : <https://www.polytechnique.org/nl/out/nohash/{$issue->id}> |
ec896627 | 71 | {/if} |
d232ae0d | 72 | {if !$is_mail} |
11f44323 | 73 | </pre> |
74 | {/if} | |
5b21237d | 75 | {elseif $mail_part eq 'html'} |
11f44323 | 76 | {if $is_mail} |
493b6abe | 77 | <?xml version="1.0" encoding="UTF-8"?> |
11f44323 | 78 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
6b440e23 SJ |
79 | <html xmlns="http://www.w3.org/1999/xhtml"> |
80 | <head> | |
183a157b | 81 | <title>Lettre mensuelle de Polytechnique.org</title> |
11f44323 | 82 | <style type="text/css"> |
a46f274c | 83 | {literal} |
84 | body { background-color: #ddd; color: #000; } | |
85 | {/literal} | |
11f44323 | 86 | <!-- |
84163d58 | 87 | {$issue->css()} |
11f44323 | 88 | --> |
89 | </style> | |
90 | </head> | |
91 | <body> | |
a46f274c | 92 | <div class='nl_background'> |
11f44323 | 93 | {/if} |
94 | <div class='nl'> | |
84163d58 RB |
95 | <div class="title"><a href="{$globals->baseurl}">{$issue->title()}</a></div> |
96 | <div class="intro">{$issue->head($user, 'html')|smarty:nodefaults}</div> | |
11f44323 | 97 | <a id="top_lnk"></a> |
84163d58 | 98 | {foreach from=$issue->arts key=cid item=arts name=cats} |
11f44323 | 99 | <div class="lnk"> |
84163d58 | 100 | <a href="{$prefix}#cat{$cid}"><strong>{$smarty.foreach.cats.iteration}. {$issue->category($cid)}</strong></a><br /> |
11f44323 | 101 | {foreach from=$arts item=art} |
84163d58 | 102 | <a href="{$prefix}#art{$art->aid}"> - {$art->title()}</a><br /> |
11f44323 | 103 | {/foreach} |
104 | </div> | |
105 | {/foreach} | |
106 | ||
84163d58 | 107 | {foreach from=$issue->arts key=cid item=arts name=cats} |
11f44323 | 108 | <h1 class="xorg_nl"><a id="cat{$cid}"></a> |
84163d58 | 109 | {$issue->category($cid)} |
11f44323 | 110 | </h1> |
111 | {foreach from=$arts item=art} | |
d5e60905 | 112 | {$art->toHtml($hash, $user->login())|smarty:nodefaults} |
11f44323 | 113 | <div class="top_lnk"><a href="{$prefix}#top_lnk">Revenir au sommaire</a></div> |
114 | {/foreach} | |
115 | {/foreach} | |
116 | <div class="foot1"> | |
a7de4ef7 | 117 | Cette lettre est envoyée à tous les Polytechniciens sur Internet par l'intermédiaire de Polytechnique.org. |
11f44323 | 118 | </div> |
119 | <div class="foot2"> | |
120 | [<a href="https://www.polytechnique.org/nl">archives</a> | | |
a7de4ef7 | 121 | <a href="https://www.polytechnique.org/nl/submit">écrire dans la NL</a> | |
602119a2 | 122 | <a href="https://www.polytechnique.org/nl/out/nohash/{$issue->id}">ne plus recevoir</a>] |
11f44323 | 123 | </div> |
183a157b | 124 | </div> |
11f44323 | 125 | {if $is_mail} |
a46f274c | 126 | </div> |
11f44323 | 127 | </body> |
128 | </html> | |
129 | {/if} | |
130 | {/if} | |
131 | ||
a7de4ef7 | 132 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |