00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 class aliroAdminPageNav extends aliroAbstractPageNav {
00043 protected $isAdmin = true;
00044
00048 function getLimitBox () {
00049 $legend = T_('Refresh page');
00050 $html = aliroHTML::getInstance()->selectList($this->makeLimitSteps(), 'limit', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $this->limit);
00051 $html .= <<<PER_PAGE
00052
00053 <input type="hidden" name="limitstart" value="$this->limitstart" />
00054 <noscript><input type="submit" class="button" value="$legend" /></noscript>
00055
00056 PER_PAGE;
00057 return $html;
00058 }
00059
00060 function writeLimitBox () {
00061 echo $this->getLimitBox();
00062 }
00063
00064 function writePagesCounter() {
00065 echo $this->getPagesCounter();
00066 }
00067
00071 function writePagesLinks($link='') {
00072 echo $this->getPagesLinks($link);
00073 }
00077 public function getPagesLinks($link='') {
00078 if (!$link) $link = aliroAdminRequest::getInstance()->simpleURL();
00079 return parent::writePagesLinks ($link);
00080 }
00081
00082 function getListFooter() {
00083 $display = T_('Display #');
00084 $html = <<<LIST_FOOTER
00085
00086 <table class="adminlist">
00087 <thead>
00088 <tr>
00089 <th colspan="3">
00090 {$this->getPagesLinks()}
00091 </th>
00092 </tr>
00093 </thead>
00094 <tbody>
00095 <tr>
00096 <td nowrap="nowrap" width="48%" class="right">
00097 $display
00098 </td>
00099 <td>
00100 {$this->getLimitBox()}
00101 </td>
00102 <td nowrap="nowrap" width="48%">
00103 {$this->getPagesCounter()}
00104 </td>
00105 </tr>
00106 </tbody>
00107 </table>
00108
00109 LIST_FOOTER;
00110
00111 return $html;
00112 }
00117 public function rowNumber( $i ) {
00118 return $i + 1 + $this->limitstart;
00119 }
00126 public function orderUpIcon( $i, $condition=true, $task='orderup', $alt='Move Up' ) {
00127 if (($i > 0 || ($i+$this->limitstart > 0)) && $condition) {
00128 return '<a href="#reorder" onclick="return listItemTask(\'cb'.$i.'\',\''.$task.'\')" title="'.$alt.'">
00129 <img src="images/uparrow.png" width="12" height="12" border="0" alt="'.$alt.'" />
00130 </a>';
00131 } else {
00132 return ' ';
00133 }
00134 }
00135
00136 public function noJavaOrderUpIcon( $i, $condition=true, $url ) {
00137 if (($i > 0 OR ($i+$this->limitstart > 0)) AND $condition) {
00138 $alt = T_('Move up');
00139 return <<<ORDERUP
00140 <a href="$url" title="$alt">
00141 <img src="images/uparrow.png" width="12" height="12" border="0" alt="$alt" />
00142 </a>
00143 ORDERUP;
00144 } else {
00145 return ' ';
00146 }
00147 }
00148
00156 public function orderDownIcon( $i, $n, $condition=true, $task='orderdown', $alt='Move Down' ) {
00157 if (($i < $n-1 || $i+$this->limitstart < $this->total-1) && $condition) {
00158 return '<a href="#reorder" onclick="return listItemTask(\'cb'.$i.'\',\''.$task.'\')" title="'.$alt.'">
00159 <img src="images/downarrow.png" width="12" height="12" border="0" alt="'.$alt.'" />
00160 </a>';
00161 } else {
00162 return ' ';
00163 }
00164 }
00165
00166 public function noJavaOrderDownIcon( $i, $n, $condition=true, $url ) {
00167 if (($i < $n-1 OR $i+$this->limitstart < $this->total-1) AND $condition) {
00168 $alt = T_('Move down');
00169 return <<<ORDERDOWN
00170 <a href="$url" title="$alt">
00171 <img src="images/downarrow.png" width="12" height="12" border="0" alt="$alt" />
00172 </a>
00173 ORDERDOWN;
00174 } else {
00175 return ' ';
00176 }
00177 }
00178
00179 }
00180 ?>