[dw-free] /betafeatures is difficult to figure out
[commit: http://hg.dwscoalition.org/dw-free/rev/139a07b97016]
http://bugs.dwscoalition.org/show_bug.cgi?id=4010
Style /betafeatures: add whitespace, tweak buttons for visibility.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=4010
Style /betafeatures: add whitespace, tweak buttons for visibility.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/LJ/Widget/BetaFeature.pm
- htdocs/betafeatures.bml
- htdocs/betafeatures.bml.text
-------------------------------------------------------------------------------- diff -r b3ab77b750fd -r 139a07b97016 cgi-bin/LJ/Widget/BetaFeature.pm --- a/cgi-bin/LJ/Widget/BetaFeature.pm Sun Oct 30 22:57:26 2011 +0800 +++ b/cgi-bin/LJ/Widget/BetaFeature.pm Mon Oct 31 01:22:31 2011 +0800 @@ -18,7 +18,7 @@ use Carp qw(croak); use LJ::BetaFeatures; -sub need_res { } +sub need_res { qw( stc/simple-form.css ) } sub render_body { my $class = shift; @@ -37,16 +37,18 @@ if $handler->is_active; if ($handler->is_active && $handler->user_can_add($u)) { + $ret .= "<div class='simple-form'>"; $ret .= $class->start_form; if ($u->is_in_beta($feature)) { $ret .= "<?p " . $class->ml("widget.betafeature.$feature.on", { $handler->args_list } ) . " p?>"; - $ret .= $class->html_submit("off", $class->ml('widget.betafeature.btn.off')); + $ret .= "<fieldset class='submit'>" . $class->html_submit("off", $class->ml('widget.betafeature.btn.off')) . "</fieldset>"; } else { $ret .= "<?p " . $class->ml("widget.betafeature.$feature.off", { $handler->args_list } ) . " p?>"; - $ret .= $class->html_submit("on", $class->ml('widget.betafeature.btn.on')); + $ret .= "<fieldset class='submit'>" . $class->html_submit("on", $class->ml('widget.betafeature.btn.on')) . "</fieldset>"; } $ret .= $class->html_hidden( feature => $feature, user => $u->user ); $ret .= $class->end_form; + $ret .= "</div>"; } elsif (!$handler->user_can_add($u)) { $ret .= "<?p " . $class->ml("widget.betafeature.$feature.cantadd") . " p?>"; } diff -r b3ab77b750fd -r 139a07b97016 htdocs/betafeatures.bml --- a/htdocs/betafeatures.bml Sun Oct 30 22:57:26 2011 +0800 +++ b/htdocs/betafeatures.bml Mon Oct 31 01:22:31 2011 +0800 @@ -17,7 +17,7 @@ <?_code { use strict; - use vars qw(%GET %POST $title $headextra @errors @warnings); + use vars qw(%GET %POST $title @errors @warnings); $title = BML::ml('.title', {'sitename' => $LJ::SITENAMESHORT}); my $remote = LJ::get_remote(); @@ -46,17 +46,23 @@ } } + my $news = LJ::load_user('news'); + if ( $news ) { + $ret .= "<p class='highlight-box'>" . BML::ml('.staytuned.newscomm', {'news' => $news->ljuser_display}) . "</p>" if $news; + } else { + $ret .= "<p class='highlight-box'>$ML{'.staytuned.generic'}</p>"; + } + $ret .= $body_ret ? $body_ret : "<?p $ML{'.nofeatures'} p?>"; - my $news = LJ::load_user('news'); - $ret .= "<?p " . BML::ml('.staytuned', {'news' => $news->ljuser_display}) . " p?>" if $news; - return $ret; } _code?> <=body title=><?_code return $title; _code?> head<= -<?_code return $headextra; _code?> +<style type="text/css"> +form { max-width: 40em; margin-left: 2em; } +</style> <=head page?> diff -r b3ab77b750fd -r 139a07b97016 htdocs/betafeatures.bml.text --- a/htdocs/betafeatures.bml.text Sun Oct 30 22:57:26 2011 +0800 +++ b/htdocs/betafeatures.bml.text Mon Oct 31 01:22:31 2011 +0800 @@ -1,7 +1,9 @@ ;; -*- coding: utf-8 -*- .nofeatures=There are no features currently available for beta testing. -.staytuned=Stay tuned to [[news]] for upcoming testing opportunities. Thank you. +.staytuned.newscomm=Stay tuned to [[news]] for upcoming testing opportunities. Thank you. + +.staytuned.generic=We'll announce more testing opportunities in our official communities. Thank you. .title=[[sitename]] Beta --------------------------------------------------------------------------------