Skip to content
Snippets Groups Projects
Commit 28b274c6 authored by Meusburger's avatar Meusburger
Browse files

Merge branch...

Merge branch 'dev#32501_afficher_le_login_de_la_personne_connectee_dans_l_interface_d_admin' into 'master'

Dev#32501 afficher le login de la personne connectee dans l interface d admin

See merge request !1243
parents e1538b5a b57300a9
Branches
Tags
1 merge request!1267Master
- ticket #32501 : Afficher le login de la personne connectée dans l'interface d'admin
\ No newline at end of file
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//////////////////////////////////////////////////////////////////////////////////////////
// OPAC3 - Menu admin horizontal
......@@ -29,6 +29,9 @@ class ZendAfi_View_Helper_Admin_MenuHorizontalAdmin extends ZendAfi_View_Helper_
array("icon" => "profils_16.png",
"label" => $this->translate()->_("Retour au site"),
"url" => $this->view->url(['id_profil' => Class_Profil::getCurrentProfil()->getId()], null, true)),
array("icon" => "demande_inscri_16.png",
"label" => Class_Users::getIdentity()->LOGIN,
"url" => $this->view->url(['module' => 'admin', 'controller' => 'users', 'action' => 'edit', 'id' => Class_Users::getIdentity()->ID_USER], null, true)),
array("icon" => "deconnexion.png",
"label" => $this->translate()->_("Se déconnecter"),
"url" => $this->view->url(['module' => 'admin', 'controller' => 'auth', 'action' => 'logout'], null, true)));
......@@ -55,7 +58,7 @@ class ZendAfi_View_Helper_Admin_MenuHorizontalAdmin extends ZendAfi_View_Helper_
}
$content .=
$content .=
"<li $class_selected>".
"<img src='$icon_url' alt='$label' />".
"<a href='$target_url'>$label</a>".$count_info.
......@@ -66,4 +69,3 @@ class ZendAfi_View_Helper_Admin_MenuHorizontalAdmin extends ZendAfi_View_Helper_
return $content;
}
}
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'AdminAbstractControllerTestCase.php';
require_once 'Class/Newsletter.php';
......@@ -44,13 +44,18 @@ class AdminControllerSitoOKTest extends Admin_AbstractControllerTestCase {
public function testMenuUtilisateurInfo() {
$this->assertQueryContentContains("div.ligne_info", 'sysadmin');
}
public function testMenuNewsletterLink() {
$this->assertXPathContentContains("//a[@href='" . BASE_URL . "/admin/newsletter']",
$this->assertXPathContentContains("//a[@href='" . BASE_URL . "/admin/newsletter']",
"Lettres d'information");
}
/** @test */
public function loginShouldBeInHorizontalMenu() {
$this->assertXPathContentContains("//a[@href='/admin/users/edit/id/777']", "sysadmin");
}
/** @test */
function prettyPhotoCssShouldBeInHead() {
$this->assertXPath("//head/link[contains(@href, 'css/prettyPhoto.css')]");
......
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