Skip to content

Commit

Permalink
[NEW FEATURES]
Browse files Browse the repository at this point in the history
  * Add hyperlink icon from any FK to the related table+record
  * Support DBIC Dynamic Default components such as DBIx::Class::TimeStamp

  [ENHANCEMENTS]

  * Display alert message when table data load fails (Getty)
  * Implement separate create() and update() in DBIC backend (davewood)

  [BUG FIXES]
  
  * Fix for hidden table configuration (F. Elliott)
  * Fix for when m2m gets generated with same name as existing rel
  • Loading branch information
ollyg committed Oct 16, 2011
2 parents 60e42da + 8c91ac9 commit 3c725dc
Show file tree
Hide file tree
Showing 46 changed files with 632 additions and 99 deletions.
17 changes: 17 additions & 0 deletions Changes
@@ -1,3 +1,20 @@
2.112890_002 2011-10-16 10:43:02 Europe/London

[NEW FEATURES]

* Add hyperlink icon from any FK to the related table+record
* Support DBIC Dynamic Default components such as DBIx::Class::TimeStamp

[ENHANCEMENTS]

* Display alert message when table data load fails (Getty)
* Implement separate create() and update() in DBIC backend (davewood)

[BUG FIXES]

* Fix for hidden table configuration (F. Elliott)
* Fix for when m2m gets generated with same name as existing rel

2.112830_001 2011-10-10 20:59:11 Europe/London

[ENHANCEMENTS]
Expand Down
8 changes: 8 additions & 0 deletions MANIFEST
Expand Up @@ -18,16 +18,20 @@ examples/demo/lib/DemoAppMusicSchema/Result/SleeveNote.pm
examples/demo/lib/DemoAppMusicSchema/Result/Track.pm
examples/demo/lib/DemoAppOtherFeatures.pm
examples/demo/lib/DemoAppOtherFeaturesSchema.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/A.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/Artist.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/ArtistUndirectedMap.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/ArtistsCalledMike.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/B.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/Bookmark.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/BookmarkWithLinkProxy.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/DynamicDefault.pm.off
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/Fourkey.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/FourkeysToTwokey.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/Link.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/Noprimarykey.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/PunctuatedColumnName.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/Reference.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/SelfRef.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/SelfRefAlias.pm
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/Twokey.pm
Expand Down Expand Up @@ -67,6 +71,7 @@ lib/Catalyst/Plugin/AutoCRUD/static/script_lightning.png
lib/Catalyst/Plugin/AutoCRUD/static/sitemap_color.png
lib/Catalyst/Plugin/AutoCRUD/static/skinny.css
lib/Catalyst/Plugin/AutoCRUD/static/skinny_body.css
lib/Catalyst/Plugin/AutoCRUD/static/table_go.png
lib/Catalyst/Plugin/AutoCRUD/static/xdatetime.js
lib/Catalyst/Plugin/AutoCRUD/templates/full-fat/javascript/grid.tt
lib/Catalyst/Plugin/AutoCRUD/templates/full-fat/javascript/grid/columns.tt
Expand All @@ -90,6 +95,7 @@ lib/Catalyst/Plugin/AutoCRUD/templates/tables.tt
lib/SQL/Translator/AutoCRUD/Quick.pm
lib/SQL/Translator/AutoCRUD/Utils.pm
lib/SQL/Translator/Filter/AutoCRUD/Backend/DBIC/AccessorDisplayName.pm
lib/SQL/Translator/Filter/AutoCRUD/Backend/DBIC/DynamicDefault.pm
lib/SQL/Translator/Filter/AutoCRUD/Backend/DBIC/ProxyColumns.pm
lib/SQL/Translator/Filter/AutoCRUD/Backend/DBIC/Relationships.pm
lib/SQL/Translator/Filter/AutoCRUD/Backend/DBIC/ViewsAsTables.pm
Expand All @@ -104,6 +110,7 @@ t/12-extjs-local.t
t/13-extjs-cachefly.t
t/14-with-html-charset.t
t/14-without-html-charset.t
t/15-hidden-table.t
t/20-music-metadata.t
t/31-ajax-list.t
t/32-ajax-delete.t
Expand Down Expand Up @@ -148,6 +155,7 @@ t/lib/columns_extjs.conf
t/lib/headings_and_columns_extjs.conf
t/lib/headings_byhash.conf
t/lib/headings_extjs.conf
t/lib/hide_table.conf
t/lib/html_charset.conf
t/lib/list_returns_byhash.conf
t/lib/list_returns_bylist.conf
Expand Down
2 changes: 1 addition & 1 deletion META.json
Expand Up @@ -81,6 +81,6 @@
"web" : "https://github.com/ollyg/Catalyst-Plugin-AutoCRUD"
}
},
"version" : "2.112830_001"
"version" : "2.112890_002"
}

2 changes: 1 addition & 1 deletion META.yml
Expand Up @@ -58,4 +58,4 @@ resources:
bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-AutoCRUD
homepage: https://github.com/ollyg/Catalyst-Plugin-AutoCRUD/wiki
repository: git://github.com/ollyg/Catalyst-Plugin-AutoCRUD.git
version: 2.112830_001
version: 2.112890_002
2 changes: 1 addition & 1 deletion Makefile.PL
Expand Up @@ -63,7 +63,7 @@ my %WriteMakefileArgs = (
"strict" => 0,
"warnings" => 0
},
"VERSION" => "2.112830_001",
"VERSION" => "2.112890_002",
"test" => {
"TESTS" => "t/*.t"
}
Expand Down
13 changes: 1 addition & 12 deletions README
Expand Up @@ -2,7 +2,7 @@ NAME
Catalyst::Plugin::AutoCRUD - Instant AJAX web front-end for DBIx::Class

VERSION
version 2.112830_001
version 2.112890_002

SYNOPSIS
If you already have a Catalyst app with DBIx::Class models configured:
Expand Down Expand Up @@ -416,11 +416,6 @@ SITES CONFIGURATION
</sites>
</Plugin::AutoCRUD>

Although this is a separate option from "create_allowed", below, *be
warned!* Both creation and editing of records are in fact "update"
actions, so the *only* way to secure the application from creation
and editing of records is to set this option to "no".

create_allowed [ yes* | no ]
This can be applied to either a schema or a source; if applied to a
schema it percolates to all the sources, unless the source has a
Expand All @@ -439,12 +434,6 @@ SITES CONFIGURATION
</sites>
</Plugin::AutoCRUD>

*Important Note:* this is purely a cosmetic action, and it is still
possible for a user to call the AJAX API published by this
application in order to create a new record. The only way truely to
prevent record creation is also to set the "update_allowed" option
to "no", as shown above.

delete_allowed [ yes* | no ]
This can be applied to either a schema or a source; if applied to a
schema it percolates to all the sources, unless the source has a
Expand Down
87 changes: 87 additions & 0 deletions examples/demo/lib/DemoAppOtherFeaturesSchema/Result/A.pm
@@ -0,0 +1,87 @@
package DemoAppOtherFeaturesSchema::Result::A;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use base 'DBIx::Class::Core';


=head1 NAME
DemoAppOtherFeaturesSchema::Result::A
=cut

__PACKAGE__->table("a");

=head1 ACCESSORS
=head2 id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 reference
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=cut

__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"reference",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");

=head1 RELATIONS
=head2 reference
Type: belongs_to
Related object: L<DemoAppOtherFeaturesSchema::Result::Reference>
=cut

__PACKAGE__->belongs_to(
"reference",
"DemoAppOtherFeaturesSchema::Result::Reference",
{ id => "reference" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
},
);

=head2 bs
Type: has_many
Related object: L<DemoAppOtherFeaturesSchema::Result::B>
=cut

__PACKAGE__->has_many(
"bs",
"DemoAppOtherFeaturesSchema::Result::B",
{ "foreign.a" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);


# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-15 14:58:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XLBJfiY2TVbu0hULuLKzTw


# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
100 changes: 100 additions & 0 deletions examples/demo/lib/DemoAppOtherFeaturesSchema/Result/B.pm
@@ -0,0 +1,100 @@
package DemoAppOtherFeaturesSchema::Result::B;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use base 'DBIx::Class::Core';


=head1 NAME
DemoAppOtherFeaturesSchema::Result::B
=cut

__PACKAGE__->table("b");

=head1 ACCESSORS
=head2 id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 a
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=head2 reference
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=cut

__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"a",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"reference",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");

=head1 RELATIONS
=head2 reference
Type: belongs_to
Related object: L<DemoAppOtherFeaturesSchema::Result::Reference>
=cut

__PACKAGE__->belongs_to(
"reference",
"DemoAppOtherFeaturesSchema::Result::Reference",
{ id => "reference" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
},
);

=head2 a
Type: belongs_to
Related object: L<DemoAppOtherFeaturesSchema::Result::A>
=cut

__PACKAGE__->belongs_to(
"a",
"DemoAppOtherFeaturesSchema::Result::A",
{ id => "a" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
},
);


# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-15 14:58:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MR5vRo2hETq1evS/7tVQtQ


# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
@@ -0,0 +1,64 @@
package DemoAppOtherFeaturesSchema::Result::DynamicDefault;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use base 'DBIx::Class::Core';
__PACKAGE__->load_components(qw( TimeStamp ));

=head1 NAME

DemoAppOtherFeaturesSchema::Result::DynamicDefault

=cut

__PACKAGE__->table("dynamic_default");

=head1 ACCESSORS

=head2 id

data_type: 'integer'
is_auto_increment: 1
is_nullable: 0

=head2 name

data_type: 'varchar'
is_nullable: 0
size: 100

=head2 on_create

data_type: 'datetime'
is_nullable: 1

=head2 on_create_and_update

data_type: 'datetime'
is_nullable: 1

=cut

__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"name",
{ data_type => "varchar", is_nullable => 0, size => 100 },
"on_create",
{ data_type => "datetime", is_nullable => 1, set_on_create => 1 },
"on_create_and_update",
{ data_type => "datetime", is_nullable => 1, set_on_create => 1, set_on_update => 1 },
);
__PACKAGE__->set_primary_key("id");


# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-16 09:27:14
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MhUVm6g6+/Lu2dNhNtbSMQ


# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

0 comments on commit 3c725dc

Please sign in to comment.