NAME

Maypole::Plugin::QuickTable - HTML::QuickTable goodness for Maypole

SYNOPSIS

use Maypole::Application qw( QuickTable );

METHODS

setup
quick_table

Returns a HTML::QuickTable object for formatting data. Set global defaults in the quicktable_defaults slot of the config object. Set class-specific defaults by defining a quicktable_defaults method in the class. Override these by passing args to the quick_table call.

print $request->quick_table( %args )->render( $data );

Pass a Maypole/CDBI object in the object slot, and its data will be extracted and <$qt-render>> called for you:

print $request->quick_table( %args, object => $object );

Foreign objects will be displayed as links to the view template.

tabulate( $object|$arrayref_of_objects, [ $with_colnames ] )

Extract data from a Maypole/CDBI object (or multiple objects), ready to pass to <quick_table-render>>. Data will start with a row of column names if $with_colnames is true.

Returns $thing unless it isa Maypole::Model::Base, in which case a link to the view template for the object is returned.

link( %args )

Returns a link, calling make_path to generate the path.

%args = ( table      => $table,
          action     => $action,        # called 'command' in the original link template
          additional => $additional,    # optional - generally an object ID
          label      => $label,
          );
make_path( %args )

This is the counterpart to Maypole::parse_path. It generates a path to use in links, form actions etc. To implement your own path scheme, just override this method and parse_path.

%args = ( table      => $table,
          action     => $action,        # called 'command' in the original link template
          additional => $additional,    # optional - generally an object ID
          );

AUTHOR

David Baird, <cpan@riverside-cms.co.uk>

BUGS

Please report any bugs or feature requests to bug-maypole-plugin-quicktable@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Maypole-Plugin-QuickTable. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2005 David Baird, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.