Added tablesorter and improved Table()

This commit is contained in:
Deon George
2013-05-07 11:38:28 +10:00
parent 74a9c291e4
commit e3c93e1d38
16 changed files with 451 additions and 134 deletions

28
views/table.php Normal file
View File

@@ -0,0 +1,28 @@
<table class="table table-striped table-condensed table-hover" id="list-table">
<thead><tr><th><?php echo implode('</th><th>',$th); ?></th></tr></thead>
<tbody>
<?php foreach ($td as $details) : ?>
<tr><td><?php echo implode('</td><td>',$details['val']); ?></td></tr></tr>
<?php endforeach ?>
<?php if ($other) : ?>
<tr><td>Other</td><td colspan="<?php #echo count($data)-1; ?>"><?php #printf('(%s) %s',$count,$other); ?></td></tr>
<?php endif ?>
</tbody>
</table>
<?php if ($jssort) : ?>
<div class="pager">
Page: <select class="input-mini gotoPage"></select>
<i class="icon-fast-backward first"></i>
<i class="icon-step-backward prev"></i>
<span class="pagedisplay"></span> <!-- this can be any element, including an input -->
<i class="icon-step-forward next"></i>
<i class="icon-fast-forward last"></i>
<select class="input-mini pagesize">
<option selected="selected" value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
Items per page
</div>
<?php endif ?>

View File

@@ -1,7 +0,0 @@
<tr>
<?php foreach ($td as $col => $details) { ?>
<td>
<?php echo $details['url'] ? sprintf(HTML::anchor($details['url'].$details['value'],$details['value'])) : $details['value']; ?>
</td>
<?php } ?>
</tr>

View File

@@ -1 +0,0 @@
</table>

View File

@@ -1,2 +0,0 @@
<table class="table table-striped table-condensed" id="list-table">
<tr><th><?php echo implode('</th><th>',$th); ?></th></tr>

View File

@@ -1 +0,0 @@
<tr><td>Other</td><td colspan="<?php echo count($td)-1; ?>"><?php printf('(%s) %s',$count,$other); ?></td></tr>

View File

@@ -1,8 +0,0 @@
<tr>
<td><?php echo Form::checkbox('id[]',$td['id']['value']); ?></td>
<?php foreach ($td as $col => $details) { ?>
<td>
<?php echo $details['url'] ? sprintf(HTML::anchor($details['url'].$details['value'],$details['value'])) : $details['value']; ?>
</td>
<?php } ?>
</tr>

View File

@@ -1,9 +0,0 @@
</table>
<!--
<div class="btn-group pull-center">
<?php #echo $button; ?>
<button type="submit" name="Submit" class="btn" id="all_on">Select All</button>
<button type="submit" name="Submit" class="btn" id="all_off">Deselect All</button>
<button type="submit" name="Submit" class="btn" id="toggle">Toggle Select</button>
</div>
-->

View File

@@ -1,2 +0,0 @@
<table class="table table-striped table-condensed table-hover" id="select-table">
<tr><th>&nbsp;</th><th><?php echo implode('</th><th>',$th); ?></th></tr>

View File

@@ -1 +0,0 @@
<tr><td>Other</td><td colspan="<?php echo count($td)-1; ?>"><?php printf('(%s) %s',$count,$other); ?></td></tr>