/[A3C]/lib/A3C/View/Strix.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

Diff of /lib/A3C/View/Strix.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 213 by dpavlin, Fri Jun 20 17:04:20 2008 UTC revision 214 by dpavlin, Fri Jun 20 20:54:41 2008 UTC
# Line 405  template 'site' => sub { Line 405  template 'site' => sub {
405          );          );
406    
407          if ( my $site_id = $action->result->content('site_id') ) {          if ( my $site_id = $action->result->content('site_id') ) {
408                  show('strix-site-navigation-tree', $action->result->content('instance'), $site_id);                  show('navigation-tree', $action->result->content('instance'), $site_id);
409          }          }
410  };  };
411    
412  =head1 PRIVATE TEMPLATES  =head1 PRIVATE TEMPLATES
413    
414  =head2 strix-site-navigation-tree  =head2 navigation-tree-category
415    
416    show('strix-site-navigation-tree',$instance,$site_id);    show('navigation-tree-category',$kat_row);
417    
418  =cut  =cut
419    
420  private template 'select-category' => sub {  private template 'navigation-tree-category' => sub {
421          my $self = shift;          my $self = shift;
422            #warn "## navigation-tree-category",dump( @_ );
423          my $p = shift;          my $p = shift;
424          strix_link( $p->{url}, $p->{naziv} );          strix_link( $p->{url}, $p->{naziv} );
425          if ( $p->{type} eq 'category' ) {          if ( $p->{type} eq 'category' ) {
# Line 439  private template 'select-category' => su Line 440  private template 'select-category' => su
440          }          }
441  };  };
442    
443  private template 'strix-site-navigation-tree' => sub {  =head2 navigation-tree
444    
445      show('navigation-tree',$instance,$site_id);
446    
447    =cut
448    
449    private template 'navigation-tree' => sub {
450          my $self = shift;          my $self = shift;
451          my ( $instance, $site_id ) = @_;          my ( $instance, $site_id ) = @_;
452    
# Line 457  private template 'strix-site-navigation- Line 464  private template 'strix-site-navigation-
464                                          if ( defined( $p->{class} ) ) {                                          if ( defined( $p->{class} ) ) {
465                                                  { class is $p->{class} };                                                  { class is $p->{class} };
466                                          }                                          }
467                                          show( 'select-category', $p );                                          show( 'navigation-tree-category', $p );
468                                          children( $p );                                          children( $p );
469                                  }                                  }
470                          }                          }
# Line 466  private template 'strix-site-navigation- Line 473  private template 'strix-site-navigation-
473    
474          my $strix = Strix->new({ instance => $instance });          my $strix = Strix->new({ instance => $instance });
475    
476          my @navigation = @{ $strix->site_navigation( $site_id ) };          my $navigation = $strix->site_navigation( $site_id );
477          if ( @navigation ) {          #warn "## navigation = ",dump( $navigation );
478            if ( $navigation ) {
479                  ul {                  ul {
480                          foreach my $p ( @navigation ) {                          foreach my $p ( @$navigation ) {
481                                  li {                                  li {
482                                          show( 'select-category', $p );                                          show( 'navigation-tree-category', $p );
483                                          children( $p );                                          children( $p );
484                                  }                                  }
485                          }                          }

Legend:
Removed from v.213  
changed lines
  Added in v.214

  ViewVC Help
Powered by ViewVC 1.1.26