1 package SL::Layout::ActionBar;
4 use parent qw(SL::Layout::Base);
6 use constant HTML_CLASS => 'layout-actionbar';
8 use Rose::Object::MakeMethods::Generic (
9 'scalar --get_set_init' => [ qw(actions) ],
13 ###### Layout overrides
16 $::request->presenter->html_tag('div', '', class => HTML_CLASS);
19 sub inline_javascript {
30 my ($self, @actions) = @_;
31 push @{ $self->actions }, @actions;
49 SL::Layout::ActionBar - Unified action buttons for controllers
53 This is a layout block that does a unified action bar for any controller who
54 wants to use it. It's designed to be rendered above the content and to be
57 While it can be used as a generic widget container, it's designed to be able to
58 provide commonly used functionality as a short cut. These shortcuts include:
64 Calling a controller with parameters
68 Submitting a form with added parameters
81 =item C<add_actions LIST>
83 Dispatches each each argument to C<add_action>
88 =item C<add_separator>
92 =head1 ACCESS FROM CODE
94 This is accessable through
96 $::request->layout->actionbar
100 The entire block is rendered into a div with the class 'layout-actionbar'.
102 =head1 ACTION WIDGETS
104 Each individual action must be an instance of C<SL::Layout::ActionBar::Action>.
112 Sven Schoeling E<lt>s.schoeling@linet-services.deE<gt>