Changeset 3089:c9d317ee8619 for inc/admin
- Timestamp:
- 09/03/15 14:07:40 (10 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.pager.php
r3087 r3089 180 180 } 181 181 182 $html_block .= '<tr>'. 183 '<th colspan="2" class="first">'.__('Title').'</th>'. 184 '<th scope="col">'.__('Date').'</th>'. 185 '<th scope="col">'.__('Category').'</th>'. 186 '<th scope="col">'.__('Author').'</th>'. 187 '<th scope="col"><img src="images/comments.png" alt="" title="'.__('Comments').'" /><span class="hidden">'.__('Comments').'</span></th>'. 188 '<th scope="col"><img src="images/trackbacks.png" alt="" title="'.__('Trackbacks').'" /><span class="hidden">'.__('Trackbacks').'</span></th>'. 189 '<th scope="col">'.__('Status').'</th>'. 190 '</tr>%s</table></div>'; 191 182 $cols = array( 183 'title' => '<th colspan="2" class="first">'.__('Title').'</th>', 184 'date' => '<th scope="col">'.__('Date').'</th>', 185 'category' => '<th scope="col">'.__('Category').'</th>', 186 'author' => '<th scope="col">'.__('Author').'</th>', 187 'comments' => '<th scope="col"><img src="images/comments.png" alt="" title="'.__('Comments'). 188 '" /><span class="hidden">'.__('Comments').'</span></th>', 189 'trackbacks' => '<th scope="col"><img src="images/trackbacks.png" alt="" title="'.__('Trackbacks'). 190 '" /><span class="hidden">'.__('Trackbacks').'</span></th>', 191 'status' => '<th scope="col">'.__('Status').'</th>' 192 ); 193 $cols = new ArrayObject($cols); 194 $this->core->callBehavior('adminPostListHeader',$this->core,$this->rs,$cols); 195 196 $html_block .= '<tr>'.implode(iterator_to_array($cols)).'</tr>%s</table></div>'; 192 197 if ($enclose_block) { 193 198 $html_block = sprintf($enclose_block,$html_block); … … 262 267 ' id="p'.$this->rs->post_id.'">'; 263 268 264 $res .= 265 '<td class="nowrap">'. 266 form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()).'</td>'. 267 '<td class="maximal" scope="row"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 268 html::escapeHTML($this->rs->post_title).'</a></td>'. 269 '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 270 '<td class="nowrap">'.$cat_title.'</td>'. 271 '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>'. 272 '<td class="nowrap count">'.$this->rs->nb_comment.'</td>'. 273 '<td class="nowrap count">'.$this->rs->nb_trackback.'</td>'. 274 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 275 '</tr>'; 269 $cols = array( 270 'check' => '<td class="nowrap">'. 271 form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()). 272 '</td>', 273 'title' => '<td class="maximal" scope="row"><a href="'. 274 $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 275 html::escapeHTML($this->rs->post_title).'</a></td>', 276 'date' => '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>', 277 'category' => '<td class="nowrap">'.$cat_title.'</td>', 278 'author' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>', 279 'comments' => '<td class="nowrap count">'.$this->rs->nb_comment.'</td>', 280 'trackbacks' => '<td class="nowrap count">'.$this->rs->nb_trackback.'</td>', 281 'status' => '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>' 282 ); 283 $cols = new ArrayObject($cols); 284 $this->core->callBehavior('adminPostListValue',$this->core,$this->rs,$cols); 285 286 $res .= implode(iterator_to_array($cols)); 287 $res .= '</tr>'; 276 288 277 289 return $res; … … 293 305 $html_block = 294 306 '<div class="table-outer clear">'. 295 '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'. 296 '<th scope="col">'.__('Title').'</th>'. 297 '<th scope="col">'.__('Date').'</th>'. 298 '<th scope="col">'.__('Author').'</th>'. 299 '<th scope="col">'.__('Status').'</th>'. 300 '</tr>%s</table></div>'; 301 307 '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'; 308 309 $cols = array( 310 'title' => '<th scope="col">'.__('Title').'</th>', 311 'date' => '<th scope="col">'.__('Date').'</th>', 312 'author' => '<th scope="col">'.__('Author').'</th>', 313 'status' => '<th scope="col">'.__('Status').'</th>' 314 ); 315 316 $cols = new ArrayObject($cols); 317 $this->core->callBehavior('adminPostMiniListHeader',$this->core,$this->rs,$cols); 318 319 $html_block .= '<tr>'.implode(iterator_to_array($cols)).'</tr>%s</table></div>'; 302 320 if ($enclose_block) { 303 321 $html_block = sprintf($enclose_block,$html_block); … … 359 377 ' id="p'.$this->rs->post_id.'">'; 360 378 361 $res .= 362 '<td scope="row" class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '. 363 'title="'.html::escapeHTML($this->rs->getURL()).'">'. 364 html::escapeHTML($this->rs->post_title).'</a></td>'. 365 '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 366 '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>'. 367 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 368 '</tr>'; 379 $cols = array( 380 'title' => '<td scope="row" class="maximal"><a href="'. 381 $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '. 382 'title="'.html::escapeHTML($this->rs->getURL()).'">'. 383 html::escapeHTML($this->rs->post_title).'</a></td>', 384 'date' => '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>', 385 'author' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>', 386 'status' => '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>' 387 ); 388 389 $cols = new ArrayObject($cols); 390 $this->core->callBehavior('adminPostMiniListValue',$this->core,$this->rs,$cols); 391 392 $res .= implode(iterator_to_array($cols)); 393 $res .= '</tr>'; 369 394 370 395 return $res; … … 422 447 } 423 448 424 $html_block .= '<tr>'. 425 '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>'. 426 '<th scope="col">'.__('Author').'</th>'. 427 '<th scope="col">'.__('Date').'</th>'. 428 '<th scope="col" class="txt-center">'.__('Status').'</th>'; 449 $cols = array( 450 'type' => '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>', 451 'author' => '<th scope="col">'.__('Author').'</th>', 452 'date' => '<th scope="col">'.__('Date').'</th>', 453 'status' => '<th scope="col" class="txt-center">'.__('Status').'</th>' 454 ); 429 455 if ($spam) { 430 $html_block .= 431 '<th scope="col">'.__('IP').'</th>'. 432 '<th scope="col">'.__('Spam filter').'</th>'; 433 } 434 $html_block .= 435 '<th scope="col" abbr="entry">'.__('Entry').'</th>'. 436 '</tr>%s</table></div>'; 456 $cols['ip'] = '<th scope="col">'.__('IP').'</th>'; 457 $cols['spam_filter'] = '<th scope="col">'.__('Spam filter').'</th>'; 458 } 459 $cols['entry'] = '<th scope="col" abbr="entry">'.__('Entry').'</th>'; 460 461 $cols = new ArrayObject($cols); 462 $this->core->callBehavior('adminCommentListHeader',$this->core,$this->rs,$cols); 463 464 $html_block .= '<tr>'.implode(iterator_to_array($cols)).'</tr>%s</table></div>'; 437 465 438 466 if ($enclose_block) { … … 505 533 ' id="c'.$this->rs->comment_id.'">'; 506 534 507 $res .= 508 '<td class="nowrap">'. 509 form::checkbox(array('comments[]'),$this->rs->comment_id,$checked,'','',0).'</td>'. 510 '<td class="nowrap" abbr="'.__('Type and author').'" scope="row">'. 511 '<a href="'.$comment_url.'" title="'.$comment_title.'">'. 512 '<img src="images/edit-mini.png" alt="'.__('Edit').'"/> '. 513 ($this->rs->comment_trackback ? __('trackback') : __('comment')).' '.'</a></td>'. 514 '<td class="nowrap maximal"><a href="'.$author_url.'">'.html::escapeHTML($this->rs->comment_author).'</a></td>'. 515 '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'. 516 '<td class="nowrap status txt-center">'.$img_status.'</td>'; 535 $cols = array( 536 'check' => '<td class="nowrap">'. 537 form::checkbox(array('comments[]'),$this->rs->comment_id,$checked,'','',0).'</td>', 538 'type' => '<td class="nowrap" abbr="'.__('Type and author').'" scope="row">'. 539 '<a href="'.$comment_url.'" title="'.$comment_title.'">'. 540 '<img src="images/edit-mini.png" alt="'.__('Edit').'"/> '. 541 ($this->rs->comment_trackback ? __('trackback') : __('comment')).' '.'</a></td>', 542 'author' => '<td class="nowrap maximal"><a href="'.$author_url.'">'. 543 html::escapeHTML($this->rs->comment_author).'</a></td>', 544 'date' => '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>', 545 'status' => '<td class="nowrap status txt-center">'.$img_status.'</td>' 546 ); 547 517 548 if ($spam) { 518 549 $filter_name = ''; … … 524 555 } 525 556 } 526 $res .= 527 '<td class="nowrap"><a href="'.$core->adminurl->get("admin.comments",array('ip' => $this->rs->comment_ip)).'">'.$this->rs->comment_ip.'</a></td>'. 528 '<td class="nowrap">'.$filter_name.'</td>'; 529 } 530 $res .= 531 '<td class="nowrap discrete"><a href="'.$post_url.'">'. 532 $post_title.'</a>'. 533 ($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'; 534 557 $cols['ip'] = '<td class="nowrap"><a href="'. 558 $core->adminurl->get("admin.comments",array('ip' => $this->rs->comment_ip)).'">'. 559 $this->rs->comment_ip.'</a></td>'; 560 $cols['spam_filter'] = '<td class="nowrap">'.$filter_name.'</td>'; 561 } 562 $cols['entry'] = '<td class="nowrap discrete"><a href="'.$post_url.'">'.$post_title.'</a>'. 563 ($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'; 564 565 $cols = new ArrayObject($cols); 566 $this->core->callBehavior('adminCommentListValue',$this->core,$this->rs,$cols); 567 568 $res .= implode(iterator_to_array($cols)); 535 569 $res .= '</tr>'; 536 570 … … 565 599 } 566 600 567 $html_block .= '<tr>'. 568 '<th colspan="2" scope="col" class="first">'.__('Username').'</th>'. 569 '<th scope="col">'.__('First Name').'</th>'. 570 '<th scope="col">'.__('Last Name').'</th>'. 571 '<th scope="col">'.__('Display name').'</th>'. 572 '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>'. 573 '</tr>%s</table></div>'; 574 601 $cols = array( 602 'username' => '<th colspan="2" scope="col" class="first">'.__('Username').'</th>', 603 'first_name' => '<th scope="col">'.__('First Name').'</th>', 604 'last_name' => '<th scope="col">'.__('Last Name').'</th>', 605 'display_name' => '<th scope="col">'.__('Display name').'</th>', 606 'entries' => '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>' 607 ); 608 609 $cols = new ArrayObject($cols); 610 $this->core->callBehavior('adminUserListHeader',$this->core,$this->rs,$cols); 611 612 $html_block .= '<tr>'.implode(iterator_to_array($cols)).'</tr>%s</table></div>'; 575 613 if ($enclose_block) { 576 614 $html_block = sprintf($enclose_block,$html_block); … … 607 645 $img_status = sprintf($img,__('superadmin'),'superadmin.png'); 608 646 } 609 return 610 '<tr class="line">'. 611 '<td class="nowrap">'.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post). 612 form::checkbox(array('users[]'),$this->rs->user_id).'</td>'. 613 '<td class="maximal" scope="row"><a href="'.$this->core->adminurl->get('admin.user',array('id' => $this->rs->user_id)).'">'. 614 $this->rs->user_id.'</a> '.$img_status.'</td>'. 615 '<td class="nowrap">'.html::escapeHTML($this->rs->user_firstname).'</td>'. 616 '<td class="nowrap">'.html::escapeHTML($this->rs->user_name).'</td>'. 617 '<td class="nowrap">'.html::escapeHTML($this->rs->user_displayname).'</td>'. 618 '<td class="nowrap count"><a href="'.$this->core->adminurl->get('admin.posts',array('user_id' => $this->rs->user_id)).'">'. 619 $this->rs->nb_post.'</a></td>'. 620 '</tr>'; 647 648 $res = '<tr class="line">'; 649 650 $cols = array( 651 'check' => '<td class="nowrap">'.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post). 652 form::checkbox(array('users[]'),$this->rs->user_id).'</td>', 653 'username' => '<td class="maximal" scope="row"><a href="'. 654 $this->core->adminurl->get('admin.user',array('id' => $this->rs->user_id)).'">'. 655 $this->rs->user_id.'</a> '.$img_status.'</td>', 656 'first_name' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_firstname).'</td>', 657 'last_name' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_name).'</td>', 658 'display_name' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_displayname).'</td>', 659 'entries' => '<td class="nowrap count"><a href="'. 660 $this->core->adminurl->get('admin.posts',array('user_id' => $this->rs->user_id)).'">'. 661 $this->rs->nb_post.'</a></td>' 662 ); 663 664 $cols = new ArrayObject($cols); 665 $this->core->callBehavior('adminUserListValue',$this->core,$this->rs,$cols); 666 667 $res .= implode(iterator_to_array($cols)); 668 $res .= '</tr>'; 669 670 return $res; 621 671 } 622 672 }
Note: See TracChangeset
for help on using the changeset viewer.