/
_selected_items.php
42 lines (39 loc) · 1.19 KB
/
_selected_items.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
<?php
/**
* This view display the result of selected items. It's rendered via ajax for the confirmation modal of Massive Widget Modal
*
* @var $aResults The array containing the result of each items selection
*/
if (!isset($tableLabels)) {
$tableLabels = array('ID','Title','Status');
}
?>
<hr>
<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 CHtml::encode($iSid);?>
</td>
<td>
<?php echo CHtml::encode($result['title']);?>
</td>
<?php if ($result['result']):?>
<td class="text-success">
<?php eT('Selected'); ?>
</td>
<?php else: ?>
<td class="text-warning">
<?php echo CHtml::encode($result['error']) ; ?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
</table>