[Jifty-commit] r1156 - in jifty/trunk: lib/Jifty
share/web/templates/__jifty/admin
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jun 5 00:34:48 EDT 2006
Author: jesse
Date: Mon Jun 5 00:34:48 2006
New Revision: 1156
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Action.pm
jifty/trunk/lib/Jifty/ClassLoader.pm
jifty/trunk/share/web/templates/__jifty/admin/index.html
Log:
r12108 at pinglin: jesse | 2006-06-05 00:33:48 -0400
* Now know what actions are autogenerated and don't display them in our list of all actions
Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm (original)
+++ jifty/trunk/lib/Jifty/Action.pm Mon Jun 5 00:34:48 2006
@@ -936,4 +936,13 @@
return 1;
}
+=head2 autogenerated
+
+Autogenerated Actions will always return true when this method is called.
+"Regular" actions will return false.
+
+=cut
+
+sub autogenerated {0}
+
1;
Modified: jifty/trunk/lib/Jifty/ClassLoader.pm
==============================================================================
--- jifty/trunk/lib/Jifty/ClassLoader.pm (original)
+++ jifty/trunk/lib/Jifty/ClassLoader.pm Mon Jun 5 00:34:48 2006
@@ -137,6 +137,7 @@
"use warnings; use strict; package $module;\n"
. "use base qw/Jifty::Action::Record::$1/;\n"
. "sub record_class { '$modelclass' };\n"
+ . "sub autogenerated { 1 };\n"
. "1;" );
}
return undef;
Modified: jifty/trunk/share/web/templates/__jifty/admin/index.html
==============================================================================
--- jifty/trunk/share/web/templates/__jifty/admin/index.html (original)
+++ jifty/trunk/share/web/templates/__jifty/admin/index.html Mon Jun 5 00:34:48 2006
@@ -48,6 +48,8 @@
<h2><%_('Actions')%></h2>
<ul>
% foreach my $action (Jifty->api->actions) {
+% Jifty::Util->require($action);
+% next if ( $action->autogenerated);
<li><% Jifty->web->link( url => '/__jifty/admin/action/'.$action, label => $action) %>
% }
</ul>
More information about the Jifty-commit
mailing list