From: Tim Starling Date: Wed, 16 Aug 2006 00:25:12 +0000 (+0000) Subject: Some styling for Special:Imagelist courtesy of Splarka X-Git-Tag: 1.31.0-rc.0~55975 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=c4c5825235feeeb93ea723aa72cc473bbde7c3d8;p=lhc%2Fweb%2Fwiklou.git Some styling for Special:Imagelist courtesy of Splarka --- diff --git a/includes/Pager.php b/includes/Pager.php index 5555760731..de361b3cdc 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -442,7 +442,10 @@ abstract class TablePager extends IndexPager { function getStartBody() { global $wgStylePath; - $s = "\n"; + $tableClass = htmlspecialchars( $this->getTableClass() ); + $sortClass = htmlspecialchars( $this->getSortHeaderClass() ); + + $s = "
\n"; $fields = $this->getFieldNames(); foreach ( $fields as $field => $name ) { if ( strval( $name ) == '' ) { @@ -469,7 +472,7 @@ abstract class TablePager extends IndexPager { $link = $this->makeLink( "\"$alt\"" . htmlspecialchars( $name ), $query ); - $s .= "\n"; + $s .= "\n"; } else { $s .= '\n"; } @@ -511,6 +514,18 @@ abstract class TablePager extends IndexPager { return $this->mSort; } + function getTableClass() { + return 'TablePager'; + } + + function getNavClass() { + return 'TablePager_nav'; + } + + function getSortHeaderClass() { + return 'TablePager_sort'; + } + /** * A navigation bar with images */ @@ -545,7 +560,8 @@ abstract class TablePager extends IndexPager { } $links = $this->getPagingLinks( $linkTexts, $disabledTexts ); - $s = '
$link$link' . $this->makeLink( htmlspecialchars( $name ), $query ) . "
'; + $navClass = htmlspecialchars( $this->getNavClass() ); + $s = "
"; $cellAttrs = 'valign="top" align="center" width="' . 100 / count( $links ) . '%"'; foreach ( $labels as $type => $label ) { $s .= "\n"; diff --git a/includes/SpecialImagelist.php b/includes/SpecialImagelist.php index eff5a1c9cf..54ee83e5f1 100644 --- a/includes/SpecialImagelist.php +++ b/includes/SpecialImagelist.php @@ -153,6 +153,17 @@ class ImageListPager extends TablePager { return $s; } + function getTableClass() { + return 'imagelist ' . parent::getTableClass(); + } + + function getNavClass() { + return 'imagelist_nav ' . parent::getNavClass(); + } + + function getSortHeaderClass() { + return 'imagelist_sort ' . parent::getSortHeaderClass(); + } } ?> diff --git a/skins/common/common.css b/skins/common/common.css index c17396a6e0..a34624b7b6 100644 --- a/skins/common/common.css +++ b/skins/common/common.css @@ -406,3 +406,22 @@ div.multipageimagenavbox hr { table.multipageimage td { text-align: center; } + +/* + Table pager (e.g. Special:Imagelist) + - remove underlines from the navigation link + - collapse borders + - set the borders to outsets (similar to Special:Allmessages) + - remove line wrapping for all td and th, set background color + - restore line wrapping for the last two table cells (description and size) +*/ +.TablePager_nav a { text-decoration: none; } +.TablePager { border-collapse: collapse; } +.TablePager, .TablePager td, .TablePager th { border: 2px outset #666666; } +.TablePager td, .TablePager th { background-color: #eeeeff } + +.imagelist td, .imagelist th { white-space: nowrap } +.imagelist td + td { background-color: #ffffff } +.imagelist td + td + td + td + td { white-space: normal } +.imagelist th.TablePager_sort { background-color: #ccccff } + diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 9ba74029a0..8b52ee0d9b 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -1465,3 +1465,21 @@ div.multipageimagenavbox hr { table.multipageimage td { text-align: center; } + +/* + Table pager (e.g. Special:Imagelist) + - remove underlines from the navigation link + - collapse borders + - set the borders to outsets (similar to Special:Allmessages) + - remove line wrapping for all td and th, set background color + - restore line wrapping for the last two table cells (description and size) +*/ +.TablePager_nav a { text-decoration: none; } +.TablePager { border-collapse: collapse; } +.TablePager, .TablePager td, .TablePager th { border: 2px outset #666666; } +.TablePager td, .TablePager th { background-color: #eeeeff } + +.imagelist td, .imagelist th { white-space: nowrap } +.imagelist td + td { background-color: #ffffff } +.imagelist td + td + td + td + td { white-space: normal } +.imagelist th.TablePager_sort { background-color: #ccccff }
{$links[$type]}