Commit 7d586c8d authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #56034 continue renaming process

parent a4cc504a
Pipeline #1175 passed with stage
in 14 minutes and 14 seconds
......@@ -228,12 +228,12 @@ class Admin_ActivityController extends ZendAfi_Controller_Action {
public function showAction() {
$this->_activityDoAndNotify('show', 'l\'activité "%s" est visible');
$this->_activityDoAndNotify('show', 'L\'activité "%s" est visible');
}
public function hideAction() {
$this->_activityDoAndNotify('hide', 'l\'activité "%s" n\'est plus visible');
$this->_activityDoAndNotify('hide', 'L\'activité "%s" n\'est plus visible');
}
......
......@@ -70,7 +70,7 @@ class Admin_SessionActivityController extends ZendAfi_Controller_Action {
$this->view->page = $this->_request->getParam('page');
$this->view->search = $this->_getParam('search');
$this->view->titre = sprintf(
'Liste des participants à la session du %s de l\' activité "%s"',
'Liste des participants à la session du %s de l\'activité "%s"',
$this->view->humanDate($session->getDateDebut(), 'd MMMM YYYY'),
$session->getActivity()->getLibelle());
}
......@@ -124,7 +124,7 @@ class Admin_SessionActivityController extends ZendAfi_Controller_Action {
return;
}
$this->view->titre = sprintf('Impressions pour la session du %s de l\' activité "%s"',
$this->view->titre = sprintf('Impressions pour la session du %s de l\'activité "%s"',
$this->view->humanDate($session->getDateDebut(), 'd MMMM YYYY'),
$session->getLibelleActivity());
$this->view->session = $session;
......
<?php
$url_edit_participants = $this->url(['controller' => 'session-formation',
$url_edit_participants = $this->url(['controller' => 'session-activity',
'action' => 'inscriptions',
'id' => $this->session->getId()]);
......@@ -9,12 +9,12 @@ echo sprintf("<span style='display:none'>%s</span><span>%s</span>",
$this->humanDate($this->session->getDateDebut(), 'd MMM'));
echo sprintf("<div class='actions'>%s</div>",
$this->tagAnchor(['controller' => 'session-formation',
$this->tagAnchor(['controller' => 'session-activity',
'action' => 'edit',
'id' => $this->session->getId()],
$this->boutonIco("type=edit",
'bulle='.$this->_('Modifier la session'))).
$this->tagAnchor(['controller' => 'session-formation',
$this->tagAnchor(['controller' => 'session-activity',
'action' => ($this->session->isVisible() ? 'hide' : 'show'),
'id' => $this->session->getId()],
$this->boutonIco('picto=' . ($this->session->isVisible() ? 'show' : 'hide'),
......@@ -25,22 +25,22 @@ echo sprintf("<div class='actions'>%s</div>",
$this->tagAnchor($url_edit_participants,
$this->boutonIco("picto=users", "bulle=Stagiaires")).
$this->tagAnchor(['controller' => 'formation',
$this->tagAnchor(['controller' => 'activity',
'action' => 'presences',
'id' => $this->session->getId()],
$this->boutonIco("picto=validate", "bulle=Présences")).
$this->tagAnchor(['controller' => 'session-formation',
$this->tagAnchor(['controller' => 'session-activity',
'action' => 'impressions',
'id' => $this->session->getId()],
$this->boutonIco("picto=print", "bulle=Imprimer")).
$this->tagAnchor(['controller' => 'session-formation',
$this->tagAnchor(['controller' => 'session-activity',
'action' => 'export_inscriptions',
'id' => $this->session->getId()],
$this->boutonIco("picto=card", "bulle=Exporter")).
$this->tagAnchor(['controller' => 'session-formation',
$this->tagAnchor(['controller' => 'session-activity',
'action' => 'delete',
'id' => $this->session->getId()],
$this->boutonIco("type=del",
......
<?php
$url_edit_participants = $this->url(['controller' => 'session-formation',
$url_edit_participants = $this->url(['controller' => 'session-activity',
'action' => 'inscriptions',
'id' => $this->session->getId()]);
......
......@@ -1175,7 +1175,7 @@ class AbonneController extends ZendAfi_Controller_Action {
public function activitiesAction() {
$this->view->titre = $this->_('S\'inscrire à une formation');
$this->view->titre = $this->_('S\'inscrire à une activité');
$this->view->sessions = Class_SessionActivity::findAllAvailable($this->_user);
}
......@@ -1187,7 +1187,7 @@ class AbonneController extends ZendAfi_Controller_Action {
public function activitiesDoneAction() {
$this->view->titre = $this->_('Mes formations suivies');
$this->view->titre = $this->_('Mes activités suivies');
$this->view->sessions = Class_SessionActivity::findAllDone($this->_user);
}
......
......@@ -41,7 +41,7 @@ abstract class Class_Activity_AbstractMail {
protected function _getSessionUrl() {
return Class_Url::absolute(['controller' => 'activity',
return Class_Url::absolute(['controller' => 'activities',
'action' => 'detail-session',
'id' => $this->_training_session->getId()],
null,
......
......@@ -174,8 +174,8 @@ class Class_UserGroup extends Storm_Model_Abstract {
protected static
$_rights_definition =
[
self::RIGHT_SUIVRE_ACTIVITY => 'Activité : suivre une activité',
self::RIGHT_DIRIGER_ACTIVITY => 'Activité : diriger une activité' ,
self::RIGHT_SUIVRE_ACTIVITY => 'Activités : suivre une activité',
self::RIGHT_DIRIGER_ACTIVITY => 'Activités : diriger une activité' ,
self::RIGHT_ACCES_ARTEVOD => 'Bibliothèque numérique: accéder à ARTE VOD',
self::RIGHT_ACCES_NUMILOG => 'Bibliothèque numérique: accéder à Numilog',
self::RIGHT_ACCES_CYBERLIBRIS => 'Bibliothèque numérique: accéder à Cyberlibris',
......
......@@ -27,11 +27,11 @@ class ZendAfi_Controller_Plugin_ResourceDefinition_Activity extends ZendAfi_Cont
'order' => 'id'],
'messages' => ['successful_save' => $this->_('Activité "%s" sauvegardée'),
'successful_add' => $this->_('L\' activité "%s" a été sauvegardée'),
'successful_add' => $this->_('L\'activité "%s" a été sauvegardée'),
'successful_delete' => $this->_('Activité "%s" supprimée')],
'actions' => ['add' => ['title' => $this->_("Ajouter une activité")],
'edit' => ['title' => $this->_("Modifier l\' activité: %s")]],
'actions' => ['add' => ['title' => $this->_('Ajouter une activité')],
'edit' => ['title' => $this->_('Modifier l\'activité: %s')]],
'form_class_name' => 'ZendAfi_Form_Admin_Activity',
'after_add' => function($activity) { $this->_redirect('/admin/session-activity/add/activity_id/' . $activity->getId());} ];
......
......@@ -20,14 +20,16 @@
*/
abstract class ZendAfi_View_Helper_Abonne_Abstract extends ZendAfi_View_Helper_BaseHelper {
public function tagFicheAbonne($html, $icone='', $url='', $attribs = []) {
if ($icone && $url) {
$classes = explode(' ', $icone);
$icon = $classes[0];
if ($icone && $url && $icon) {
$html = $this->view->tagAnchor($url,
$this->view->tagImg(Class_Profil::getCurrentProfil()
->getUrlImage('/abonnes/'.$icone.'.png'),
['alt' => $icone]) . $html,
->getUrlImage('/abonnes/'.$icon.'.png'),
['alt' => $icon]) . $html,
array_merge(['class' => $icone], $attribs));
}
return '<div class="abonneFiche '.$icone.'">'.$html.'<div class="clear"></div></div>';
return '<div class="abonneFiche '. $icone .'">'.$html.'<div class="clear"></div></div>';
}
}
......
......@@ -31,11 +31,11 @@ class ZendAfi_View_Helper_Abonne_Activities extends ZendAfi_View_Helper_Abonne_A
true);
$html = $this->view->tagAnchor($action_url,
$this->view->_("S'inscrire à une activite"));
$this->view->_("S'inscrire à une activité"));
$html .= $this->_renderSubscriptions();
return $this->tagFicheAbonne($html, 'activities', $action_url);
return $this->tagFicheAbonne($html, 'formations activities', $action_url);
}
......@@ -45,7 +45,7 @@ class ZendAfi_View_Helper_Abonne_Activities extends ZendAfi_View_Helper_Abonne_A
$this->_tag('li',
$this->view->tagAnchor(['controller' => 'abonne',
'action' => 'activities-done'],
$this->_('Mes activities suivies')))
$this->_('Mes activités suivies')))
. $this->_tag('li',
$this->view->tagAnchor(['controller' => 'abonne',
'action' => 'activities-registered'],
......
......@@ -149,7 +149,7 @@ class Render_Session_Table extends Render_Session {
$session->getDateDebut() ,
$session->getDateFin()));
$html.= $this->view->tag('td', $session->getLibelleLieu());
$html.= $this->view->tag('td', $this->view->tagAnchor(['controller' => 'activity',
$html.= $this->view->tag('td', $this->view->tagAnchor(['controller' => 'activities',
'action' => 'detail-session',
'id' => $session->getId()],
$this->view->_('Détails de la session')));
......
storm @ 455ad18f
Subproject commit 4904c4eb21ee4676d40859be58e600f141bef3b6
Subproject commit 455ad18f28ac1dd0c3ff4acc9449852b1f20aa7c
......@@ -236,7 +236,7 @@ class Admin_ActivityControllerAddTest extends Admin_ActivityControllerTestCase {
/** @test */
function formShouldContainsInputForLibelle() {
$this->assertXPath('//form[@id="activityform"]//input[@name="libelle"]');
$this->assertXPath('//form//input[@name="libelle"]');
}
......@@ -343,7 +343,7 @@ class Admin_ActivityControllerEditLearningJavaTest extends Admin_ActivityContro
/** @test */
function activitiesPanelShouldBePresent() {
$this->assertXPathContentContains('//div[@class="activity formations form"]//div', 'Learn Java');
$this->assertXPathContentContains('//div[@class="activities formations form"]//div', 'Learn Java');
}
}
......@@ -468,7 +468,7 @@ class Admin_ActivityControllerIndexAtYear2009Test extends Admin_ActivityControll
/** @test */
public function tableShouldBeSortable() {
$this->assertXPath('//table[@class="activity formations tablesorter"]');
$this->assertXPath('//table[@class="activities tablesorter"]');
$this->assertXPathContentContains('//script', 'tablesorter()');
}
}
......@@ -552,7 +552,7 @@ class Admin_ActivityControllerIndexTest extends Admin_ActivityControllerTestCase
/** @test */
function participants_session_fevrier17_ShouldLinkToActionInscriptions() {
$this->assertXPathContentContains('//table//tr[1]//td//a[contains(@href, "session-activity/inscriptions/id/31")]',
'1 / 1-10', $this->response->getBody());
'1 / 1-10');
}
......@@ -1379,7 +1379,7 @@ class Admin_ActivityControllerExportInscriptionsSessionMarsJavaTest extends Adm
/** @test */
public function contentShouldContainsDetailSession() {
$this->assertContains("Activity;Learn Java;\n".
$this->assertContains("Activité;Learn Java;\n".
"Session;27 mars 2012;\n".
"Durée;8h;\n".
"Effectif;5-25;\n",
......
......@@ -674,7 +674,7 @@ class CustomFieldsControllerValuesForActivityLearnSmalltalkTest extends CustomFi
/** @test */
public function titleForActivityShouldBeCustomFieldsForActivityLearnSmalltalk() {
$this->dispatch('/admin/custom-fields/values/model/Activity/id/2', true);
$this->assertXPathContentContains('//h1', 'Champs personnalisés: activity "Learn Smalltalk"');
$this->assertXPathContentContains('//h1', 'Champs personnalisés: activité "Learn Smalltalk"');
}
......
......@@ -285,7 +285,7 @@ class Admin_UserGroupControllerIndexTest extends Admin_UserGroupControllerTestCa
/** @test */
public function firstTRShouldContainsRightSuivreUneActivity() {
$this->assertXPath('//li[contains(@title, "suivre une activity")]');
$this->assertXPath('//li[contains(@title, "suivre une activité")]');
}
......@@ -379,7 +379,7 @@ class Admin_UserGroupControllerAddTest extends Admin_UserGroupControllerTestCase
/** @test */
public function aCheckBoxShouldContainsRightDirigerUneActivity() {
$this->assertRightInputFor(1, 'Activités: diriger une activité');
$this->assertRightInputFor(1, 'Activités : diriger une activité');
}
......
......@@ -402,7 +402,7 @@ class AbonneControllerActivitiesListTest extends AbstractAbonneControllerActivit
/** @test */
function boiteTitleShouldBeActivities() {
$this->assertXPathContentContains('//h1', 'S\'inscrire à une activity');
$this->assertXPathContentContains('//h1', 'S\'inscrire à une activité');
}
......@@ -436,7 +436,7 @@ class AbonneControllerActivitiesFicheAbonneTest extends AbstractAbonneController
/** @test */
public function pageShouldContainsLinkToActivities() {
$this->assertXPathContentContains('//a[contains(@href, "/abonne/activities")]',
'S\'inscrire à une formation');
'S\'inscrire à une activité');
}
......@@ -456,7 +456,7 @@ class AbonneControllerActivitiesFicheAbonneTest extends AbstractAbonneController
/** @test */
public function pageShouldContainsLinkToDone() {
$this->assertXPathContentContains('//a[contains(@href, "/abonne/activities-done")]',
'Mes formations suivies');
'Mes activités suivies');
}
}
......@@ -529,7 +529,7 @@ class AbonneControllerActivitiesDoneActionTest
/** @test */
public function titleShouldBeMesInscriptionsEnCours() {
$this->assertXPathContentContains('//h1', 'Mes activities suivies');
$this->assertXPathContentContains('//h1', 'Mes activités suivies');
}
......@@ -564,7 +564,7 @@ Class AbonneControllerActivitiesFicheAbonneWithoutSufficientRigthsTest extends A
/** @test */
public function whenActivitiesDisabledPageShouldNotContainsLinkToActivities() {
Class_AdminVar::getLoader()
->newInstanceWithId('ACTIVITIES')
->newInstanceWithId('ACTIVITY')
->setValeur('0');
$this->dispatch('/opac/abonne/fiche');
$this->assertNotXPath('//a[contains(@href, "activities")]');
......@@ -573,7 +573,7 @@ Class AbonneControllerActivitiesFicheAbonneWithoutSufficientRigthsTest extends A
/** @test */
public function whenUserNotStagiairePageShouldNotContainsLinkToActivities() {
$this->_amadou->setUserGroups(array());
$this->_amadou->setUserGroups([]);
$this->dispatch('/opac/abonne/fiche');
$this->assertNotXPath('//a[contains(@href, "activities")]');
}
......
......@@ -136,7 +136,7 @@ abstract class ProfilOptionsControllerWithProfilAdulteTestCase extends AbstractC
'picto' => 'vide.gif',
'preferences' => ['nb' => 4]],
['type_menu' => 'ABON_ACTIVITIESo',
['type_menu' => 'ABON_ACTIVITIES',
'libelle' => 'Activities',
'picto' => 'vide.gif',
'preferences' => []],
......@@ -588,8 +588,8 @@ class ProfilOptionsControllerViewProfilAdulteTest extends ProfilOptionsControlle
/** @test */
public function menuHorizontalShouldIncludeLinkToActivities() {
$this->assertXPathContentContains("//div[@id='menu_horizontal']//li//a[contains(@href, '/activities')]",
'Activities',$this->_response->getBody());
$this->assertXPathContentContains("//div[@id='menu_horizontal']//li//a[contains(@href, 'activities')]",
'Activities');
}
......
......@@ -64,9 +64,12 @@ class View_Helper_Abonne_ActivitiesTest extends ViewHelperTestCase {
/** @test */
public function activitiesShouldReturnDivWithClassActivities() {
$this->assertXPath($this->_html,'//div[@class="abonneFiche formations activities"]',$this->_html);
$this->assertXPath($this->_html,'//div[@class="abonneFiche formations activities"]', $this->_html);
}
}
?>
\ No newline at end of file
/** @test */
public function imgShouldBePeActivities() {
$this->assertXpath($this->_html, '//img[contains(@src, "/abonnes/formations.png")]');
}
}
\ No newline at end of file
......@@ -163,7 +163,7 @@ class ZendAfi_View_Helper_Status_HtmlTest extends ZendAfi_View_Helper_Status_Tes
/** @test */
public function variableUnsettedActivitiesShouldBeDisplayed() {
$this->assertXPath($this->_html,
'//dl/dd[preceding-sibling::dt[text()="ACTIVITIES"]][text()="0"]');
'//dl/dd[preceding-sibling::dt[text()="ACTIVITY"]][text()="0"]');
}
......
......@@ -397,7 +397,7 @@ class ZendAfi_View_Helper_Status_JsonTest extends ZendAfi_View_Helper_Status_Tes
public function booleanAndMultiplesVariablesShouldBeAvailable() {
$this->assertEquals(['BIBNUM' => '1',
'LANGUES' => ['fr', 'en'],
'ACTIVITIES' => '0'],
'ACTIVITY' => '0'],
$this->_report['variables']);;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment