[Jifty-commit] r3062 - in jifty/trunk/lib/Jifty: View/Declare

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Mar 26 09:12:52 EDT 2007


Author: clkao
Date: Mon Mar 26 09:12:51 2007
New Revision: 3062

Modified:
   jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm
   jifty/trunk/lib/Jifty/View/Declare/Helpers.pm

Log:
Move the h1 in default wrapper to a overridable template.

Modified: jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm	Mon Mar 26 09:12:51 2007
@@ -64,7 +64,9 @@
 
 };
 
-
+private template 'heading_in_wrapper' => sub {
+    h1 { attr { class => 'title' }; outs_raw(get('title')) };
+};
 
 private template 'keybindings' => sub {
     div { id is "keybindings" };

Modified: jifty/trunk/lib/Jifty/View/Declare/Helpers.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Helpers.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/Helpers.pm	Mon Mar 26 09:12:51 2007
@@ -323,7 +323,9 @@
                                 }
                             }
                             &$render_header;
-                            h1 { attr { class => 'title' }; outs_raw($title) };
+                            my $oldt = get('title'); set(title => $title);
+                            show 'heading_in_wrapper';
+                            set(title => $oldt);
                         };
 
                         &_render_pre_content_hook();


More information about the Jifty-commit mailing list