[Jifty-commit] r2338 - in jifty/branches/template-declare: . lib/Jifty/Manual share/web/templates/__jifty/admin/fragments/list share/web/templates/__jifty/error

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Dec 6 06:04:43 EST 2006


Author: audreyt
Date: Wed Dec  6 06:04:22 2006
New Revision: 2338

Added:
   jifty/branches/template-declare/lib/Jifty/Manual/PageRegions.pod
      - copied, changed from r2319, /jifty/branches/template-declare/lib/Jifty/Manual/PageRegions.pm
   jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/header
Removed:
   jifty/branches/template-declare/lib/Jifty/Manual/PageRegions.pm
Modified:
   jifty/branches/template-declare/   (props changed)
   jifty/branches/template-declare/MANIFEST
   jifty/branches/template-declare/lib/Jifty/Manual/AccessControl.pod
   jifty/branches/template-declare/lib/Jifty/Manual/Actions.pod
   jifty/branches/template-declare/lib/Jifty/Manual/Continuations.pod
   jifty/branches/template-declare/lib/Jifty/Manual/Models.pod
   jifty/branches/template-declare/lib/Jifty/Manual/UsingCSSandJS.pod
   jifty/branches/template-declare/share/po/fr.po
   jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/list
   jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/new_item
   jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/update
   jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/view
   jifty/branches/template-declare/share/web/templates/__jifty/error/mason_internal_error

Log:
* Merge down to template-declare branch.

Modified: jifty/branches/template-declare/MANIFEST
==============================================================================
--- jifty/branches/template-declare/MANIFEST	(original)
+++ jifty/branches/template-declare/MANIFEST	Wed Dec  6 06:04:22 2006
@@ -120,7 +120,7 @@
 lib/Jifty/Manual/Glossary.pod
 lib/Jifty/Manual/Models.pod
 lib/Jifty/Manual/ObjectModel.pod
-lib/Jifty/Manual/PageRegions.pm
+lib/Jifty/Manual/PageRegions.pod
 lib/Jifty/Manual/RequestHandling.pod
 lib/Jifty/Manual/Style.pod
 lib/Jifty/Manual/Tutorial.pod

Modified: jifty/branches/template-declare/lib/Jifty/Manual/AccessControl.pod
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Manual/AccessControl.pod	(original)
+++ jifty/branches/template-declare/lib/Jifty/Manual/AccessControl.pod	Wed Dec  6 06:04:22 2006
@@ -1,32 +1,38 @@
 =head1 NAME
 
-Jifty::Manual::AccessControl
+Jifty::Manual::AccessControl - Using Jifty's default ACL system
 
 =head1 DESCRIPTION
 
 
 Out of the box Jifty-based applications have an ACL system.  The system 
-automatically validates ACLs on Jifty::Record objects by calling the method
+automatically validates ACLs on L<Jifty::Record> objects by calling the method
 C<current_user_can> before any create, read, update, or delete operation.
 In all cases, the arguments passed to the CRUD operation are passed as 
-extra arguments to current_user_can.
+extra arguments to C<current_user_can>.
 
 On C<create()>, we reject the operation if C<current_user_can('create')>
 returns FALSE.
 
-On C<_value()> or C<I<somefieldname>>, we reject the operation  if C<current_user_can('read')> returns false.
+On C<_value()> or C<I<somefieldname>>, we reject the operation
+if C<current_user_can('read')> returns false.
 
-On C<_set()> or C<I<set_somefieldname>>, we reject the operation  if C<current_user_can('write')> returns false.
+On C<_set()> or C<I<set_somefieldname>>, we reject the operation
+if C<current_user_can('write')> returns false.
 
 
-On C<delete()>, we reject the operation  if C<current_user_can('delete')> returns false.
+On C<delete()>, we reject the operation  if C<current_user_can('delete')>
+returns false.
 
-Out of the box, C<current_user_can> returns 1. When you want to actually check ACLs, you'll need to override C<current_user_can()> in your C<Jifty::Record> subclass.
+Out of the box, C<current_user_can> returns 1. When you want to actually 
+check ACLs, you'll need to override C<current_user_can()> in your
+C<Jifty::Record> subclass.
 
 It's likely that at some point, you'll decide you want to ask other
-questions on certain types of operation.  Say, you only want to let
+questions on certain types of operations.  Say, you only want to let
 administrators update the C<paid_account> field. In that case, you'd override
-C<check_update_rights()> to look for the C<admin> right rather than the C<update> right, if the C<FIELD> is C<paid_account>.
+C<check_update_rights()> to look for the C<admin> right rather than the 
+C<update> right, if the C<FIELD> is C<paid_account>.
 
 =head1 ENABLING ACCESS CONTROL USING THE LOGIN PLUGIN
 
@@ -38,7 +44,7 @@
       - Login: {}
 
 Then, create an C<App::Model::User> class that derives from
-C<Jifty::Plugin::Login::Model::User>, for example like that:
+C<Jifty::Plugin::Login::Model::User>, for example:
 
     use strict;
     use warnings;
@@ -58,7 +64,7 @@
 The model that manages C<User> Records is not limited to the plugin's
 definition. It can be expanded by providing an additional schema
 definition. Every column here will be added to the plugin's
-columns. Simply add a schema definition block like the following:
+columns. Simply add a schema definition block like this:
 
     use Jifty::DBI::Schema;
     use App::Record schema {
@@ -74,9 +80,9 @@
 a chance to add more data to the C<CurrentUser> object. This method
 will automatically get called after the Plugin's C<_init> is done.
 
-=head2 Templates defined by the Login plugin
+=head2 Templates defined by the C<Login> plugin
 
-To avoid the need for repetitive work, the Login plugin already
+To avoid the need for repetitive work, the C<Login> plugin already
 defines a couple of usable templates:
 
 =over 4
@@ -84,8 +90,8 @@
 =item F</login>
 
 provides a login screen with a signup option. After
-successful login, the current Continuation is called. If no
-Continuation exists, the template sitting at the base URL (F</>) is called.
+successful login, the current continuation is called. If no
+continuation exists, the template sitting at the base URL (F</>) is called.
 
 =item F</logout>
 
@@ -93,17 +99,17 @@
 
 =item F</signup>
 
-allows a user to sign up himself. As a default
-behavior a confirmation mail is sent out that has to get followed by
+allows a user to sign up himself/herself. By default
+a confirmation mail is sent out that has to get followed by
 the user.
 
 =item F</chgpasswd>
 
-allows a user to change his password.
+allows a user to change his/her password.
 
 =item F</passwordreminder>
 
-after entering his mail address, the user will receive a mail that
+after entering his/her mail address, the user will receive a mail that
 contains a link to F</let/reset_lost_password>.
 
 =item F</let/confirm_email>

Modified: jifty/branches/template-declare/lib/Jifty/Manual/Actions.pod
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Manual/Actions.pod	(original)
+++ jifty/branches/template-declare/lib/Jifty/Manual/Actions.pod	Wed Dec  6 06:04:22 2006
@@ -7,8 +7,8 @@
 C<Jifty::Action> abstracts around the idea of declaring named
 (L<"parameters"|Jifty::Manual::Glossary/parameter>) at compile time.
 At runtime, the action collects user input as
-(L<"arguments"|Jifty::Manual::Glossary/argument>), do something with them,
-and returning some result to the user.  If this sounds incredibly
+(L<"arguments"|Jifty::Manual::Glossary/argument>), does something with them,
+and returns some result to the user.  If this sounds incredibly
 general, that's because it is -- actions do nearly B<everything> in Jifty.
 
 C<Jifty::Action> will also generate HTML for you from its parameters --
@@ -16,7 +16,7 @@
 POST arguments by hand and dispatching them where they belong --
 C<Jifty::Action> does it all for you.
 
-=head2 WRITING ACTIONS
+=head1 WRITING ACTIONS
 
 Jifty provides some actions for you out of the box -- see
 L<Jifty::Manual::ObjectModel> and L<Jifty::Action::Record> for
@@ -26,10 +26,10 @@
 
 Every action is a subclass of Jifty::Action, as well as typically
 I<AppName>::Action. Actions usually live in the I<AppName>::Action::
-namespace; While that's just convention, it will make your life easier
+namespace; while that's just a convention, it will make your life easier
 if you follow it.
 
-This, the simplest possible action is:
+This, the simplest possible action, is:
 
     use warnings;
     use strict;
@@ -55,7 +55,7 @@
 
 Every C<Jifty::Action> subclass should define a C<schema>, which contains
 some C<param> declarations that describes what arguments it takes.
-Supposing we were writing a an action to post a blog article, we might start
+Supposing we were writing an action to post a blog article, we might start
 out with parameters like thus:
 
     use Jifty::Param::Schema;
@@ -69,7 +69,7 @@
 
 However, we've only scratched the surface of the power the
 C<param> API offers.  Parameters can have types, labels,
-validators, canonicalizers, and even more. To start with, lets add
+validators, canonicalizers, and even more. To start with, let's add
 some types and labels:
 
     use Jifty::Param::Schema;
@@ -121,8 +121,8 @@
     ...
 
 Now, Jifty will populate the combobox with the result of calling C<name>
-on each element on C<$categories>. Alternatively, if you set
-C<<value_from => 'id'>>, Jifty would automatically return the C<id> of
+on each element in C<$categories>. Alternatively, if you set
+C<< value_from => 'id' >>, Jifty would automatically return the C<id> of
 the category, for easy database reference. We don't do this with the
 combobox, however, since a combobox displays the selected value in its
 text field.
@@ -131,13 +131,13 @@
 you can set in the C<param> declaration, and see L<Jifty::Param::Schema>
 for more about the syntax.
 
-=head3 validation
+=head2 validation
 
 C<Jifty::Action> can automatically validate arguments for you, as
 appropriate. If an argument has C<valid_values>, then C<Jifty::Action>
-will automatically verify that the given value matches one of
+will automatically verify if the given value matches one of
 them. However, you can also write your own validators. Just write a
-C<< sub validate_<argument> >>, and it will be called as appropriate:
+C<< sub validate_<parameter> >>, and it will be called as appropriate:
 
     use Regexp::Common 'profanity_us';
 
@@ -145,7 +145,9 @@
        my $self = shift;
        my $body = shift;
        if ( $body =~ /$RE{profanity}/i) {
-           return $self->validation_error( body => 'Would you speak like that in front of your mother? *cough*');
+           return $self->validation_error(
+               body => 'Would you speak like that in front of your mother? *cough*'
+           );
        }
        return $self->validation_ok('body');
     }
@@ -153,7 +155,7 @@
 You can also do validation in the model -- see
 L<Jifty::Action::Record> 
 
-=head3 canonicalization
+=head2 canonicalization
 
 If, instead of failing, you want to automatically modify
 invalid content to be valid, you want a
@@ -196,7 +198,9 @@
         if ($value =~ s/\[(.*?)\]//) {
             # this clobbers, may want to merge
             $self->argument_value( tags => $1 );
-            $self->canonicalization_note( title => 'Removed tags from your title' );
+            $self->canonicalization_note(
+                title => 'Removed tags from your title'
+            );
         }
 
         return $value;
@@ -206,7 +210,8 @@
 If you set C<ajax validates> or C<ajax canonicalizes>
 for an argument, then Jifty will automatically validate or
 canonicalize it in an L<AJAX|Jifty::Manual::Glossary/ajax>-enabled
-browser when the user stops typing.
+browser when the user stops typing and puts the focus out of
+the corresponding form field.
 
 =head2 take_action
 
@@ -220,7 +225,7 @@
 been passed an argument or not (as opposed to being passed a true
 argument or not), use C<< $self->has_argument('foo') >>.
 
-Once an action has done its thing, it needs to inform the caller
+Once an action has done its task, it needs to inform the caller
 whether or not it has succeeded, possibly with some status message. To
 this end, every C<Jifty::Action> has a C<Jifty::Result> associated
 with. C<Jifty::Result> carries both a failure/sucess code, and a
@@ -237,7 +242,7 @@
     $self->result->message('Posted to your blog');
 
 Actions will default to successful with an empty message if you don't
-do anything. Additionally, if you need to return more semantic
+do anything with the result object. Additionally, if you need to return more semantic
 information than a simple message, you can set arbitrary content on
 the result, using $self->result->content, e.g:
 
@@ -257,9 +262,15 @@
    </%init>
 
 where C<'post_blog'> is the moniker for your post page action object.
-In fact, that's exactly how actions "return" values to other templates 
+In fact, that's exactly how actions "return" values to other components 
 in your application.
 
+Mutiple action "return values" are possible and arbitrary data structures
+can be passed too:
+
+    $self->result->content( keys   => $keys );
+    $self->result->content( result => $collection);
+
 It should also be mentioned that the response object is "per request". That is,
 it usually can't live up to another user request. Therefore, when paging mechanism 
 is applied to your view page, for example, you have to either pass some data 
@@ -268,7 +279,7 @@
 See L</monikers>, the Jifty Pony site's source, and L<Jifty::Request::Mapper> for some 
 more information.
 
-=head2 USING ACTIONS
+=head1 USING ACTIONS
 
 At their simplest, you can create and run actions yourself, e.g.:
 
@@ -281,11 +292,11 @@
         }
     )->run;
 
-Note that Jifty->web->new_action, and all similar methods
+Note that C<< Jifty->web->new_action >>, and all similar methods
 (e.g. L<Jifty::Request::add_action|Jifty::Request/add_action>,
 L<Jifty::Web::Form::add_action|Jifty::Web::Form/new_action>), will
 automatically qualify the C<class> with either C<Jifty::Action::> or
-C<I<AppName>::Action::> as necessary (I told you putting actions in
+C<I<AppName>::Action::> as necessary (I've told you putting actions in
 I<AppName::Action::> would make your life easier!)
 
 In practice, you'll rarely provide actions with arguments
@@ -309,7 +320,7 @@
     </div>
       <% $create->form_field('body') %>
     <% Jifty->web->form->submit(label => "Post") %>
-    %# or <% Jifty->web->form->link(label => "Post", submit => # $create) %>
+    %# or <% Jifty->web->form->link(label => "Post", submit => $create) %>
     %# or <% $action->button(label => "Post"); %>
     <% Jifty->web->form->end %>
 
@@ -318,7 +329,7 @@
 to your action as an argument when the form is submitted. If you need
 to change the appearance of the field, Jifty outputs classes on the
 fields, as well as providing some semantic C<< <div> >>s you can style
-using CSS. (TODO: Document Jifty HTML classes and default CSS).
+using CSS. (See L<Jifty::Manual::UsingCSSandJS> for some more details.)
 
 See L<Jifty::Web::Form/submit>, L<Jifty::Web/link> and
 L<Jifty::Action/button> for details on the different ways to generate
@@ -326,13 +337,13 @@
 
 Additionally, instead of C<form_field>, you can use C<hidden> to
 generate a C<hidden> input, which will not be viewable or editable in
-a web browser. (Note that a knowledgeable user *can* still submit a
+a web browser. (Note that a knowledgeable user I<can> still submit a
 form with a different value for that hidden input; If this concerns
 you, make sure you have appropriate
 L<ACLs|Jifty::Manual::AccessControl> in place. If it still worries
-you, you probably want a L<continuation|Jifty::Continuation>.
+you, you probably want a L<continuation|Jifty::Continuation> here.)
 
-=head3 monikers
+=head2 monikers
 
 You probably noticed the C<< moniker => 'post_blog' >>. Every action you
 create in Jifty has an associated
@@ -342,7 +353,7 @@
 serialized (over HTTP, or Javascript AJAX calls, and so on), and
 unpacked, we need a way refer to specific actions other than just
 object identity, e.g. to extract its arguments or results in the
-L<dispatcher|Jifty::Dispatcher>. Monikers give us that. Given a
+L<dispatcher|Jifty::Dispatcher> or a template. Monikers give us that. Given a
 moniker, you can pull information about the associated action out of a
 L<request|Jifty::Request> or L<response|Jifty::Response>.
 
@@ -350,7 +361,7 @@
 
 (XXX TODO Note about action registration here)
 
-=head3 Argument Folding
+=head2 Argument Folding
 
 If you write out more than one C<form_field> for a given argument in
 the same form, and more than one is filled in, Jifty will C<fold> the

Modified: jifty/branches/template-declare/lib/Jifty/Manual/Continuations.pod
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Manual/Continuations.pod	(original)
+++ jifty/branches/template-declare/lib/Jifty/Manual/Continuations.pod	Wed Dec  6 06:04:22 2006
@@ -10,7 +10,7 @@
 that state at any later time, by calling the continuation with, and
 evaluation of that interpreter state will resume.  They're a concept
 that first arose in LISP, but has implementations these days in Ruby,
-Scheme, Haskell, Smalltalk, to name a few.
+Scheme, Haskell, Smalltalk (just to name a few).
 
 Thus, continuations allow you to preserve context, and return to it
 later.  This is amazingly useful in web programming, which is limited
@@ -116,7 +116,7 @@
 
 The first page renders the entry box for the first number; the second
 input is hidden because Jifty notices that it is based on a mapped
-value: i.e., its default is set to C<{request_argument => "number"}>
+value: i.e., its default is set to C<< {request_argument => "number"} >>
 instead of a plain scalar value.
 
 Pressing the button validates the action but does not complete
@@ -168,7 +168,7 @@
 to C</protected>.
 
 As currently impelented, these redirect-from-dispatcher tangents works
-exactly like like rendered-as-links tangents, in that when they return,
+exactly like rendered-as-links tangents, in that when they return,
 I<all> rules in the dispatcher are still executed from the start.
 Therefore the C<unless> guard in the C<before '/protected'> rule above
 is neccessary to prevent recursion.

Modified: jifty/branches/template-declare/lib/Jifty/Manual/Models.pod
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Manual/Models.pod	(original)
+++ jifty/branches/template-declare/lib/Jifty/Manual/Models.pod	Wed Dec  6 06:04:22 2006
@@ -63,8 +63,8 @@
 To get all these things done, Jifty allows to describe the schema
 definition in a simply comprehendable but powerful syntax that looks
 more like written text than a programming language. The schema
-definition is made inside the I<MyApp::Model::XXX::Schema> package and
-for every single column to get created, starts with the word C<column>
+definition is made inside the C<MyApp::Model::XXX::Schema> package and
+every single column to get created starts with the word C<column>
 followed by the column's name.
 
 A simple definition could look like this:
@@ -76,7 +76,7 @@
         since '0.0.1';
 
 The following BNF shows the full syntax supported (omitting
-non-terminals that are self explaining for perl-developers):
+non-terminals that are self-explanatory to perl-developers):
 
     schema_definition ::= column_definition+
 
@@ -128,12 +128,13 @@
     jifty schema --setup
 
 your database structure will be in sync to your schema definition.
+See L<Jifty::Manual::Upgrading> for more information on model upgrading.
 
 =head2 Testing a model
 
 After having created a schema, you might use the B<ADMINISTRATION>
-Menu entry in Jifty's web view to browse through your models and add,
-edit or delete records in your database.
+Menu entry in Jifty's web view (i.e. the "pony") to browse through
+your models and add, edit or delete records in your database.
 
 =head2 The classes behind a model
 
@@ -141,12 +142,12 @@
 
 =item * MyApp::Model::Xxx
 
-This is the model-class you created to access records of your desired
+This is the model-class you created to access individual records of your desired
 type. You will directly deal with objects of this class.
 
 =item * MyApp::Record
 
-All records of MyApp::Model::Xxx will have this class as their base
+All records of C<MyApp::Model::Xxx> will have this class as their base
 class. Usually, this class will be automatically created by
 L<Jifty::ClassLoader> for you. But, if you want to automatically
 enable all your records to do something, you will have a chance to do
@@ -154,13 +155,13 @@
 
 =item * L<Jifty::Record>
 
-This is the super-class of MyApp::Record. Inside this class, loading
+This is the super-class of C<MyApp::Record>. Inside this class, loading
 of records as well as the checking of user capabilities is done before
 going one level down to the database layer.
 
 =item * L<Jifty::DBI::Record>
 
-This is the lowest-level class that the database-stack provides. It
+This is the lowest-level class that the database stack provides. It
 directly deals with the underlying database.
 
 =item * App::Model::XxxCollection
@@ -168,8 +169,9 @@
 As the name applies, a collection is a set of typically more than one
 record. Every collection of this class conists of multiple
 C<App::Model::Xxx> objects that can get retrieved from your data-store
-without explicit SQL statements, ordered by any criteria you like and
-iterated sequentially or accessed at random order.
+without explicit SQL statements, ordered by any criteria you give,
+paged in the fashion you like,
+and iterated sequentially or accessed at random order.
 
 =item * App::Collection
 
@@ -185,14 +187,14 @@
 
 =item * L<Jifty::DBI::Collection>
 
-This is the low-level base class that directly manages the access to
+This is the lowest-level base class that directly manages the access to
 the underlying database.
 
 =back
 
-=head2 Working with single records
+=head2 Working with a single record
 
-Working with single records means work with objects of classes like
+Working with a single record means working with objects of classes like
 C<MyApp::Model::Xxx>. The typical creation and usage of a single
 record is:
 
@@ -200,17 +202,17 @@
     my $object = new MyApp::Model::Xxx;
 
     # either create a representation in the DB
-    $object->create(column=>'value', ...);
+    $object->create(column => 'value', ...);
 
     # or load the data from DB somehow
     $object->load($id); # by a matching ID
-    $object->load_by_cols(column=>'value', other_column=>'secondvalue');
+    $object->load_by_cols(column => 'value', other_column => 'secondvalue');
 
     # try to load and if failed, create a record
-    $object->load_or_create(column=>'value');
+    $object->load_or_create(column => 'value');
 
     # get the record's ID in the database
-    # results in 'undef' if record is not valid (usually means not found)
+    # results in 'undef' if record is not valid (which usually means not found)
     my $id = $object->id;
 
     # delete the record from the database
@@ -247,10 +249,10 @@
     $collection->unlimit;
 
     # or restrict items to match some condition
-    $collection->limit(column=>'colname', operator=>'=', value=>42);
+    $collection->limit(column => 'colname', operator => '=', value => 42);
 
     # bring the items into some sorting order
-    $collection->order_by(column=>'colname');
+    $collection->order_by(column => 'colname');
 
     # if neccesarry, directly jump to some record from the set
     $collection->goto_first_item;
@@ -270,7 +272,7 @@
     # get back an array-ref containing all items
     my $records = $collection->items_array_ref;
 
-=head3 some options provided by C<limit>
+=head3 Some options provided by C<limit>
 
 In order to construct more complex restrictions the C<limit> method
 may get called more than once, specifying one single condition with
@@ -292,19 +294,24 @@
 
     # combining restrictions with "AND"
     # note that "AND" is implicit here
-    $collection->limit(column=>'col1', value=>'...');
-    $collection->limit(column=>'col2', value=>'...');
+    $collection->limit(column => 'col1', value => '...');
+    $collection->limit(column => 'col2', value => '...');
 
     # combining restrictions with "OR"
     # note that the 'subclause' has the same value
-    $collection->limit(column=>'col1', value=>'...',
-                       entry_aggregator=>'OR', # is already default
-                       subclause=>'some_id');
-    $collection->limit(column=>'col2', value=>'...',
-                       entry_aggregator=>'OR', # is already default
-                       subclause=>'some_id');
+    $collection->limit(column => 'col1', value => '...',
+                       entry_aggregator => 'OR', # is already default
+                       subclause => 'some_id');
+    $collection->limit(column => 'col2', value => '...',
+                       entry_aggregator => 'OR', # is already default
+                       subclause => 'some_id');
 
-see L<Jifty::DBI::Collection> about more ways or ordering and limiting
+For debugging purposes, you might want to examine the SQL statement
+generated behind the scene:
+
+    warn $collection->build_select_query;
+
+See L<Jifty::DBI::Collection> about more ways or ordering and limiting
 collections.
 
 =head2 Action - Model relationship

Copied: jifty/branches/template-declare/lib/Jifty/Manual/PageRegions.pod (from r2319, /jifty/branches/template-declare/lib/Jifty/Manual/PageRegions.pm)
==============================================================================
--- /jifty/branches/template-declare/lib/Jifty/Manual/PageRegions.pm	(original)
+++ jifty/branches/template-declare/lib/Jifty/Manual/PageRegions.pod	Wed Dec  6 06:04:22 2006
@@ -15,12 +15,12 @@
 
 =head2 Constructing Page Regions
 
-From inside any template, a region may get constructed something like
+From inside any template, a region may get constructed via something like
 this:
 
     <% Jifty->web->region( name     => 'regionname',
                            path     => '/path/of/component',
-                           defaults => {argname => 'some value', ...},
+                           defaults => { argname => 'some value', ... },
                          ) %>
 
 This call will pass all arguments to the C<new> constructor of
@@ -34,6 +34,8 @@
 content into a C<< <div> >> tag which is marked with a fully qualified
 name for that region. The qualified name represents the nesting
 structure of regions inside a page and is automatically built inside.
+The qualified name for a given L<Jifty::Web::PageRegion> object can
+be obtained by calling C<< Jifty->web->qualified_region >>.
 
 =item path (optional)
 
@@ -104,16 +106,26 @@
                          as_button => 1,
                        ) %>
 
+    %# refresh the parent region which holds the current one
+    <% $search->button(
+        label   => 'Search!',
+        onclick => {
+            submit  => $search_action,
+            refresh => Jifty->web->current_region->parent,
+            args    => { page => 1 }
+                   }
+      ) %>
+
 =head1 GORY DETAILS
 
 There is a bit of complication involved in making sure that the
-on-server Perl implementation of page regions, and, more importantly,
+server-side Perl implementation of page regions, and, more importantly,
 how they preserve state, interacts with the client-side JavaScript
 implementation.  What follows is an attempt to describe the process.
 
 Regions, when they are created, have a default path and a default set
 of arguments.  These are "defaults" because they can be overridden by
-the browser -- this is what enables the browser to say "and that
+the browser -- this is what enables the browser to say "...and that
 region has this other path, in reality."  The same is true for
 arguments; for example, a paging widget could have a default C<page>
 argument of 1, but could be actually being rendered with a C<page> of
@@ -123,7 +135,7 @@
 region is entered, it peers at the current state variables, and
 overrides the default path and arguments before rendering the region.
 
-When a L<Jifty::Web::Form::Clickable> with an C<onclick> is
+When a L<Jifty::Web::Form::Clickable> object with an C<onclick> is
 L<generated|Jifty::Web::Form::Clickable/generate>, it examines the
 C<onclick> and determines how to emulate it without JavaScript.  It
 determines which actions need to be run, as well as how to manipulate
@@ -136,11 +148,11 @@
 which serves two purposes: to inform the JavaScript of the existance
 of the page region and its default path and variables, and to create a
 unique C<< <div> >> for the fragment to reside in.  The browser reads
-the JavaScript and creates, on client-side, a model of the nested
+the JavaScript and creates, on the client-side, a model of the nested
 PageRegions.  This allows the JavaScript to model the state variable
 changes correctly.
 
-When the JavaScript Update function is called, it is passed a list of
+When the JavaScript C<Update> function is called, it is passed a list of
 fragments that needs to be updated, as well as a list of actions that
 need to be run.  As it does so, it builds up an up-to-date list of
 state variables, to more closely imitate the state of a non-javascript

Modified: jifty/branches/template-declare/lib/Jifty/Manual/UsingCSSandJS.pod
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Manual/UsingCSSandJS.pod	(original)
+++ jifty/branches/template-declare/lib/Jifty/Manual/UsingCSSandJS.pod	Wed Dec  6 06:04:22 2006
@@ -12,14 +12,14 @@
 
 =head1 BUILT-IN FEATURES
 
-Both, CSS and JavaScript (further abbreviated with "JS") files
+Both, CSS and JavaScript (further abbreviated as "JS") files
 typically reside in the C<share/web/static> directory of Jifty,
 keeping separate C<css> and C<js> subdirectories for each of both sets
 of files. When using Jifty without any interference into these files,
-all of those files will get loaded from the Jifty-provided directory.
+all of those files will get loaded from the Jifty-provided directories.
 
 In both cases, there are hooks for expansion by keeping empty but
-present files in the C<css> and C<js> directory. By simply creating
+present files in the C<css> and C<js> directories. By simply creating
 and populating these files inside the C<share/web/static/css> and
 C<share/web/static/js> directories brings the predefined hooks to
 work.
@@ -28,7 +28,7 @@
 application running in C<DevelMode> or a productive application. In
 DevelMode, every single CSS and JS file will get included into every
 single template page being rendered. On the other hand, a productive
-application will merge all CSS and JS definition upon the first
+application will merge all CSS and JS definitions upon the first
 request and will only include one file each containing all CSS and JS
 definitions in a single request.
 
@@ -80,7 +80,7 @@
 =item form_field, mandatory, argument-$name
 
 Every form field including its label is packed inside a C<< <div> >>
-tag with these classes (mandatory only given if the field is
+tag with these classes (mandatory only if the field is
 mandatory, of course), where C<$name> is the field's name.
 
 =item preamble
@@ -108,7 +108,7 @@
 
 =item jifty, results, messages
 
-These tree CSS classes are used to surround a message block displaying
+These three CSS classes are used to surround a message block displaying
 an action's messages after having run an action.
 
 =item message, error, $moniker
@@ -128,7 +128,7 @@
 
 =item C<Prototype> L<http://prototype.conio.net>
 
-Prototype is a toolkit for providing AJAX support. This is a library,
+Prototype is a toolkit for providing AJAX support. This is a library
 some others depend on.
 
 =item C<scriptaculous.js> L<http://script.aculo.us/>
@@ -160,7 +160,7 @@
 Jifty maintains a complete list of JS files to include. This list may
 be retrieved or set by the accessor C<< Jifty->web->javascript_libs >>.
 There should, However, rarely arise a situation to do that, because
-Jifty already reserved two files that may get added to your application:
+Jifty has already reserved two files that may get added to your application:
 
 =over 4
 

Modified: jifty/branches/template-declare/share/po/fr.po
==============================================================================
--- jifty/branches/template-declare/share/po/fr.po	(original)
+++ jifty/branches/template-declare/share/po/fr.po	Wed Dec  6 06:04:22 2006
@@ -17,57 +17,57 @@
 
 #: lib/Jifty/Action/Record/Search.pm:125
 msgid "!=>< allowed"
-msgstr ""
+msgstr "!=>< autorisés"
 
 #: lib/Jifty/Action/Record/Search.pm:115 lib/Jifty/z:26
 #. ($label)
 msgid "%1 after"
-msgstr ""
+msgstr "%1 aprés"
 
 #: lib/Jifty/Action/Record/Search.pm:116 lib/Jifty/z:27
 #. ($label)
 msgid "%1 before"
-msgstr ""
+msgstr "%1 avant"
 
 #: lib/Jifty/Action/Record/Search.pm:112
 #. ($label)
 msgid "%1 contains"
-msgstr ""
+msgstr "%1 contient"
 
 #: lib/Jifty/Action/Record/Search.pm:123 lib/Jifty/z:35
 #. ($label)
 msgid "%1 greater or equal to"
-msgstr ""
+msgstr "%1 supérieur ou égal à"
 
 #: lib/Jifty/Action/Record/Search.pm:121 lib/Jifty/z:32
 #. ($label)
 msgid "%1 greater than"
-msgstr ""
+msgstr "%1 supérieur à"
 
 #: lib/Jifty/Action/Record/Search.pm:108
 #. ($label)
 msgid "%1 is not"
-msgstr ""
+msgstr "%1 n'est pas"
 
 #: lib/Jifty/Action/Record/Search.pm:113
 #. ($label)
 msgid "%1 lacks"
-msgstr ""
+msgstr "%1 ne contient pas"
 
 #: lib/Jifty/Action/Record/Search.pm:124 lib/Jifty/z:36
 #. ($label)
 msgid "%1 less or equal to"
-msgstr ""
+msgstr "%1 inférieur ou égal"
 
 #: lib/Jifty/Action/Record/Search.pm:122 lib/Jifty/z:33
 #. ($label)
 msgid "%1 less than"
-msgstr ""
+msgstr "%1 inférieur à"
 
 #: share/web/templates/__jifty/error/mason_internal_error:30 share/web/templates/__jifty/error/mason_internal_error:34 share/web/templates/__jifty/error/mason_internal_error:38
 #. ($path, $line)
 msgid "%1 line %2"
-msgstr ""
+msgstr "%1 ligne %2"
 
 #: share/web/templates/__jifty/halo:119
 #. ($_->[3])
@@ -77,12 +77,12 @@
 #: lib/Jifty/Action/Record/Search.pm:117 lib/Jifty/z:28
 #. ($label)
 msgid "%1 since"
-msgstr ""
+msgstr "%1 depuis le"
 
 #: lib/Jifty/Action/Record/Search.pm:118 lib/Jifty/z:29
 #. ($label)
 msgid "%1 until"
-msgstr ""
+msgstr "%1 depuis"
 
 #: lib/Jifty/Action/Record/Search.pm:77
 msgid "(any)"
@@ -110,24 +110,24 @@
 
 #: lib/Jifty/Action/Record/Search.pm:129
 msgid "Any field contains"
-msgstr ""
+msgstr "Un champs contient"
 
 #: share/web/templates/__jifty/admin/action/dhandler:25 share/web/templates/__jifty/admin/model/dhandler:20
 msgid "Back to the admin console"
-msgstr ""
+msgstr "Retour à l'interface d'admin"
 
 #: share/web/templates/__jifty/admin/index.html:29
 msgid "Back to the application"
-msgstr ""
+msgstr "Retour à l'application"
 
 #: share/web/templates/helpers/calendar.html:4
 #. (_ &><body class="calpopup"><a href="#" onclick="window.close()
 msgid "Calendar"
-msgstr ""
+msgstr "Calendrier"
 
 #: share/web/templates/__jifty/admin/fragments/list/update:28
 msgid "Cancel"
-msgstr ""
+msgstr "Annuler"
 
 #: share/web/templates/helpers/calendar.html:4
 msgid "Close window"
@@ -135,11 +135,11 @@
 
 #: share/web/templates/__jifty/admin/fragments/list/view:29
 msgid "Confirm delete?"
-msgstr ""
+msgstr "Confirmer l'effacment ?"
 
 #: share/web/templates/__jifty/admin/fragments/list/new_item:17
 msgid "Create"
-msgstr ""
+msgstr "Enregistrer"
 
 #: lib/Jifty/Action/Record/Create.pm:81
 #. (ref($record)
@@ -156,7 +156,7 @@
 
 #: share/web/templates/__jifty/admin/fragments/list/view:26
 msgid "Delete"
-msgstr ""
+msgstr "Effacer"
 
 #: lib/Jifty/Action/Record/Delete.pm:76
 msgid "Deleted"
@@ -164,7 +164,7 @@
 
 #: share/web/templates/__jifty/admin/fragments/list/view:37
 msgid "Edit"
-msgstr ""
+msgstr "Editer"
 
 #: lib/Jifty/Mason/Halo.pm:104
 #. ($comp_name)
@@ -194,7 +194,7 @@
 
 #: share/web/templates/__jifty/error/mason_internal_error:1
 msgid "Mason error"
-msgstr ""
+msgstr "Erreur Mason"
 
 #: share/web/templates/__jifty/admin/index.html:9
 msgid "Models"
@@ -202,11 +202,11 @@
 
 #: share/web/templates/__jifty/admin/fragments/list/list:73
 msgid "Next Page"
-msgstr ""
+msgstr "Page Suivante"
 
 #: lib/Jifty/Action/Record/Search.pm:130
 msgid "No field contains"
-msgstr ""
+msgstr "Aucun champ contient"
 
 #: lib/Jifty/Web.pm:297
 msgid "No request to handle"
@@ -219,7 +219,7 @@
 #: share/web/templates/__jifty/admin/fragments/list/list:45
 #. ($page, $collection->pager->last_page)
 msgid "Page %1 of %2"
-msgstr ""
+msgstr "Page %1 / %2"
 
 #: lib/Jifty/Record.pm:240 lib/Jifty/Record.pm:319 lib/Jifty/Record.pm:60
 msgid "Permission denied"
@@ -227,7 +227,7 @@
 
 #: share/web/templates/__jifty/admin/fragments/list/list:68
 msgid "Previous Page"
-msgstr ""
+msgstr "Page précédente"
 
 #:
 msgid "Record created"
@@ -235,7 +235,7 @@
 
 #: share/web/templates/__jifty/admin/action/dhandler:20
 msgid "Run the action"
-msgstr ""
+msgstr "Exécuter l'action"
 
 #: share/web/templates/__jifty/halo:111
 msgid "SQL Statements"
@@ -243,7 +243,7 @@
 
 #: share/web/templates/__jifty/admin/fragments/list/update:18
 msgid "Save"
-msgstr ""
+msgstr "Enregistrer"
 
 #: share/web/templates/__jifty/online_docs/content.html:50
 msgid "Schema"
@@ -251,7 +251,7 @@
 
 #: share/web/templates/__jifty/admin/fragments/list/search:18
 msgid "Search"
-msgstr ""
+msgstr "Chercher"
 
 #: share/web/templates/dhandler:1
 msgid "Something's not quite right"
@@ -283,15 +283,15 @@
 
 #: share/web/templates/__jifty/admin/index.html:7
 msgid "To disable this administrative console, add \"AdminMode: 0\" under the \"framework:\" settings in the config file (etc/config.yml)."
-msgstr ""
+msgstr "Pour désactiver cette console d'administration, ajoutez \"AdminMode: 0\" dans la rubrique \"framework:\" du fichier de configuration (etc/config.yml)."
 
 #: share/web/templates/__jifty/admin/fragments/list/list:38
 msgid "Toggle search"
-msgstr ""
+msgstr "Rechercher"
 
 #: share/web/templates/__jifty/error/mason_internal_error:6
 msgid "Try again"
-msgstr ""
+msgstr "Ré-essayer"
 
 #: lib/Jifty/Action/Record/Update.pm:156
 msgid "Updated"
@@ -316,4 +316,4 @@
 
 #: share/web/templates/_elements/sidebar:7
 msgid "You're not currently signed in."
-msgstr ""
+msgstr "Vous n'êtes pas encore connecté."

Added: jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/header
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/header	Wed Dec  6 06:04:22 2006
@@ -0,0 +1,57 @@
+<%args>
+$object_type
+$mask_val => ""
+$mask_field => ""
+$list_path
+</%args>
+<%init>
+my $record_class = Jifty->app_class("Model", $object_type);
+my $record = $record_class->new();
+ my $update = Jifty->web->new_action(class => 'Update'.$object_type);
+</%init>
+<div class="jifty_admin">
+
+% foreach my $argument ($update->argument_names) {
+% unless( $argument eq $mask_field ||  $argument eq 'id' || $argument =~ /_confirm$/i
+%        && lc $update->arguments->{$argument}{render_as} eq 'password') {
+<%
+    Jifty->web->link(
+        label   => "[A]",
+        onclick => 
+            { 
+            replace_with => $list_path.'list' ,
+            args   => {
+                object_type => $object_type,
+                limit_val => $mask_val,
+                limit_field => $mask_field,
+                list_path => $list_path,
+                sort_by => $argument,
+                order => undef
+                },
+            },
+        #as_button => 1
+        )
+%>
+<%
+    Jifty->web->link(
+        label   => "[D]",
+        onclick => 
+            {
+            replace_with => $list_path.'list',
+            args   => {
+                object_type => $object_type,
+                limit_val => $mask_val,
+                limit_field => $mask_field,
+                list_path => $list_path,
+                sort_by => $argument,
+                order => 'D'
+                },
+            },
+        #as_button => 1
+        )
+%>
+ <%$argument%>
+% }
+% }
+<hr />
+</div>

Modified: jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/list
==============================================================================
--- jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/list	(original)
+++ jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/list	Wed Dec  6 06:04:22 2006
@@ -1,25 +1,58 @@
+<%doc>
+
+You can copy this fragment directory to your app.
+And use it in a page like this :
+
+<% Jifty->web->region(name => "admin-subdomain",
+                      path => "/admin/fragments/list/list",
+                      defaults => { object_type => 'SubDomain',
+                                    list_path => '/admin/fragments/list/',
+                                    limit_field => 'domain',
+                                    limit_val => $domain,
+                                    search_slot => 0,
+                                    per_page => 5,
+                                    render_submit => 1 }) %>
+
+limit_field, limit_val allow add to your sql query 
+ ... WHERE $limit_field = $limit_val
+
+</%doc>
 <%args>
 $object_type
 $page => 1
 $new_slot => 1
+$search_slot => 1
 $item_path => "/__jifty/admin/fragments/list/view"
+$list_path => "/__jifty/admin/fragments/list/"
+$limit_field => ""
+$limit_val => ""
+$per_page => 25
+$sort_by => undef
+$order => undef
 </%args>
 <%init>
 my $collection_class = Jifty->app_class("Model", $object_type."Collection");
 my $search = Jifty->web->response->result('search');
-my $collection;
+my $collection = $collection_class->new();
+
 if(!$search) {
-    $collection = $collection_class->new();
-    $collection->unlimit();
+   if ( $limit_field && $limit_val ) {
+      $collection->limit(column => $limit_field, value => $limit_val);
+   } else {
+      $collection->unlimit();
+   }
+   $collection->order_by(column => $sort_by, order=>'ASC') if ($sort_by && !$order);
+   $collection->order_by(column => $sort_by, order=>'DESC') if ($sort_by && $order);
 } else {
     $collection = $search->content('search');
     warn $collection->build_select_query;
 }
 
 $collection->set_page_info( current_page => $page,
-                            per_page     => 25
+                            per_page     => $per_page
                            );
 </%init>
+% if ($search_slot) {
 <%perl>    
 my $search_region = Jifty::Web::PageRegion->new(
    name     => 'search',
@@ -30,7 +63,7 @@
 <% Jifty->web->link(
     onclick => [{
         region       => $search_region->qualified_name,
-        replace_with => '/__jifty/admin/fragments/list/search',
+        replace_with => $list_path.'search',
         toggle       => 1,
         args         => { object_type => $object_type }
     },
@@ -40,6 +73,7 @@
 %>
 
 <% $search_region->render %>
+% }
 
 % if ($collection->pager->last_page > 1) {
     <span class="page-count"><%_('Page %1 of %2', $page, $collection->pager->last_page) %></span>   
@@ -50,12 +84,15 @@
 % }
 
 <div class="list">
+<& $list_path.'header', object_type => $object_type, list_path => $list_path, 
+    mask_field => $limit_field, mask_val => $limit_val &>
 <%perl>
 while ( my $item = $collection->next ) {
     Jifty->web->region(
         name     => 'item-' . $item->id,
         path     => $item_path,
-        defaults => { id => $item->id, object_type => $object_type }
+        defaults => { id => $item->id, object_type => $object_type, list_path => $list_path,
+                      mask_field => $limit_field , mask_val => $limit_val }
     );
 }
 
@@ -78,8 +115,9 @@
 % if ($new_slot) {
 <% Jifty->web->region(
         name => 'new_item',
-        path => "/__jifty/admin/fragments/list/new_item",
-        defaults => {   object_type => $object_type },
+        path => $list_path.'new_item',
+        defaults => {   object_type => $object_type, list_path => $list_path,
+                     mask_field => $limit_field , mask_val => $limit_val },
         ) %>
 
 % }

Modified: jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/new_item
==============================================================================
--- jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/new_item	(original)
+++ jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/new_item	Wed Dec  6 06:04:22 2006
@@ -1,14 +1,22 @@
 <%args>
 $object_type 
 $region
+$mask_field => ""
+$mask_val => ""
+$list_path
 </%args>
 <%init>
 my $record_class = Jifty->app_class("Model", $object_type);
- my $create = Jifty->web->new_action(class => 'Create'.$object_type);
+my $create = Jifty->web->new_action(class => 'Create'.$object_type);
 </%init>
+% if ($mask_field) {
+  <% $create->hidden($mask_field,$mask_val) %>
+% }
 <div class="jifty_admin create item inline">
 % foreach my $argument ($create->argument_names) {
+%  if ( $argument ne $mask_field ) {
         <%$create->form_field($argument)%>
+%  }
 %}
 </div>
 <%
@@ -20,9 +28,10 @@
                  { refresh_self => 1 },
                  {
                    element => $region->parent->get_element('div.list'),
-                   append => '/__jifty/admin/fragments/list/view',
+                   append => $list_path.'view',
                    args   => { 
                               object_type => $object_type,
+                              list_path => $list_path,
                               id          => { result_of => $create, name => 'id' },
                              },
                  },

Modified: jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/update
==============================================================================
--- jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/update	(original)
+++ jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/update	Wed Dec  6 06:04:22 2006
@@ -1,6 +1,9 @@
 <%args>
 $id => undef
 $object_type
+$mask_field => ""
+$mask_val => ""
+$list_path
 </%args>
 <%init>
 my $record_class = Jifty->app_class("Model", $object_type);
@@ -15,28 +18,33 @@
 <div class="jifty_admin update item inline <%$object_type%>">
 <div class="editlink">
   <% Jifty->web->link(
-      label   => _("Save"),
+      label   => _('Save'),
       onclick => [
           { submit => $update },
-          {   replace_with => '/__jifty/admin/fragments/list/view',
-              args         => { object_type => $object_type, id => $id }
+          {   replace_with => $list_path.'view',
+              args         => { object_type => $object_type, id => $id, list_path => $list_path }
           }
       ]
       ) %>
 
   <% Jifty->web->link(
-      label     => _("Cancel"),
+      label     => _('Cancel'),
       onclick   => {
-          replace_with => '/__jifty/admin/fragments/list/view',
-          args         => { object_type => $object_type, id => $id }
+          replace_with => $list_path.'view',
+          args         => { object_type => $object_type, id => $id, list_path => $list_path }
         },
       as_button => 1
   ) %>
 
 </div>
 
+% if ($mask_field) {
+<% $update->hidden($mask_field, $mask_val) %>
+% }
 % foreach my $argument ($update->argument_names) {
+%  if ( $argument ne $mask_field ) {
 <%$update->form_field($argument)%>
+%  }
 %}
 
 <hr />

Modified: jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/view
==============================================================================
--- jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/view	(original)
+++ jifty/branches/template-declare/share/web/templates/__jifty/admin/fragments/list/view	Wed Dec  6 06:04:22 2006
@@ -1,6 +1,9 @@
 <%args>
 $id => undef
 $object_type
+$mask_field => ""
+$mask_val => ""
+$list_path
 </%args>
 <%init>
 my $record_class = Jifty->app_class("Model", $object_type);
@@ -23,30 +26,31 @@
 <%
     Jifty->web->form->submit(
         class   => "editlink",
-        label   => _("Delete"),
-        submit => $delete,
-        onclick => { 
-         confirm => _("Confirm delete?"), 
-         delete =>  Jifty->web->current_region->qualified_name
-        },
+        label   => _('Delete'),
+        onclick => [
+         { confirm => _("Confirm delete?")},
+         { submit => $delete },
+         { delete =>  Jifty->web->current_region->qualified_name }
+        ]
         )
 %> 
 
 <%
     Jifty->web->link(
-        label   => _("Edit"),
+        label   => _('Edit'),
         class   => "editlink",
         onclick => {
-            replace_with => "/__jifty/admin/fragments/list/update",
-            args         => { object_type => $object_type, id => $id }
+            replace_with => $list_path.'update',
+            args         => { object_type => $object_type, id => $id, list_path => $list_path,
+                            mask_field => $mask_field, mask_val => $mask_val }
             },
-        as_button => 1
+   #     as_button => 1
         )
 %>
 
 <% $delete->hidden('id',$id) %>
 % foreach my $argument ($update->argument_names) {
-% unless(   $argument =~ /_confirm$/
+% unless( $argument eq $mask_field ||  $argument =~ /_confirm$/
 %        && lc $update->arguments->{$argument}{render_as} eq 'password') {
   <%$update->form_field($argument, render_mode => 'read')%>
 % }

Modified: jifty/branches/template-declare/share/web/templates/__jifty/error/mason_internal_error
==============================================================================
--- jifty/branches/template-declare/share/web/templates/__jifty/error/mason_internal_error	(original)
+++ jifty/branches/template-declare/share/web/templates/__jifty/error/mason_internal_error	Wed Dec  6 06:04:22 2006
@@ -20,8 +20,9 @@
 $file
 $line
 </%args>
+%   my $path;
 %   if (-w $file) {
-%     my $path = $file;
+%     $path = $file;
 %     for (map {$_->[1]} @{Jifty->handler->mason->interp->comp_root}) {
 %       last if $path =~ s/^\Q$_\E//;
 %     }


More information about the Jifty-commit mailing list