surveillances
This commit is contained in:
parent
c8ceb9d4d6
commit
ee3f799e8d
@ -46,6 +46,7 @@ class User_PortfolioController extends Zend_Controller_Action
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if (!$user->checkPerm('survliste')){
|
||||
$this->forward('perms', 'error', 'default');
|
||||
@ -62,7 +63,7 @@ class User_PortfolioController extends Zend_Controller_Action
|
||||
$nbAffichage = 50;
|
||||
$position = ($page - 1 ) * $nbAffichage;
|
||||
|
||||
$source = $request->getParam('source', '');
|
||||
$source =$request->getParam('source', ''); //'annonces'; //
|
||||
|
||||
$tri = $request->getParam('tri', 'siren');
|
||||
$this->view->assign('tri', $tri);
|
||||
@ -472,9 +473,9 @@ class User_PortfolioController extends Zend_Controller_Action
|
||||
echo "Erreur lors de la suppression";
|
||||
}
|
||||
} elseif (isset($page)) {
|
||||
$this->redirect('surveillance/liste/page/'.$page);
|
||||
$this->redirect('user/portfolio/index/page/'.$page);
|
||||
} else {
|
||||
$this->redirect('surveillance/liste');
|
||||
$this->redirect('user/portfolio/index');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ $('#dialogsurv').dialog({ buttons: [ {
|
||||
// ]});
|
||||
|
||||
function survSubmit(){
|
||||
$('#dialogsurv').dialog({buttons: []});
|
||||
// $('#dialogsurv').dialog({buttons: []});
|
||||
var action = $('#frmSurv').attr('action');
|
||||
var siret = $('input[name=siret]').val();
|
||||
var ref = $('input[name=ref]').val();
|
||||
@ -203,14 +203,15 @@ function survSubmit(){
|
||||
$('#frmSurv').append('<br/>Mise sous surveillance terminé.');
|
||||
}
|
||||
});
|
||||
$('#dialogsurv').dialog({ buttons: [ {
|
||||
text: "Fermer", click: function() {$(this).dialog("close"); }
|
||||
} ]});
|
||||
$('.modal-footer').replaceWith('<div class="modal-footer"><button type="button" class="btn btn-danger" data-dismiss="modal"> Close </button></div>');
|
||||
// $('#dialogsurv').dialog({ buttons: [ {
|
||||
// text: "Fermer", click: function() {$(this).dialog("close"); }
|
||||
// } ]});
|
||||
} else {
|
||||
$('#frmSurv').replaceWith('<div id="frmSurv">Aucune source !</div>');
|
||||
$('#dialogsurv').dialog({ buttons: [ {
|
||||
text: "Fermer", click: function() { $(this).dialog("close"); }
|
||||
} ]});
|
||||
// $('#dialogsurv').dialog({ buttons: [ {
|
||||
// text: "Fermer", click: function() { $(this).dialog("close"); }
|
||||
// } ]});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,249 +1,298 @@
|
||||
<div id="content">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Surveillance</h1>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<label>Afficher uniquement les suveillances de type</label>
|
||||
<select name="type">
|
||||
<option value="">toutes</option>
|
||||
<?=$this->selectTri?>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
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>
|
||||
<select class="col-md-10 col-lg-10 col-sm-10" id="optgroup-limit"
|
||||
multiple="multiple">
|
||||
<optgroup class="group-1" label="type" id="group-1">
|
||||
<option value="">toutes</option>
|
||||
<?=$this->selectTri?>
|
||||
</optgroup>
|
||||
<optgroup class="group-1" label="triMode">
|
||||
<option value="asc" <?=($this->triMode=='asc')? ' selected' : ''?>>croissant</option>
|
||||
<option value="desc" <?=($this->triMode=='desc')? ' selected' : ''?>>décroissant</option>
|
||||
</optgroup>
|
||||
<optgroup class="group-1" label="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>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="formSurveillance">
|
||||
<form name="recherche" action="<?=$this->url(array('module'=>'user', '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>
|
||||
<form name="recherche"
|
||||
action="<?=$this->url(array('module'=>'user', '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>
|
||||
<table class="table table-bordered table-condensed" id="surveillance">
|
||||
<thead>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="home">
|
||||
|
||||
<h2>Liste des surveillances</h2><br/>
|
||||
|
||||
<button class="button btn btn-default col-md-1 col-lg-1 col-sm-1" ><i class="fa fa-trash-o" aria-hidden="true"></i>
|
||||
</button>
|
||||
<table class="table table-hover" id="surveillance">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="25"><input id="selectAll" type="checkbox" /></th>
|
||||
<th width="75">Siren</th>
|
||||
<th width="400">Dénomination Sociale</th>
|
||||
<th width="90">Référence</th>
|
||||
<th width="75">Surveillance</th>
|
||||
<th width="75">Ajout le</th>
|
||||
<th width="75">Envoyé le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<!-- <table class="table table-bordered table-condensed" id="surveillance"> -->
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
//$i=1;
|
||||
foreach ( $this->surveillances as $item ) {
|
||||
foreach ( $this->listSources as $source ) {
|
||||
|
||||
foreach ( $item ['sources'] as $surveillance ) {
|
||||
// $ok = false;
|
||||
if ($surveillance ['source'] == $source) {
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<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(
|
||||
'module' =>'legal',
|
||||
'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 scope="row"><input type="checkbox" data-url="<?=$this->url ( array ('module' => 'user','controller' => 'portfolio','action' => 'supprimer','siret' => $item ['siren'] . $item ['nic'],'ref' => urlencode ( $surveillance ['ref'] ),'email' => $surveillance ['email'],'source' => $surveillance ['source'] ) )?>"/></td>
|
||||
<td class="aleft"><a
|
||||
href="<?=$this->url ( array ('module' => 'legal','controller' => 'identite','action' => 'fiche','siret' => $item ['siren'] . $item ['nic'] ) )?>"><?=$item['siren']?></a></td>
|
||||
<td>
|
||||
<?=$item['rs']?>
|
||||
<i><?=$item['cp']?>; <?=$item['ville']?></i>
|
||||
</td>
|
||||
|
||||
<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 href="#" data-toggle="modal" data-target="#dialog" data-url="<?=$this->url(array(
|
||||
'module'=>'user',
|
||||
'controller' => 'portfolio',
|
||||
'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 href="#" data-toggle="modal" data-target="#dialog" data-url="<?=$this->url(array(
|
||||
'module'=>'user',
|
||||
'controller' => 'portfolio',
|
||||
'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(
|
||||
'module'=>'user',
|
||||
'controller' => 'portfolio',
|
||||
'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 href="#" data-toggle="modal" data-target="#dialog" data-url="<?=$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>';
|
||||
// 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;
|
||||
}
|
||||
$ok = true;
|
||||
}
|
||||
}
|
||||
if ( $ok === false ) {?><p>-</p><?php }
|
||||
}
|
||||
?>
|
||||
// / }
|
||||
// if ($ok === false) {
|
||||
// ?>
|
||||
<!-- <p>-</p> -->
|
||||
<?php
|
||||
|
||||
// }
|
||||
// }
|
||||
?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<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 href="#" data-toggle="modal" data-target="#dialog"
|
||||
data-url="<?=$this->url ( array ('module' => 'user','controller' => 'portfolio','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 href="#" data-toggle="modal" data-target="#dialog"
|
||||
data-url="<?=$this->url ( array ('module' => 'user','controller' => 'portfolio','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 ('module' => 'user','controller' => 'portfolio','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>
|
||||
<input type="hidden" name="sup"
|
||||
data-url="<?=$this->url ( array ('module' => 'user','controller' => 'portfolio','action' => 'supprimer','siret' => $item ['siren'] . $item ['nic'],'ref' => urlencode ( $surveillance ['ref'] ),'email' => $surveillance ['email'],'source' => $surveillance ['source'] ) )?>"
|
||||
title="Supprimer la surveillance<?=$surveillance['source']?>"/>
|
||||
</div>
|
||||
<?php
|
||||
// $ok = true;
|
||||
// }
|
||||
// }
|
||||
// if ($ok === false) {
|
||||
?>
|
||||
<!-- <div class="action"> -->
|
||||
<p><?//=ucfirst($source)?></p> <!-- <a href="#" data-toggle="modal" data-target="#dialog" data-url=" -->
|
||||
<?//=$this->url ( array ('module' => 'user','controller' => 'portfolio','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>
|
||||
</tr>
|
||||
<?php } }/* $i++;*/ } } ?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="settings"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if ($this->PageTotal>1) {?>
|
||||
<div class="text-center">
|
||||
<ul class="pagination">
|
||||
<li><a href="<?=$this->url(array('page'=>1))?>" aria-label="First"><span aria-hidden="true">«</span></a></li>
|
||||
<li><a href="<?=$this->url(array('page'=>$this->PagePrev))?>">‹</a></li>
|
||||
<li><a href="#"><span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span></a></li>
|
||||
<li><a href="<?=$this->url(array('page'=>$this->PageNext))?>">›</a></li>
|
||||
<li><a href="<?=$this->url(array('page'=>$this->PageTotal))?>" aria-label="Last"><span aria-hidden="true">»</span></a></li>
|
||||
</ul>
|
||||
<ul class="pagination">
|
||||
<li><a href="<?=$this->url(array('page'=>1))?>" aria-label="First"><span
|
||||
aria-hidden="true">«</span></a></li>
|
||||
<li><a href="<?=$this->url(array('page'=>$this->PagePrev))?>">‹</a></li>
|
||||
<li><a href="#"><span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span></a></li>
|
||||
<li><a href="<?=$this->url(array('page'=>$this->PageNext))?>">›</a></li>
|
||||
<li><a href="<?=$this->url(array('page'=>$this->PageTotal))?>"
|
||||
aria-label="Last"><span aria-hidden="true">»</span></a></li>
|
||||
</ul>
|
||||
</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(
|
||||
'module'=>'user',
|
||||
'controller'=>'portfolio' ,
|
||||
'action'=>'index',
|
||||
'q' => $this->q,
|
||||
), 'default', true)?>/index/source/'+source+'/tri/'+tri+'/triMode/'+triMode;
|
||||
var tri = $('optgroup[label=tri] option:selected').val();
|
||||
var triMode = $('optgroup[label=triMode] option:selected').val();
|
||||
var source = $('optgroup[label=type] option:selected').val();
|
||||
window.location.href = '<?=$this->url ( array ('module' => 'user','controller' => 'portfolio','action' => 'index','q' => $this->q ), 'default', true )?>/index/source/'+source+'/tri/'+tri+'/triMode/'+triMode;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=page]').change(function(){
|
||||
$('optgroup[label=page]').change(function(){
|
||||
window.location.href = $(this).val();
|
||||
});
|
||||
|
||||
$('select[name=type]').change(function() {
|
||||
$('optgroup[label=type]').change(function() {
|
||||
submitTri();
|
||||
});
|
||||
|
||||
$('select[name=tri]').change(function() {
|
||||
$('optgroup[label=Tri]').change(function() {
|
||||
submitTri();
|
||||
});
|
||||
|
||||
@ -256,6 +305,44 @@ $(function() {
|
||||
var val = $(this).val();
|
||||
if ( val == '' ){ $(this).val(txt); }
|
||||
});
|
||||
$('#optgroup-limit').multiselect({
|
||||
onChange: function(options, checked) {
|
||||
var $option = $(options);
|
||||
// This example works onyl for selection one option a time, has to be adapted to your case ...
|
||||
if ($option.length == 1) {
|
||||
// This is the important part for you: get the parent optgroup:
|
||||
var $group = $option.parent('optgroup')
|
||||
// Here, the properties of the optgroup can be checked ...
|
||||
if ($group.hasClass('group-1')) {
|
||||
var $options = $('option', $group);
|
||||
$options = $options.filter(':selected');
|
||||
submitTri();
|
||||
|
||||
if (checked && $options.length > 1) {
|
||||
alert('Cannot select more than 2 elements in this group!');
|
||||
$("#optgroup-limit").multiselect('deselect', $option.val());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#selectAll').click(function(event){
|
||||
|
||||
$(':checkbox').prop('checked',this.checked);
|
||||
});
|
||||
|
||||
$('.button').click(function(){
|
||||
$("table input[type='checkbox']:checked").each(function() {
|
||||
var url = $(this).data('url');
|
||||
$.get(url);
|
||||
});
|
||||
$(document).ajaxStop(function(){
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -85,6 +85,7 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
|
||||
*/
|
||||
$view->headLink()
|
||||
->appendStylesheet('/libs/bootstrap-3.3.7/css/bootstrap.min.css', 'all')
|
||||
->appendStylesheet('/libs/bootstrap-multiselect/css/bootstrap-multiselect.css', 'all')
|
||||
->appendStylesheet('/libs/ui-1.11.4/themes/smoothness/jquery-ui.min.css', 'all')
|
||||
->appendStylesheet('/libs/qtip/jquery.qtip.min.css', 'all')
|
||||
->appendStylesheet('/libs/font-awesome-4.6.3/css/font-awesome.min.css', 'all');
|
||||
@ -108,7 +109,9 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
|
||||
->appendFile('/themes/default/scripts/bridge.js', 'text/javascript')
|
||||
->appendFile('/themes/default/scripts/print.js', 'text/javascript')
|
||||
->appendFile('/themes/default/scripts/main.js', 'text/javascript')
|
||||
->appendFile('/libs/bootstrap-3.3.7/js/bootstrap.min.js', 'text/javascript');
|
||||
->appendFile('/libs/bootstrap-3.3.7/js/bootstrap.min.js', 'text/javascript')
|
||||
->appendFile('/libs/bootstrap-multiselect/js/bootstrap-multiselect.js', 'text/javascript');
|
||||
|
||||
|
||||
if ( ! $UserLogin ) {
|
||||
$view->headScript()
|
||||
|
10
public/libs/bootstrap-multiselect/README.md
Normal file
10
public/libs/bootstrap-multiselect/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
bootstrap-multiselect
|
||||
=====================
|
||||
|
||||
Shim repository for http://github.com/davidstutz/bootstrap-multiselect
|
||||
|
||||
Package Managers
|
||||
----------------
|
||||
|
||||
* [Composer](http://packagist.org/packages/mrohnstock/bootstrap-multiselect): `mrohnstock/bootstrap-multiselect`
|
||||
* [Component](http://component.io): `mrohnstock/bootstrap-multiselect`
|
36
public/libs/bootstrap-multiselect/component.json
Normal file
36
public/libs/bootstrap-multiselect/component.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "mrohnstock-bootstrap-multiselect",
|
||||
"repo": "mrohnstock/bootstrap-multiselect",
|
||||
"description": "Twitter Bootstrap plugin to make selects user friendly.",
|
||||
"version": "0.9.13",
|
||||
"homepage": "http://davidstutz.github.io/bootstrap-multiselect/",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "Apache License, Version 2.0",
|
||||
"url": "https://github.com/davidstutz/bootstrap-multiselect/blob/master/LICENSE.md"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"js",
|
||||
"css",
|
||||
"less",
|
||||
"bootstrap",
|
||||
"jquery",
|
||||
"multiselect"
|
||||
],
|
||||
"dependencies": {
|
||||
"components/jquery": ">=1.11.0",
|
||||
"components/bootstrap": ">= 2.3.2"
|
||||
},
|
||||
"main": "js/bootstrap-multiselect.js",
|
||||
"scripts": [
|
||||
"js/bootstrap-multiselect.js",
|
||||
"js/bootstrap-multiselect-collapsible-groups.js"
|
||||
],
|
||||
"files": [
|
||||
"css/bootstrap-multiselect.css",
|
||||
"js/bootstrap-multiselect.js",
|
||||
"js/bootstrap-multiselect-collapsible-groups.js",
|
||||
"less/bootstrap-multiselect.less"
|
||||
]
|
||||
}
|
46
public/libs/bootstrap-multiselect/composer.json
Normal file
46
public/libs/bootstrap-multiselect/composer.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "mrohnstock/bootstrap-multiselect",
|
||||
"description": "Twitter Bootstrap plugin to make selects user friendly.",
|
||||
"type": "component",
|
||||
"homepage": "http://davidstutz.github.io/bootstrap-multiselect/",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "Apache License, Version 2.0",
|
||||
"url": "https://github.com/davidstutz/bootstrap-multiselect/blob/master/LICENSE.md"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"js",
|
||||
"css",
|
||||
"less",
|
||||
"bootstrap",
|
||||
"jquery",
|
||||
"multiselect"
|
||||
],
|
||||
"author": {
|
||||
"url": "http://davidstutz.de/",
|
||||
"name": "David Stutz"
|
||||
},
|
||||
"require": {
|
||||
"robloach/component-installer": "*",
|
||||
"components/jquery": ">=1.11.0",
|
||||
"components/bootstrap": ">= 2.3.2"
|
||||
},
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"js/bootstrap-multiselect.js",
|
||||
"js/bootstrap-multiselect-collapsible-groups.js"
|
||||
],
|
||||
"files": [
|
||||
"css/bootstrap-multiselect.css",
|
||||
"js/bootstrap-multiselect.js",
|
||||
"js/bootstrap-multiselect-collapsible-groups.js",
|
||||
"less/bootstrap-multiselect.less"
|
||||
],
|
||||
"shim": {
|
||||
"deps": ["jquery"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
public/libs/bootstrap-multiselect/css/bootstrap-multiselect.css
vendored
Normal file
1
public/libs/bootstrap-multiselect/css/bootstrap-multiselect.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .input-group{margin:5px}.multiselect-container>li{padding:0}.multiselect-container>li>a.multiselect-all label{font-weight:700}.multiselect-container>li.multiselect-group label{margin:0;padding:3px 20px 3px 20px;height:100%;font-weight:700}.multiselect-container>li.multiselect-group-clickable label{cursor:pointer}.multiselect-container>li>a{padding:0}.multiselect-container>li>a>label{margin:0;height:100%;cursor:pointer;font-weight:400;padding:3px 20px 3px 40px}.multiselect-container>li>a>label.radio,.multiselect-container>li>a>label.checkbox{margin:0}.multiselect-container>li>a>label>input[type=checkbox]{margin-bottom:5px}.btn-group>.btn-group:nth-child(2)>.multiselect.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.form-inline .multiselect-container label.checkbox,.form-inline .multiselect-container label.radio{padding:3px 20px 3px 40px}.form-inline .multiselect-container li a label.checkbox input[type=checkbox],.form-inline .multiselect-container li a label.radio input[type=radio]{margin-left:-20px;margin-right:0}
|
92
public/libs/bootstrap-multiselect/js/bootstrap-multiselect-collapsible-groups.js
vendored
Normal file
92
public/libs/bootstrap-multiselect/js/bootstrap-multiselect-collapsible-groups.js
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
! function(e) {
|
||||
"use strict";
|
||||
jQuery.fn.multiselect.Constructor.prototype.selectAll = (function() {
|
||||
var cached_function = jQuery.fn.multiselect.Constructor.prototype.selectAll;
|
||||
|
||||
return function() {
|
||||
var args = Array.prototype.slice.call( arguments );
|
||||
args[0] = (this.options.enableCollapsibleOptGroups && this.options.multiple) ? false : args[0];
|
||||
cached_function.apply(this, args);
|
||||
};
|
||||
}());
|
||||
|
||||
jQuery.fn.multiselect.Constructor.prototype.deselectAll = (function() {
|
||||
var cached_function = jQuery.fn.multiselect.Constructor.prototype.deselectAll;
|
||||
|
||||
return function() {
|
||||
var args = Array.prototype.slice.call( arguments );
|
||||
args[0] = (this.options.enableCollapsibleOptGroups && this.options.multiple) ? false : args[0];
|
||||
cached_function.apply(this, args);
|
||||
};
|
||||
}());
|
||||
|
||||
jQuery.fn.multiselect.Constructor.prototype.createOptgroup = (function() {
|
||||
var cached_function = jQuery.fn.multiselect.Constructor.prototype.createOptgroup;
|
||||
|
||||
return function() {
|
||||
var args = Array.prototype.slice.call( arguments );
|
||||
var t = args[0];
|
||||
if (this.options.enableCollapsibleOptGroups && this.options.multiple) {
|
||||
var n = e(t).attr("label");
|
||||
var v = e(t).attr("value");
|
||||
var r = e('<li class="multiselect-item multiselect-group"><a href="javascript:void(0);"><input type="checkbox" value="' + v + '"/><b> ' + n + '<b class="caret"></b></b></a></li>');
|
||||
|
||||
if (this.options.enableClickableOptGroups) {
|
||||
r.addClass("multiselect-group-clickable")
|
||||
}
|
||||
this.$ul.append(r);
|
||||
if (e(t).is(":disabled")) {
|
||||
r.addClass("disabled")
|
||||
}
|
||||
e("option", t).each(e.proxy(function(e, t) {
|
||||
this.createOptionValue(t)
|
||||
}, this))
|
||||
} else {
|
||||
cached_function.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
}());
|
||||
|
||||
jQuery.fn.multiselect.Constructor.prototype.buildDropdownOptions = (function() {
|
||||
var cached_function = jQuery.fn.multiselect.Constructor.prototype.buildDropdownOptions;
|
||||
|
||||
return function() {
|
||||
cached_function.apply(this, arguments);
|
||||
|
||||
if (this.options.enableCollapsibleOptGroups && this.options.multiple) {
|
||||
|
||||
e("li.multiselect-group input", this.$ul).off();
|
||||
e("li.multiselect-group", this.$ul).siblings().not("li.multiselect-group, li.multiselect-all", this.$ul).each( function () {
|
||||
$(this).toggleClass('hidden', true);
|
||||
});
|
||||
e("li.multiselect-group", this.$ul).on("click", e.proxy(function(t) {
|
||||
t.stopPropagation();
|
||||
}, this));
|
||||
e("li.multiselect-group > a > b", this.$ul).on("click", e.proxy(function(t) {
|
||||
t.stopPropagation();
|
||||
var n = e(t.target).closest('li');
|
||||
var r = n.nextUntil("li.multiselect-group");
|
||||
var i = true;
|
||||
r.each(function() {
|
||||
i = i && e(this).hasClass('hidden');
|
||||
});
|
||||
r.toggleClass('hidden', !i);
|
||||
}, this));
|
||||
e("li.multiselect-group > a > input", this.$ul).on("change", e.proxy(function(t) {
|
||||
t.stopPropagation();
|
||||
var n = e(t.target).closest('li');
|
||||
var r = n.nextUntil("li.multiselect-group");
|
||||
var i = true;
|
||||
var s = r.find("input");
|
||||
s.each(function() {
|
||||
i = i && e(this).prop("checked")
|
||||
});
|
||||
s.prop("checked", !i).trigger("change")
|
||||
}, this));
|
||||
e("li.multiselect-all", this.$ul).css('background', '#f3f3f3').css('border-bottom', '1px solid #eaeaea');
|
||||
e("li.multiselect-group > a, li.multiselect-all > a > label.checkbox", this.$ul).css('padding', '3px 20px 3px 35px');
|
||||
e("li.multiselect-group > a > input", this.$ul).css('margin', '4px 0px 5px -20px');
|
||||
}
|
||||
};
|
||||
}());
|
||||
}(window.jQuery)
|
1416
public/libs/bootstrap-multiselect/js/bootstrap-multiselect.js
vendored
Normal file
1416
public/libs/bootstrap-multiselect/js/bootstrap-multiselect.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
112
public/libs/bootstrap-multiselect/less/bootstrap-multiselect.less
vendored
Normal file
112
public/libs/bootstrap-multiselect/less/bootstrap-multiselect.less
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
/**
|
||||
* Bootstrap Multiselect (https://github.com/davidstutz/bootstrap-multiselect)
|
||||
*
|
||||
* Apache License, Version 2.0:
|
||||
* Copyright (c) 2012 - 2015 David Stutz
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a
|
||||
* copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* BSD 3-Clause License:
|
||||
* Copyright (c) 2012 - 2015 David Stutz
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* - Neither the name of David Stutz nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
.multiselect-container {
|
||||
position: absolute;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
.input-group {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
> li {
|
||||
padding: 0;
|
||||
|
||||
> a.multiselect-all label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.multiselect-group label {
|
||||
margin: 0;
|
||||
padding: 3px 20px 3px 20px;
|
||||
height: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.multiselect-group-clickable label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
> a {
|
||||
padding: 0;
|
||||
|
||||
> label {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
font-weight: normal;
|
||||
padding: 3px 20px 3px 40px;
|
||||
|
||||
&.radio, &.checkbox {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
> input[type="checkbox"] {
|
||||
margin-bottom:5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group > .btn-group:nth-child(2) > .multiselect.btn {
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
.form-inline .multiselect-container{
|
||||
|
||||
label.checkbox, label.radio{
|
||||
padding: 3px 20px 3px 40px;
|
||||
}
|
||||
|
||||
li a label{
|
||||
|
||||
&.checkbox input[type="checkbox"], &.radio input[type="radio"]{
|
||||
margin-left: -20px;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
1
public/libs/libs
Symbolic link
1
public/libs/libs
Symbolic link
@ -0,0 +1 @@
|
||||
/home/vhosts/extranet/public/libs
|
Loading…
Reference in New Issue
Block a user