Skip to content

Commit

Permalink
Merge pull request #243 from decyt-tdf/revert-239-AgregaConstanciaIns…
Browse files Browse the repository at this point in the history
…cripcionPDF

Revert "AgregaConstanciaInscripcionPDF"
  • Loading branch information
santiagogil authored Nov 16, 2017
2 parents 9b9352e + 63ddab0 commit b0bf043
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 334 deletions.
6 changes: 4 additions & 2 deletions Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,18 @@
'AssetDispatcher',
'CacheDispatcher'
));
//CakePlugin::loadAll();
CakePlugin::loadAll(array('CakePdf' => array('bootstrap' => true, 'routes' => true)));
CakePlugin::loadAll();
//CakePlugin::loadAll(array('CakePdf' => array('bootstrap' => true, 'routes' => true)));
/**
* Configuration CakePdf
*
*/
/*
define('DOMPDF_ENABLE_REMOTE', true);
CakePlugin::load('CakePdf', array('bootstrap' => true, 'routes' => true));
Configure::write('CakePdf', array(
'engine' => 'CakePdf.DomPdf',
'pageSize' => 'A4',
'orientation' => 'portrait'
));
*/
4 changes: 0 additions & 4 deletions Controller/InscripcionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ public function view($id = null) {
$this->redirect(array('action' => 'index'));
}
$this->set('inscripcion', $this->Inscripcion->read(null, $id));
$this->pdfConfig = array(
'download' => true,
'filename' => 'inscripcion_' . $id .'.pdf'
);
$personaId = $this->Inscripcion->Alumno->find('list', array('fields'=>array('persona_id')));
$this->loadModel('Persona');
$personaNombre = $this->Persona->find('list', array('fields'=>array('nombre_completo_persona')));
Expand Down
63 changes: 0 additions & 63 deletions View/Inscripcions/pdf/view.ctp

This file was deleted.

1 change: 0 additions & 1 deletion View/Inscripcions/view.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
<div class="col-md-4">
<div class="unit">
<div class="subtitulo">Opciones</div>
<div class="opcion"><?php echo $this->Html->link(__('Constancia de Inscripción'), array('action' => 'view', $inscripcion['Inscripcion']['id'], 'ext' => 'pdf')); ?></div>
<div class="opcion"><?php echo $this->Html->link(__('Listar Inscripciones'), array('action' => 'index')); ?></div>
<div class="opcion"><?php echo $this->Html->link(__('Editar'), array('action' => 'edit', $inscripcion['Inscripcion']['id'])); ?> </div>
<?php if($current_user['role'] == 'superadmin'): ?>
Expand Down
2 changes: 2 additions & 0 deletions View/Layouts/pdf.ctp
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<?php /*
header("Content-type: application/pdf");
echo $content_for_layout;
*/ ?>
2 changes: 2 additions & 0 deletions View/Layouts/pdf/default.ctp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?php /*
<!DOCTYPE html>
<html>
<head>
Expand All @@ -17,3 +18,4 @@
</div>
</body>
</html>
*/ ?>
11 changes: 2 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,12 @@
"require": {
"cakephp/cakephp": "^2.9.5",
"cakedc/migrations":"^2.5",
"roave/security-advisories": "dev-master",
"dompdf/dompdf": "dev-master"
"roave/security-advisories": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"cakephp/debug_kit": "2.2.*",
"cakephp/cakephp-codesniffer": "2.*.*",
"friendsofcake/cakepdf": "~1.0"
},
"extra": {
"installer-paths": {
"Plugin/CakePdf": ["friendsofcake/cakepdf"]
}
"cakephp/cakephp-codesniffer": "2.*.*"
},
"bin": [
"lib/Cake/Console/cake"
Expand Down
Loading

0 comments on commit b0bf043

Please sign in to comment.