Add userrights-text message to display at all times on Special:Userrights, like makes...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 31 Dec 2007 23:50:47 +0000 (23:50 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 31 Dec 2007 23:50:47 +0000 (23:50 +0000)
RELEASE-NOTES
includes/Linker.php
includes/SpecialUserrights.php
languages/messages/MessagesEn.php
skins/MonoBook.php
skins/chick/main.css
skins/common/cologneblue.css
skins/common/oldshared.css
skins/common/shared.css
skins/monobook/main.css
skins/simple/main.css

index 501305a..776e79a 100644 (file)
@@ -112,6 +112,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Add HTML ID's mw-read-only-warning and mw-anon-edit-warning to warnings when
   editing to allow CSS styling.
 * Parser now returns list of sections
+* Add userrights-text message to display at all times on Special:Userrights.
 
 === Bug fixes in 1.12 ===
 
index 17e988b..aeb4f68 100644 (file)
@@ -1225,7 +1225,7 @@ class Linker {
         * @return string HTML headline
         */
        public function makeHeadline( $level, $attribs, $anchor, $text, $link ) {
-               return "<a name=\"$anchor\"></a><h$level$attribs$link <span class=\"mw-headline\">$text</span></h$level>";
+               return "<div class=\"mw-h$level\"><a name=\"$anchor\" id=\"$anchor\"></a> <h$level$attribs$text</h$level> $link</div>";
        }
 
        /**
index 0394b7d..f19fe1d 100644 (file)
@@ -232,6 +232,8 @@ class UserrightsForm extends HTMLForm {
         */
        function switchForm() {
                global $wgOut, $wgRequest;
+               $wgOut->addWikiText( wfMsg( 'userrights-text' ) );
+               
                $username = $wgRequest->getText( 'user-editname' );
                $form  = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->action, 'name' => 'uluser' ) );
                $form .= '<fieldset><legend>' . wfMsgHtml( 'userrights-lookup-user' ) . '</legend>';
index 861f080..1cafdd9 100644 (file)
@@ -1343,6 +1343,7 @@ Unselected groups will not be changed. You can deselect a group with CTRL + Left
 'userrights-nodatabase'       => 'Database $1 does not exist or is not local.',
 'userrights-nologin'          => 'You must [[Special:Userlogin|log in]] with an administrator account to assign user rights.',
 'userrights-notallowed'       => 'Your account does not have permission to assign user rights.',
+'userrights-text'             => '', # don't translate or duplicate this message to other languages
 
 # Groups
 'group'               => 'Group:',
index e930a5e..fa6b3c2 100644 (file)
@@ -98,7 +98,7 @@ class MonoBookTemplate extends QuickTemplate {
        <div id="content">
                <a name="top" id="top"></a>
                <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
-               <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
+               <div class="mw-h1 firstHeading"><h1><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1></div>
                <div id="bodyContent">
                        <h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
                        <div id="contentSub"><?php $this->html('subtitle') ?></div>
index 07b922c..236feac 100644 (file)
@@ -41,33 +41,35 @@ hr {
     margin: 0.2em 0 0.2em 0;
 }
 
-h1, h2, h3, h4, h5, h6 {
-    color: Black;
-    background: none;
-    font-weight: normal;
-    margin: 0;
-    padding-top: 0.5em;
-    padding-bottom: 0.17em;
-    border-bottom: 1px solid #aaaaaa;
+/* Headers */
+.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
+       color: black;
+       background: none;
+       margin: 0;
+       border-bottom: 1px solid #aaa;
 }
-.editsection {
+.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
+       border-bottom: none;
+}
+h1, h2 {
        font-weight: normal;
 }
 h1 { font-size: 188%; }
-h1 .editsection { font-size: 53.2%; }
 h2 { font-size: 150%; }
-h2 .editsection { font-size: 66.7%; }
-h3, h4, h5, h6 {
-    border-bottom: none;
-    font-weight: bold;
-}
 h3 { font-size: 132%; }
-h3 .editsection { font-size: 75.8%; }
 h4 { font-size: 116%; }
-h4 .editsection { font-size: 86.2%; }
 h5 { font-size: 100%; }
 h6 { font-size: 80%;  }
-h6 .editsection { font-size: 125%; }
+
+/* To replicate the old padding, where h# were block-level elements and edit
+ * links were floated, we need to multiply .5em top padding and .17em bottom
+ * padding by the header text sizes. */
+.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
+.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
+.mw-h3 { padding: .66em 0 .22em; } /* etc. */
+.mw-h4 { padding: .58em 0 .20em; }
+.mw-h5 { padding: .50em 0 .17em; }
+.mw-h6 { padding: .40em 0 .14em; }
 
 ul {
     line-height: 1.5em;
index 670996e..8613b5f 100644 (file)
@@ -78,7 +78,6 @@ h1 {
  font-family: Verdana, Arial, sans-serif;
  font-size: 180%; line-height: 21pt;
 }
-h1 .editsection { font-size: 55.6%; }
 h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
 #article p.subtitle {
  color: #666666; font-size: 11pt; font-weight: bold;
@@ -91,7 +90,7 @@ a:visited { color: #8D0749; }
 a.printable { text-decoration: underline; }
 a.stub, #quickbar a.stub { color:#772233; text-decoration:none; }
 a.new, #quickbar a.new { color: #CC2200; }
-h2, h3, h4, h5, h6 { margin-bottom: 0; }
+.mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; }
 small { font-size: 75%; }
 input.mw-searchInput { width: 106px; }
 
@@ -106,4 +105,4 @@ div#mw-recreate-deleted-warn {
 div#mw-upload-deleted-warn ul li,
 div#mw-recreate-deleted-warn ul li {
        font-size: 90%;
-}
\ No newline at end of file
+}
index ead422d..4559cd3 100644 (file)
@@ -4,28 +4,6 @@
  * CologneBlue, the old pre-Monobook skins
  */
 
-/* For clarity, explicitly state some recommendations from <http://www.w3.org/
-   TR/CSS21/sample.html> to make sure the editsection links scale right */
-
-h1 { font-size: 2em; }
-h2 { font-size: 1.5em; }
-h3 { font-size: 1.17em; }
-h5 { font-size: .83em; }
-h6 { font-size: .75em; }
-h1, h2, h3, h4, h5, h6 { font-weight: bolder }
-
-/* Now the custom parts */
-
-/* Make edit sections (which are inside h# tags) normal-sized */
-.editsection {
-       font-weight: normal;
-}
-h1 .editsection { font-size: 50% }
-h2 .editsection { font-size: 66.7% }
-h3 .editsection { font-size: 85.5% }
-h5 .editsection { font-size: 120% }
-h6 .editsection { font-size: 133% }
-
 #footer { clear: both }
 /* images */
 div.floatright { float: right; clear: right; margin: 0 0 1em 1em; }
index 61f6839..ef5c926 100644 (file)
@@ -19,11 +19,17 @@ div#mw-js-message {
        background-color: #fcfcfc;
 }
 
-/* Edit section links */
-.editsection {
-       float: right;
-       margin-left: 5px;
-}
+/* Display headings on the same line as edit link */
+h1, h2, h3, h4, h5, h6 { display: inline; margin: 0; }
+/* But then we have to reintroduce the margin.  We use the W3 recommended mar-
+ * gins <http://www.w3.org/TR/CSS21/sample.html>, multiplying by the recom-
+ * mended font-size. */
+.mw-h1 { margin: 1.34em 0; }
+.mw-h2 { margin: 1.13em 0; }
+.mw-h3 { margin: 0.97em 0; }
+.mw-h4 { margin: 1.12em 0; }
+.mw-h5 { margin: 1.25em 0; }
+.mw-h6 { margin: 1.25em 0; }
 
 /**
  * File histories
index 02cc9c9..394a8fb 100644 (file)
@@ -111,31 +111,33 @@ hr {
        margin: .2em 0 .2em 0;
 }
 
-h1, h2, h3, h4, h5, h6 {
+/* Headers */
+.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
        color: black;
        background: none;
-       font-weight: normal;
        margin: 0;
-       padding-top: .5em;
-       padding-bottom: .17em;
        border-bottom: 1px solid #aaa;
 }
-h1 { font-size: 188%; }
-h1 .editsection { font-size: 53%; }
-h2 { font-size: 150%; }
-h2 .editsection { font-size: 67%; }
-h3, h4, h5, h6 {
+.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
        border-bottom: none;
-       font-weight: bold;
 }
+h1, h2 { font-weight: normal; }
+h1 { font-size: 188%; }
+h2 { font-size: 150%; }
 h3 { font-size: 132%; }
-h3 .editsection { font-size: 76%; font-weight: normal; }
 h4 { font-size: 116%; }
-h4 .editsection { font-size: 86%; font-weight: normal; }
 h5 { font-size: 100%; }
-h5 .editsection { font-weight: normal; }
 h6 { font-size: 80%;  }
-h6 .editsection { font-size: 125%; font-weight: normal; }
+
+/* To replicate the old padding, where h# were block-level elements and edit
+ * links were floated, we need to multiply .5em top padding and .17em bottom
+ * padding by the header text sizes. */
+.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
+.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
+.mw-h3 { padding: .66em 0 .22em; } /* etc. */
+.mw-h4 { padding: .58em 0 .20em; }
+.mw-h5 { padding: .50em 0 .17em; }
+.mw-h6 { padding: .40em 0 .14em; }
 
 ul {
        line-height: 1.5em;
index d53443d..2929b93 100644 (file)
@@ -1,26 +1,3 @@
-/* For clarity, explicitly state some recommendations from <http://www.w3.org/
-   TR/CSS21/sample.html> to make sure the editsection links scale right */
-
-h1 { font-size: 2em; }
-h2 { font-size: 1.5em; }
-h3 { font-size: 1.17em; }
-h5 { font-size: .83em; }
-h6 { font-size: .75em; }
-h1, h2, h3, h4, h5, h6 { font-weight: bolder }
-
-/* Now the custom parts */
-
-/* Make edit sections (which are inside h# tags) normal-sized */
-.editsection {
-       font-weight: normal;
-}
-h1 .editsection { font-size: 50% }
-h2 .editsection { font-size: 66.7% }
-h3 .editsection { font-size: 85.5% }
-h5 .editsection { font-size: 120% }
-h6 .editsection { font-size: 133% }
-
-
 #toolbar {
   display: none;
 }
@@ -86,11 +63,22 @@ p {
 }
 p img { margin: 0; }
 
-h1, h2, h3, h4, h5, h6 {
-    margin: 0;
-    padding-top: 0.5em;
-    padding-bottom: 0.17em;
-}
+.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
+       margin: 0;
+}
+/* To replicate the old padding, where h# were block-level elements and edit
+ * links were floated, we need to multiply .5em top padding and .17em bottom
+ * padding by the header text sizes.  We assume the W3 recommendations are
+ * used: 200%, 150%, 117%, 100%, 83%, 75% size in that order
+ * <http://www.w3.org/TR/CSS21/sample.html>.  If not the padding may be margin-
+ * ally off. */
+.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
+.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
+.mw-h3 { padding: .66em 0 .22em; } /* etc. */
+.mw-h4 { padding: .58em 0 .20em; }
+.mw-h5 { padding: .50em 0 .17em; }
+.mw-h6 { padding: .40em 0 .14em; }
+
 fieldset {
     margin: 1em 0em 1em 0em;
     padding: 0em 1em 1em 1em;