Commit 0f619e5d authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'master' of git.unicaen.fr:dsi/sygal

parents 415c6436 f8b47581
Loading
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/config/others/these.config.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ return [
                    'fusion' => [
                        'type'          => 'Segment',
                        'options'       => [
                            'route'       => '/fusion/:these[/:corrigee[/:version]]',
                            'route'       => '/fusion/:these[/:corrigee[/:version[/:removal]]]',
                            'constraints' => [
                                'these' => '\d+',
                            ],
+12 −11
Changes for module/Application/src/Application/Controller/TheseController.php: 12 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -1423,6 +1423,7 @@ class TheseController extends AbstractController
        $these          = $this->requestedThese();
        $corrigee       = $this->params()->fromRoute("corrigee");
        $versionName    = $this->params()->fromRoute("version");
        $removal        = $this->params()->fromRoute("removal");

        $version = null;
        if ($versionName !== null) {
@@ -1479,20 +1480,20 @@ class TheseController extends AbstractController
        $merged->SetKeywords( $these->getMetadonnee()->getMotsClesLibresFrancais());

        $merged->SetImportUse();    //allows the usage of pages stored as template
        $filenames = [$couvertureChemin, $manuscritChemin];

        $first = true;
        foreach ($filenames as $filename) {
            if (file_exists($filename)) {
                $pageCount = $merged->SetSourceFile($filename);
                for ($i = 1; $i <= $pageCount; $i++) {
                    if (!$first) $merged->WriteHTML('<pagebreak />');
                    $first = false;

        $merged->setSourceFile($couvertureChemin);
        $tplId = $merged->ImportPage(1);
        $merged->UseTemplate ($tplId);

        $pageCount = $merged->SetSourceFile($manuscritChemin);
        $start_at = 1;
        if ($removal) $start_at = 2;
        for ($i = $start_at; $i <= $pageCount; $i++) {
            $merged->WriteHTML('<pagebreak />');
            $tplId = $merged->ImportPage($i);
            $merged->UseTemplate ($tplId);
        }
            }
        }


        //unlink pour effacer la couv temp
        //unlink($filename);
+23 −3
Changes for module/Application/view/application/these/rdv-bu.phtml: 23 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -45,20 +45,27 @@ $rdvBu = $these->getRdvBu();
            Une fois la fusion réalisée, assurez vous que toutes les informations sur la page de couverture sont présentes et que la fusion n'a pas endommagé le mémoire.
        </p>


        <div class="btn-group">
            <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                Version à récupérer <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                <li><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VO'], [], true); ?>">Version originale</a></li>
                <li class="complete"><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VO'], [], true); ?>">Version originale</a></li>
                <li class="removal"><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VO', 'removal' => true], [], true); ?>">Version originale</a></li>
                <?php if ($hasVD): ?>
                    <li><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VD'], [], true); ?>">Version diffusion</a></li>
                    <li class="complete"><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VD'], [], true); ?>">Version diffusion</a></li>
                    <li class="removal"><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VD', 'removal' => true], [], true); ?>">Version diffusion</a></li>
                <?php endif; ?>
                <?php if ($hasVA): ?>
                    <li><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VA'], [], true); ?>">Version archivable</a></li>
                    <li class="complete"><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VA' ], [], true); ?>">Version archivable</a></li>
                    <li class="removal"><a href="<?php echo $this->url('these/fusion', ['these' => $these->getId(), 'corrigee' => 0, 'version' => 'VA', 'removal' => true ], [], true); ?>">Version archivable</a></li>
                <?php endif; ?>
            </ul>
        </div>
        <div>
            <input type="checkbox" id="removal" /> Retrait de la page de couverture fournie par le doctorant.
        </div>
    </div>
</div>

@@ -138,6 +145,8 @@ $rdvBu = $these->getRdvBu();


<script>
    $(".removal").hide();

    $(function () {
        var refreshingNextStep = function(done, effect) {
            return function() {
@@ -154,6 +163,17 @@ $rdvBu = $these->getRdvBu();
            refreshingNextStep
        ], self);

        $("input#removal").on("change", function(event, data) {
            var test = $(this).is(':checked');
            if (test) {
                $(".removal").show();
                $(".complete").hide();
            } else {
                $(".removal").hide();
                $(".complete").show();

            }
        });

        $("body").one("event-rdv-bu-modified", function (event, data) {
            // Les données viennent d'être modifiées.