Commit ef5e5dd0 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Retraitement auto ou manuel : affichage du message issu de l'assertion lorsque...

Retraitement auto ou manuel : affichage du message issu de l'assertion lorsque l'opération n'est pas autorisée.
parent ba8a1da7
Loading
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/src/Application/View/Renderer/PhpRenderer.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ use UnicaenApp\View\Helper\AppInfos;
 * @method \UnicaenApp\Form\View\Helper\FormLdapPeople               formLdapPeople(\Zend\Form\ElementInterface $element = null)
 * @method \UnicaenApp\Form\View\Helper\FormErrors|string            formErrors(\Zend\Form\Form $form = null, $message = null)
 * @method \UnicaenApp\Form\View\Helper\Form                         form(\Zend\Form\FormInterface $form = null)
 * @method \UnicaenApp\View\Helper\MessageCollectorHelper            messagecollector()
 * @method \UnicaenApp\View\Helper\MessageCollectorHelper            messagecollector($namespace = null)
 * @method \UnicaenApp\View\Helper\HeadScript                        headScript($mode = 'FILE', $spec = null, $placement = 'APPEND', array $attrs = [], $type = 'text/javascript')
 * @method \UnicaenApp\View\Helper\InlineScript                      inlineScript($mode = 'FILE', $spec = null, $placement = 'APPEND', array $attrs = [], $type = 'text/javascript')
 * @method \UnicaenApp\View\Helper\HeadLink                          headLink(array $attributes = null, $placement = 'APPEND')
+17 −1
Changes for module/Application/view/application/these/archivage/these-retraitee.phtml: 17 added lines, 1 removed line.
Original line number Diff line number Diff line
<?php

use Application\Assertion\BaseAssertion;
use Application\Entity\Db\Fichier;
use Application\Entity\Db\NatureFichier;
use Application\Entity\Db\These;
@@ -21,7 +22,8 @@ use Application\View\Renderer\PhpRenderer;
 * @var VersionFichier $versionFichier
 */

$canEdit = $this->isAllowed($these, ThesePrivileges::privilegeDeposerFor($nature, $versionFichier));
$privilege = ThesePrivileges::privilegeDeposerFor($nature, $versionFichier);
$canEdit = $this->isAllowed($these, $privilege);

$uploader = $this->uploader()->setUrl($uploadUrl);

@@ -84,9 +86,11 @@ if ($validite === null || $validiteEstInconnue || $estValide) {
                            L'application peut générer une version retraitée de votre thèse à l'aide d'un
                            retraitement automatique permettant dans la plupart des cas de la rendre archivable.
                        </p>
                        <?php if ($canEdit): ?>
                        <p>
                            Cliquez sur le bouton ci-dessous pour générer une version retraitée de votre thèse...
                        </p>
                        <?php endif ?>
                    <?php else: ?>
                        <p>
                            Vous avez opté pour le retraitement automatique.
@@ -109,6 +113,12 @@ if ($validite === null || $validiteEstInconnue || $estValide) {
                            <div class="text-sm text-info" style="margin-top: 8px; margin-bottom: 12px; max-width: 250px">
                                <strong>NB: </strong> <?php echo Fichier::MESSAGE_RETRAITEMENT_DUREE ?>
                            </div>
                        <?php else: ?>
                            <?php
                            $msgCollector = $this->messageCollector(BaseAssertion::class);
                            $msgCollector->getMessengerHelper()->setContainerClassesToAdd('alert-sm');
                            echo $msgCollector->render();
                            ?>
                        <?php endif ?>
                    <?php endif ?>

@@ -180,6 +190,12 @@ if ($validite === null || $validiteEstInconnue || $estValide) {
                                        <strong>NB: </strong> <?php echo Fichier::MESSAGE_DEPOT_DUREE ?>
                                    </div>
                                </div>
                            <?php else: ?>
                                <?php
                                $msgCollector = $this->messageCollector(BaseAssertion::class);
                                $msgCollector->getMessengerHelper()->setContainerClassesToAdd('alert-sm');
                                echo $msgCollector->render();
                                ?>
                            <?php endif ?>
                        <?php endif ?>