Skip to content
Snippets Groups Projects
Commit 92f0e85b authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Bokeh version go to title instead of dedicated block

parent b958a1f4
Branches
Tags
6 merge requests!2080Sandbox detach zf from storm,!1922Master,!1921Hotline master,!1920Master,!1910Dev bloc info integration,!1905Dev bloc info integration
......@@ -20,7 +20,13 @@
*/
class Admin_IndexController extends ZendAfi_Controller_Action {
public function indexAction() {
$this->view->titre = $this->_('Accueil');
$this->view->titre = $this->_('Accueil')
. $this->view->tag('span',
$this->_(' version %s',
$this->view->tag('a', BOKEH_RELEASE_NUMBER,
['href' => BOKEH_REMOTE_FILES . 'blob/' . BOKEH_VERSION . '/VERSIONS'])),
['class' => 'version']);
$this->view->user = Class_Users::getIdentity();
// Activation - désactivation du site
......
<?php
echo $this->tag('h2',
$this->_('Version') . ' : ' . $this->tag('a',
BOKEH_RELEASE_NUMBER,
['href' => BOKEH_REMOTE_FILES . 'blob/' . BOKEH_VERSION . '/VERSIONS']));
?>
<h2><?php echo $this->traduire('Paramètres du site');?>&nbsp;:</h2>
<h2><?php echo $this->traduire('Paramètres du site');?>&nbsp;:</h2>
<?php
$profil = Class_Profil::getCurrentProfil();
$lien_edit_site = $lien = $edit_domain_name = '';
......
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH 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).
*
* BOKEH 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 BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'AdminAbstractControllerTestCase.php';
abstract class Admin_IndexControllerTestCase extends Admin_AbstractControllerTestCase {
protected
$_storm_default_to_volatile = true,
$_cms_menu_path = '//div[@class="menuGaucheAdmin"][.//td[text()="Gestionnaire de contenu"]]',
$_bibnum_menu_path = '//div[@class="menuGaucheAdmin"][.//td[text()="Bibliothèque numérique"]]';
}
class Admin_IndexControllerTest extends Admin_IndexControllerTestCase {
public function setUp() {
parent::setUp();
$this->fixture('Class_AdminVar',
['id' => 'NOM_DOMAINE',
'clef' => 'NOM_DOMAINE',
'valeur' => 'http://bokeh-library-portal.org']);
$this->dispatch('/admin/index/index', true);
}
/** @test */
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH 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).
*
* BOKEH 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 BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'AdminAbstractControllerTestCase.php';
abstract class Admin_IndexControllerTestCase extends Admin_AbstractControllerTestCase {
protected
$_storm_default_to_volatile = true,
$_cms_menu_path = '//div[@class="menuGaucheAdmin"][.//td[text()="Gestionnaire de contenu"]]',
$_bibnum_menu_path = '//div[@class="menuGaucheAdmin"][.//td[text()="Bibliothèque numérique"]]';
}
class Admin_IndexControllerTest extends Admin_IndexControllerTestCase {
public function setUp() {
parent::setUp();
$this->fixture('Class_AdminVar',
['id' => 'NOM_DOMAINE',
'clef' => 'NOM_DOMAINE',
'valeur' => 'http://bokeh-library-portal.org']);
$this->dispatch('/admin/index/index', true);
}
/** @test */
public function fileBokeh74ShouldBeLoaded() {
$this->assertXPath('//link[contains(@href, "bokeh74/global.css")]');
}
......@@ -74,6 +74,12 @@
}
/** @test */
public function titleShouldContainsVersion() {
$this->assertXPathContentContains('//div[@class="modules"]//h1//a', BOKEH_RELEASE_NUMBER);
}
/** @test */
public function domaineNameShouldPresent() {
$this->assertXPathContentContains('//div/b', 'http://bokeh-library-portal.org');
......@@ -92,12 +98,6 @@
}
/** @test */
public function linkToDocShouldBePresent() {
$this->assertXPathContentContains('//h2/a[contains(@href, "/blob/' . BOKEH_VERSION . '/VERSIONS")]', BOKEH_RELEASE_NUMBER);
}
/** @test */
public function onloadUtilsJsShouldBeLoaded() {
$this->assertXPath('//script[contains(@src, "onload_utils.js")]');
......@@ -244,12 +244,12 @@ class Admin_IndexControllerWithSkinSelectorTest extends Admin_AbstractController
parent::setUp();
Class_Admin_Skin::setFileSystem(
(new Storm_FileSystem_Volatile())
->mkdir(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh88')
->mkdir(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh2000')
->mkdir(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh88/' . Class_Admin_Skin::ADMIN_COLORS_FOLDER)
->mkdir(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh2000/' . Class_Admin_Skin::ADMIN_COLORS_FOLDER)
->touch(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh2000/' . Class_Admin_Skin::ADMIN_COLORS_FOLDER . '/blue.css')
(new Storm_FileSystem_Volatile())
->mkdir(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh88')
->mkdir(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh2000')
->mkdir(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh88/' . Class_Admin_Skin::ADMIN_COLORS_FOLDER)
->mkdir(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh2000/' . Class_Admin_Skin::ADMIN_COLORS_FOLDER)
->touch(Class_Admin_Skin::DEFAULT_ADMIN_PATH . 'bokeh2000/' . Class_Admin_Skin::ADMIN_COLORS_FOLDER . '/blue.css')
);
Class_Users::getIdentity()->setAdminSkin([Class_User_Settings::ADMIN_SKIN => 'bokeh2000',
......
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