issue #0001687: generate start date from db
This commit is contained in:
parent
9da60b4254
commit
b226fd28ad
@ -362,23 +362,16 @@ class GiantController extends Zend_Controller_Action
|
||||
}
|
||||
endforeach;
|
||||
$this->view->val_siren = $merged_siren;
|
||||
/*
|
||||
|
||||
$sess = new stdClass();
|
||||
$sess->mon_result = $result;
|
||||
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if ( $auth->hasIdentity() ) {
|
||||
$this->identity = $auth->getIdentity();
|
||||
}
|
||||
$this->giant->monitoring = $sess;
|
||||
$auth->getStorage()->write($this->giant);
|
||||
*/
|
||||
$type = $this->getRequest()->getParam('Type');
|
||||
if(isset($type))
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
print_r($this->getRequest()->getParams());
|
||||
$identity = $auth->getIdentity();
|
||||
}
|
||||
$identity->result = $sess;
|
||||
$auth->getStorage()->write($identity);
|
||||
}
|
||||
public function retAction()
|
||||
{
|
||||
@ -386,4 +379,15 @@ class GiantController extends Zend_Controller_Action
|
||||
$resultDB = $giantController->retrivDB($this->getRequest()->getParam('date_st'));
|
||||
print_r($resultDB[0]['ActualStartDate']);
|
||||
}
|
||||
public function reteventsAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
$result = $auth->getStorage()->read($identity);
|
||||
$this->view->result = $result->result->mon_result;
|
||||
|
||||
unset($identity->result);
|
||||
$auth->getStorage()->write($identity);
|
||||
}
|
||||
}
|
214
application/views/default/scripts/giant/retevents.phtml
Normal file
214
application/views/default/scripts/giant/retevents.phtml
Normal file
@ -0,0 +1,214 @@
|
||||
<div id="center">
|
||||
<h1 class="titre">SURVEILLANCE</h1>
|
||||
<div class="paragraph">
|
||||
<?php
|
||||
if ( empty($this->source) ){
|
||||
?>
|
||||
<table id="info">
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoLib">Nombre d'entités affichées</td>
|
||||
<td><?=count($this->result->MonitoringEvents->MonitoringEvent)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoLib">Nombre de surveillances</td>
|
||||
<td><?=count($this->val)?></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>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' : ''?>>Raison 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, Raison Sociale"?>" />
|
||||
<input type="submit" value="Rechercher" class="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Liste des surveillances</h2>
|
||||
<div class="paragraph">
|
||||
<?php if ($this->curPage>=1) { ?>
|
||||
<a class="pagination" href="<?=$this->url(array('action' => 'liste', 'page' => $this->curPage-1))?>"
|
||||
title="Page précédente..."> << </a>
|
||||
<?php } ?>
|
||||
<?php if ($this->curPage!=$this->totPage) { ?>
|
||||
<span>Page <select name="page">
|
||||
<?php for ($i=1;$i<$this->totPage+1;$i++) {?>
|
||||
<option value="<?=$this->url(array('action' => 'liste', 'page' => $i-1))?>"
|
||||
<?=($i==$this->curPage+1)? ' selected' : ''?>><?=$i?></option>
|
||||
<?php }?></select> / <?=$this->totPage?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
<?php if ($this->curPage+1<$this->totPage) { ?>
|
||||
<a class="pagination" href="<?=$this->url(array('action' => 'liste', 'page' => $this->curPage+1))?>"
|
||||
title="Page suivante..."> >> </a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<table class="tablesorter" id="surveillance" width="570">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="75">Siren</th>
|
||||
<th width="110">Raison Sociale</th>
|
||||
|
||||
<th width="150">Surveillance</th>
|
||||
<th width="110">Ajout le</th>
|
||||
<th width="110">Envoyé le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->val_siren as $monitor) {?>
|
||||
<pre><? //print_r($monitor);?></pre>
|
||||
<tr>
|
||||
<td class="aleft">
|
||||
<p><?=$monitor[0]->Company->CompanyId ?></p>
|
||||
</td>
|
||||
<td>
|
||||
<p><?=$monitor[0]->Company->CompanyName['0']->_ ?></p>
|
||||
</td>
|
||||
<td style='text-align: left'>
|
||||
<?php
|
||||
foreach ($monitor as $monitor_type) {
|
||||
echo "<a class='ev_code' title='".$monitor_type->Company->Event[0]->EventCode."' href='/giant/retrive/Type/".$monitor_type->Company->Event[0]->EventCode."'><p>".$monitor_type->Company->Event[0]->EventCode."</p></a>";
|
||||
} //Fin foreach?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
foreach ($monitor as $monitor_type) {
|
||||
echo "<p>".$this->action('ret', 'giant',null,array('date_st'=>$monitor_type->ProviderOrderId)).'</p>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
foreach ($monitor as $monitor_type) {
|
||||
echo "<p>".$monitor_type->Company->Event[0]->Date->_."</p>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<?php if ($this->curPage>=1) { ?>
|
||||
<a class="pagination" href="<?=$this->url(array('action' => 'liste', 'page' => $this->curPage-1))?>"
|
||||
title="Page précédente..."> << </a>
|
||||
<?php } ?>
|
||||
<?php if ($this->curPage!=$this->totPage) { ?>
|
||||
<span>Page <select name="page">
|
||||
<?php for ($i=1;$i<$this->totPage+1;$i++) {?>
|
||||
<option value="<?=$this->url(array('action' => 'liste', 'page' => $i-1))?>"
|
||||
<?=($i==$this->curPage+1)? ' selected' : ''?>><?=$i?></option>
|
||||
<?php }?></select> / <?=$this->totPage?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
<?php if ($this->curPage+1<$this->totPage) { ?>
|
||||
<a class="pagination" href="<?=$this->url(array('action' => 'liste', 'page' => $this->curPage+1))?>"
|
||||
title="Page suivante..."> >> </a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</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,
|
||||
), null, 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, Raison Sociale';
|
||||
var val = $(this).val();
|
||||
if ( val == '' || val == txt ) { $(this).val(''); }
|
||||
}).focusout(function(){
|
||||
var txt = 'Siren, Référence, Raison 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>
|
||||
|
@ -108,7 +108,7 @@ par
|
||||
<td style='text-align: left'>
|
||||
<?php
|
||||
foreach ($monitor as $monitor_type) {
|
||||
echo "<a class='ev_code' value='".serialize($monitor_type)."' title='".$monitor_type->Company->Event[0]->EventCode."' href='/giant/retrive/Type/".$monitor_type->Company->Event[0]->EventCode."'><p>".$monitor_type->Company->Event[0]->EventCode."</p></a>";
|
||||
echo "<a class='ev_code' value='".serialize($monitor_type)."' title='".$monitor_type->Company->Event[0]->EventCode."' href='/giant/retevents/Type/".$monitor_type->Company->Event[0]->EventCode."'><p>".$monitor_type->Company->Event[0]->EventCode."</p></a>";
|
||||
} //Fin foreach?>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -4,7 +4,6 @@ $(document).ready( function()
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var host = 'http://'+window.location.hostname+$(this).attr('href');
|
||||
alert($(this).attr('value'));
|
||||
var dlgOpts = {
|
||||
bgiframe: true,
|
||||
|
Loading…
Reference in New Issue
Block a user