[Jifty-commit] r2956 - in jifty/trunk: lib/Jifty/Plugin/SkeletonApp
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Mar 13 23:11:19 EDT 2007
Author: jesse
Date: Tue Mar 13 23:11:19 2007
New Revision: 2956
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm
jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm
Log:
r53378 at pinglin: jesse | 2007-03-13 22:46:48 -0400
* skeleton app fleshing out
Modified: jifty/trunk/lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm Tue Mar 13 23:11:19 2007
@@ -16,6 +16,28 @@
use Jifty::Dispatcher -base;
+
+
+on '*' => run {
+ my $top = Jifty->web->navigation;
+ $top->child( Home => url => "/", sort_order => 1, label => _('Home') );
+ if ( Jifty->config->framework('AdminMode') ) {
+ $top->child(
+ Administration =>
+ url => "/__jifty/admin/",
+ label => _('Administration'),
+ sort_order => 998
+ );
+ $top->child(
+ OnlineDocs =>
+ url => "/__jifty/online_docs/",
+ label => _('Online docs'),
+ sort_order => 999
+ );
+ }
+ return ();
+};
+
on '/' => run { show 'index.html' };
1;
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 Tue Mar 13 23:11:19 2007
@@ -20,28 +20,9 @@
=cut
-template '_elements/nav' => sub {
- my $top = Jifty->web->navigation;
- $top->child( Home => url => "/", sort_order => 1, label => _('Home') );
- if ( Jifty->config->framework('AdminMode') ) {
- $top->child(
- Administration =>
- url => "/__jifty/admin/",
- label => _('Administration'),
- sort_order => 998
- );
- $top->child(
- OnlineDocs =>
- url => "/__jifty/online_docs/",
- label => _('Online docs'),
- sort_order => 999
- );
- }
- return ();
-};
-
-template '_elements/sidebar' => sub {
- with( id => "salutation" ), div {
+private template 'salutation' => sub {
+ div {
+ attr {id => "salutation" };
if ( Jifty->web->current_user->id
and Jifty->web->current_user->user_object )
{
@@ -52,10 +33,13 @@
else {
_("You're not currently signed in.");
}
- };
- with( id => "navigation" ), div {
- Jifty->web->navigation->render_as_menu;
- };
+ }
+};
+
+private template 'menu' => sub {
+ div {
+ attr { id => "navigation" };
+ Jifty->web->navigation->render_as_menu; };
};
template '__jifty/empty' => sub {
@@ -63,36 +47,29 @@
};
-template '_elements/header' => sub {
+private template 'header' => sub {
my ($title) = get_current_attr(qw(title));
Jifty->handler->apache->content_type('text/html; charset=utf-8');
- head {
+ head {
with(
'http-equiv' => "content-type",
content => "text/html; charset=utf-8"
- ),
+ ),
meta {};
with( name => 'robots', content => 'all' ), meta {};
title { _($title) };
-
Jifty->web->include_css;
Jifty->web->include_javascript;
- }
+ };
+
};
-template '_elements/keybindings' => sub {
+
+private template 'keybindings' => sub {
div { id is "keybindings" };
};
-template 'index.html' => page {
- { title is _('Welcome to your new Jifty application') }
- img {
- src is "/static/images/pony.jpg", alt is _(
- 'You said you wanted a pony. (Source %1)',
- 'http://hdl.loc.gov/loc.pnp/cph.3c13461'
- );
- };
-};
+#template 'index.html' => page { { title is _('Welcome to your new Jifty application') } img { src is "/static/images/pony.jpg", alt is _( 'You said you wanted a pony. (Source %1)', 'http://hdl.loc.gov/loc.pnp/cph.3c13461'); }; };
1;
More information about the Jifty-commit
mailing list