Catalyst::ActionRole::Tabs

Add tabs to Catalyst controller actions
Download

Catalyst::ActionRole::Tabs Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Bernhard Graf
  • Publisher web site:
  • http://search.cpan.org/~graf/

Catalyst::ActionRole::Tabs Tags


Catalyst::ActionRole::Tabs Description

Add tabs to Catalyst controller actions Catalyst::ActionRole::Tabs is a Perl module that allows to add 'Tab' attributes to action endpoints, and it will automatically build a data structure suitable for rendering 'tabs' to switch between the methods that share the same tab structure.Although this was originally built to help with making tabbed interfaces, it isn't limited to creating tabs, as it simply collects the information about the related actions. Actions are considered to be related if they share a namespace and the same captures from chained actions.For examples of usage, please have a look in the test directory ./t and its subdirectories.SYNOPSIS package MyApp::Controller::Foo; use Moose::Role; use namespace::autoclean; BEGIN { extends 'Catalyst::Controller::ActionRole' } # view action has a tab sub view : Local Does(Tabs) Tab { ... } # edit action has a tab sub edit : Local Does(Tabs) Tab { ... $form->action($c->uri_for('update')); ... } # update action uses same tab as edit action sub update : Local Does(Tabs) TabAlias(edit) { ... if ($form->result->has_errors) { $stash->{template} = 'edit.tt2'; } else { $c->response->redirect($c->uri_for('view')); } < ul class="tabs" > < li class="selected" > < a href="" >< /a > < /li > < /ul > Requirements: · Perl


Catalyst::ActionRole::Tabs Related Software