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

Merge branch 'dev#142667_supprimer_la_pub_mybibapp' into 'master'

dev@142667_supprimer_la_pub_mybibapp : delete mybibapp teaser

See merge request !4247
parents 31cd6baf e2b9c113
Branches
Tags
2 merge requests!4250Master,!4247dev@142667_supprimer_la_pub_mybibapp : delete mybibapp teaser
Pipeline #15002 passed with stage
in 25 minutes and 56 seconds
- ticket #142667 : administration : suppression de la pub mybibapp
\ No newline at end of file
<?php echo $this->renderBokehVersion();?>
<?php echo $this->renderBokehVersion();
<?php
if ($this->is_request_secure)
echo $this->myBibAppTeaser();
?>
<?php
echo $this->tag('h2',
$this->_('Enquête de satisfaction'));
$form_link = Class_IntBib::isSingleNanook()
......
<?php
/**
* Copyright (c) 2012-2014, 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
*/
class ZendAfi_View_Helper_Admin_MyBibAppTeaser extends ZendAfi_View_Helper_BaseHelper {
public function myBibAppTeaser() {
Class_ScriptLoader::getInstance()->addInlineStyle($this->_css());
return $this->_tag('div',
$this->_renderContent(),
['id' => 'mybibapp_teaser']);
}
protected function _css() {
return '
#mybibapp_teaser {
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(auto-fill, 150px);
}
#mybibapp_teaser > a {
align-self: end;
}
#mybibapp_teaser > a:first-child() {
grid-column: 1/3;
grid-row: 1;
}
#mybibapp_teaser > a:nth-child(2) {
grid-column: 1;
grid-row: 2;
}
#mybibapp_teaser > a:nth-child(3) {
grid-column: 2;
grid-row: 2;
}
#mybibapp_teaser > div {
grid-column: 3/-1;
grid-row: 1/3;
}
#mybibapp_teaser ul {
margin-left:20px;
}
#mybibapp_teaser li {
list-style: circle;
}
#mybibapp_teaser div p img {
vertical-align: bottom;
margin-right: 5px
}';
}
protected function _iconLink($url, $title, $icon, $width) {
return
$this->_tag('a',
$this->_tag('img',
null,
['src' => URL_SHARED_IMG . '/mybibapp/' . $icon,
'width' => $width]),
['title' => $title,
'href' => $url,
'target' => '_blank']);
}
protected function _renderContent() {
return
$this->_iconLink('https://www.mybibapp.fr',
$this->_('Accéder à la présentation de MyBibApp'),
'banner_alpha_1024.png',
300)
.
$this->_iconLink('https://play.google.com/store/apps/details?id=fr.afi_sa.MyBibApp',
$this->_('Télécharger MyBibApp pour Google Android'),
'mybibapp_android.png',
150)
.
$this->_iconLink('https://apps.apple.com/fr/app/mybibapp/id1463572666',
$this->_('Télécharger MyBibApp pour Apple iOS'),
'mybibapp_apple.png',
150)
.
$this->_tag('div',
$this->_renderDescription());
}
protected function _renderMyBibAppLink() {
return $this->_tag('a',
'MyBibApp',
['target' => '_blank',
'href' => 'https://www.mybibapp.fr']);
}
protected function _renderDescription() {
return
$this->_('%s, application mobile libre et gratuite, permet à vos abonnés d\'accéder aux services de votre réseau :',
$this->_renderMyBibAppLink())
.
$this->_tag('ul',
implode(
array_map(function($content) { return $this->_tag('li', $content); },
[
$this->_('récupération de la liste de ses prêts et réservations'),
$this->_('gestion de plusieurs cartes et comptes (famille, école, ...) au sein d\'une même application'),
$this->_('accéder au site de la médiathèque automatiquement authentifié'),
$this->_('consulter notice et enrichissements (bande-annonce, pré-écoute, ...) d\'un document en scannant son identifiant'),
$this->_('... et plus encore !')
])))
.
$this->_tag('p',
$this->_tag('img', null, ['src' => URL_SHARED_IMG . '/buttons/bouton_vert.png'])
. $this->_('Votre portail est compatible !'))
.
$this->_tag('p',
$this->_('Pour référencer votre portail dans %s, ou pour toute information complémentaire, contactez-nous par courriel : '
.
$this->_tag('a',
'cial-bib@afi-sa.fr',
['href' => 'mailto:cial-bib@afi-sa.fr?subject=[MyBibApp] ' . $this->_('Demande d\'informations')]),
$this->_renderMyBibAppLink()));
}
}
\ No newline at end of file
......@@ -43,11 +43,12 @@ abstract class Admin_IndexControllerTestCase extends Admin_AbstractControllerTes
class Admin_IndexControllerWithHTTPSTest extends Admin_IndexControllerTestCase {
/** @test */
public function pageShouldDisplayMyBibAppTeaser() {
public function pageShouldntDisplayMyBibAppTeaserAnymore() {
$_SERVER['HTTPS'] = 'on';
$this->dispatch('/admin/index/index', true);
$this->assertXPath('//div[@id="mybibapp_teaser"]');
$this->assertNotXPath('//div[@id="mybibapp_teaser"]');
}
......@@ -146,12 +147,6 @@ class Admin_IndexControllerTest extends Admin_IndexControllerTestCase {
}
/** @test */
public function withoutHTTPSShouldNotDisplayMyBibAppTeaser() {
$this->assertNotXPath('//div[@id="mybibapp_teaser"]');
}
/** @test */
public function fileBokeh74ShouldBeLoaded() {
$this->assertXPath('//link[contains(@href, "bokeh74/global.css")]');
......@@ -909,4 +904,4 @@ class Admin_IndexControllerDispatchWithNoFixturesMyOpacTest extends Admin_Abstra
public function threeLinksShouldBePresent() {
$this->assertXPathCount(3, '//div[@class="modules"]//div[@class="test_my_opac"]/ul/li/a');
}
}
\ 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