[Jifty-commit] r6998 - wifty/trunk/lib/Wifty

Jifty commits jifty-commit at lists.jifty.org
Tue May 12 02:35:47 EDT 2009


Author: ruz
Date: Tue May 12 02:35:47 2009
New Revision: 6998

Modified:
   wifty/trunk/lib/Wifty/View.pm

Log:
* show logging in hint only when user is not logged in

Modified: wifty/trunk/lib/Wifty/View.pm
==============================================================================
--- wifty/trunk/lib/Wifty/View.pm	(original)
+++ wifty/trunk/lib/Wifty/View.pm	Tue May 12 02:35:47 2009
@@ -52,9 +52,11 @@
         div { attr { class => 'inline' };
             unless ( $can_edit ) { p { attr { style => "width: 70%" };
                 outs(_("You don't have permission to edit this page."));
-                outs(' '. _("Perhaps logging in would help."));
                 outs(' '. _("In the mean time, though, you're welcome to view and copy the source of this page."). ' ');
-                tangent(url => '/login', label => _('Login'));
+                unless ( Jifty->web->current_user->id ) {
+                    outs(' '. _("Perhaps logging in would help."));
+                    tangent(url => '/login', label => _('Login'));
+                }
             } }
             form_next_page url => '/view/'.$page->name;
             render_action $viewer, ['content'];


More information about the Jifty-commit mailing list