issue #0001687: User interface

This commit is contained in:
Arman KYOKCHAN 2013-09-02 12:39:30 +00:00
parent ac68c8dbd6
commit 8ffb6ec145
3 changed files with 53 additions and 30 deletions

View File

@ -377,8 +377,9 @@ class GiantController extends Zend_Controller_Action
public function retAction()
{
$giantController = new GiantControllerLib();
$type = $this->getRequest()->getParam('type');
$resultDB = $giantController->retrivDB($this->getRequest()->getParam('date_st'));
print_r($resultDB[0]['ActualStartDate']);
print_r($resultDB[0][$type]);
}
public function reteventsAction()
{

View File

@ -75,7 +75,7 @@ if ( empty($this->source) ){
<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>";
echo "<a class='ev_code' href='/giant/retrive/Type/".$monitor_type->Company->Event[0]->EventCode."'><p>".$monitor_type->Company->Event[0]->EventCode."</p></a>";
} //Fin foreach?>
</td>
<td>

View File

@ -89,16 +89,19 @@ par
<tr>
<th width="75">Siret</th>
<th width="110">Raison Sociale</th>
<th width="150">Surveillance</th>
<th width="110">Ajout le</th>
<th width="110">Envoyé le</th>
<th width="110">Start Monitoring</th>
<th width="110">End Monitoring</th>
<th width="150">Event Type</th>
<th width="110">Last Change</th>
<th width="110">Count</th>
</tr>
</thead>
<tbody><pre><? //print_r($this->val_siren);?></pre>
<?php foreach ($this->val_siren as $monitor) {?>
<pre><? //print_r($monitor);?></pre>
<? $merged = Array();
<?
//STORE BY ProviderOrderId
$merged = Array();
foreach ($monitor as $MonitoringEvent):
if ($merged[$MonitoringEvent->ProviderOrderId]){
array_push($merged[$MonitoringEvent->ProviderOrderId],$MonitoringEvent) ;
@ -107,7 +110,18 @@ par
}
endforeach;
?>
<? foreach ($merged as $MonitoringEv):?>
<? foreach ($merged as $MonitoringEv):
//STORE BY type
$merged_type = Array();
foreach ($MonitoringEv as $MonitoringType):
if ($merged_type[$MonitoringType->Company->Event[0]->EventCode]){
array_push($merged_type[$MonitoringType->Company->Event[0]->EventCode],$MonitoringType) ;
} else {
$merged_type[$MonitoringType->Company->Event[0]->EventCode][]=$MonitoringType;
}
endforeach;
?>
<tr>
<td class="aleft">
<p><?=$MonitoringEv[0]->Company->CompanyId ?></p>
@ -115,38 +129,46 @@ par
<td>
<p><?=$MonitoringEv[0]->Company->CompanyName['0']->_ ?></p>
</td>
<td style='text-align: left'>
<?php
$merged_type = Array();
foreach ($MonitoringEv as $MonitoringType):
if ($merged_type[$MonitoringType->Company->Event[0]->EventCode]){
array_push($merged_type[$MonitoringType->Company->Event[0]->EventCode],$MonitoringType) ;
} else {
$merged_type[$MonitoringType->Company->Event[0]->EventCode][]=$MonitoringType;
}
endforeach;
foreach ($merged_type as $monitor_type) {
echo "<a class='ev_code' title='".$monitor_type[0]->Company->Event[0]->EventCode."' href='/giant/retevents/Type/".$monitor_type[0]->Company->Event[0]->EventCode."'><p>".$monitor_type[0]->Company->Event[0]->EventCode."</p></a>";
} //Fin foreach?>
</td>
<td>
<?php
foreach ($MonitoringEv as $monitor_type) {
echo "<p>".$this->action('ret', 'giant',null,array('date_st'=>$monitor_type->ProviderOrderId)).'</p>';
foreach ($merged_type as $monitor_type) {
echo "<p>".$this->action('ret', 'giant',null,array('date_st'=>$monitor_type->ProviderOrderId, 'type'=>'ActualStartDate')).'</p>';
}
?>
</td>
<td>
<?php
foreach ($MonitoringEv as $monitor_type) {
echo "<p>".$monitor_type->Company->Event[0]->Date->_."</p>";
foreach ($merged_type as $monitor_type) {
echo "<p>".$this->action('ret', 'giant',null,array('date_st'=>$monitor_type->ProviderOrderId, 'type'=>'ActualEndDate')).'</p>';
}
?>
</td>
<td style='text-align: left'>
<?php
foreach ($merged_type as $monitor_type) {
echo "<a class='ev_code' title='".$monitor_type[0]->Company->Event[0]->EventCode."' href='/giant/retevents/Type/".$monitor_type[0]->Company->Event[0]->EventCode."'><p>".$monitor_type[0]->Company->Event[0]->EventCode."</p></a>";
} //Fin foreach?>
</td>
<td>
<?php
foreach ($merged_type as $monitor_type) {
$dateEv= Array();
foreach ($monitor_type as $last_date) {
$dateEv[]=$last_date->Company->Event[0]->Date->_;
}
echo "<p>".max($dateEv)."</p>";
}
?>
</td>
<td>
<?php
foreach ($merged_type as $monitor_type) {
echo "<p>".count($monitor_type).'</p>';
}
?>
</td>
<?php endforeach; } ?>
</tbody>
</table>