Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15403 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 15403 Rev 15447
Línea 7... Línea 7...
7
use LeadersLinked\Model\CompetencyType;
7
use LeadersLinked\Model\CompetencyType;
8
use LeadersLinked\Model\Behavior;
8
use LeadersLinked\Model\Behavior;
9
use Laminas\Mvc\I18n\Translator;
9
use Laminas\Mvc\I18n\Translator;
Línea 10... Línea 10...
10
 
10
 
-
 
11
class JobDescriptionPdf extends FPDF {
-
 
12
    
Línea 11... Línea 13...
11
class JobDescriptionPdf extends FPDF {
13
    const MAX_Y_ADD_PAGE = 240;
12
 
14
 
13
    /**
15
    /**
14
     *
16
     *
Línea 88... Línea 90...
88
 
90
 
89
        $this->SetFillColor(225, 255, 255);
91
        $this->SetFillColor(225, 255, 255);
90
        $this->SetTextColor(0);
92
        $this->SetTextColor(0);
Línea 91... Línea 93...
91
        $this->SetFont('Arial', '', 9);
93
        $this->SetFont('Arial', '', 9);
92
 
-
 
93
        $this->Cell(155, 8, utf8_decode(' 1: Mínimo  2: Medio  3: Medio-Alto  4: Alto  N/A: No aplica 
94
 
94
'), 1, 'L', false);
95
        $this->Cell(155, 8, utf8_decode(' 1: Mínimo  2: Medio  3: Medio-Alto  4: Alto  N/A: No aplica '), 1, 'L', false);
Línea 95... Línea 96...
95
        $this->Ln(15);
96
        $this->Ln(15);
96
    }
97
    }
Línea 126... Línea 127...
126
            } else {
127
            } else {
Línea 127... Línea 128...
127
 
128
 
128
                $this->SetFont('Arial', '', 9);
129
                $this->SetFont('Arial', '', 9);
129
                $this->MultiCell(190, 6, utf8_decode($rs['content']), 1, 'L', false);
130
                $this->MultiCell(190, 6, utf8_decode($rs['content']), 1, 'L', false);
-
 
131
            }
-
 
132
            
-
 
133
            $y = $this->getY();
-
 
134
            if($y >= self::MAX_Y_ADD_PAGE) {
-
 
135
                $this->addPage();
130
            }
136
            }
131
        }
137
        }
-
 
138
        $this->Ln(5);
-
 
139
        
-
 
140
        $y = $this->getY();
-
 
141
        if($y >= self::MAX_Y_ADD_PAGE) {
-
 
142
            $this->addPage();
132
        $this->Ln(5);
143
        }
Línea 133... Línea 144...
133
    }
144
    }
134
 
145
 
135
    /**
146
    /**
Línea 159... Línea 170...
159
                $this->Cell(150, 6, utf8_decode($rs['content']), 0, 'L', false);
170
                $this->Cell(150, 6, utf8_decode($rs['content']), 0, 'L', false);
160
                $this->Ln();
171
                $this->Ln();
161
            } else {
172
            } else {
162
                $this->MultiCell(190, 6, utf8_decode($rs['content']), 0, 'L', false);
173
                $this->MultiCell(190, 6, utf8_decode($rs['content']), 0, 'L', false);
163
            }
174
            }
-
 
175
            
-
 
176
            $y = $this->getY();
-
 
177
            if($y >= self::MAX_Y_ADD_PAGE) {
-
 
178
                $this->addPage();
-
 
179
            }
164
        }
180
        }
165
        $this->Ln(5);
181
        $this->Ln(5);
-
 
182
        
-
 
183
        $y = $this->getY();
-
 
184
        if($y >= self::MAX_Y_ADD_PAGE) {
-
 
185
            $this->addPage();
-
 
186
        }
166
    }
187
    }
Línea 167... Línea 188...
167
 
188
 
168
    /**
189
    /**
169
     * Create Competency Table
190
     * Create Competency Table
170
     * @param string $index
191
     * @param string $index
171
     * @param CompetencyType $competenceType
192
     * @param CompetencyType $competenceType
172
     * @param Competency $competency
193
     * @param Competency $competency
-
 
194
     * @param Behavior[] $behaviors
173
     * @param Behavior[] $behaviors
195
     * @param boolean $last
174
     */
196
     */
Línea 175... Línea 197...
175
    function competencyTable($index, $competenceType, $competency, $behaviors) {
197
    function competencyTable($index, $competenceType, $competency, $behaviors, $last ) {
176
 
198
 
177
 
199
 
Línea 192... Línea 214...
192
 
214
 
Línea 193... Línea 215...
193
        $this->MultiCell(190, 6, utf8_decode(strip_tags($competency->description)), 0, 'L', false);
215
        $this->MultiCell(190, 6, utf8_decode(strip_tags($competency->description)), 0, 'L', false);
Línea 194... Línea -...
194
 
-
 
195
        $this->Ln(3);
-
 
196
 
-
 
197
        $this->SetFillColor(204, 204, 204);
-
 
198
        $this->SetDrawColor(0, 0, 0);
-
 
199
        $this->SetLineWidth(0);
-
 
Línea 200... Línea -...
200
        $this->SetFont('Arial', 'B', 9);
-
 
201
 
-
 
202
        if ($behaviors) {
-
 
203
 
-
 
204
            $this->Cell(155, 6, utf8_decode('Conductas observables :'), 1, 0, 'L', true);
-
 
205
            $this->Cell(7, 6, '1', 1, 0, 'C', true);
-
 
206
            $this->Cell(7, 6, '2', 1, 0, 'C', true);
-
 
207
            $this->Cell(7, 6, '3', 1, 0, 'C', true);
-
 
208
            $this->Cell(7, 6, '4', 1, 0, 'C', true);
-
 
209
            $this->Cell(7, 6, 'N/A', 1, 0, 'C', true);
-
 
210
            $this->Ln();
-
 
211
 
-
 
Línea 212... Línea 216...
212
            // Body Table
216
 
Línea -... Línea 217...
-
 
217
        $this->Ln(3);
-
 
218
 
-
 
219
 
-
 
220
 
-
 
221
        if ($behaviors) {
-
 
222
 
-
 
223
            $first  = true;
-
 
224
            
-
 
225
     
-
 
226
            $max =  count($behaviors);
-
 
227
            for ($i = 0; $i <$max; $i++) {
-
 
228
                
-
 
229
                if($first) {
-
 
230
                    $this->SetFillColor(204, 204, 204);
-
 
231
                    $this->SetDrawColor(0, 0, 0);
-
 
232
                    $this->SetLineWidth(0);
-
 
233
                    $this->SetFont('Arial', 'B', 9);
-
 
234
                    
-
 
235
                    /*
-
 
236
                    $this->Cell(155, 6, utf8_decode('Conductas observables :'), 1, 0, 'L', true);
-
 
237
                    $this->Cell(7, 6, '1', 1, 0, 'C', true);
-
 
238
                    $this->Cell(7, 6, '2', 1, 0, 'C', true);
-
 
239
                    $this->Cell(7, 6, '3', 1, 0, 'C', true);
-
 
240
                    $this->Cell(7, 6, '4', 1, 0, 'C', true);
-
 
241
                    $this->Cell(7, 6, 'N/A', 1, 0, 'C', true);
-
 
242
                    */
-
 
243
                    $this->Cell(180, 6, utf8_decode('Conductas observables :'), 1, 0, 'L', true);
-
 
244
                    $this->Cell(10, 6, 'Nivel', 1, 0, 'C', true);
-
 
245
                    $this->Ln();
-
 
246
                    
-
 
247
                    // Body Table
-
 
248
                    $this->SetFillColor(225, 255, 255);
-
 
249
                    $this->SetTextColor(0);
-
 
250
                    $this->SetFont('Arial', '', 9);
-
 
251
                    $first = false;
213
            $this->SetFillColor(225, 255, 255);
252
                }
214
            $this->SetTextColor(0);
253
                
215
            $this->SetFont('Arial', '', 9);
254
 
216
 
255
                $this->Cell(180, 6, utf8_decode($behaviors[$i]['description']), 1, 0, 'L', false);
217
            for ($i = 0; $i < count($behaviors); $i++) {
256
                $this->Cell(10, 6, $behaviors[$i]['level'], 1, 0, 'C', false);
218
 
257
                /*
219
                $this->Cell(155, 6, utf8_decode($behaviors[$i]['description']), 1, 0, 'L', false);
-
 
-
 
258
                $this->Cell(155, 6, utf8_decode($behaviors[$i]['description']), 1, 0, 'L', false);
220
                $this->Cell(7, 6, $behaviors[$i]['level'] == '1' ? 'X' : '', 1, 0, 'C', false);
259
                $this->Cell(7, 6, $behaviors[$i]['level'] == '1' ? 'X' : '', 1, 0, 'C', false);
-
 
260
                $this->Cell(7, 6, $behaviors[$i]['level'] == '2' ? 'X' : '', 1, 0, 'C', false);
-
 
261
                $this->Cell(7, 6, $behaviors[$i]['level'] == '3' ? 'X' : '', 1, 0, 'C', false);
-
 
262
                $this->Cell(7, 6, $behaviors[$i]['level'] == '4' ? 'X' : '', 1, 0, 'C', false);
-
 
263
                $this->Cell(7, 6, $behaviors[$i]['level'] == '0' ? 'X' : '', 1, 0, 'C', false);
-
 
264
                */
-
 
265
                $this->Ln();
-
 
266
                
221
                $this->Cell(7, 6, $behaviors[$i]['level'] == '2' ? 'X' : '', 1, 0, 'C', false);
267
                
222
                $this->Cell(7, 6, $behaviors[$i]['level'] == '3' ? 'X' : '', 1, 0, 'C', false);
268
                $y = $this->getY();
Línea 223... Línea 269...
223
                $this->Cell(7, 6, $behaviors[$i]['level'] == '4' ? 'X' : '', 1, 0, 'C', false);
269
                if( ($y >= self::MAX_Y_ADD_PAGE) && ($max - 1 > $i)) {
-
 
270
                    $this->addPage();
-
 
271
                    $first  = true;
-
 
272
                }
-
 
273
            }
-
 
274
        }
-
 
275
 
-
 
276
 
-
 
277
        $this->Ln();
-
 
278
        
-
 
279
        if(!$last) {
-
 
280
        
-
 
281
            $y = $this->getY();
224
                $this->Cell(7, 6, $behaviors[$i]['level'] == '0' ? 'X' : '', 1, 0, 'C', false);
282
            if($y >= self::MAX_Y_ADD_PAGE) {
Línea 225... Línea 283...
225
 
283
                $this->addPage();