Start portfolio
This commit is contained in:
parent
09992794c8
commit
3dc15579b8
1140
application/modules/user/controllers/PortfolioController.php
Normal file
1140
application/modules/user/controllers/PortfolioController.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,295 @@
|
||||
<div id="content">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Surveillance</h1>
|
||||
</div>
|
||||
|
||||
<?php if ( empty($this->source) ){?>
|
||||
<table id="info">
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoLib">Nombre d'entités affichées</td>
|
||||
<td><?=$this->nbReponses?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoLib">Nombre de surveillances</td>
|
||||
<td><?=$this->nbSurveillances?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } else {?>
|
||||
<table id="info">
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoLib">Nombre de surveillances <?=$this->source?></td>
|
||||
<td><?=$this->nbSurveillances?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<h2>Extraction des surveillances</h2>
|
||||
<?php //$this->action('surveillancecsv', 'surveillance')?>
|
||||
|
||||
<h2>Options de recherche</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<label>Afficher uniquement les suveillances de type</label>
|
||||
<select name="type">
|
||||
<option value="">toutes</option>
|
||||
<?=$this->selectTri?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
Tri
|
||||
<select name="triMode">
|
||||
<option value="asc"<?=($this->triMode=='asc')? ' selected' : ''?>>croissant</option>
|
||||
<option value="desc"<?=($this->triMode=='desc')? ' selected' : ''?>>décroissant</option>
|
||||
</select>
|
||||
par
|
||||
<select name="tri">
|
||||
<option value="siren"<?=($this->tri=='siren')? ' selected' : ''?>>Siren</option>
|
||||
<option value="ref"<?=($this->tri=='ref')? ' selected' : ''?>>Référence</option>
|
||||
<option value="rs"<?=($this->tri=='rs')? ' selected' : ''?>>Dénomination Sociale</option>
|
||||
<option value="dateAjout"<?=($this->tri=='dateAjout')? ' selected' : ''?>>Date d'ajout</option>
|
||||
<option value="dateDerEnvoi"<?=($this->tri=='dateDerEnvoi')? ' selected' : ''?>>Date d'envoi</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="paragraph" id="formSurveillance">
|
||||
<form name="recherche" action="<?=$this->url(array('controller'=>'surveillance', 'action'=>'liste'))?>">
|
||||
<input type="text" name="q" class="search" value="<?=($this->q != null)? $this->q : "Siren, Référence, Dénomination Sociale"?>" />
|
||||
<input type="submit" value="Rechercher" class="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Liste des surveillances</h2>
|
||||
<?php if ($this->PageTotal>1) {?>
|
||||
<div class="paragraph">
|
||||
<div class="pagination clearfix">
|
||||
<a class="first" href="<?=$this->url(array('page'=>1, 'token'=> $this->token))?>">«</a>
|
||||
<a class="previous" href="<?=$this->url(array('page'=>$this->PagePrev, 'token'=> $this->token))?>">‹</a>
|
||||
<span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span>
|
||||
<a class="next" href="<?=$this->url(array('page'=>$this->PageNext, 'token'=> $this->token))?>">›</a>
|
||||
<a class="last" href="<?=$this->url(array('page'=>$this->PageTotal, 'token'=> $this->token))?>">»</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div class="paragraph">
|
||||
<table class="tablesorter" id="surveillance" width="570">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="75">Siren</th>
|
||||
<th width="150">Dénomination Sociale</th>
|
||||
<th width="90">Référence</th>
|
||||
<th width="150">Surveillance</th>
|
||||
<th width="75">Ajout le</th>
|
||||
<th width="75">Envoyé le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->surveillances as $item) {?>
|
||||
<tr>
|
||||
<td class="aleft">
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'identite',
|
||||
'action' => 'fiche',
|
||||
'siret' => $item['siren'].$item['nic'],
|
||||
))?>"><?=$item['siren']?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?=$item['rs']?><br/><i><?=$item['cp']?> <?=$item['ville']?></i>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
foreach ($this->listSources as $source) {
|
||||
$ok = false;
|
||||
foreach ($item['sources'] as $surveillance) {
|
||||
if ( $surveillance['source'] == $source ) {
|
||||
if ($surveillance['ref'] != '') { ?><p><?=$surveillance['ref']?></p><?php }
|
||||
else { ?><p>-</p><?php }
|
||||
$ok = true;
|
||||
}
|
||||
}
|
||||
if ( $ok === false ) {?><p>-</p><?php }
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
foreach ($this->listSources as $source) {
|
||||
$ok = false;
|
||||
foreach ($item['sources'] as $surveillance) {
|
||||
if ( $surveillance['source'] == $source ) {
|
||||
?>
|
||||
<div class="action">
|
||||
<p><?=ucfirst($surveillance['source'])?></p>
|
||||
<a class="dialogsurv" href="<?=$this->url(array(
|
||||
'controller' => 'surveillance',
|
||||
'action' => 'ajouter',
|
||||
'siret' => $item['siren'].$item['nic'],
|
||||
'source' => $surveillance['source'],
|
||||
), 'default', true)?>" title="Ajouter la surveillance <?=$surveillance['source']?>">
|
||||
<img src="/themes/default/images/interfaces/ajouter.png"/>
|
||||
</a>
|
||||
<a class="dialogsurv" href="<?=$this->url(array(
|
||||
'controller' => 'surveillance',
|
||||
'action' => 'ajouter',
|
||||
'siret' => $item['siren'].$item['nic'],
|
||||
'ref' => $surveillance['ref'],
|
||||
'email' => $surveillance['email'],
|
||||
'source' => $surveillance['source']
|
||||
), 'default' , true)?>" title="Editer la surveillance <?=$source?>">
|
||||
<img src="/themes/default/images/interfaces/editer.png"/>
|
||||
</a>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'surveillance',
|
||||
'action' => 'supprimer',
|
||||
'siret' => $item['siren'].$item['nic'],
|
||||
'ref' => urlencode($surveillance['ref']),
|
||||
'email' => $surveillance['email'],
|
||||
'source' => $surveillance['source']
|
||||
))?>" title="Supprimer la surveillance <?=$surveillance['source']?>">
|
||||
<img src="/themes/default/images/interfaces/supprimer.png"/>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
$ok = true;
|
||||
}
|
||||
}
|
||||
if ( $ok === false ) {
|
||||
?>
|
||||
<div class="action">
|
||||
<p><?=ucfirst($source)?></p>
|
||||
<a class="dialogsurv" href="<?=$this->url(array(
|
||||
'controller' => 'surveillance',
|
||||
'action' => 'ajouter',
|
||||
'siret' => $item['siren'].$item['nic'],
|
||||
'source' => $source
|
||||
), null, true)?>" title="Ajouter la surveillance <?=$source?>">
|
||||
<img src="/themes/default/images/interfaces/ajouter.png"/>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<br/>
|
||||
<?php } //Fin foreach?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
foreach ($this->listSources as $source) {
|
||||
$ok = false;
|
||||
foreach ($item['sources'] as $surveillance) {
|
||||
if ( $surveillance['source'] == $source ) {
|
||||
?>
|
||||
<p><?=substr($surveillance['dateAjout'], 8, 2).'/'.
|
||||
substr($surveillance['dateAjout'], 5, 2).'/'.
|
||||
substr($surveillance['dateAjout'], 0, 4)?></p>
|
||||
<?php
|
||||
$ok = true;
|
||||
}
|
||||
}
|
||||
if ( $ok === false ) {?><p>-</p><?php }
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
foreach ($this->listSources as $source) {
|
||||
$ok = false;
|
||||
foreach ($item['sources'] as $surveillance) {
|
||||
if ( $surveillance['source'] == $source ) {
|
||||
$pDate = substr($surveillance['dateDerEnvoi'], 8, 2).'/'.
|
||||
substr($surveillance['dateDerEnvoi'], 5, 2).'/'.
|
||||
substr($surveillance['dateDerEnvoi'], 0, 4);
|
||||
if ($pDate != '00/00/0000') {
|
||||
echo '<p>'.$pDate.'</p>';
|
||||
} else {
|
||||
echo '<p>-</p>';
|
||||
}
|
||||
$ok = true;
|
||||
}
|
||||
}
|
||||
if ( $ok === false ) {?><p>-</p><?php }
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php if ($this->PageTotal>1) {?>
|
||||
<div class="paragraph">
|
||||
<div class="pagination clearfix">
|
||||
<a class="first" href="<?=$this->url(array('page'=>1))?>">«</a>
|
||||
<a class="previous" href="<?=$this->url(array('page'=>$this->PagePrev))?>">‹</a>
|
||||
<span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span>
|
||||
<a class="next" href="<?=$this->url(array('page'=>$this->PageNext))?>">›</a>
|
||||
<a class="last" href="<?=$this->url(array('page'=>$this->PageTotal))?>">»</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function submitTri() {
|
||||
var tri = $('select[name=tri] option:selected').val();
|
||||
var triMode = $('select[name=triMode] option:selected').val();
|
||||
var source = $('select[name=type] option:selected').val();
|
||||
window.location.href = '<?=$this->url(array(
|
||||
'controller'=>'surveillance' ,
|
||||
'action'=>'liste',
|
||||
'q' => $this->q,
|
||||
), 'default', true)?>/source/'+source+'/tri/'+tri+'/triMode/'+triMode;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('select[name=page]').change(function(){
|
||||
window.location.href = $(this).val();
|
||||
});
|
||||
|
||||
$('select[name=type]').change(function() {
|
||||
submitTri();
|
||||
});
|
||||
|
||||
$('select[name=tri]').change(function() {
|
||||
submitTri();
|
||||
});
|
||||
|
||||
$('input[name=q]').focusin(function(){
|
||||
var txt = 'Siren, Référence, Dénomination Sociale';
|
||||
var val = $(this).val();
|
||||
if ( val == '' || val == txt ) { $(this).val(''); }
|
||||
}).focusout(function(){
|
||||
var txt = 'Siren, Référence, Dénomination Sociale';
|
||||
var val = $(this).val();
|
||||
if ( val == '' ){ $(this).val(txt); }
|
||||
});
|
||||
|
||||
<?php
|
||||
if ($source == '') {
|
||||
?>
|
||||
$('#surveillance').tablesorter({
|
||||
headers: {
|
||||
2: { sorter: false },
|
||||
3: { sorter: false },
|
||||
4: { sorter: false },
|
||||
5: { sorter: false }
|
||||
}
|
||||
});
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
$('#surveillance').tablesorter({
|
||||
headers: {
|
||||
3: { sorter: false }
|
||||
}
|
||||
});
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
});
|
||||
</script>
|
||||
|
@ -0,0 +1,225 @@
|
||||
<div id="center">
|
||||
<h1 class="titre">PORTEFEUILLE</h1>
|
||||
|
||||
<div class="paragraph">
|
||||
<table id="info">
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoLib">Nombre d'entités affichées</td>
|
||||
<td><?=$this->nbReponses?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="StyleInfoLib">Nombre de surveillances</td>
|
||||
<td><?=$this->nbSurveillances?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Exportation de votre portefeuille</h2>
|
||||
<div class="paragraph">
|
||||
<?php //$this->action('portefeuillecsv', 'surveillance')?>
|
||||
</div>
|
||||
|
||||
<h2>Options de recherche</h2>
|
||||
<div class="paragraph">
|
||||
Tri par
|
||||
<select name="tri">
|
||||
<option value="siren"<?=($this->tri=='siren')? ' selected' : ''?>>Siren</option>
|
||||
<option value="ref"<?=($this->tri=='ref')? ' selected' : ''?>>Référence</option>
|
||||
<option value="rs"<?=($this->tri=='rs')? ' selected' : ''?>>Dénomination Sociale</option>
|
||||
<option value="dateAjout"<?=($this->tri=='dateAjout')? ' selected' : ''?>>Date d'ajout</option>
|
||||
<option value="dateDerEnvoi"<?=($this->tri=='dateDerEnvoi')? ' selected' : ''?>>Date d'envoi</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="paragraph" id="formSurveillance">
|
||||
<form name="recherche" action="<?=$this->url(array('controller'=>'surveillance', 'action'=>'portefeuille'))?>">
|
||||
<input type="text" name="siren" class="search" value="<?=($this->siren != null)? $this->siren : "Siren"?>" /><br/>
|
||||
<input type="text" name="ref" class="search" value="<?=($this->ref != null)? $this->ref : "Référence"?>" /><br/>
|
||||
<input type="text" name="rs" class="search" value="<?=($this->rs != null)? $this->rs : "Dénomination Sociale"?>" />
|
||||
<input type="submit" value="Rechercher" class="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2>Surveillance Score</h2>
|
||||
<?php if ($this->totPage>1) {?>
|
||||
<div class="paragraph">
|
||||
<div class="pagination clearfix">
|
||||
<a class="first" href="<?=$this->url(array('page'=>1))?>">«</a>
|
||||
<a class="previous" href="<?=$this->url(array('page'=>$this->curPage-1))?>">‹</a>
|
||||
<span>Page <?=$this->curPage?>/<?=$this->totPage?></span>
|
||||
<a class="next" href="<?=$this->url(array('page'=>$this->curPage+1))?>">›</a>
|
||||
<a class="last" href="<?=$this->url(array('page'=>$this->totPage))?>">»</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div class="paragraph">
|
||||
<?php
|
||||
if (count($this->portefeuille)>0) {
|
||||
?>
|
||||
<table class="tablesorter" id="surveillance">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Siren</th>
|
||||
<th>Dénomination Sociale</th>
|
||||
<th>Référence</th>
|
||||
<th class="score">Score</th>
|
||||
<th>Encours demandé</th>
|
||||
<th>Encours conseillé</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ( $this->portefeuille as $item ){ ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'identite',
|
||||
'action' => 'fiche',
|
||||
'siret' => $item->siren));?>">
|
||||
<?=$item->siren?>
|
||||
</a>
|
||||
</td>
|
||||
<td width="110">
|
||||
<?=$item->rs?><br/>
|
||||
<i><?=$item->cp.' '.$item->ville?></i>
|
||||
</td>
|
||||
<td>
|
||||
<p><?=$item->ref?></p>
|
||||
</td>
|
||||
<td class="tooltip" title="<?=$item->tooltip?>">
|
||||
<div class="align_image"><?=$item->colScore?></div>
|
||||
</td>
|
||||
<td class="encours set">
|
||||
<div class="valign">
|
||||
<?php
|
||||
if( $item->indiScoreDate!='0000-00-00' &&
|
||||
$item->procol!='P' && $item->actif!=0)
|
||||
{
|
||||
?>
|
||||
<a class="dialogsurv editencours" href="<?=$this->url(array(
|
||||
'action' => 'encours',
|
||||
'siret' => $item->siren.$item->nic,
|
||||
'ref' => $item->ref,
|
||||
'email' => $item->email));
|
||||
?>" title="Editer encours">
|
||||
<img src="/themes/default/images/interfaces/editer.png"/>
|
||||
</a>
|
||||
<span>
|
||||
<?php if(!empty($item->encoursClient)) { ?>
|
||||
<?=number_format(round($item->encoursClient/1000), 0, ',', ' ')?> K€
|
||||
<?php }else{ ?> - <?php }
|
||||
}else{ ?> - <?php }
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<?php
|
||||
if( $item->indiScoreDate!='0000-00-00' && $item->procol!='P' && $item->actif!=0) {
|
||||
?>
|
||||
<td class="encours" title="Précédent :
|
||||
<?=number_format(round($item->encoursPre/1000), 0, ',', ' ')?>
|
||||
K€">
|
||||
<?=number_format(round($item->encours/1000), 0, ',', ' ')?> K€
|
||||
</td>
|
||||
<?php }else{ ?>
|
||||
<td class="encours">-</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } else {?>
|
||||
Aucune surveillance Score.
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->PageTotal>1) {?>
|
||||
<div class="paragraph">
|
||||
<div class="pagination clearfix">
|
||||
<a class="first" href="<?=$this->url(array('page'=>1))?>">«</a>
|
||||
<a class="previous" href="<?=$this->url(array('page'=>$this->PagePrev))?>">‹</a>
|
||||
<span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span>
|
||||
<a class="next" href="<?=$this->url(array('page'=>$this->PageNext))?>">›</a>
|
||||
<a class="last" href="<?=$this->url(array('page'=>$this->PageTotal))?>">»</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function submitTri() {
|
||||
var tri = $('select[name=tri] option:selected').val();
|
||||
window.location.href = '<?=$this->url(array(
|
||||
'controller'=>'surveillance' ,
|
||||
'action'=>'portefeuille',
|
||||
'siren' => $this->siren,
|
||||
'ref' => $this->ref,
|
||||
'rs' => $this->rs,
|
||||
), 'default', true)?>/tri/'+tri;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('select[name=page]').change(function(){
|
||||
window.location.href = $(this).val();
|
||||
});
|
||||
|
||||
$('#surveillance').tablesorter({
|
||||
headers: {
|
||||
3: { sorter: false },
|
||||
4: { sorter: false },
|
||||
5: { sorter: false }
|
||||
}
|
||||
});
|
||||
|
||||
$('.tooltip').each(function(){
|
||||
$(this).qtip({
|
||||
content: $(this).attr('tooltip'),
|
||||
style: { width: 300, classes: "qtip-dark" },
|
||||
position: { at: "bottom center", my: "top center" }
|
||||
});
|
||||
});
|
||||
|
||||
$('.set').hover(function(){
|
||||
$(this).find('a.editencours').css('display', 'inline');
|
||||
},function () {
|
||||
$(this).find('a.editencours').css('display', 'none');
|
||||
});
|
||||
|
||||
$('input[name=siren]').focusin(function(){
|
||||
var txt = 'Siren';
|
||||
var val = $(this).val();
|
||||
if ( val == '' || val == txt ) { $(this).val(''); }
|
||||
}).focusout(function(){
|
||||
var txt = 'Siren';
|
||||
var val = $(this).val();
|
||||
if ( val == '' ){ $(this).val(txt); }
|
||||
});
|
||||
|
||||
$('input[name=ref]').focusin(function(){
|
||||
var txt = 'Référence';
|
||||
var val = $(this).val();
|
||||
if ( val == '' || val == txt ) { $(this).val(''); }
|
||||
}).focusout(function(){
|
||||
var txt = 'Référence';
|
||||
var val = $(this).val();
|
||||
if ( val == '' ){ $(this).val(txt); }
|
||||
});
|
||||
|
||||
$('input[name=rs]').focusin(function(){
|
||||
var txt = 'Dénomination Sociale';
|
||||
var val = $(this).val();
|
||||
if ( val == '' || val == txt ) { $(this).val(''); }
|
||||
}).focusout(function(){
|
||||
var txt = 'Dénomination Sociale';
|
||||
var val = $(this).val();
|
||||
if ( val == '' ){ $(this).val(txt); }
|
||||
});
|
||||
|
||||
$('select[name=tri]').change(function() {
|
||||
submitTri();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user