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

Merge branch 'dev#133049_mettre_un_lien_vers_l_enquete_bokeh' into 'hotline'

dev #133049 add link to 2021 customers satisfaction form. Add bokeh dbname to super admin index

See merge request !3970
parents 5084a1ec 92fb3285
Branches
Tags
2 merge requests!3975Hotline,!3970dev #133049 add link to 2021 customers satisfaction form. Add bokeh dbname to super admin index
Pipeline #13078 failed with stage
in 1 hour
- ticket #133049 : Administration : Ajout du lien vers l'enquête de satisfaction Bokeh & NanooK 2021.
Ajout de du nom de la base donnée du site Bokeh dans le bloc paramètre du site lorsqu'on est connecté en super admin.
\ No newline at end of file
......@@ -4,6 +4,18 @@
if ($this->is_request_secure)
echo $this->myBibAppTeaser();
?>
<?php
echo $this->tag('h2',
$this->_('Enquête de satisfaction'));
$form_link = Class_IntBib::isSingleNanook()
? $this->tagAnchor('https://docs.google.com/forms/d/e/1FAIpQLSdKGlvMUMxTwCYH6TvbYZwGaQmLZcoGXXSk8T9u3IcMkdMqsg/viewform',
$this->_('AFI : Enquête de satisfaction 2021 SIGB AFI-Nanook et portail Bokeh'))
: $this->tagAnchor('https://docs.google.com/forms/d/e/1FAIpQLSdKPUl7RUHXId-JyUmFCY5jRTkarXA-PVtjBG9LKFFKkQnksQ/viewform',
$this->_('AFI : Enquête de satisfaction 2021 portail Bokeh'));
echo $this->tag('div', $form_link);
?>
<h2 class="toggle_video">
<?php
......@@ -11,9 +23,9 @@ if ($this->is_request_secure)
echo $this->_('Démonstrations vidéos');
?>
</h2>
<div><iframe width="750" height="450" src="https://www.youtube-nocookie.com/embed/videoseries?list=PLL40cYmJt-b9YSCI0rvnxl8xjptuvgiZC" allowfullscreen></iframe></div>
<div><iframe width="750" height="450" src="https://www.youtube-nocookie.com/embed/videoseries?list=PLL40cYmJt-b9YSCI0rvnxl8xjptuvgiZC" allowfullscreen></iframe></div>
<h2><?php echo $this->_('Paramètres du site');?>&nbsp;:</h2>
<h2><?php echo $this->_('Paramètres du site');?>&nbsp;:</h2>
<?php
$lien = $edit_domain_name = '';
if ($this->user->isAdmin()) {
......@@ -31,6 +43,9 @@ if ($this->user->isAdmin()) {
echo $this->ligneInfos($this->_('Etat du site'), $this->etat_site . $lien)
. $this->ligneInfos($this->_('Nom du domaine'), Class_AdminVar::getNomDomaine() . $edit_domain_name);
if (Class_Users::isCurrentUserSuperAdmin())
echo $this->ligneInfos($this->_('Base de donnée'), array_at('dbname', Zend_Db_Table::getDefaultAdapter()->getConfig()));
?>
<h2><?php echo $this->_('Données en attente de modération');?>&nbsp;:
......@@ -39,9 +54,9 @@ echo $this->ligneInfos($this->_('Etat du site'), $this->etat_site . $lien)
'controller' => 'rss',
'action' => 'moderations'));
?>"><img src="<?php echo URL_ADMIN_IMG;?>/rss.gif" alt="RSS"/></a>
</h2>
</h2>
<?php
$moderer = new Class_Moderer();
$moderer = new Class_Moderer();
$modstats = $moderer->getModerationStats();
foreach ($modstats as $stat) {
$nombre = ($stat['count']) ? $stat['count'] : 'aucun';
......
......@@ -332,7 +332,7 @@ class AdminIndexControllerAdminVarEditCKEditorActionTest extends Admin_AbstractC
public function editPageShouldContainsTitlePNBLoanMessage() {
$this->fixture('Class_AdminVar',
['id' => 'DILICOM_PNB_LOAN_WARNING_MESSAGE',
'valeur' => '']);
'valeur' => '']);
$this->dispatch('/admin/index/adminvaredit/cle/DILICOM_PNB_LOAN_WARNING_MESSAGE');
$this->assertQueryContentContains('h1',
......@@ -344,7 +344,7 @@ class AdminIndexControllerAdminVarEditCKEditorActionTest extends Admin_AbstractC
public function postEnrichTextShouldNotRemoveTags() {
$this->fixture('Class_AdminVar',
['id' => 'DILICOM_PNB_LOAN_WARNING_MESSAGE',
'valeur' => '']);
'valeur' => '']);
$this
->getRequest()
->setMethod('POST')
......@@ -935,3 +935,50 @@ class AdminIndexControllerAdminVarEditHTTPSTest
}
class AdminIndexControllerWithFormLinkTest extends Admin_AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
$super_admin = $this->fixture('Class_Users',
['id' => 34,
'role_level' => ZendAfi_Acl_AdminControllerRoles::SUPER_ADMIN,
'login' => 'bokeh',
'password' => 'vvvvvv']);
ZendAfi_Auth::getInstance()->logUser($super_admin);
}
/** @test */
public function shouldRenderOnlyBokehFormLink() {
$this->dispatch('admin/index');
$this->assertXPathContentContains('//div/a[@href="https://docs.google.com/forms/d/e/1FAIpQLSdKPUl7RUHXId-JyUmFCY5jRTkarXA-PVtjBG9LKFFKkQnksQ/viewform"]', 'AFI : Enquête de satisfaction 2021 portail Bokeh');
}
/** @test */
public function shouldRenderNanookBokehFormLink() {
$this->fixture('Class_IntBib',
['id' => 78,
'sigb' => Class_IntBib::SIGB_NANOOK,
'comm_sigb' => Class_IntBib::COM_NANOOK,
'comm_params' => 'a:1:{s:11:"url_serveur";s:53:"http://nanookws.afi-sa.net/afi_NanookWs/ilsdi/meylan/";}']);
$this->dispatch('admin/index');
$this->assertXPathContentContains('//div/a[@href="https://docs.google.com/forms/d/e/1FAIpQLSdKGlvMUMxTwCYH6TvbYZwGaQmLZcoGXXSk8T9u3IcMkdMqsg/viewform"]', 'AFI : Enquête de satisfaction 2021 SIGB AFI-Nanook et portail Bokeh');
}
/** @test */
public function withSuperAdminLoggedDbNameShouldBePresent() {
$this->dispatch('admin/index');
$this->assertXPathContentContains('//div[@class = "ligne_info "]', 'Base de donnée');
}
}
\ No newline at end of file
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