Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.css |
Property changes on: trunk/extensions/UsabilityInitiative/OptIn/OptIn.css |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 1 | + native |
Index: trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php |
— | — | @@ -52,9 +52,58 @@ |
53 | 53 | $wgOut->addWikiMsg( 'optin-intro' ); |
54 | 54 | $wgOut->addHTML( Xml::hidden( 'opt', $opt ) ); |
55 | 55 | // Uses the optin-submit-in or optin-submit-out message |
56 | | - $wgOut->addHTML( Xml::submitButton( wfMsg( "optin-submit-$opt" ) ) ); |
| 56 | + if ( $opt == 'in' ) |
| 57 | + $this->showOptInButtons(); |
| 58 | + else |
| 59 | + $wgOut->addHTML( Xml::submitButton( wfMsg( "optin-submit-out" ) ) ); |
57 | 60 | $wgOut->addHTML( Xml::closeElement( 'form' ) ); |
| 61 | + $wgOut->addWikiMsg( 'optin-improvements' ); |
58 | 62 | } |
| 63 | + |
| 64 | + function showOptInButtons() { |
| 65 | + global $wgOut, $wgOptInStyleVersion; |
| 66 | + UsabilityInitiativeHooks::initialize(); |
| 67 | + UsabilityInitiativeHooks::addStyle( 'OptIn/OptIn.css', |
| 68 | + $wgOptInStyleVersion ); |
| 69 | + $wgOut->addHTML( |
| 70 | + Xml::tags( 'div', array( 'class' => 'optin-accept' ), |
| 71 | + Xml::tags( 'div', array(), |
| 72 | + Xml::tags( 'div', array(), |
| 73 | + Xml::tags( 'div', array(), |
| 74 | + Xml::tags( 'div', array(), |
| 75 | + Xml::tags( 'a', array(), // TODO: target |
| 76 | + Xml::element( 'span', |
| 77 | + array( 'class' => 'optin-button-shorttext' ), |
| 78 | + wfMsg( 'optin-accept-short' ) |
| 79 | + ) . |
| 80 | + Xml::element( 'br' ) . |
| 81 | + Xml::element( 'span', |
| 82 | + array( 'class' => 'optin-button-longtext' ), |
| 83 | + wfMsg( 'optin-accept-long' ) |
| 84 | + ) |
| 85 | + ) |
| 86 | + ) ) ) ) |
| 87 | + ) . " " . |
| 88 | + Xml::tags( 'div', array( 'class' => 'optin-deny' ), |
| 89 | + Xml::tags( 'div', array(), |
| 90 | + Xml::tags( 'div', array(), |
| 91 | + Xml::tags( 'div', array(), |
| 92 | + Xml::tags( 'div', array(), |
| 93 | + Xml::tags( 'a', array(), // TODO: target |
| 94 | + Xml::element( 'span', |
| 95 | + array( 'class' => 'optin-button-shorttext' ), |
| 96 | + wfMsg( 'optin-deny-short' ) |
| 97 | + ) . |
| 98 | + Xml::element( 'br' ) . |
| 99 | + Xml::element( 'span', |
| 100 | + array( 'class' => 'optin-button-longtext' ), |
| 101 | + wfMsg( 'optin-deny-long' ) |
| 102 | + ) |
| 103 | + ) |
| 104 | + ) ) ) ) |
| 105 | + ) |
| 106 | + ); |
| 107 | + } |
59 | 108 | |
60 | 109 | function isOptedIn( $user ) { |
61 | 110 | global $wgOptInPrefs; |
— | — | @@ -84,6 +133,7 @@ |
85 | 134 | |
86 | 135 | function showSurvey() { |
87 | 136 | global $wgOptInSurvey, $wgOut, $wgOptInStyleVersion; |
| 137 | + UsabilityInitiativeHooks::initialize(); |
88 | 138 | UsabilityInitiativeHooks::addScript( 'OptIn/OptIn.js', |
89 | 139 | $wgOptInStyleVersion ); |
90 | 140 | |
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.i18n.php |
— | — | @@ -14,14 +14,17 @@ |
15 | 15 | $messages['en'] = array( |
16 | 16 | 'optin' => 'Usability Initiative opt in', |
17 | 17 | 'optin-desc' => 'Allow users to opt in to the Usability Initiative\'s usability enhancements', |
18 | | - 'optin-title' => 'Usability Initiative enhancements', |
| 18 | + 'optin-title' => 'Opt-in for Improved Usability', |
19 | 19 | 'optin-needlogin' => 'You need to [$1 log in] to opt in to the Usability Initiative\'s usability enhancements.', |
20 | | - 'optin-intro' => 'The Wikipedia Usability Initiative has developed a new skin and a new edit toolbar intended to enhance the usability of Wikipedia. These enhancements have not been enabled for all users yet, but you can opt in to them by clicking "{{int:optin-submit-in}}" below.', |
| 20 | + 'optin-intro' => 'The Wikipedia Usability Initiative has been working hard to improve the usability of Wikipedia. To try some of the new enhancements, click below.', |
21 | 21 | 'optin-success-in' => 'You have successfully opted in to the Usability Initiative\'s usability enhancements. |
22 | 22 | You can opt back out at any time by clicking "{{int:optin-submit-out}}" below.', |
23 | 23 | 'optin-success-out' => 'You have successfully opted out of the Usability Initiative\'s usability enhancements. |
24 | 24 | You can opt back in at any time by clicking {{int:optin-submit-in}} below.', |
25 | | - 'optin-submit-in' => 'Opt in', |
| 25 | + 'optin-accept-short' => 'Let\'s do it!', |
| 26 | + 'optin-accept-long' => 'opt-in to beta', |
| 27 | + 'optin-deny-short' => 'No thanks', |
| 28 | + 'optin-deny-long' => 'return to previous page', |
26 | 29 | 'optin-submit-out' => 'Opt out', |
27 | 30 | 'optin-survey-intro' => "Thank you for trying the Usability Initiative's usability enhancements. |
28 | 31 | You can opt out by clicking \"{{int:optin-submit-out}}\" at the bottom of this page. |
— | — | @@ -56,6 +59,7 @@ |
57 | 60 | 'optin-survey-answer-os-other' => 'Other:', |
58 | 61 | 'optin-survey-question-res' => 'What is the resolution of your screen?', |
59 | 62 | 'optin-survey-question-feedback' => 'Please let us know your feedback:', |
| 63 | + 'optin-improvements' => "== What's been improved? ==\n[[File:UsabilityNavigation.png|right]]\n;Enhanced navigation\nClear indication of the state of \"read\" and \"edit\" whether you are on an article or a discussion page. The search box is moved from the left navigation bar to the top right corner for easier access and quicker searching.\n<div style=\"clear:both;\"></div>\n\n[[File:UsabilityToolbar.png|right]]\n;Edit toolbar improvements\nAn expandable edit toolbar hides infrequently used tool icons. Power users can expand the toolbar to access specialized icons. Help references (cheat sheet) are built into the toolbar. Toolbar icons were redesigned by using Tango and Gnome icons.\n<div style=\"clear:both;\"></div>\n\n[[File:UsabilitySearch.png|right]]\n;Improved search interface\nAs the search result page is often the entry point to an article, titles of results are laid out to increase visibility and infrequently needed information is reduced.\n<div style=\"clear:both;\"></div>\n\n;General aesthetic improvements\nMinimal aesthetic improvements have been applied for visual enhancements and redundant information has been removed.", |
60 | 64 | ); |
61 | 65 | |
62 | 66 | /** Message documentation (Message documentation) |