wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18687: LJSUP-8316. Landing page: need viewing e...

Committer: gprochaev
LJSUP-8316. Landing page: need viewing error

U   trunk/htdocs/community/directory.bml
U   trunk/htdocs/community/directory.bml.text
Modified: trunk/htdocs/community/directory.bml
===================================================================
--- trunk/htdocs/community/directory.bml	2011-03-23 10:51:37 UTC (rev 18686)
+++ trunk/htdocs/community/directory.bml	2011-03-23 11:06:15 UTC (rev 18687)
@@ -1,10 +1,9 @@
 <?page
-title=><?_ml .title _ml?>
 body<=
 <?_code
 {
     use strict;
-    use vars qw(%GET %POST);
+    use vars qw(%GET %POST $title $windowtitle);
     use Class::Autouse qw( LJ::Browse );
 
     return "This page is not available." unless LJ::is_enabled("browse");
@@ -74,8 +73,14 @@
 
     my $cname = $GET{authas};
 
+    $title = "";
+    $windowtitle = $ML{'.title'};
+
     $ret .= "<form action='directory.bml' method='GET'>\n";
-    $ret .= LJ::make_authas_select($remote, { authas => $GET{authas}, type => 'C' });
+    my $authas_select = LJ::make_authas_select($remote, { authas => $GET{authas}, type => 'C' });
+    return "<?h1 $ML{'Error'} h1?><?p $ML{'.error.havent.comm'} p?>" unless $authas_select =~ "<option";
+    $title = $ML{'.title'};
+    $ret .= $authas_select;
     my $ref_vert_id = undef;
     $ref_vert_id = $POST{'vert_id'} ? $POST{'vert_id'} : $GET{'vert_id'};
     $ret .= "<input type='hidden' name='vert_id' value='$ref_vert_id'>" if defined $ref_vert_id;
@@ -244,4 +249,6 @@
 _code?>
 
 <=body
+title=><?_code return $title; _code?>
+windowtitle=><?_code return $windowtitle; _code?>
 page?>

Modified: trunk/htdocs/community/directory.bml.text
===================================================================
--- trunk/htdocs/community/directory.bml.text	2011-03-23 10:51:37 UTC (rev 18686)
+++ trunk/htdocs/community/directory.bml.text	2011-03-23 11:06:15 UTC (rev 18687)
@@ -11,6 +11,8 @@
 .error.noaccess|staleness=1
 .error.noaccess=Only community maintainers are able to submit to the Community Directory. You are not a maintainer of community [[comm]].
 
+.error.havent.comm=You do not have a community to manage.
+
 .error.nocomm|staleness=1
 .error.nocomm=Community not found.
 

Tags: bml, livejournal, text, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments