]> git.agnieray.net Git - galette.git/blob - galette/includes/fields_defs/pdfmodels_fields.php
42c47d1f8a77cf95f699d5796887e9f18b36fa20
[galette.git] / galette / includes / fields_defs / pdfmodels_fields.php
1 <?php
2
3 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5 /**
6 * PDF models declarations
7 *
8 * PHP version 5
9 *
10 * Copyright © 2013-2014 The Galette Team
11 *
12 * This file is part of Galette (http://galette.tuxfamily.org).
13 *
14 * Galette is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * Galette is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
26 *
27 * @category Functions
28 * @package Galette
29 *
30 * @author Johan Cwiklinski <johan@x-tnd.be>
31 * @copyright 2013-2014 The Galette Team
32 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
33 * @version SVN: $Id$
34 * @link http://galette.tuxfamily.org
35 * @since 0.7.5 - 2013-06-02
36 */
37
38 use Galette\Entity\PdfModel;
39
40 $pdfmodels_fields = array(
41 array(
42 'model_id' => PdfModel::MAIN_MODEL,
43 'model_name' => '_T("Main")',
44 'model_title' => null,
45 'model_type' => PdfModel::MAIN_MODEL,
46 'model_header' => '<table>
47 <tr>
48 <td id="pdf_assoname"><strong id="asso_name">{ASSO_NAME}</strong><br/>{ASSO_SLOGAN}</td>
49 <td id="pdf_logo">{ASSO_LOGO}</td>
50 </tr>
51 </table>',
52 'model_footer' => '<div id="pdf_footer">
53 _T("Association") {ASSO_NAME} - {ASSO_ADDRESS}<br/>
54 {ASSO_WEBSITE}
55 </div>',
56 'model_body' => null,
57 'model_styles' => 'div#pdf_title {
58 font-size: 1.4em;
59 font-wieght:bold;
60 text-align: center;
61 }
62
63 div#pdf_subtitle {
64 text-align: center;
65 }
66
67 div#pdf_footer {
68 text-align: center;
69 font-size: 0.7em;
70 }
71
72 td#pdf_assoname {
73 width: 75%;
74 font-size: 1.1em;
75 }
76
77 strong#asso_name {
78 font-size: 1.6em;
79 }
80
81 td#pdf_logo {
82 text-align: right;
83 width: 25%;
84 }
85
86 div[dir=\'rtl\'] td#pdf_logo {
87 text-align: left;
88 width: 0%;
89 }
90
91 div[dir=rtl] td#pdf_assoname {
92 width: 100%;
93 margin-left: 25%;
94 }',
95 'model_parent' => null
96 ),
97 array(
98 'model_id' => PdfModel::INVOICE_MODEL,
99 'model_name' => '_T("Invoice")',
100 'model_title' => '_T("Invoice") {CONTRIBUTION_YEAR}-{CONTRIBUTION_ID}',
101 'model_type' => PdfModel::INVOICE_MODEL,
102 'model_header' => null,
103 'model_footer' => null,
104 'model_body' => '<table>
105 <tr>
106 <td width="300"></td>
107 <td><strong>{NAME_ADH}</strong><br/>
108 {ADDRESS_ADH}<br/>
109 <strong>{ZIP_ADH} {TOWN_ADH}</strong>
110 </td>
111 </tr>
112 <tr>
113 <td height="100"></td>
114 </tr>
115 <tr>
116 <td colspan="2">
117 <table>
118 <thead>
119 <tr>
120 <th>_T("Label")</th>
121 <th>_T("Amount")</th>
122 </tr>
123 </thead>
124 <tbody>
125 <tr>
126 <td>
127 {CONTRIBUTION_LABEL} (_T("on") {CONTRIBUTION_DATE})<br/>
128 _T("from") {CONTRIBUTION_BEGIN_DATE} _T("to") {CONTRIBUTION_END_DATE}<br/>
129 {CONTRIBUTION_PAYMENT_TYPE}<br/>
130 {CONTRIBUTION_COMMENT}
131 </td>
132 <td>{CONTRIBUTION_AMOUNT}</td>
133 </tr>
134 </tbody>
135 </table>
136 </td>
137 </tr>
138 </table>',
139 'model_styles' => null,
140 'model_parent' => PdfModel::MAIN_MODEL
141 ),
142 array(
143 'model_id' => PdfModel::RECEIPT_MODEL,
144 'model_name' => '_T("Receipt")',
145 'model_title' => '_T("Receipt") {CONTRIBUTION_YEAR}-{CONTRIBUTION_ID}',
146 'model_type' => PdfModel::RECEIPT_MODEL,
147 'model_header' => null,
148 'model_footer' => null,
149 'model_body' => '<table>
150 <tr>
151 <td width="300"></td>
152 <td><strong>{NAME_ADH}</strong><br/>
153 {ADDRESS_ADH}<br/>
154 <strong>{ZIP_ADH} {TOWN_ADH}</strong>
155 </td>
156 </tr>
157 <tr>
158 <td height="100"></td>
159 </tr>
160 <tr>
161 <td colspan="2">
162 <table>
163 <thead>
164 <tr>
165 <th>_T("Label")</th>
166 <th>_T("Amount")</th>
167 </tr>
168 </thead>
169 <tbody>
170 <tr>
171 <td>
172 {CONTRIBUTION_LABEL} (_T("on") {CONTRIBUTION_DATE})<br/>
173 _T("from") {CONTRIBUTION_BEGIN_DATE} _T("to") {CONTRIBUTION_END_DATE}<br/>
174 {CONTRIBUTION_PAYMENT_TYPE}<br/>
175 {CONTRIBUTION_COMMENT}
176 </td>
177 <td>{CONTRIBUTION_AMOUNT}</td>
178 </tr>
179 </tbody>
180 </table>
181 </td>
182 </tr>
183 </table>',
184 'model_styles' => null,
185 'model_parent' => PdfModel::MAIN_MODEL
186 ),
187 array(
188 'model_id' => PdfModel::ADHESION_FORM_MODEL,
189 'model_name' => '_T("Adhesion form")',
190 'model_title' => '_T("Adhesion form")',
191 'model_type' => PdfModel::ADHESION_FORM_MODEL,
192 'model_header' => null,
193 'model_footer' => null,
194 'model_body' => '<hr/>
195 <div class="infos">_T("Complete the following form and send it with your funds, in order to complete your subscription.")</div>
196 <table>
197 <tr>
198 <td width="50%"></td>
199 <td width="50%">{ASSO_ADDRESS_MULTI}</td>
200 </tr>
201 </table>
202 <hr/>
203 <table>
204 <tr>
205 <td height="30"></td>
206 </tr>
207 <tr>
208 <td>_T("Required membership:")
209 <form action="none">
210 <input type="radio" class="box" name="cotisation" value="none1">_T("Active member")
211 <input type="radio" class="box" name="cotisation" value="none2">_T("Benefactor member")
212 <input type="radio" class="box" name="cotisation" value="none3">_T("Donation")
213 <div class="infos">_T("The minimum contribution for each type of membership are defined on the website of the association. The amount of donations are free to be decided by the generous donor.") </div>
214 </form>
215 </td>
216 </tr>
217 <tr>
218 <td height="30"></td>
219 </tr>
220 </table>
221 <table class="member">
222 <tr>
223 <td class="label">_T("Politeness")</td>
224 <td class="input">{TITLE_ADH}</td>
225 </tr>
226 <tr>
227 <td class="label">_T("Name")</td>
228 <td class="input">{LAST_NAME_ADH}</td>
229 </tr>
230 <tr>
231 <td class="label">_T("First name")</td>
232 <td class="input">{FIRST_NAME_ADH}</td>
233 </tr>
234 <tr>
235 <td class="label">_T("Company name") *</td>
236 <td class="input">{COMPANY_ADH}</td>
237 </tr>
238 <tr>
239 <td class="label">_T("Address")</td>
240 <td class="input">{ADDRESS_ADH}</td>
241 </tr>
242 <tr>
243 <td class="label"></td>
244 <td class="input"></td>
245 </tr>
246 <tr>
247 <td class="label"></td>
248 <td class="input"></td>
249 </tr>
250 <tr>
251 <td class="label">_T("Zip Code")</td>
252 <td class="cpinput">{ZIP_ADH}</td>
253 <td class="label">_T("City")</td>
254 <td class="towninput">{TOWN_ADH}</td>
255 </tr>
256 <tr>
257 <td class="label">_T("Country")</td>
258 <td class="input">{COUNTRY_ADH}</td>
259 </tr>
260 <tr>
261 <td class="label">_T("Email address")</td>
262 <td class="input">{EMAIL_ADH}</td>
263 </tr>
264 <tr>
265 <td class="label">_T("Username") **</td>
266 <td class="input">{LOGIN_ADH}</td>
267 </tr>
268 <tr>
269 <td colspan="2" height="10"></td>
270 </tr>
271 <tr>
272 <td class="label">_T("Amount")</td>
273 <td class="input"></td>
274 </tr>
275 </table>
276 <p>str_replace(\'%s\', \'{ASSO_NAME}\', \'_T("Hereby, I agree to comply to %s association statutes and its rules.")\')</p><p>_T("At ................................................")</p><p>_T("On .......... / .......... / .......... ")</p><p>_T("Signature")</p>
277 <p class="notes">_T("* Only for compagnies")<br/>_T("** Galette identifier, if applicable")</p>',
278 'model_styles' => 'td.label {
279 width: 20%;
280 font-weight: bold;
281 }
282 td.input {
283 width: 80%;
284 border-bottom: 1px dotted black;
285 }
286
287 td.cpinput {
288 width: 10%;
289 border-bottom: 1px dotted black;
290 }
291
292 td.towninput {
293 width: 50%;
294 border-bottom: 1px dotted black;
295 }
296
297 div.infos {
298 font-size: .8em;
299 }
300
301 p.notes {
302 font-size: 0.6em;
303 text-align: right;
304 }
305
306 .member td {
307 line-height: 20px;
308 height: 20px;
309 }',
310 'model_parent' => PdfModel::MAIN_MODEL
311 )
312 );