/[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 999 - (show annotations)
Sun Nov 4 17:03:55 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 1372 byte(s)
 r1538@llin:  dpavlin | 2007-11-04 18:03:57 +0100
 add database selection

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 => 'database', default_value => get('database') ),
17 render_param( $action => 'query', default_value => get('query') ),
18 form_submit(
19 label => _('Search'),
20 );
21 };
22
23 #warn dump( $action->result->content );
24
25 if ( my $results = $action->result->content( 'results' ) ) {
26 ul {
27 while ( my $ds = $results->next ) {
28 warn "view :: ds = ",dump( $ds );
29 li {
30 div {
31 $ds->display( 'TitleProper' ) . '. ' . $ds->display( 'Series' )
32 }
33 div { $ds->display( 'DatePublication' ) }
34 my $po = $ds->display( 'PripadajuciOznaka' );
35 warn('$po=',dump($po));
36 my @po = $ds->display( 'PripadajuciOznaka' );
37 warn('@po=',dump(@po));
38 ul { attr { class => 'linked'};
39 foreach my $i ( @po ) {
40 warn("i=",dump($i));
41 foreach my $j ( @$i ) {
42 warn("j=",dump($j));
43 li { $j }
44 }
45 }
46 }
47 div { $ds->display( 'Fond' ) }
48 div { $ds->display( 'ISBN' ) }
49 tt { $ds->display( 'database' ) . '/' . $ds->display( 'input' ) . '/' . $ds->display( 'id' ) }
50 }
51 }
52 }
53 }
54
55 };
56
57 1;

  ViewVC Help
Powered by ViewVC 1.1.26