Commit 418fd57d authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

utilisation de la structure pour le footer et header (revoir passage de variable)

parent e4c32668
Loading
Loading
Loading
Loading
+0 −0

Empty file added.

+7 −3
Changes for module/Application/src/Application/Controller/TheseController.php: 7 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -1342,14 +1342,18 @@ class TheseController extends AbstractController
        $libEtablissementLe = $letab;
        $libEtablissementDe = "de " . $letab;

        //todo remplacer par celui de la comue si elle existe ...
        $cheminLogo = $this->fileService->computeLogoFilePathForStructure($these->getEtablissement()->getStructure());
        $etablissement = $this->etablissementService->fetchEtablissementComue();
        if ($etablissement === null) $etablissement = $these->getEtablissement();
        $cheminLogo = $this->fileService->computeLogoFilePathForStructure($etablissement);

        /* @var $renderer PhpRenderer */
        $renderer = $this->getServiceLocator()->get('view_renderer');
        $exporter = new ConventionPdfExporter($renderer, 'A4');
        $exporter->setLogo(file_get_contents($cheminLogo));
//        $exporter->setLogo(file_get_contents($cheminLogo));
        $exporter->setVars([
            'test'               => "Ceci est un test",
            'etablissement'      => $etablissement,
            'logo'               => $cheminLogo,
            'these'              => $these,
            'diffusion'          => $diffusion,
            'attestation'        => $attestation,
+1 −1
Changes for module/Application/src/Application/Service/These/Convention/ConventionPdfExporter.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ class ConventionPdfExporter extends PdfExporter
        $resolver = $renderer->resolver();
        $resolver->attach(new TemplatePathStack(['script_paths' => [__DIR__]]));

        //$this->setLogo(file_get_contents(APPLICATION_DIR . '/public/logo_normandie_univ.jpg')); // 'var:logo' dans les phtml
        $this->setLogo(file_get_contents(APPLICATION_DIR . '/public/logo_normandie_univ.jpg')); // 'var:logo' dans les phtml
        $this->setHeaderScript('partial/header-odd.phtml', 'O');  // pages paires
        $this->setHeaderScript('partial/header-even.phtml', 'E'); // pages impaires
        $this->setFooterScript('partial/footer.phtml');
+6 −1
Changes for module/Application/src/Application/Service/These/Convention/convention.phtml: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
<?php

use Application\Entity\Db\Diffusion;
use Application\Entity\Db\Etablissement;
use Application\Entity\Db\These;
use Application\Service\Message\DiffusionMessages;
use Application\View\Renderer\PhpRenderer;
@@ -12,6 +13,9 @@ use Application\View\Renderer\PhpRenderer;
 * @var string      $libEtablissement
 * @var string      $libEtablissementA
 * @var string      $libEtablissementLe
 *
 * @var Etablissement $etablissement
 * @var string $logo
 */
?>

@@ -31,7 +35,8 @@ use Application\View\Renderer\PhpRenderer;
<div style="text-align: center; margin-bottom: 30px;">
    <h1>CONVENTION DE MISE EN LIGNE<br>D'UNE THÈSE SOUTENUE</h1>

    <img src="var:logo" height="100px" alt="Logo de Normandie Université" />
    <img src="<?php echo $logo; ?>" height="100px" alt="Logo de Normandie Université" />
<!--    <img src="var:logo" height="100px" alt="Logo de Normandie Université" />-->
</div>

<p>
+3 −3
Changes for module/Application/src/Application/Service/These/Convention/partial/footer.phtml: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@
        <td width="10%" align="center"><!--<em><strong><?php /*echo $this->footerTitle; */?></strong></em>--></td>
        <td width="33%" style="text-align: right;">
            <address>
                ESPLANADE DE LA PAIX / CS 14032 / 14032 CAEN CEDEX 5<br>
                <strong>tél.</strong> +33 (0)2 31 56 69 57 &nbsp; <strong>fax</strong> +33 (0)2 31 56 69 51<br>
                presidence@normandie-univ.fr &nbsp; www.normandie-univ.fr
                <?php echo ($this->etablissement)?$this->etablissement->getStructure()->getAdresse():""; ?><br>
                <strong>tél.</strong> <?php echo ($this->etablissement)?$this->etablissement->getStructure()->getTelephone():""; ?> &nbsp; <strong>fax</strong> <?php echo ($this->etablissement)?$this->etablissement->getStructure()->getFax():""; ?><br>
                <?php echo ($this->etablissement)?$this->etablissement->getStructure()->getEmail():""; ?> &nbsp; <?php echo ($this->etablissement)?$this->etablissement->getStructure()->getSiteWeb():""; ?>
            </address>
        </td>
    </tr>
Loading