/[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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 962 - (hide annotations)
Fri Nov 2 12:23:40 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 1240 byte(s)
 r1466@llin:  dpavlin | 2007-11-02 13:23:22 +0100
 more hacking on output, total mess for now

1 dpavlin 946 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 dpavlin 962 div {
30     $row->( 'TitleProper' ) . '. ' . $row->( 'Series' )
31     }
32 dpavlin 954 div { $row->( 'DatePublication' ) }
33 dpavlin 962 my $po = $row->( 'PripadajuciOznaka' );
34     warn('$po=',dump($po));
35     my @po = $row->( 'PripadajuciOznaka' );
36     warn('@po=',dump(@po));
37     ul { attr { class => 'linked'};
38     foreach my $i ( @po ) {
39     warn("i=",dump($i));
40     foreach my $j ( @$i ) {
41     warn("j=",dump($j));
42     li { $j }
43     }
44     }
45     }
46     div { $row->( 'Fond' ) }
47     div { $row->( 'ISBN' ) }
48 dpavlin 954 tt { $row->( 'database' ) . '/' . $row->( 'input' ) . '/' . $row->( 'id' ) }
49 dpavlin 946 }
50     }
51     }
52     }
53    
54     };
55    
56     1;

  ViewVC Help
Powered by ViewVC 1.1.26