Bigtop

 view release on metacpan or  search on metacpan

docs/keyword_cookbook/field/date_select_text/discussion  view on Meta::CPAN

=head1 USE

The value for the C<date_select_text> keyword is the link text which will
popup a rather old fashioned Javascript based date picker.

For it to work, you must use C<Gantry::Plugins::Calendar> (but you don't have
to use it as a plugin).  Further, you must name your form and add this to its
C<extra_keys>:

    extra_keys
        javascript => `$self->calendar_month_js( 'your_form_name' )`;

Those steps are rather tedious, so tentmaker does them for you when
you enter a value for the C<date_select_text> keyword.

Our current best practice suggestion is to use a Javascript framework like
Yahoo's UI or JQuery.  Both of those, and many similar frameworks, have
more modern and usable date pickers along with a wealth of other gadgets.

=head1 EXAMPLE

docs/keyword_cookbook/field/date_select_text/example.bigtop  view on Meta::CPAN

            cols name, birth_day;
            header_options Add;
            row_options Edit, Delete;
            title Child;
            limit_by family;
        }
        method form is AutoCRUD_form {
            all_fields_but id, created, modified;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'child' )`;
            form_name child;
        }
        uses Gantry::Plugins::Calendar;
    }
}

examples/Billing-Finished/docs/billing.bigtop  view on Meta::CPAN

            title            `Line Items`;
            cols             name, invoice, due_date;
            header_options   Add;
            row_options      Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name        line_item;
            all_fields_but   id;
            extra_keys
                legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'line_item' )`;
        }
    }
    controller Invoice is AutoCRUD {
        controls_table   invoice;
        rel_location     invoice;
        uses             Gantry::Plugins::Calendar;
        text_description invoice;
        page_link_label  Invoices;
        method do_pdf   is stub {
            extra_args   `$id`;

examples/Billing-Finished/docs/billing.bigtop  view on Meta::CPAN

            cols             number, customer, status;
            header_options   Add;
            row_options
                Tasks => `"/lineitem/main"`, PDF, Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name        invoice;
            all_fields_but   id;
            extra_keys
                legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'invoice' )`;
        }
    }
}

examples/Billing-Finished/lib/Bigtop/Example/Billing/GEN/Invoice.pm  view on Meta::CPAN

package Bigtop::Example::Billing::GEN::Invoice;

use strict;

use base 'Bigtop::Example::Billing';

use Bigtop::Example::Billing::Model::invoice qw(
    $INVOICE
);
use Gantry::Plugins::Calendar qw(
    do_calendar_month
    calendar_month_js
);



#-----------------------------------------------------------------
# $self->do_main(  )
#-----------------------------------------------------------------
sub do_main {
    my ( $self ) = @_;

examples/Billing-Finished/lib/Bigtop/Example/Billing/GEN/Invoice.pm  view on Meta::CPAN

    my ( $self, $row ) = @_;

    my $selections = $INVOICE->get_form_selections(
            { schema => $self->get_schema() }
    );

    return {
        name       => 'invoice',
        row        => $row,
        legend => $self->path_info =~ /edit/i ? 'Edit' : 'Add',
        javascript => $self->calendar_month_js( 'invoice' ),
        fields     => [
            {
                name => 'number',
                label => 'Number',
                type => 'text',
                is => 'varchar',
            },
            {
                options => $selections->{status},
                name => 'status',

examples/Billing-Finished/lib/Bigtop/Example/Billing/GEN/LineItem.pm  view on Meta::CPAN

package Bigtop::Example::Billing::GEN::LineItem;

use strict;

use base 'Bigtop::Example::Billing';

use Bigtop::Example::Billing::Model::line_item qw(
    $LINE_ITEM
);
use Gantry::Plugins::Calendar qw(
    do_calendar_month
    calendar_month_js
);



#-----------------------------------------------------------------
# $self->do_main(  )
#-----------------------------------------------------------------
sub do_main {
    my ( $self ) = @_;

examples/Billing-Finished/lib/Bigtop/Example/Billing/GEN/LineItem.pm  view on Meta::CPAN

    my ( $self, $row ) = @_;

    my $selections = $LINE_ITEM->get_form_selections(
            { schema => $self->get_schema() }
    );

    return {
        name       => 'line_item',
        row        => $row,
        legend => $self->path_info =~ /edit/i ? 'Edit' : 'Add',
        javascript => $self->calendar_month_js( 'line_item' ),
        fields     => [
            {
                date_select_text => 'Select',
                name => 'due_date',
                label => 'Due Date',
                type => 'text',
                is => 'date',
            },
            {
                name => 'name',

examples/Billing-Finished/lib/Bigtop/Example/Billing/Invoice.pm  view on Meta::CPAN


use Bigtop::Example::Billing::Model::invoice qw(
    $INVOICE
);
use Bigtop::Example::Billing::Model;
use Bigtop::Example::Billing::Model::line_item qw( $LINE_ITEM );

sub schema_base_class { return 'Bigtop::Example::Billing::Model'; }
use Gantry::Plugins::DBIxClassConn qw( get_schema );
use Gantry::Plugins::Calendar qw(
    do_calendar_month
    calendar_month_js
);

#-----------------------------------------------------------------
# $self->do_pdf( $id )
#-----------------------------------------------------------------
sub do_pdf {
    my $self = shift;
#    $self->do_fake_pdf( @_ );
    $self->do_real_pdf( @_ );
}

examples/Billing-Finished/lib/Bigtop/Example/Billing/LineItem.pm  view on Meta::CPAN

    form_name
);

use Bigtop::Example::Billing::Model;
use Bigtop::Example::Billing::Model::line_item qw( $LINE_ITEM );
use Bigtop::Example::Billing::Model::invoice   qw( $INVOICE   );

sub schema_base_class { return 'Bigtop::Example::Billing::Model'; }
use Gantry::Plugins::DBIxClassConn qw( get_schema );
use Gantry::Plugins::Calendar qw(
    do_calendar_month
    calendar_month_js
);



#-----------------------------------------------------------------
# $self->do_main( [ $invoice_id ] )
#-----------------------------------------------------------------
sub do_main {
    my ( $self, $invoice_id ) = @_;

examples/address-new.bigtop  view on Meta::CPAN

            title `Birth Day`;
            cols name, family, birthday;
            header_options Add;
            row_options Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name birthday_form;
            all_fields_but id;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'birthday_form' )`;
        }
    }
}

examples/address2.bigtop  view on Meta::CPAN

        method do_main is main_listing {
            title            `Birthday`;
            cols             name, family, birthday;
            header_options   Add;
            row_options      Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name        birthday_form;
            all_fields_but   id;
            extra_keys
                javascript => `$self->calendar_month_js( 'birthday_form' )`,
                legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`;
        }
    }
}

examples/billing.bigtop  view on Meta::CPAN

            title            `Line Items`;
            cols             name, invoice, due_date;
            header_options   Add;
            row_options      Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name        line_item;
            all_fields_but   id;
            extra_keys
                legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'line_item' )`;
        }
    }
    controller Invoice is AutoCRUD {
        controls_table   invoice;
        rel_location     invoice;
        uses             Gantry::Plugins::Calendar;
        text_description invoice;
        page_link_label  Invoices;
        method do_pdf   is stub {
            extra_args   `$id`;

examples/billing.bigtop  view on Meta::CPAN

            cols             number, customer, status;
            header_options   Add;
            row_options
                Tasks => `"/lineitem/main"`, PDF, Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name        invoice;
            all_fields_but   id;
            extra_keys
                legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'invoice' )`;
        }
    }
}

examples/checking.bigtop  view on Meta::CPAN

            cols           status, trans_date, amount, payee_payor, category;
            header_options Add;
            row_options    Edit, Delete;
        }

        method form is AutoCRUD_form {
            form_name      trans;
            all_fields_but id;
            extra_keys
                legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'trans' )`;
        }
    }
}

examples/kids.bigtop  view on Meta::CPAN

            cols name, birth_day;
            header_options Add;
            row_options Edit, Delete;
            title Child;
            limit_by family;
        }
        method form is AutoCRUD_form {
            all_fields_but id, created, modified;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'child' )`;
            form_name child;
        }
        uses Gantry::Plugins::Calendar;
    }
    table family {
        field id {
            is int4, primary_key, auto;
        }
        field parent {
            is varchar;

lib/Bigtop/Backend/Control/Gantry.pm  view on Meta::CPAN

See above.  Note that for the extra_args to be available, they must
be passed from the AutoCRUD calling method.

=item extra_keys

List key/value pairs you want to appear in the hash returned by the method.
Example:

    extra_keys
        legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
        javascript => `$self->calendar_month_js( 'customer' )`;

The javascript entry is exactly correct for a form named customer
using Gantry::Plugins::Calendar.

Note that whatever you put inside the backquotes appears EXACTLY as is
in the generated output.  Nothing will be done to it, not even quote
escaping.

=item fields

lib/Bigtop/Docs/Cookbook.pod  view on Meta::CPAN


Including the refers_to statement implies that the field is a foreign
key.  Whether this generates SQL indicating that is up to the backend.
None of the current backends (Bigtop::SQL::Postgres, Bigtop::SQL::MySQL,
or Bigtop::SQL::SQLite) generate foreign key SQL.  But, using refers_to
always affects the model.  For instance, Bigtop::Model::DBIxClass generates
a belongs_to call for each field with a refers_to statement.  Other Model
backends do the analogous things.

The date_select_text is shown by Gantry templates as the text for
a popup calendar link.  See the discussion of the LineItem controller in
Bigtop::Docs::Tutorial for details.  You might also want to check 'How can I
let my users pick dates easily?' in Gantry::Docs::FAQ to see
what bigtop generates.

All of the statements which begin with html_form_ are passed through
to the template (with html_form_ stripped).  Consult your template
for details.  The Gantry template is form.tt.  Note that html_form_constraint
is actually used by Gantry plugins which rely on Gantry::Utils::CRUDHelp.
This includes at least Gantry::Plugins::AutoCRUD and Gantry::Plugins::CRUD.
These constraints are enforced by Data::FormValidator.

lib/Bigtop/Docs/TentRef.pod  view on Meta::CPAN

Changing the name of the field will change all references to it in other
parts of the bigtop file.

=item SQL Type

The type of the column in SQL.  In the quick edit box you may only supply
one type phrase.  In the full edit table, you may include as many phrases
as you like.

If you change the type to date, tentmaker will do all the needed work to
make a popup calendar for easy date selection.

Note that int4 and varchar are magical.  Each database backend does something
reasonable to turn these into integers and strings respectively.  All other
types are taken literally and must be understood by the database you
actually use.

=item Label

What the user sees as a label for this field when it is on the screen.

lib/Bigtop/Docs/TentRef.pod  view on Meta::CPAN

Applies only to html_form_type display.  Indicates that this field is a
foreign key and the foreign_display should be used instead of the id.

=item html_form_onchange

If the field's type is select, this becomes the onchange callback for
the select input element.

=item date_select_text

Gantry provides a mechanism for user date entry via a popup calendar.
Enter the link text, which will trigger the popup, here.  If you set a
value here, several other changes will happen throughout the bigtop file,
so that the user can easily pick dates.  This will be set automatically
when any field's type becomes date.

=item html_form_raw_html

HTML to be added immediately before this field's HTML table row.  Generally
useful for hacking only.

lib/Bigtop/Docs/TentTut.pod  view on Meta::CPAN

    create a new contact database
    use the database command line tool to populate the database

Once the database is ready, you can restart the server:

    ./app.server

Go to the address page and click on 'Add' and see that most fields are
now optional.  Then go to the bday page and 'Add' a birthday.  Note the
pull down list of families we could associate with this birthday person.
Also note the 'Date Select' link which pops up a calendar for easy date
picking.

You can continue to develop and regenerate as the model changes.  The
only piece that is difficult to manage is the database once it is built.

=head1 Further Reading

See C<Bigtop::Docs::TentRef> for more details on what tentmaker can control.
For more command line options, including firing up tentmaker to build an
app based on an existing PostgreSQL 8 database, see

lib/Bigtop/Docs/Tutorial.pod  view on Meta::CPAN

        field id { is int4, primary_key, assign_by_sequence; }
        field due_date {
            is               date;
            label            `Due Date`;
            date_select_text Select;
            html_form_type   text;
        }

The date_select_text will appear as an HTML href link next to the entry
field for the date.  If the user clicks the link, a popup will display
an intuitive calendar.  If the user clicks a date on the popup calendar,
the text input box will be populated with that date.

Of course, this behavior is driven by the controller.
For example, see the LineItem controller below.

        field name {
            is               varchar;
            label            Name;
            html_form_type   text;
        }

lib/Bigtop/Docs/Tutorial.pod  view on Meta::CPAN

            title            `Line Items`;
            cols             name, due_date, customer_id;
            header_options   Add;
            row_options      Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name        line_item;
            all_fields_but   id;
            extra_keys
                legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'line_item' )`;
        }
    }

When we discussed the line_items table, I explained breifly how the
user may chose dates.  There are really three steps in the process:

=over 4

=item 1.

lib/Bigtop/Docs/Tutorial.pod  view on Meta::CPAN

method blocks of type stub.  For gantry dispatching, the name of the
method must be do_ followed by the lowercase name of the row option.  In
order for the methods to operate properly, they must know the id of the
row they will work on.  Include this in an extra_args statement.

        method form is AutoCRUD_form {
            form_name        invoice;
            all_fields_but   id;
            extra_keys
                legend     => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'invoice' )`;
        }
    }
 }

This concludes our walk through the bigtop description of the billing
application.  Now it's time to build it.

=head2 Generation and Installation

Once you have a bigtop description of your application, you are ready

lib/Bigtop/Parser.pm  view on Meta::CPAN

    }
    else { # create a form_name statement
        $self->add_method_statement(
            {
                keyword   => 'form_name',
                new_value => $table,
            }
        );
    }

    # Second, make sure that name is in javascript code for calendars.
    my $javascript_code = qq{\$self->calendar_month_js( '$table' )},
    my $keys_statement  = $self->get_method_statement( 'extra_keys' );
    my $extra_keys;

    if ( defined $keys_statement ) {
        push @{ $keys_statement->{ __ARGS__ } },
             { javascript => $javascript_code };

        $extra_keys = $keys_statement->{ __ARGS__ };
    }
    else {

lib/Bigtop/TentMaker.pm  view on Meta::CPAN

            );

            if ( $type eq 'field'
                    and
                 ref $success eq 'ARRAY'
                    and
                 $success->[0] =~ /^date/
               )
            {
                # tell the tree so it can update these:
                #   controller uses calendar plugin
                #   form has a name (the table's name)
                #   form has extra_keys key javascript
                #   field's html_form_type is text
                #   and either date_select_text or is

                my $result = $tree->field_became_date(
                    {
                        ident   => $ancestors,
                        trigger => $success->[0],
                    }

t/gantry/02_controllers.t  view on Meta::CPAN

                              Date => `\$site->location() . '/date_order'`;
            header_options    Add;
            row_options       Edit, Delete;
            order_by          `trans_date DESC`;
            where_terms       cleared => `'t'`, amount => `{ '>', 0 }`;
        }
        method form is AutoCRUD_form {
            all_fields_but    id;
            extra_keys
                legend     => `\$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `\$self->calendar_month_js( 'trans' )`,
                extraneous => `'uninteresting'`;
        }
    }
    controller Trans::Action is AutoCRUD {
        plugins PluginA;
        controls_table trans;
        rel_location   transaction;
        method form is AutoCRUD_form {
            form_name trans;
            fields    status;

t/gantry/02_controllers.t  view on Meta::CPAN

            col_labels        `Status 3`,
                              Date => `\$site->location() . '/date_order'`;
            header_options    Add;
            row_options       Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name         trans;
            all_fields_but    id;
            extra_keys
                legend     => `\$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `\$self->calendar_month_js( 'trans' )`,
                extraneous => `'uninteresting'`;
        }
    }
    controller Trans::Action is AutoCRUD {
        controls_table trans;
        method form is AutoCRUD_form {
            form_name trans;
            fields    status;
        }
    }

t/gantry/04_no_gen.t  view on Meta::CPAN

            title             Transactions;
            cols              status, trans_date, amount, payee_payor;
            header_options    Add;
            row_options       Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name         trans;
            all_fields_but    id;
            extra_keys
                legend     => `\$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `\$self->calendar_month_js( 'trans' )`,
                extraneous => `'uninteresting'`;
        }
    }
}
EO_Bigtop_File

# Add this to status field of trans table:
#            validate_with          `R|O|C`;
# Add this to amount field of trans table:
#            to_db_filter           strip_decimal_point;

t/gantry/04_no_gen.t  view on Meta::CPAN

            title             Transactions;
            cols              status, trans_date, amount, payee_payor;
            header_options    Add;
            row_options       Edit, Delete;
        }
        method form is AutoCRUD_form {
            form_name         trans;
            all_fields_but    id;
            extra_keys
                legend     => `\$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `\$self->calendar_month_js( 'trans' )`,
                extraneous => `'uninteresting'`;
        }
    }
}
EO_Another_Bigtop

warning_like {
    Bigtop::Parser->gen_from_string(
        {
            bigtop_string => $bigtop_string,

t/gantry/playship/Apps-Checkbook/lib/Apps/Checkbook/GEN/Trans.pm  view on Meta::CPAN

# $self->form( $row )
#-----------------------------------------------------------------
sub form {
    my ( $self, $row ) = @_;

    my $selections = $TRANS->get_form_selections();

    return {
        row        => $row,
        legend => $self->path_info =~ /edit/i ? 'Edit' : 'Add',
        javascript => $self->calendar_month_js( 'trans' ),
        extraneous => 'uninteresting',
        fields     => [
            {
                display_size => 2,
                name => 'status',
                label => 'Status2',
                type => 'text',
                is => 'int',
            },
            {

t/gantry/playship2/Apps-Checkbook/lib/Apps/Checkbook/GEN/Trans.pm  view on Meta::CPAN

# $self->form( $row )
#-----------------------------------------------------------------
sub form {
    my ( $self, $row ) = @_;

    my $selections = $TRANS->get_form_selections();

    return {
        row        => $row,
        legend => $self->path_info =~ /edit/i ? 'Edit' : 'Add',
        javascript => $self->calendar_month_js( 'trans' ),
        extraneous => 'uninteresting',
        fields     => [
            {
                display_size => 2,
                name => 'status',
                label => 'Status2',
                type => 'text',
                is => 'int',
            },
            {

t/tentmaker/ajax_07/todate  view on Meta::CPAN

      "Missing",
      "Module",
      "Gantry::Plugins::Calendar"
    ]
  },
  { "keyword" : "ident_14::form_name", "value" : "family" },
  { "keyword" : "ident_14::extra_keys", "hashes" : [
      { "keyword" : "legend",
        "value" : "$self->path_info =~ /edit/i ? q!Edit! : q!Add!" },
      { "keyword" : "javascript",
        "value" : "$self->calendar_month_js( 'family' )" }
    ]
  },
  { "keyword" : "ident_9::html_form_type", "value" : "text" },
  { "keyword" : "ident_9::date_select_text", "value" : "Select Date" }
]
config {
    engine MP20;
    template_engine TT;
    Init Std {  }
    Conf Gantry { conffile `docs/app.gantry.conf`; instance address; }

t/tentmaker/ajax_07/todate  view on Meta::CPAN

        method do_main is main_listing {
            cols ident, description;
            header_options Add;
            row_options Edit, Delete;
            title Family;
        }
        method form is AutoCRUD_form {
            all_fields_but id, created, modified;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? q!Edit! : q!Add!`,
                javascript => `$self->calendar_month_js( 'family' )`;
            form_name family;
        }
        uses Missing, Module, Gantry::Plugins::Calendar;
    }
}

t/tentmaker/ajax_09/billing_initial  view on Meta::CPAN

        method do_main is main_listing {
            cols number, description;
            header_options Add;
            row_options Edit, Delete, Tasks => `"/task/main/$id"`;
            title Invoice;
        }
        method form is AutoCRUD_form {
            all_fields_but id, created, modified;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'invoice' )`;
            form_name invoice;
        }
        uses Gantry::Plugins::Calendar;
    }
    table task {
        field id {
            is int4, primary_key, auto;
        }
        field name {
            is varchar;

t/tentmaker/ajax_09/billing_initial  view on Meta::CPAN

            cols name, description;
            header_options Add;
            row_options Edit, Delete;
            title Task;
            limit_by invoice;
        }
        method form is AutoCRUD_form {
            all_fields_but id, created, modified;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'task' )`;
            form_name task;
        }
        uses Gantry::Plugins::Calendar;
    }
}


    </div>
    </fieldset>

t/tentmaker/ajax_09/billing_initial  view on Meta::CPAN

                        "ident_49::extra_keys",
                        1,
                        this
                    )'
                />
            </td>
            <td>
                <input
                    type='text'
                    name='ident_49::extra_keys_value'
                    value="$self->calendar_month_js( 'invoice' )"
                    class='urgency_0'
                    onblur='javascript:update_pairs(
                        "method_statement_pair",
                        "ident_49::extra_keys",
                        1,
                        this
                    )'
                />
            </td>
        </tr>

t/tentmaker/ajax_09/billing_initial  view on Meta::CPAN

                        "ident_63::extra_keys",
                        1,
                        this
                    )'
                />
            </td>
            <td>
                <input
                    type='text'
                    name='ident_63::extra_keys_value'
                    value="$self->calendar_month_js( 'task' )"
                    class='urgency_0'
                    onblur='javascript:update_pairs(
                        "method_statement_pair",
                        "ident_63::extra_keys",
                        1,
                        this
                    )'
                />
            </td>
        </tr>

t/tentmaker/billing.bigtop  view on Meta::CPAN

        method do_main is main_listing {
            cols number, description;
            header_options Add;
            row_options Edit, Delete, Tasks => `"/task/main/$id"`;
            title Invoice;
        }
        method form is AutoCRUD_form {
            all_fields_but id, created, modified;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'invoice' )`;
            form_name invoice;
        }
        uses Gantry::Plugins::Calendar;
    }
    table task {
        field id {
            is int4, primary_key, auto;
        }
        field name {
            is varchar;

t/tentmaker/billing.bigtop  view on Meta::CPAN

            cols name, description;
            header_options Add;
            row_options Edit, Delete;
            title Task;
            limit_by invoice;
        }
        method form is AutoCRUD_form {
            all_fields_but id, created, modified;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
                javascript => `$self->calendar_month_js( 'task' )`;
            form_name task;
        }
        uses Gantry::Plugins::Calendar;
    }
}



( run in 1.141 second using v1.01-cache-2.11-cpan-c333fce770f )