[Jifty-commit] r4094 - in apps/CASPlus: . trunk/lib/CASPlus
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Sep 11 18:49:57 EDT 2007
Author: sterling
Date: Tue Sep 11 18:49:56 2007
New Revision: 4094
Modified:
apps/CASPlus/ (props changed)
apps/CASPlus/trunk/ (props changed)
apps/CASPlus/trunk/lib/CASPlus/Dispatcher.pm
apps/CASPlus/trunk/lib/CASPlus/View.pm
Log:
r11991 at dynpc145: andrew | 2007-09-11 17:45:15 -0500
r11981 at dynpc145: andrew | 2007-09-11 17:44:23 -0500
r11968 at dynpc145 (orig r1987): andrew | 2007-09-11 17:53:15 -0500
r11967 at dynpc145: andrew | 2007-09-11 17:39:38 -0500
Move profile object registration to CASPlus::View.
Modified: apps/CASPlus/trunk/lib/CASPlus/Dispatcher.pm
==============================================================================
--- apps/CASPlus/trunk/lib/CASPlus/Dispatcher.pm (original)
+++ apps/CASPlus/trunk/lib/CASPlus/Dispatcher.pm Tue Sep 11 18:49:56 2007
@@ -514,13 +514,7 @@
# Only create the CRUD view if it doesn't exist yet
unless (Template::Declare->resolve_template('/admin/object/'.$name)) {
- use Jifty::View::Declare::CRUD;
-
- # Install a CRUD view for the profile object
- alias Jifty::View::Declare::CRUD under '/admin/object/'.$name, {
- object_type => $name,
- record_class => $profile->record_class,
- };
+ CASPlus::View::_register_profile_object($name, $record_class);
}
# Show that CRUD view!
Modified: apps/CASPlus/trunk/lib/CASPlus/View.pm
==============================================================================
--- apps/CASPlus/trunk/lib/CASPlus/View.pm (original)
+++ apps/CASPlus/trunk/lib/CASPlus/View.pm Tue Sep 11 18:49:56 2007
@@ -281,6 +281,17 @@
alias $view_class under $path;
}
+sub _register_profile_object {
+ my $name = shift;
+ my $record_class = shift;
+
+ # Install a CRUD view for the profile object
+ alias Jifty::View::Declare::CRUD under '/admin/object/'.$name, {
+ object_type => $name,
+ record_class => $record_class,
+ };
+}
+
#use Template::Declare::XML;
#use Jifty::View::Declare schema {
# namespace cas => 'http://www.yale.edu/tp/cas';
More information about the Jifty-commit
mailing list