/[webpac2]/Webpacus2/lib/Webpacus/View.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /Webpacus2/lib/Webpacus/View.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 946 - (show annotations)
Wed Oct 31 19:08:25 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 751 byte(s)
simple search view
1 package Webpacus::View;
2
3 use strict;
4 use warnings;
5
6 use Jifty::View::Declare -base;
7
8 use Data::Dump qw/dump/;
9
10
11 template '/' => page {
12 my $action = new_action( class => 'Search' );
13 h1 { _("Search out data") },
14 form {
15 render_param( $action => 'field', default_value => get('field') ),
16 render_param( $action => 'query', default_value => get('query') ),
17 form_submit(
18 label => _('Search'),
19 );
20 };
21
22 #warn dump( $action->result->content );
23
24 if ( my $results = $action->result->content( 'results' ) ) {
25 ul {
26 while ( my $row = $results->next ) {
27 warn "view :: row = ",dump( $row );
28 li {
29 div { join(' ',@{$row->{TitleProper}}) }
30 tt { $row->{database} . '/' . $row->{input} . '/' . $row->{id} }
31 }
32 }
33 }
34 }
35
36 };
37
38
39 1;

  ViewVC Help
Powered by ViewVC 1.1.26