App-ZofCMS

 view release on metacpan or  search on metacpan

lib/App/ZofCMS/Plugin/CRUD.pm  view on Meta::CPAN


    <tmpl_if name="crud_can_u">
        Can update!
    </tmpl_if>

True or false value. If true, then the user is allowed to update
records (see C<can> configuration argument).

=head3 C<crud_can_ud>

    <tmpl_if name="crud_can_ud">
        Can update or delete!
    </tmpl_if>

True or false value. If true, then the user is allowed to delete
B<or> update records (see C<can> configuration argument).

=head3 C<crud_u_form>

    <tmpl_var name='crud_u_form'>

Contains HTML code for the "Update Record" form. This HTML might change
in the future or be configurable, as currently it's highly specific
to what I use in a specific Web app. You can easily use your own form
by including C<crud_update> parameter set to a true value and
C<crud_id> paramater set to the ID of the record (that will be in the
C<< <tmpl_var name='crud_id> >>).

=head3 C<crud_d_form>

    <tmpl_var name='crud_d_form'>

Contains HTML code for the "Delete Record" form. This HTML might change
in the future or be configurable, as currently it's highly specific
to what I use in a specific Web app. You can easily use your own form
by including C<crud_delete> parameter set to a true value and
C<crud_id> paramater set to the ID of the record (that will be in the
C<< <tmpl_var name='crud_id> >>).

=head1 TODO AND LIMITATIONS

Currently, the module doesn't actually implement the "READ" functionality.
Instead, it only does "LIST" (i.e. list all records instead of a chosen
one) and it doesn't support pagination. If you expect a whole ton of
records in the database, heed the "L" flag in the C<can> option; if it's
present, the plugin will always load B<all> records into C<{t}>

Along with the "READ" optional and pagination, this plugin could make use
of absorbing some of the HTML for the LIST feature; so you'd have to
just type C<< <tmpl_var name="crud_list"> >> instead of doing HTML
by hand, but so far I haven't found a flexible solution that doesn't
drown the user of the plugin in settings options.

In addition, the plugin needs an option to add a variable amount of files,
all stored in a single database field, which in turn would allow updating
the file field during record editing.

Lastly, the plugin currently doesn't support
selects, checkboxes, or radio boxes in the Create/Update form.

=head1 A NOTE ON FORM INPUT ERROR CHECKING

This plugin only checks for whether or not a mandatory field is
present when creating/updating records. If you need more advanced error
checking, see L<App::ZofCMS::Plugin::FormChecker> that can (read "should")
work together with this plugin (run C<FormChecker> first).

=head1 REPOSITORY

Fork this module on GitHub:
L<https://github.com/zoffixznet/App-ZofCMS>

=head1 BUGS

To report bugs or request features, please use
L<https://github.com/zoffixznet/App-ZofCMS/issues>

If you can't access GitHub, you can email your request
to C<bug-App-ZofCMS at rt.cpan.org>

=head1 AUTHOR

Zoffix Znet <zoffix at cpan.org>
(L<http://zoffix.com/>, L<http://haslayout.net/>)

=head1 LICENSE

You can use and distribute this module under the same terms as Perl itself.
See the C<LICENSE> file included in this distribution for complete
details.

=cut



( run in 0.536 second using v1.01-cache-2.11-cpan-13bb782fe5a )