perl-Catalyst-Plugin-BootstrapAlert-0.50-alt1.noarch.rpm


Advertisement

Description

perl-Catalyst-Plugin-BootstrapAlert - Replacement for Catalyst::Plugin::StatusMessage inline with Bootstrap alert names (success, info, w

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-Catalyst-Plugin-BootstrapAlert
Package version 0.50
Package release alt1
Package architecture noarch
Package type rpm
Installed size 9.87 KB
Download size 9.87 KB
Official Mirror ftp.altlinux.org
Replacement for Catalyst::Plugin::StatusMessage using Bootstrap alert names (success, info, warning, and danger),
whilst also keeping `status_msg' and `error_msg' as aliases.
Storing an array-ref of msgs, or even an array-ref of hash-refs is fine, in TT you'd want to use the `list' VMethod:
[% IF danger_alert.list.size %]
<div class="alert alert-danger" role="alert">
[% FOREACH each_danger_alert IN danger_alert.list %]
<p>[% each_danger_alert %]</p>
[% END %]
</div>
[% END %]
Calling `list' on an actual list just returns the list, so essentially a no-op.
See http://www.template-toolkit.org/docs/manual/VMethods.html#section_list
In MyApp.pm:
use Catalyst qr/
BootstrapAlert
/;
In controller where you want to save a message for display on the next page:
$c->response->redirect( "/?mid=" . $c->set_success_alert("It worked!") );
Or, to save an danger message:
$c->response->redirect( "/?mid=" . $c->set_error_msg("Error deleting widget") );
Then, in the controller action that corresponds to the redirect above:
sub list :Path {
my ($self, $c) = @_;
...
$c->load_bootstrap_alerts;
...
}
This would mean simply changing `load_status_msgs' if using `Catalyst::Plugin::StatusMessage'.
And, to display the output (here using Template Toolkit):
...
<span class="message">[% success_alert %]</span>
<span class="error">[% error_msg %]</span>
...

Alternatives

Package Version Architecture Repository
perl-Catalyst-Plugin-BootstrapAlert - - -

Requires

Name Value
/usr/share/perl5 -
rpmlib(PayloadIsLzma) -

Provides

Name Value
perl(Catalyst/Plugin/BootstrapAlert.pm) = 0.500
perl-Catalyst-Plugin-BootstrapAlert = 0.50-alt1

Download

Type URL
Binary Package perl-Catalyst-Plugin-BootstrapAlert-0.50-alt1.noarch.rpm
Source Package perl-Catalyst-Plugin-BootstrapAlert-0.50-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    
    rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
    rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
    
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Catalyst-Plugin-BootstrapAlert rpm package:
    # sudo apt-get install perl-Catalyst-Plugin-BootstrapAlert

Files

Path
/usr/share/doc/perl-Catalyst-Plugin-BootstrapAlert-0.50/Changes
/usr/share/doc/perl-Catalyst-Plugin-BootstrapAlert-0.50/README
/usr/share/perl5/Catalyst/
/usr/share/perl5/Catalyst/Plugin/BootstrapAlert.pm

See Also

Package Description
perl-Catalyst-Plugin-Bread-Board-0.03-alt1.noarch.rpm use Bread::Board to configure your Catalyst app
perl-Catalyst-Plugin-Browser-0.08-alt1.noarch.rpm DEPRECATED: Browser Detection
perl-Catalyst-Plugin-BuildURI-0.1-alt1.noarch.rpm Build URI by action name, namespace, and args
perl-Catalyst-Plugin-C3-0.03-alt1.noarch.rpm Catalyst Plugin to subvert NEXT to use Class::C3
perl-Catalyst-Plugin-CDBI-Transaction-0.03-alt1.noarch.rpm Simple transaction handling for Catalyst
perl-Catalyst-Plugin-CGI-Untaint-0.05-alt1_29.noarch.rpm CGI::Untaint Plugin for Catalyst
perl-Catalyst-Plugin-Cache-0.12-alt1_16.noarch.rpm Flexible caching support for Catalyst
perl-Catalyst-Plugin-Cache-BerkeleyDB-0.01-alt1.noarch.rpm perl module Catalyst-Plugin-Cache-BerkeleyDB
perl-Catalyst-Plugin-Cache-FastMmap-0.9-alt1_9.noarch.rpm Mmap cache for Catalyst applications
perl-Catalyst-Plugin-Cache-HTTP-0.001000-alt1.noarch.rpm HTTP/1.1 cache validators for Catalyst
perl-Catalyst-Plugin-Cache-HTTP-Preempt-0.1.3-alt1.noarch.rpm preemptive HTTP cache control
perl-Catalyst-Plugin-Cache-Memcached-Fast-0.14-alt1.noarch.rpm Catalyst Plugin for Cache::Memcached::Fast
perl-Catalyst-Plugin-Cache-Store-FastMmap-0.02-alt3_10.noarch.rpm A thin wrapper for
perl-Catalyst-Plugin-Captcha-0.04-alt3_8.noarch.rpm Create and validate Captcha for Catalyst
perl-Catalyst-Plugin-ChainedURI-0.007-alt1.noarch.rpm Simple way to get an URL to an action from chained catalyst controller
Advertisement
Advertisement