[Jifty-commit] r2988 - in jifty/trunk:
lib/Jifty/Plugin/Authentication/Password
lib/Jifty/Plugin/Authentication/Password/Action
lib/Jifty/Plugin/LetMe lib/Jifty/Plugin/Yullio
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Mar 16 01:54:02 EDT 2007
Author: jesse
Date: Fri Mar 16 01:54:01 2007
New Revision: 2988
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
jifty/trunk/lib/Jifty/Plugin/LetMe/Dispatcher.pm
jifty/trunk/lib/Jifty/Plugin/Yullio/View.pm
Log:
r53526 at pinglin: jesse | 2007-03-16 01:53:52 -0400
* POD updates
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm Fri Mar 16 01:54:01 2007
@@ -168,10 +168,17 @@
return 1;
}
+=head2 login_message $user_object
+
+Returns the "hi, you're logged in message"
+
+=cut
+
+
sub login_message {
my $self = shift;
my $user = shift;
- return "Welcome back, " . $user->name . "." ;
+ return _("Welcome back, %1.", $user->name);
}
1;
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm Fri Mar 16 01:54:01 2007
@@ -6,6 +6,25 @@
# Put any plugin-specific dispatcher rules here.
+
+=head1 NAME
+
+Jifty::Plugin::Authentication::Password::Dispatcher
+
+=head1 DESCRIPTION
+
+All the dispatcher rules jifty needs to support L<Jifty::Authentication::Password/>
+
+=cut
+
+
+=head1 RULES
+
+
+=head2 before logout
+
+=cut
+
before 'logout' => run {
Jifty->web->new_action( class => 'Logout', moniker => 'logout')->run;
redirect '/';
@@ -14,6 +33,10 @@
# Make sure tangents work
# Before password reminders, login or signup, let's push the user off to the homepage if they're logged in
+=head2 before *
+
+=cut
+
before '*' => run {
if ( Jifty->web->current_user->id ) {
logged_in_nav();
@@ -24,10 +47,19 @@
};
+=head2 on qr/^(?:passwordreminder|signup)$/
+
+=cut
+
on qr/^(?:passwordreminder|signup)$/ => run {
redirect('/') if ( Jifty->web->current_user->id );
set 'next' => Jifty->web->request->continuation || Jifty::Continuation->new( request => Jifty::Request->new( path => "/login" ) );
};
+
+=head2 on login
+
+=cut
+
on qr/^(?:login)$/ => run {
redirect('/') if ( Jifty->web->current_user->id );
set 'next' => Jifty->web->request->continuation || Jifty::Continuation->new( request => Jifty::Request->new( path => "/" ) );
@@ -35,21 +67,40 @@
# Send a password reminder for a lost password
+=head2 on passwordreminder
+
+=cut
+
on 'passwordreminder' => run {
set 'action' => Jifty->web->new_action( class => 'SendPasswordReminder', moniker => 'password_reminder');
};
+
+=head2 on signup
+
# Sign up for an account
+
+=cut
+
on 'signup' => run {
set 'action' => Jifty->web->new_action( class => 'Signup');
};
-# Login
+=head2 on login
+
+Login
+
+=cut
+
on 'login' => run {
set 'action' => Jifty->web->new_action( class => 'Login');
};
+=head2 not_logged_in_nav
+
+=cut
+
sub not_logged_in_nav {
Jifty->web->navigation->child(
Login => label => _('Login') =>
@@ -63,6 +114,10 @@
);
}
+=head2 logged_in_nav
+
+=cut
+
sub logged_in_nav {
Jifty->web->navigation->child(
Logout => label => _('Logout') =>
Modified: jifty/trunk/lib/Jifty/Plugin/LetMe/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/LetMe/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/LetMe/Dispatcher.pm Fri Mar 16 01:54:01 2007
@@ -4,6 +4,16 @@
package Jifty::Plugin::LetMe::Dispatcher;
use Jifty::Dispatcher -base;
+=head1 NAME
+
+Jifty::Plugin::LetMe::Dispatcher
+
+=head1 DESCRIPTION
+
+All the dispatcher rules jifty needs to support L<Jifty::LetMe/>
+
+=cut
+
## LetMes
before qr'^/let/(.*)' => run {
my $let_me = Jifty::LetMe->new();
Modified: jifty/trunk/lib/Jifty/Plugin/Yullio/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Yullio/View.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Yullio/View.pm Fri Mar 16 01:54:01 2007
@@ -56,6 +56,13 @@
};
}
+=head2 yullio CODE CODE
+
+Clkao owes docs
+
+=cut
+
+
sub yullio(&&) {
my ($code1, $code2) = @_;
_yullio_content($code1, $code2)->();
More information about the Jifty-commit
mailing list