<td><?=Columns::output(Arr::path($ticket, 'static.'.$key), Columns::get_type($key))?></td> <?php endforeach;?> <td> <table class="table subtable"> <tr class="same-yellow"> <th>Column name</th> <th>Old value</th> <th>New value</th> <th>Current value</th> </tr> <?php foreach($ticket['data'] as $id => $value): $date = Columns::get_type($id) == 'date';?> <tr class="submission <?=$value['old_value'] != $ticket['current'][$id] ? 'rose' : 'same-yellow' . (isset($_GET['discrepancy']) ? ' hidden' : '')?>"> <td><?=HTML::chars(Columns::get_name($id));?></td> <td><?=HTML::chars($date ? date("d-m-Y H:i", $value['old_value'] ? : 0) : $value['old_value'])?></td> <td><?=HTML::chars($date ? date("d-m-Y H:i", $value['new_value'] ? : 0) : $value['new_value'])?></td> <td><?=HTML::chars($date ? date("d-m-Y H:i", $ticket['current'][$id] ? : 0) : $ticket['current'][$id])?></td> </tr> <?php endforeach;?> </table> </td> </tr> <?php endforeach;?> </table> <div class="col-xs-12 text-center"> <?php if (Pager::pages() > 1) echo $pager = View::factory('Pager');?> </div> <div class="col-xs-12"> <a class="pull-right btn btn-simple export-button" data-url="<?=URL::base()?>imex/discrepancies/export" href="javascript:;"><span class="glyphicon glyphicon-export"></span>Export to CSV</a> </div> <div class="clearfix"> </div> <?php endif;?>
</td> </tr> <?php } ?> </table> <?php echo View::factory('Pager'); if (User::current('is_admin')) { ?> <div class="pull-right"> <a href="<?php echo URL::base(); ?> orders/export?all" class="btn btn-info">Export All</a> <?php if (Pager::pages() > 1) { ?> <a href="<?php echo URL::base(); ?> orders/export<?php echo URL::query(); ?> " class="btn btn-info">Export current page</a> <?php } ?> </div> <?php }
<nav> <ul class="pagination"> <?php if (Pager::pages() > 1):?> <li <?=Pager::page() > 1 ? '' : 'class="disabled"'?>> <a href="<?=URL::query(array('page' => max(1, Pager::page() - 1)))?>" aria-label="Previous"><span aria-hidden="true">«</span></a> </li> <?php for ($i = -3; $i<4; $i++) if (Pager::page() + $i > 0 && Pager::page() + $i <= Pager::pages()): $page = Pager::page() + $i;?> <li <?=$i ? '' : 'class="active"'?>><a href="<?=URL::query(array('page' => $page))?>"><?=$page?></a></li> <?php endif;?> <li <?=Pager::page() < Pager::pages() ? '' : 'class="disabled"'?>> <a href="<?=URL::query(array('page' => min(Pager::pages(), Pager::page() + 1)))?>" aria-label="Next"><span aria-hidden="true">»</span></a> </li> <?php endif;?> <li> <span>Total <?=Pager::$count?> records</span> </li> <li><span>Items on page:</span></li> <?php foreach (Pager::$counts as $count):?> <li <?=$count == Pager::limit() ? 'class="disabled"' : ''?>><a href="javascript:;" class="pager-count " data-value="<?=$count?>"><?=$count?></a></li> <?php endforeach;?> </ul> </nav>
echo URL::query(array('page' => $page)); ?> "><?php echo $page; ?> </a></li> <?php } } ?> <li <?php echo Pager::page() < Pager::pages() ? '' : 'class="disabled"'; ?> > <a href="<?php echo URL::query(array('page' => min(Pager::pages(), Pager::page() + 1))); ?> " aria-label="Next"><span aria-hidden="true">»</span></a> </li> <?php } ?> <li> <span>Total <?php echo Pager::$count; ?> records</span> </li> <li><span>Items on page:</span></li> <?php foreach (Pager::$counts as $count) {