2
$thisUrl = url_for($target_module . '/list');
3
$ascArrow = '▲';
4
$descArrow = '▼';
5
($status != 'active') ? $statusAppend = '?status=' . $status : $statusAppend = '?status=active';
6
($sort != null) ? $sortAppend = '&sort=' . $sort : $sortAppend = '';
7
($order != null) ? $orderAppend = '&order=' . $order : $orderAppend = '';
8
($limit != null) ? $limitAppend = '&limit=' . $limit : $limitAppend = '';
2
$thisUrl = url_for($targetModule . '/' . $targetAction);
7
$ascArrow = '▲';
8
$descArrow = '▼';
9
($status != 'active') ? $statusAppend = '?status=' . $status : $statusAppend = '?status=active';
10
($sort != null) ? $sortAppend = '&sort=' . $sort : $sortAppend = '';
11
($order != null) ? $orderAppend = '&order=' . $order : $orderAppend = '';
10
if (!(isset($caption)))
12
//the above two lines are in place to supress warnings until sort is corrected
13
if (!(isset($caption)))
15
//the above two lines are in place to supress warnings until sort is corrected
14
17
<table class="staffTable">
15
18
<caption><?php echo $caption ?>
18
if (count($widgets) > 0) {
19
foreach ($widgets as $widget) {
21
if (count($widgets) > 0) {
22
foreach ($widgets as $widget) {
21
<div class="floatRight" style="font-size: 12px;">
22
<form name="statusForm" action="<?php echo $thisUrl ?>" method="get">
24
<?php if(isset($sort)): ?>
25
<input type="hidden" name="sort" value="<?php echo $sort ?>">
27
<?php if(isset($order)): ?>
28
<input type="hidden" name="order" value="<?php echo $order ?>">
24
<div class="floatRight" style="font-size: 12px;">
25
<form name="statusForm" action="<?php echo $thisUrl ?>" method="get">
27
<?php if(isset($sort)): ?>
28
<input type="hidden" name="sort" value="<?php echo $sort ?>">
30
<?php if(isset($order)): ?>
31
<input type="hidden" name="order" value="<?php echo $order ?>">
41
foreach ($displayColumns as $column => $columnCaption) {
43
$listhead .= ' <th>' . $columnCaption['title'];
44
if ($columnCaption['sortable']) {
45
$listhead .= $sort == $column && $order == 'ASC' ? '<a href="' . $thisUrl . '?status=' . $status . '&sort=' . $column . '&order=ASC" class="buttonSortSelected" title="ascending">' . $ascArrow . '</a>' : '<a href="' . $thisUrl . '?status=' . $status . '&sort=' . $column . '&order=ASC" class="buttonSort" title="ascending">' . $ascArrow . '</a>';
46
$listhead .= $sort == $column && $order == 'DESC' ? '<a href="' . $thisUrl . '?status=' . $status . '&sort=' . $column . '&order=DESC" class="buttonSortSelected" title="descending">' . $descArrow . '</a>' : '<a href="' . $thisUrl . '?status=' . $status . '&sort=' . $column . '&order=DESC" class="buttonSort" title="descending">' . $descArrow . '</a>';
48
if ($columnCaption->offsetExists('tooltip')) {
49
$listhead .= '<a href="' . $columnCaption['tooltip'] . '" class="tooltipTrigger">?</a>';
44
foreach ($displayColumns as $column => $columnCaption)
46
$listhead .= ' <th>' . $columnCaption['title'];
47
if ($columnCaption['sortable'])
49
$listhead .= $sort == $column && $order == 'ASC' ? '<a href="' . $thisUrl . '?status=' . $status . '&sort=' . $column . '&order=ASC" class="buttonSortSelected" title="ascending">' . $ascArrow . '</a>' : '<a href="' . $thisUrl . '?status=' . $status . '&sort=' . $column . '&order=ASC" class="buttonSort" title="ascending">' . $ascArrow . '</a>';
50
$listhead .= $sort == $column && $order == 'DESC' ? '<a href="' . $thisUrl . '?status=' . $status . '&sort=' . $column . '&order=DESC" class="buttonSortSelected" title="descending">' . $descArrow . '</a>' : '<a href="' . $thisUrl . '?status=' . $status . '&sort=' . $column . '&order=DESC" class="buttonSort" title="descending">' . $descArrow . '</a>';
52
if ($columnCaption->offsetExists('tooltip'))
54
$listhead .= '<a href="' . $columnCaption['tooltip'] . '" class="tooltipTrigger">?</a>';
59
foreach ($pager->getResults() as $result) {
60
64
echo get_partial('global/row', array(
62
66
//'widget' => $widget,
63
67
'displayColumns' => $displayColumns,
64
'target_module' => $target_module
68
'targetModule' => $targetModule
72
75
<td colspan=<?php echo count($displayColumns) + 1 ?>>
74
// Output the current staff members being shown, as well total number in the list.
75
// The if prevents getting a 1-0 display indicator if there is an empty list.
76
if($pager->count() == 0) {
79
$firstIndice = $pager->getFirstIndice();
81
echo $firstIndice . "-" . $pager->getLastIndice() . " of " . $pager->count();
77
// Output the current staff members being shown, as well total number in the list.
78
// The if prevents getting a 1-0 display indicator if there is an empty list.
79
$totalRecords = $pager->getNumResults();
80
$firstIndice = ($totalRecords === 0) ? 0 : $pager->getFirstIndice();
81
$lastIndice = $pager->getLastIndice();
82
echo $firstIndice . " - " . $lastIndice . " of " . $totalRecords;
86
87
<td colspan=<?php echo count($displayColumns) + 1 ?>>
88
$listfoot = '<div class="floatRight">';
90
//First Page link (or inactive if we're at the first page).
91
$listfoot .= ( !$pager->isFirstPage() ? '<a href="' . $thisUrl . '?page=' . $pager->getFirstPage() . '&status=' . $status . $sortAppend . $orderAppend . '" class="buttonText" title="First Page"><<</a>' : '<a class="buttonTextOff"><<</a>');
92
//Previous Page link (or inactive if we're at the first page).
93
$listfoot .= ( !$pager->isFirstPage() ? '<a href="' . $thisUrl . '?page=' . $pager->getPreviousPage() . '&status=' . $status . $sortAppend . $orderAppend . '" class="buttonText" title="Previous Page"><</a>' : '<a class="buttonTextOff"><</a>');
94
//Next Page link (or inactive if we're at the last page).
95
$listfoot .= ( !$pager->isLastPage() ? '<a href="' . $thisUrl . '?page=' . $pager->getNextPage() . '&status=' . $status . $sortAppend . $orderAppend . '" class="buttonText" title="Next Page">></a>' : '<a class="buttonTextOff">></a>');
96
//Last Page link (or inactive if we're at the last page).
97
$listfoot .= ( !$pager->isLastPage() ? '<a href="' . $thisUrl . '?page=' . $pager->getLastPage() . '&status=' . $status . $sortAppend . $orderAppend . '" class="buttonText" title="Last Page">>></a>' : '<a class="buttonTextOff">>></a>');
98
$listfoot .= '</div>';
100
// Commented out $listheader here. It's declaration is commented above. Ask Charles.
89
$listfoot = '<div class="floatRight">';
90
$currentPage = $pager->getPage();
91
$firstPage = $pager->getFirstPage();
92
$lastPage = $pager->getLastPage();
93
$seperator = ($targetAction == 'list') ? '?' : '&';
95
//First Page link (or inactive if we're at the first page).
96
$listfoot .= ( ($currentPage == $firstPage) ? '<a class="buttonTextOff"><<</a>' : '<a href="' . $thisUrl . $seperator . 'page=' . $firstPage . '&status=' . $status . $sortAppend . $orderAppend . '" class="buttonText" title="First Page"><<</a>');
97
//Previous Page link (or inactive if we're at the first page).
98
$listfoot .= ( ($currentPage == $firstPage) ? '<a class="buttonTextOff"><</a>' : '<a href="' . $thisUrl . $seperator . 'page=' . $pager->getPreviousPage() . '&status=' . $status . $sortAppend . $orderAppend . '" class="buttonText" title="Previous Page"><</a>');
99
//Next Page link (or inactive if we're at the last page).
100
$listfoot .= ( ($currentPage == $lastPage) ? '<a class="buttonTextOff">></a>' : '<a href="' . $thisUrl . $seperator . 'page=' . $pager->getNextPage() . '&status=' . $status . $sortAppend . $orderAppend . '" class="buttonText" title="Next Page">></a>');
101
//Last Page link (or inactive if we're at the last page).
102
$listfoot .= ( ($currentPage == $lastPage) ? '<a class="buttonTextOff">>></a>' : '<a href="' . $thisUrl . $seperator . 'page=' . $pager->getLastPage() . '&status=' . $status . $sortAppend . $orderAppend . '" class="buttonText" title="Last Page">>></a>');
103
$listfoot .= '</div>';