2012-10-18 21:18:42 +00:00
<?php if ( empty ( $this -> AutrePage )) { ?>
2011-04-18 15:25:26 +00:00
< div id = "center" >
2012-10-18 21:18:42 +00:00
<?php } ?>
2011-09-01 18:43:19 +00:00
2012-10-18 21:18:42 +00:00
<?php if ( empty ( $this -> AutrePage )) { ?>
2012-12-03 21:01:11 +00:00
< h1 > LIENS INTER-ENTREPRISES< / h1 >
2011-04-22 14:29:58 +00:00
< div class = "paragraph" >
2011-05-04 14:18:22 +00:00
< table class = "identite" >
2012-11-15 13:30:33 +00:00
<?php if ( $this -> siren ) { ?>
2012-09-26 20:00:57 +00:00
< tr >
2011-04-22 14:29:58 +00:00
< td width = "30" > < / td >
2012-09-26 20:00:57 +00:00
< td width = "200" class = "StyleInfoLib" > Numé ro identifiant Siren< / td >
< td width = "350" class = "StyleInfoData" > <? = $this -> SirenTexte ( $this -> siren ) ?> </ td >
< / tr >
2012-11-15 13:30:33 +00:00
<?php } ?>
2012-09-26 20:00:57 +00:00
< tr >
2011-04-22 14:29:58 +00:00
< td width = "30" > < / td >
< td width = "200" class = "StyleInfoLib" > Raison Sociale< / td >
< td width = "350" class = "StyleInfoData" > <? = $this -> raisonSociale ?> </ td >
2012-09-26 20:00:57 +00:00
< / tr >
<?php if ( $this -> liengroupe ) { ?>
< tr >
2012-03-29 13:29:45 +00:00
< td width = "30" > < / td >
< td width = "550" colspan = "2" class = "StyleInfoLib" >
2012-09-26 20:00:57 +00:00
< a id = "groupesarbo" title = "Arborescence du groupe" href = " <? = $this -> liengroupe ?> " > Organigramme du groupe</ a >
< / td >
< / tr >
<?php } ?>
2012-11-07 11:18:53 +00:00
< tr >
< td width = "30" > < / td >
2012-11-09 16:24:11 +00:00
< td width = "200" class = "StyleInfoLib" valign = "top" > Documents< / td >
< td width = "350" class = "StyleInfoLib" >
2012-11-15 16:51:05 +00:00
<?php
if ($this->siren) {
echo $this->action('liendoc', 'identite', null, array('id'=>$this->siren, 'type'=>'Siren'));
} else {
echo $this->action('liendoc', 'identite', null, array('id'=>$this->lienref, 'type'=>'Entreprise'));
}
?>
2012-11-26 16:15:01 +00:00
<?php if ( $this -> edition ) { ?>
2012-11-09 16:24:11 +00:00
< br / >
2012-11-07 16:57:52 +00:00
< a class = "dialogDoc" title = "Lier un document" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'liendoc' , 'siren' => $this -> siren ), null , true ) ?> " >
2012-11-20 20:58:21 +00:00
< img style = "vertical-align:middle;" src = "/themes/default/images/interfaces/page_white_put.png" / >
2012-11-09 16:24:11 +00:00
Lier un document (organigramme du groupe)
2012-11-07 11:18:53 +00:00
< / a >
< / td >
2012-11-07 10:46:52 +00:00
<?php } ?>
2012-11-26 16:15:01 +00:00
< / tr >
2011-04-22 14:29:58 +00:00
< / table >
< / div >
2012-10-18 21:18:42 +00:00
<?php } ?>
2011-04-22 14:29:58 +00:00
2012-11-30 17:06:56 +00:00
< style >
table { border-spacing: 0; border-collapse: collapse; }
table.data td { border:1px solid #ccc; padding:2px; }
< / style >
2012-10-18 21:18:42 +00:00
<?php $liste = array ( 'actionnaires' , 'participations' ); ?>
<?php foreach ( $liste as $part ) { ?>
2011-04-22 14:29:58 +00:00
2012-10-18 21:18:42 +00:00
<?php if ( $part == 'actionnaires' ) { ?>
< h2 > Actionnariat< / h2 >
<?php } else { ?>
< h2 > Participations< / h2 >
2012-09-26 20:00:57 +00:00
<?php } ?>
2011-04-22 14:29:58 +00:00
< div class = "paragraph" >
2012-10-18 21:18:42 +00:00
<?php if ( count ( $this -> $part ) > 0 ) { ?>
2012-12-03 21:01:11 +00:00
< table class = "data" >
2012-10-18 21:18:42 +00:00
<?php foreach ( $this -> $part as $lien ) { ?>
< tr >
< td class = "StyleInfoData" width = "100" >
<?php
if (intval($lien->PDetention)>0) echo $lien->PDetention.' %';
elseif ($lien->MajMin=='+') echo 'major.';
elseif ($lien->MajMin=='-') echo 'minor.';
elseif ($lien->MajMin=='C') echo 'major.';
elseif ($lien->MajMin=='S') echo 'minor.';
elseif ($lien->MajMin=='F') echo 'absorption';
elseif ($lien->MajMin=='A') echo 'absorbant';
else echo ' ';
2011-04-22 14:29:58 +00:00
?>
< / td >
2012-12-03 15:01:40 +00:00
< td class = "StyleInfoLib" width = "350" >
2012-11-15 13:30:33 +00:00
< span class = "lienfiche" href = " <? = $this -> url ( array ( 'controller' => 'identite' , 'action' => 'lienfiche' , 'idFiche' => $lien -> idFiche ), null , true ) ?> " > <? = $lien -> nom ?> </ span >
<?php if ( $this -> edition ) { ?> < a href = " <? = $this -> url ( array ( 'controller' => 'identite' , 'action' => 'liens' , 'lienref' => $lien -> idFiche ), null , true ) ?> " > Basculer</ a > <?php } ?>
2011-04-22 14:29:58 +00:00
< / td >
2012-10-18 21:18:42 +00:00
< td class = "StyleInfoData" width = "150" >
<?php
if ( !empty($lien->siren) & & intval($lien->siren)!=0 ) {
$href = $this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $lien->siren
), null, true);
2012-11-30 17:06:56 +00:00
echo 'Siren < a href = "'.$href.'" > '.$this->SirenTexte($lien->siren).'< / a > ';
2012-10-18 21:18:42 +00:00
}
else ' ';
2011-04-22 14:29:58 +00:00
2012-10-18 21:18:42 +00:00
if ($lien->pays< >'France') echo '< b > '.$lien->pays.'< / b > ';
?>
2011-04-22 14:29:58 +00:00
< / td >
2012-09-26 20:00:57 +00:00
<?php if ( $this -> edition ) { ?>
2012-11-30 17:06:56 +00:00
< td width = "150" >
2012-11-09 16:24:11 +00:00
< a class = "documentsLien" title = "Documents associés" href = " <? = $this -> url ( array ( 'controller' => 'identite' , 'action' => 'liendoc' , 'id' => $lien -> id , 'type' => 'Lien' )) ?> " > +</ a >
2012-10-18 21:18:42 +00:00
<?php if ( $part == 'actionnaires' ) { ?>
2012-12-13 13:26:36 +00:00
< a class = "dialog" title = "Fusionner/Déplacer actionnaire" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'lienchange' , 'mode' => 'moveact' , 'lienref' => $lien -> idFiche ), null , true ) ?> " >< img src = "/themes/default/images/interfaces/page_swap.png" /></ a >
2012-10-23 15:28:17 +00:00
< a class = "dialog" title = "Modifier actionnaire" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'lien' , 'type' => 'actionnaire' , 'mode' => 'edit' , 'siren' => $this -> siren , 'idLien' => $lien -> id ), null , true ) ?> " >< img src = "/themes/default/images/interfaces/editer.png" /></ a >
< a class = "dialog" title = "Supprimer actionnaire" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'lien' , 'type' => 'actionnaire' , 'mode' => 'delete' , 'siren' => $this -> siren , 'idLien' => $lien -> id ), null , true ) ?> " >< img src = "/themes/default/images/interfaces/supprimer.png" /></ a >
2012-10-18 21:18:42 +00:00
<?php } else { ?>
2012-12-13 13:26:36 +00:00
< a class = "dialog" title = "Fusionner/Déplacer participation" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'lienchange' , 'mode' => 'movepar' , 'lienref' => $lien -> idFiche ), null , true ) ?> " >< img src = "/themes/default/images/interfaces/page_swap.png" /></ a >
2012-10-23 15:28:17 +00:00
< a class = "dialog" title = "Modifier participation" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'lien' , 'type' => 'participation' , 'mode' => 'edit' , 'siren' => $this -> siren , 'idLien' => $lien -> id ), null , true ) ?> " >< img src = "/themes/default/images/interfaces/editer.png" /></ a >
2012-10-24 16:10:48 +00:00
< a class = "dialog" title = "Supprimer participation" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'lien' , 'type' => 'participation' , 'mode' => 'delete' , 'siren' => $this -> siren , 'idLien' => $lien -> id ), null , true ) ?> " >< img src = "/themes/default/images/interfaces/supprimer.png" /></ a >
2012-09-26 20:00:57 +00:00
<?php } ?>
2012-11-07 16:57:52 +00:00
< a class = "dialogDoc" title = "Lier un document" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'liendoc' , 'idLien' => $lien -> id ), null , true ) ?> " >< img src = "/themes/default/images/interfaces/page_white_put.png" /></ a >
2012-11-07 11:18:53 +00:00
< / td >
2012-10-18 21:18:42 +00:00
<?php } ?>
< / tr >
<?php } ?>
2012-12-03 21:01:11 +00:00
< / table >
2012-10-18 21:18:42 +00:00
<?php } else { ?>
<?php if ( $part == 'actionnaires' ) { ?>
2012-12-03 21:01:11 +00:00
< div > Aucun actionnaire ré fé rencé par nos services.< / div >
2012-10-29 09:34:46 +00:00
<?php if ( $this -> lienStatuts ) { ?>
2012-10-26 06:55:45 +00:00
<?php if ( $this -> lienStatuts ) { ?>
2012-12-03 21:01:11 +00:00
< div > Afin d’ identifier les actionnaires de cette entreprise, consulter ses < a href = " <? = $this -> lienStatuts ?> " > statuts</ a > .</ div >
2012-10-26 06:55:45 +00:00
<?php } ?>
2012-10-29 09:34:46 +00:00
<?php } ?>
2012-10-18 21:18:42 +00:00
<?php } else { ?>
2012-12-03 21:01:11 +00:00
< div > Aucune participation ré fé rencé e par nos services.< / div >
2012-10-29 09:34:46 +00:00
<?php if ( $this -> lienBilans ) { ?>
2012-10-26 06:55:45 +00:00
<?php if ( $this -> lienStatuts ) { ?>
2012-12-03 21:01:11 +00:00
< div > Afin d’ identifier les participations de cette entreprise, consulter son < a href = " <? = $this -> lienBilans ?> " > dernier bilan publié</ a > .</ div >
2012-10-26 06:55:45 +00:00
<?php } ?>
2012-10-29 09:34:46 +00:00
<?php } ?>
2012-10-18 21:18:42 +00:00
<?php } ?>
<?php } ?>
2012-09-26 20:00:57 +00:00
<?php if ( $this -> edition ) { ?>
2012-10-18 21:18:42 +00:00
<?php if ( $part == 'actionnaires' ) { ?>
< div style = "line-height:16px;" >
2012-11-15 16:51:05 +00:00
< a class = "dialog" title = "Ajouter un actionnaire" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'lien' , 'type' => 'actionnaire' , 'mode' => 'add' , 'siren' => $this -> siren , 'lienref' => $this -> lienref ), null , true ) ?> " >
2012-10-18 21:18:42 +00:00
< img style = "vertical-align:middle;" src = "/themes/default/images/interfaces/ajouter.png" / > Ajouter un actionnaire< / a >
< / div >
<?php } else { ?>
< div style = "line-height:16px;" >
2012-11-15 16:51:05 +00:00
< a class = "dialog" title = "Ajouter une participation" href = " <? = $this -> url ( array ( 'controller' => 'saisie' , 'action' => 'lien' , 'type' => 'participation' , 'mode' => 'add' , 'siren' => $this -> siren , 'lienref' => $this -> lienref ), null , true ) ?> " >
2012-10-18 21:18:42 +00:00
< img style = "vertical-align:middle;" src = "/themes/default/images/interfaces/ajouter.png" / > Ajouter une participation< / a >
< / div >
<?php } ?>
2012-09-26 20:00:57 +00:00
<?php } ?>
2011-04-22 14:29:58 +00:00
< / div >
2012-10-18 21:18:42 +00:00
<?php } ?>
2011-04-22 14:29:58 +00:00
2012-11-30 17:06:56 +00:00
<?php if ( count ( $this -> directions ) > 0 ) { ?>
< h2 > Fonctions de directions< / h2 >
< div class = "paragraph" >
< table class = "data" >
<?php foreach ( $this -> directions as $lien ) { ?>
< tr >
< td class = "StyleInfoData" width = "100" valign = "top" > <? = $lien -> fonction ?> </ td >
2012-12-07 08:18:18 +00:00
< td class = "StyleInfoData" width = "500" >
< b > <? = $lien -> nom ?> </ b >
2012-11-30 17:06:56 +00:00
<?php if ( $lien -> dirNom != '' ) { ?>
2012-12-07 08:05:13 +00:00
< br /> représenté par < b > <? = $lien -> dirNom ?> </ b >
2012-12-03 21:01:11 +00:00
<?php if ( $lien -> dirNaissDate && $lien -> dirNaissDate != '0000-00-00' ) { ?>
2012-12-07 08:05:13 +00:00
née le <? = substr ( $lien -> dirNaissDate , 8 , 2 ) . '/' . substr ( $lien -> dirNaissDate , 5 , 2 ) . '/' . substr ( $lien -> dirNaissDate , 0 , 4 ) ?><?php } ?>
2012-12-07 08:18:18 +00:00
<?php if ( $lien -> dirNaissLieu ) { ?> à < b > <? = $lien -> dirNaissLieu ?> </ b > <?php } ?>
2012-11-30 17:06:56 +00:00
<?php } ?>
< / td >
< td class = "StyleInfoData" width = "150" valign = "top" >
<?php if ( ! empty ( $lien -> siren ) && intval ( $lien -> siren ) != 0 ) {
$href = $this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $lien->siren
), null, true);
echo 'Siren < a href = "'.$href.'" > '.$this->SirenTexte($lien->siren).'< / a > ';
}?>< / td >
< / tr >
<?php } ?>
< / table >
< / div >
<?php } ?>
2012-10-18 21:18:42 +00:00
<?php if ( empty ( $this -> AutrePage )) { ?>
2012-06-25 08:32:16 +00:00
<? = $this -> render ( 'cgu.phtml' , $this -> cgu ) ?>
2012-10-18 21:18:42 +00:00
<?php } ?>
2012-06-25 08:32:16 +00:00
2012-10-18 21:18:42 +00:00
<?php if ( empty ( $this -> AutrePage )) { ?>
2011-09-01 18:43:19 +00:00
< / div >
2012-10-18 21:18:42 +00:00
<?php } ?>
2012-09-26 20:00:57 +00:00
2012-10-24 07:57:39 +00:00
< script >
2012-10-25 15:38:56 +00:00
$('span.lienfiche').each(function(){
2012-10-24 07:57:39 +00:00
$(this).qtip({
2012-11-20 20:58:21 +00:00
hide: { event: 'unfocus' },
show: { solo: true },
2012-10-24 07:57:39 +00:00
content: {
text: "Chargement...",
ajax: { url: $(this).attr('href') }
},
2012-11-20 20:58:21 +00:00
style: { classes: "ui-tooltip-cream" },
position: { my: "bottom left", at: "top right" }
2012-10-24 07:57:39 +00:00
});
});
< / script >
2012-09-26 20:00:57 +00:00
<?php if ( $this -> edition ) { ?>
< script >
2012-11-09 16:24:11 +00:00
$('a.documentsLien').on('click', function(e){
e.preventDefault();
var tr = $(this).parents('tr');
2012-11-12 17:55:37 +00:00
var href = $(this).attr('href');
$(this).remove();
2012-11-09 16:24:11 +00:00
var contentB = '< tr > < td width = "30" > < / td > < td width = "300" class = "StyleInfoData" > ';
var contentE = '< / td > < td > < /td< / tr > ';
2012-11-12 17:55:37 +00:00
$.post(href, function(data){ tr.after(contentB + data + contentE); });
2012-11-09 16:24:11 +00:00
});
2012-11-07 16:57:52 +00:00
$('a.dialogDoc').on('click', function(){
var href = $(this).attr('href');
if (href!='#') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 650,
height: 600,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Annuler: function() { $(this).dialog('close'); }
},
2012-11-12 17:55:37 +00:00
close: function() { $('#dialog').remove(); }
2012-11-07 16:57:52 +00:00
};
$('< div id = "dialog" > < / div > ').dialog(dialogOpts);
return false;
}
});
2012-09-26 20:00:57 +00:00
$('a.dialog').on('click', function(){
var href = $(this).attr('href');
if (href!='#') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 650,
height: 600,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
2012-10-15 09:12:59 +00:00
Valider: function() {
2012-11-13 17:11:40 +00:00
if ($('input[name=mode]').val()=='delete' & & $('input[name=id1]').length>0
|| $('input[name=id1]').length>0 & & $('input[name=id2]').length>0) {
2012-10-15 09:12:59 +00:00
var form = $('form[name=lien]');
$.post(form.attr('action'), form.serialize(), function(data){
2012-10-25 10:15:26 +00:00
$('form[name=lien]').replaceWith(data);
}).error(function(){ alert('Unknow error'); });
2012-10-15 09:12:59 +00:00
} else {
alert("Quelque chose manque !");
}
},
2012-09-26 20:00:57 +00:00
Annuler: function() { $(this).dialog('close'); }
},
2012-11-12 17:55:37 +00:00
close: function() { $('#dialog').remove(); }
2012-09-26 20:00:57 +00:00
};
2012-11-07 16:57:52 +00:00
$('< div id = "dialog" > < / div > ').dialog(dialogOpts);
2012-09-26 20:00:57 +00:00
return false;
}
});
< / script >
<?php } ?>