Changeset 2130:9571f9d492ef for inc/admin/lib.pager.php
- Timestamp:
- 09/22/13 18:04:14 (12 years ago)
- Branch:
- Ticket #1548
- Parents:
- 2129:8bc6a4f0ac8f (diff), 2013:da9c70e5fd18 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.pager.php
r2008 r2130 50 50 $this->form_hidden = ''; 51 51 foreach ($args as $k=>$v) { 52 if (is_array($v)) { 53 foreach ($v as $k2=>$v2) { 54 $this->form_hidden .= form::hidden(array($k.'[]'),$v2); 55 } 56 } else { 57 $this->form_hidden .= form::hidden(array($k),$v); 58 } 52 $this->form_hidden .= form::hidden(array($k),$v); 59 53 } 60 54 $this->form_action = $url['path']; … … 151 145 class adminPostList extends adminGenericList 152 146 { 153 public function display($page,$nb_per_page,$enclose_block='' )147 public function display($page,$nb_per_page,$enclose_block='',$filter=false) 154 148 { 155 149 if ($this->rs->isEmpty()) 156 150 { 157 echo '<p><strong>'.__('No entry').'</strong></p>'; 151 if( $filter ) { 152 echo '<p><strong>'.__('No entry matches the filter').'</strong></p>'; 153 } else { 154 echo '<p><strong>'.__('No entry').'</strong></p>'; 155 } 158 156 } 159 157 else … … 166 164 } 167 165 } 168 $html_block = 169 '<div class="table-outer">'. 170 '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'. 166 $html_block = '<table class="clear">'; 167 168 if( $filter ) { 169 $html_block .= '<caption>'.sprintf(__('List of %s entries match the filter.'), $this->rs_count).'</caption>'; 170 } else { 171 $html_block .= '<caption class="hidden">'.__('Entries list').'</caption>'; 172 } 173 174 $html_block .= '<tr>'. 171 175 '<th colspan="2" class="first">'.__('Title').'</th>'. 172 176 '<th scope="col">'.__('Date').'</th>'. … … 176 180 '<th scope="col">'.__('Trackbacks').'</th>'. 177 181 '<th scope="col">'.__('Status').'</th>'. 178 '</tr>%s</table> </div>';182 '</tr>%s</table>'; 179 183 180 184 if ($enclose_block) { … … 280 284 281 285 $html_block = 282 '<div class="table-outer clear">'. 283 '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'. 286 '<table class="clear"><caption class="hidden">'.__('Entries list').'</caption><tr>'. 284 287 '<th scope="col">'.__('Title').'</th>'. 285 288 '<th scope="col">'.__('Date').'</th>'. 286 289 '<th scope="col">'.__('Author').'</th>'. 287 290 '<th scope="col">'.__('Status').'</th>'. 288 '</tr>%s</table> </div>';291 '</tr>%s</table>'; 289 292 290 293 if ($enclose_block) { … … 372 375 $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 373 376 374 $comments = array();375 if (isset($_REQUEST['comments'])) {376 foreach ($_REQUEST['comments'] as $v) {377 $comments[(integer)$v]=true;378 }379 }380 377 $html_block = 381 '<div class="table-outer">'.382 378 '<table><caption class="hidden">'.__('Comments and trackbacks list').'</caption><tr>'. 383 379 '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>'. … … 386 382 '<th scope="col" class="txt-center">'.__('Status').'</th>'. 387 383 '<th scope="col" abbr="entry">'.__('Entry title').'</th>'. 388 '</tr>%s</table> </div>';384 '</tr>%s</table>'; 389 385 390 386 if ($enclose_block) { … … 400 396 while ($this->rs->fetch()) 401 397 { 402 echo $this->commentLine( isset($comments[$this->rs->comment_id]));398 echo $this->commentLine(); 403 399 } 404 400 … … 409 405 } 410 406 411 private function commentLine( $checked=false)407 private function commentLine() 412 408 { 413 409 global $author, $status, $sortby, $order, $nb_per_page; … … 488 484 489 485 $html_block = 490 '<div class="table-outer clear">'. 491 '<table><caption class="hidden">'.__('Users list').'</caption><tr>'. 486 '<table class="clear"><caption class="hidden">'.__('Users list').'</caption><tr>'. 492 487 '<th colspan="2" scope="col" class="first">'.__('Username').'</th>'. 493 488 '<th scope="col">'.__('First Name').'</th>'. … … 495 490 '<th scope="col">'.__('Display name').'</th>'. 496 491 '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>'. 497 '</tr>%s</table> </div>';492 '</tr>%s</table>'; 498 493 499 494 if ($enclose_block) {
Note: See TracChangeset
for help on using the changeset viewer.