-
Notifications
You must be signed in to change notification settings - Fork 987
/
_action_results.php
49 lines (48 loc) · 1.51 KB
/
_action_results.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/** @var string $successLabel */
/**
* This view display the result of delete multiple action. It's rendered via ajax for the confirmation modal in survey list
*
* @var $aResults The array containing the result of each survey deletion
*/
if (!isset($tableLabels)) {
$tableLabels = array(gT('ID'), gT('Title'), gT('Status'));
}
?>
<?php if(isset($additionalMessage)):?>
<?php echo $additionalMessage?>
<?php endif;?>
<table class="table table-striped">
<thead>
<?php foreach($tableLabels as $label):?>
<th><?php echo $label?></th>
<?php endforeach;?>
</thead>
<tbody>
<?php foreach($aResults as $iSid => $result):?>
<tr>
<td>
<?php echo $iSid;?>
</td>
<td>
<?php echo CHtml::encode($result['title']);?>
</td>
<?php if ($result['result']):?>
<td class="text-success">
<?php echo $successLabel ?>
</td>
<?php else: ?>
<td class="text-danger">
<?php ;
if(isset($result['error'])){
echo $result['error'] ;
}else{
eT('Error!');
}
; ?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
</table>