[Catalyst-commits] r8437 - in trunk/Catalyst-Example-InstantCRUD: .
lib/Catalyst/Example lib/Catalyst/Example/Controller
lib/Catalyst/Helper/View
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Sat Sep 20 08:14:47 BST 2008
Author: zby
Date: 2008-09-20 08:14:47 +0100 (Sat, 20 Sep 2008)
New Revision: 8437
Modified:
trunk/Catalyst-Example-InstantCRUD/Makefile.PL
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/Controller/InstantCRUD.pm
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD.pm
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/View/InstantCRUD.pm
Log:
Removed dependency on HTML::Widget
Modified: trunk/Catalyst-Example-InstantCRUD/Makefile.PL
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/Makefile.PL 2008-09-20 01:37:45 UTC (rev 8436)
+++ trunk/Catalyst-Example-InstantCRUD/Makefile.PL 2008-09-20 07:14:47 UTC (rev 8437)
@@ -31,7 +31,6 @@
'version' => 0,
'URI::Escape' => 0,
'HTML::Entities' => 0,
- 'HTML::Widget' => 1.10,
'File::Spec' => 0,
'File::Slurp' => 0,
'Pod::Usage' => 0,
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/Controller/InstantCRUD.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/Controller/InstantCRUD.pm 2008-09-20 01:37:45 UTC (rev 8436)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/Controller/InstantCRUD.pm 2008-09-20 07:14:47 UTC (rev 8437)
@@ -6,7 +6,6 @@
use Carp;
use Data::Dumper;
-use HTML::Widget;
use Path::Class;
use Rose::HTMLx::Form::DBIC qw/ dbic_from_form options_from_resultset init_with_dbic /;
@@ -59,12 +58,14 @@
$c->forward('list');
}
else {
- my $w =
- $c->widget('widget')->method('post')
- ->action( $c->uri_for( 'destroy', @pks) );
- $w->element( 'Submit', 'ok' )->value('Delete ?');
- $c->stash->{destroywidget} = $w->process;
-# $c->stash->{template} = 'destroy.tt';
+ my $action_uri = $c->uri_for( 'destroy', @pks);
+ $c->stash->{destroywidget} = <<END;
+<form action="$action_uri" id="widget" method="post">
+<fieldset class="widget_fieldset">
+<input class="submit" id="widget_ok" name="ok" type="submit" value="Delete ?" />
+</fieldset>
+</form>
+END
}
}
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD.pm 2008-09-20 01:37:45 UTC (rev 8436)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD.pm 2008-09-20 07:14:47 UTC (rev 8437)
@@ -89,7 +89,6 @@
'Catalyst' => 0,
'URI::Escape' => 0,
'HTML::Entities' => 0,
- 'HTML::Widget' => 0,
'File::Spec' => 0,
'Catalyst' => 5.66,
'Catalyst::View::TT' => 0.21,
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/View/InstantCRUD.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/View/InstantCRUD.pm 2008-09-20 01:37:45 UTC (rev 8436)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/View/InstantCRUD.pm 2008-09-20 07:14:47 UTC (rev 8437)
@@ -145,9 +145,9 @@
</td>
<+ END +>
[% SET id = row.$pri %]
- <td><a href="[% c.uri_for( 'view', <+ FOR key = primary_keys +>item.<+ key +>, <+ END +> ) %]">View</a></td>
- <td><a href="[% c.uri_for( 'edit', <+ FOR key = primary_keys +>item.<+ key +>, <+ END +> ) %]">Edit</a></td>
- <td><a href="[% c.uri_for( 'destroy', <+ FOR key = primary_keys +>item.<+ key +>, <+ END +> ) %]">Destroy</a></td>
+ <td><a href="[% c.uri_for( 'view', <+ FOR key = primary_keys +>row.<+ key +>, <+ END +> ) %]">View</a></td>
+ <td><a href="[% c.uri_for( 'edit', <+ FOR key = primary_keys +>row.<+ key +>, <+ END +> ) %]">Edit</a></td>
+ <td><a href="[% c.uri_for( 'destroy', <+ FOR key = primary_keys +>row.<+ key +>, <+ END +> ) %]">Destroy</a></td>
</tr>
[% END %]
</table>
More information about the Catalyst-commits
mailing list