Merge new page corporama
This commit is contained in:
parent
38df487e08
commit
ffd84c49f3
@ -1499,4 +1499,39 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('siren', $siren);
|
||||
}
|
||||
|
||||
/**
|
||||
* Corporama
|
||||
* Intégration en ajax du lien corporama
|
||||
* Solutions de prospection et de veille entreprise
|
||||
*/
|
||||
public function corporamaAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$corporamaUrl = "http://corporama.com/search?siren=".$siren."&company=".urlencode($session->getRaisonSociale())."&partner=sd268";
|
||||
$this->view->assign('corporamaUrl', $corporamaUrl);
|
||||
|
||||
if ( $request->isXmlHttpRequest() || $request->getParam('include') ) {
|
||||
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$page = file_get_contents($corporamaUrl, false);
|
||||
if ($page === false) {
|
||||
echo "Erreur";
|
||||
}
|
||||
$this->view->assign('page', $page);
|
||||
|
||||
}
|
||||
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('corporama', $this->siret);
|
||||
}
|
||||
|
||||
}
|
11
application/views/default/scripts/identite/corporama.phtml
Normal file
11
application/views/default/scripts/identite/corporama.phtml
Normal file
@ -0,0 +1,11 @@
|
||||
<?php if ( isset($this->page) ) {?>
|
||||
|
||||
<?=$this->page?>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<div id="center" style="padding:0;">
|
||||
<iframe src="<?=$this->corporamaUrl?>" width="100%" height="1000px" style="border:0;overflow-x:hidden;"></iframe>
|
||||
</div>
|
||||
|
||||
<?php }?>
|
@ -141,6 +141,11 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EffectifEtab']);
|
||||
<?=$this->action('geo', 'identite', null, array('infos' => $this->infos));?>
|
||||
<?=$this->action('news', 'identite');?>
|
||||
|
||||
<div class="paragraph" style="clear:both;">
|
||||
<a href="#" title="Corporama me donne accès à toute la puissance des réseaux sociaux professionnels pour identifier rapidement un interlocuteur et accéder à ses coordonnées">
|
||||
Actualités de la société <?=$this->raisonSociale?> sur CORPORAMA</a>
|
||||
</div>
|
||||
|
||||
<?php if ( !empty($this->surveillance) ) {?>
|
||||
<div class="paragraph" style="clear:both;">
|
||||
<?=$surveillances?>
|
||||
|
@ -142,10 +142,16 @@ class Scores_Menu
|
||||
'label' => "Modifications Insee",
|
||||
'controller' => 'identite',
|
||||
'action' => 'evenements',
|
||||
'permission' => 'eveninsee',
|
||||
'forceVisible' => true,
|
||||
'permission' => 'EVENINSEE',
|
||||
),
|
||||
array(
|
||||
'label' => "Actualités Corporama",
|
||||
'title' => "Corporama me donne accès à toute la puissance des réseaux sociaux professionnels pour identifier rapidement un interlocuteur et accéder à ses coordonnées",
|
||||
'controller' => 'identite',
|
||||
'action' => 'corporama',
|
||||
'forceVisible' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
@ -618,8 +624,8 @@ class Scores_Menu
|
||||
protected function computePage($pages)
|
||||
{
|
||||
$computePages = array();
|
||||
foreach($pages as $page){
|
||||
$visible = false;
|
||||
foreach( $pages as $page ) {
|
||||
$visible = false;
|
||||
if (array_key_exists('forceVisible', $page)){
|
||||
$visible = $page['forceVisible'];
|
||||
}
|
||||
@ -629,34 +635,45 @@ class Scores_Menu
|
||||
$perm = $this->checkPermission($page['permission']);
|
||||
}
|
||||
|
||||
if (!$perm && $visible){
|
||||
$computePage = array();
|
||||
$computePage = array();
|
||||
|
||||
if ( !$perm && $visible ) {
|
||||
|
||||
$computePage['label'] = $page['label'];
|
||||
$computePage['class'] = 'inactif';
|
||||
$computePage['uri'] = '#';
|
||||
$computePages[] = $computePage;
|
||||
} elseif ($perm){
|
||||
if ($this->checkParams($page['controller'], $page['action'])){
|
||||
$computePage = array();
|
||||
$computePage = $page;
|
||||
$computePage['params'] = $this->setParams($page['controller'], $page['action']);
|
||||
|
||||
} elseif ( $perm ) {
|
||||
|
||||
if ( $this->checkParams($page['controller'], $page['action']) ) {
|
||||
|
||||
$computePage = $page;
|
||||
$computePage['params'] = $this->setParams($page['controller'], $page['action']);
|
||||
if (array_key_exists('pref', $page)){
|
||||
if ($this->hasPref('demanderef') && in_array('demanderef', $page['pref']) ){ // @todo: Erreur data
|
||||
$computePage['class'] = 'demanderef';
|
||||
}
|
||||
}
|
||||
|
||||
$computePages[] = $computePage;
|
||||
} elseif ($visible) {
|
||||
$computePage = array();
|
||||
} elseif ( $visible ) {
|
||||
|
||||
$computePage['label'] = $page['label'];
|
||||
$computePage['class'] = 'inactif';
|
||||
$computePage['uri'] = '#';
|
||||
$computePages[] = $computePage;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( array_key_exists('title', $page) ) {
|
||||
$computePage['title'] = $page['title'];
|
||||
}
|
||||
|
||||
if ( count($computePage)>0 ) {
|
||||
$computePages[] = $computePage;
|
||||
}
|
||||
}
|
||||
|
||||
return $computePages;
|
||||
}
|
||||
|
||||
@ -796,6 +813,7 @@ class Scores_Menu
|
||||
case 'groupe':
|
||||
case 'etablissements':
|
||||
case 'evenements':
|
||||
case 'corporama':
|
||||
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user