<?php
/**
 * Screen alerts\history
 * @version 1.0.1
 * @package Backend\Alerts
 * 
*/
$context = $this->data["contextname"];
$list = $this->data['list'];
$lcontext = $this->data['contexts'];
$lstatus = $this->data['status'];

?>
<div class="row" >
<div class="col-lg-12" >
            <h3><?= R('page_title_alerts') ?></h3> 
	        <BR>
             <div class="panel panel-default">
	         <div class="panel-body">
           	 <div class="table-responsive" >
           	        <table id="table1" class="table table-hover table-striped tablesorter">
           	 <thead>
                  <tr>
                    <th class="header"><?=R('label_date') ?> <i class="fa fa-sort"></th>
                    <th class="header"><?=R("type") ?> <i class="fa fa-sort"></i></th>
                    <th class="header"><?=R('label_value') ?> <i class="fa fa-sort"></i></th>
                    <th class="header"><?= R("status") ?></th>
                  </tr>
                </thead>
                <tbody>
                <?php
                foreach($list as $line)  { ?>
                 <tr>
                  	 <td>
                    	<?=substr($line->alert_creationdate,0,16); ?>
                	</td>
                    <td>
                    	<?=  ($line->alertcontexttype_descriptioncode != '') ? D($line->alertcontexttype_descriptioncode) : ' - ' ?>
                	</td>
                    <td>
                    	<?= str_replace(__ALERT_CONTEXTDESC_TAG,(isset($line->alert_contextdescription))?$line->alert_contextdescription :$line->alert_contextid,D($line->alerttype_descriptioncode)); ?>
                	</td>
                 <td>
					<?=  ($lstatus[$line->alert_statuscodeid] != '') ? D($lstatus[$line->alert_statuscodeid]) : ' - ' ?>
                  	</td>  
                        	
                  </tr>
               <?php
                  }
                ?>
                </tbody>
              </table>

              
           	 
              </div>
              </div>
              </div>

		              <div class="pull-right">
		              	<a href="<?= __SITEBASE ?>/alerts/live" class="btn btn-default" role="button"><?= R('btn_live') ?></a> 
		              </div>

	</div>
</div> 
          