Index: trunk/phase3/skins/monobook/main.css |
— | — | @@ -691,7 +691,6 @@ |
692 | 692 | } |
693 | 693 | |
694 | 694 | #p-navigation li.active a, #p-navigation li.active a:hover { |
695 | | - color: #000; |
696 | 695 | text-decoration: none; |
697 | 696 | display: inline; |
698 | 697 | } |
— | — | @@ -837,6 +836,7 @@ |
838 | 837 | #p-cactions li.selected { |
839 | 838 | border-color: #fabd23; |
840 | 839 | padding: 0 0 .2em 0; |
| 840 | + font-weight: bold; |
841 | 841 | } |
842 | 842 | #p-cactions li a { |
843 | 843 | background-color: white; |
Index: trunk/phase3/skins/MonoBook.php |
— | — | @@ -110,11 +110,11 @@ |
111 | 111 | <div class="pBody"> |
112 | 112 | <ul> |
113 | 113 | <?php foreach($this->data['personal_urls'] as $key => $item) { |
114 | | - ?><li id="pt-<?php echo htmlspecialchars($key) ?>"><a href="<?php |
| 114 | + ?><li id="pt-<?php echo htmlspecialchars($key) ?>"><?php if ($item['active']) echo '<strong>' ?><a href="<?php |
115 | 115 | echo htmlspecialchars($item['href']) ?>"<?php |
116 | 116 | if(!empty($item['class'])) { ?> class="<?php |
117 | 117 | echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php |
118 | | - echo htmlspecialchars($item['text']) ?></a></li><?php |
| 118 | + echo htmlspecialchars($item['text']) ?></a><?php if ($item['active']) echo '</strong>' ?></li><?php |
119 | 119 | } ?> |
120 | 120 | </ul> |
121 | 121 | </div> |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -430,35 +430,45 @@ |
431 | 431 | * @access private |
432 | 432 | */ |
433 | 433 | function buildPersonalUrls() { |
| 434 | + global $wgTitle, $wgShowIPinHeader; |
| 435 | + |
434 | 436 | $fname = 'SkinTemplate::buildPersonalUrls'; |
| 437 | + $pageurl = $wgTitle->getLocalURL(); |
435 | 438 | wfProfileIn( $fname ); |
436 | 439 | |
437 | 440 | /* set up the default links for the personal toolbar */ |
438 | | - global $wgShowIPinHeader; |
439 | 441 | $personal_urls = array(); |
440 | 442 | if ($this->loggedin) { |
441 | 443 | $personal_urls['userpage'] = array( |
442 | 444 | 'text' => $this->username, |
443 | 445 | 'href' => &$this->userpageUrlDetails['href'], |
444 | | - 'class' => $this->userpageUrlDetails['exists']?false:'new' |
| 446 | + 'class' => $this->userpageUrlDetails['exists']?false:'new', |
| 447 | + 'active' => ( $this->userpageUrlDetails['href'] == $pageurl ) |
445 | 448 | ); |
446 | 449 | $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage); |
447 | 450 | $personal_urls['mytalk'] = array( |
448 | 451 | 'text' => wfMsg('mytalk'), |
449 | 452 | 'href' => &$usertalkUrlDetails['href'], |
450 | | - 'class' => $usertalkUrlDetails['exists']?false:'new' |
| 453 | + 'class' => $usertalkUrlDetails['exists']?false:'new', |
| 454 | + 'active' => ( $usertalkUrlDetails['href'] == $pageurl ) |
451 | 455 | ); |
| 456 | + $href = $this->makeSpecialUrl('Preferences'); |
452 | 457 | $personal_urls['preferences'] = array( |
453 | 458 | 'text' => wfMsg('preferences'), |
454 | | - 'href' => $this->makeSpecialUrl('Preferences') |
| 459 | + 'href' => $this->makeSpecialUrl('Preferences'), |
| 460 | + 'active' => ( $href == $pageurl ) |
455 | 461 | ); |
| 462 | + $href = $this->makeSpecialUrl('Watchlist'); |
456 | 463 | $personal_urls['watchlist'] = array( |
457 | 464 | 'text' => wfMsg('watchlist'), |
458 | | - 'href' => $this->makeSpecialUrl('Watchlist') |
| 465 | + 'href' => $href, |
| 466 | + 'active' => ( $href == $pageurl ) |
459 | 467 | ); |
| 468 | + $href = $this->makeSpecialUrl("Contributions/$this->username"); |
460 | 469 | $personal_urls['mycontris'] = array( |
461 | 470 | 'text' => wfMsg('mycontris'), |
462 | | - 'href' => $this->makeSpecialUrl("Contributions/$this->username") |
| 471 | + 'href' => $href, |
| 472 | + 'active' => ( $href == $pageurl . '/' . $this->username ) |
463 | 473 | ); |
464 | 474 | $personal_urls['logout'] = array( |
465 | 475 | 'text' => wfMsg('userlogout'), |
— | — | @@ -466,26 +476,32 @@ |
467 | 477 | ); |
468 | 478 | } else { |
469 | 479 | if( $wgShowIPinHeader && isset( $_COOKIE[ini_get("session.name")] ) ) { |
| 480 | + $href = &$this->userpageUrlDetails['href']; |
470 | 481 | $personal_urls['anonuserpage'] = array( |
471 | 482 | 'text' => $this->username, |
472 | | - 'href' => &$this->userpageUrlDetails['href'], |
473 | | - 'class' => $this->userpageUrlDetails['exists']?false:'new' |
| 483 | + 'href' => $href, |
| 484 | + 'class' => $this->userpageUrlDetails['exists']?false:'new', |
| 485 | + 'active' => ( $pageurl == $href ) |
474 | 486 | ); |
475 | 487 | $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage); |
| 488 | + $href = &$usertalkUrlDetails['href']; |
476 | 489 | $personal_urls['anontalk'] = array( |
477 | 490 | 'text' => wfMsg('anontalk'), |
478 | | - 'href' => &$usertalkUrlDetails['href'], |
479 | | - 'class' => $usertalkUrlDetails['exists']?false:'new' |
| 491 | + 'href' => $href, |
| 492 | + 'class' => $usertalkUrlDetails['exists']?false:'new', |
| 493 | + 'active' => ( $pageurl == $href ) |
480 | 494 | ); |
481 | 495 | $personal_urls['anonlogin'] = array( |
482 | 496 | 'text' => wfMsg('userlogin'), |
483 | | - 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ) |
| 497 | + 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ), |
| 498 | + 'active' => ( NS_SPECIAL == $wgTitle->getNamespace() && 'Userlogin' == $wgTitle->getDBkey() ) |
484 | 499 | ); |
485 | 500 | } else { |
486 | 501 | |
487 | 502 | $personal_urls['login'] = array( |
488 | 503 | 'text' => wfMsg('userlogin'), |
489 | | - 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ) |
| 504 | + 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ), |
| 505 | + 'active' => ( NS_SPECIAL == $wgTitle->getNamespace() && 'Userlogin' == $wgTitle->getDBkey() ) |
490 | 506 | ); |
491 | 507 | } |
492 | 508 | } |