Catalyst-Plugin-CRUD
view release on metacpan or search on metacpan
lib/Catalyst/Helper/Model/CRUD.pm view on Meta::CPAN
[% serials %]
__controller_class__
package [% app_name %]::Controller::[% class_name %];
use strict;
use warnings;
use base 'Catalyst::Controller';
use Class::Trigger;
sub default : Private {
my ( $self, $c ) = @_;
$c->forward('list');
}
sub create : Local {
my ( $self, $c ) = @_;
$c->create($self);
}
sub read : Local {
my ( $self, $c ) = @_;
$c->read($self);
}
sub update : Local {
my ( $self, $c ) = @_;
$c->update($self);
}
sub delete : Local {
my ( $self, $c ) = @_;
$c->delete($self);
}
sub list : Local {
my ( $self, $c ) = @_;
$c->list($self);
}
sub setting {
my ( $self, $c ) = @_;
my $hash = {
'name' => '[% path_name %]',
'type' => '[% base_name %]',
'model' => '[% base_name %]::[% model_name %]',
'primary' => '[% primary %]',
'columns' => [qw([% columns %])],
'default' => '/[% path_name %]/list',
'template' => {
'prefix' => 'template/[% path_name %]/',
'suffix' => '.tt'
},
};
return $hash;
}
1;
__header_html__
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>[% app_name %]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- http://openjsan.org/doc/k/ko/komagata/Widget/Dialog/ -->
<script type="text/javascript" src="/static/js/Widget/Dialog.js"></script>
<!-- link rel="stylesheet" href="styles.css" / -->
<style type="text/css">
<!--
#centre {
border:1px solid #202020;
border-bottom:0;
border-top:0;
color:#000;
padding:1.5em;
}
#conteneur {
background-color:#fafafa;
margin:1em 5%;
min-width:60em;
position:absolute;
width:90%;
}
#haut {
background-color:#202020;
height:2.4em;
max-height:2.4em;
}
#header {
background-color:#2D4B9B;
border:1px solid #fafafa;
color:#fafafa;
font-size:2em;
height:2.5em;
padding-left:2em;
padding-top:1em;
}
#pied {
border:1px solid #202020;
border-top:0;
padding:0.5em;
text-align:right;
}
.menuhaut {
font-size:1em;
list-style-type:none;
margin:0;
padding:0;
}
.menuhaut a {
color:#fafafa;
margin:0 0.4em;
text-decoration:none;
}
( run in 0.835 second using v1.01-cache-2.11-cpan-63c85eba8c4 )