diff --git a/application/modules/opac/views/scripts/abonne/tagnotice.phtml b/application/modules/opac/views/scripts/abonne/tagnotice.phtml index d637e20fc629a4af7747e0e22ae4f25913dfcfef..6938f59d4ea3d9507594053ebc14c66b6429cebb 100644 --- a/application/modules/opac/views/scripts/abonne/tagnotice.phtml +++ b/application/modules/opac/views/scripts/abonne/tagnotice.phtml @@ -1,34 +1,34 @@ <center> - <h1><?php echo $this->_('Proposer des tags pour cette notice') ?></h1> - <div class="formTable"> - <?php if($this->message) echo '<p class="erreur">'.$this->message.'</p>'; else echo BR?> - <form name="form" id="form" action="<?php echo $this->view(['module'=>'opac', -'controller'=>'abonne', -'action'=>'tagnotice', -'id_notice'=>$this->id]); ?>" method="post"> - <fieldset> - <legend><?php echo $this->_('Vos propositions') ?></legend> - <table cellspacing="2"> + <h1><?php echo $this->_('Proposer des tags pour cette notice') ?></h1> + <div class="formTable"> + <?php if($this->message) echo '<p class="erreur">'.$this->message.'</p>'; else echo BR?> + <form name="form" id="form" action="<?php echo $this->url(['module'=>'opac', + 'controller'=>'abonne', + 'action'=>'tagnotice', + 'id_notice'=>$this->id]); ?>" method="post"> + <fieldset> + <legend><?php echo $this->_('Vos propositions') ?></legend> + <table cellspacing="2"> - <tr style="height:40px"> - <td class="droite"><?php echo $this->traduire("Votre Tag"); ?></td> - <td class="gauche"><input type="text" size="40" maxlength="50" name="abonneTag1" /> - <input type="hidden" value="<?php echo $this->id; ?>" name="id" /> - </td> - </tr> - <tr style="height:40px"> - <td class="droite"><?php echo $this->traduire("Votre Tag"); ?></td> - <td class="gauche"><input type="text" size="40" maxlength="50" name="abonneTag2" /></td> - </tr> - <tr style="height:40px"> - <td class="droite"><?php echo $this->traduire("Votre Tag"); ?></td> - <td class="gauche"><input type="text" size="40" maxlength="50" name="abonneTag3" /></td> - </tr> + <tr style="height:40px"> + <td class="droite"><?php echo $this->traduire("Votre Tag"); ?></td> + <td class="gauche"><input type="text" size="40" maxlength="50" name="abonneTag1" /> + <input type="hidden" value="<?php echo $this->id; ?>" name="id" /> + </td> + </tr> + <tr style="height:40px"> + <td class="droite"><?php echo $this->traduire("Votre Tag"); ?></td> + <td class="gauche"><input type="text" size="40" maxlength="50" name="abonneTag2" /></td> + </tr> + <tr style="height:40px"> + <td class="droite"><?php echo $this->traduire("Votre Tag"); ?></td> + <td class="gauche"><input type="text" size="40" maxlength="50" name="abonneTag3" /></td> + </tr> - </table> - </fieldset> - <?php echo $this->formSubmit("", $this->_("Valider"),array("class" => "bouton")) ?> - </form> - </div> + </table> + </fieldset> + <?php echo $this->formSubmit("", $this->_("Valider"),array("class" => "bouton")) ?> + </form> + </div> </center> <br /><br /> diff --git a/tests/application/modules/opac/controllers/AbonneControllerTagNoticeTest.php b/tests/application/modules/opac/controllers/AbonneControllerTagNoticeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0231ad7727f5f540d67e24341370bf7c869f6d8d --- /dev/null +++ b/tests/application/modules/opac/controllers/AbonneControllerTagNoticeTest.php @@ -0,0 +1,40 @@ +<?php +/** + * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved. + * + * AFI-OPAC 2.0 is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * AFI-OPAC 2.0 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with AFI-OPAC 2.0; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +require_once 'AbstractControllerTestCase.php'; + +class AbonneControllerTagNoticeTest extends AbstractControllerTestCase { + public function setUp() { + parent::setUp(); + $this->fixture('Class_Notice', + ['id' => 23]); + + + $this->dispatch('/abonne/tagnotice/id_notice/23', true); + } + + /** @test */ + public function controllerAndActionShouldBeAbonneTagnotice() { + $this->assertController('abonne'); + $this->assertAction('tagnotice'); + } +} + +?>