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

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

revision 209 by dpavlin, Thu Jun 19 21:43:35 2008 UTC revision 231 by dpavlin, Sun Aug 31 11:54:40 2008 UTC
# Line 43  template 'sync' => page { Line 43  template 'sync' => page {
43    
44  };  };
45    
46    use Encode qw/decode/;
47    
48  template 'dump' => page {  template 'search' => page {
49          h1 { _('LDAP data about Schools in system') };          h1 { _('LDAP data about Schools in system') };
50          my $ldap = A3C::LDAP->new;  
51          div {          my $action = new_action(
52                  $ldap->search(                  class   => 'SearchLDAP',
53                          base    => 'dc=skole,dc=hr',                  moniker => 'search-ldap'
54                          filter  => '(objectClass=hrEduOrg)',          );
55                          sizelimit => 10,  
56                  );          form {
57                  while ( my $entry = $ldap->current_search->shift_entry ) {                  render_action( $action => [ 'base', 'filter', 'sizelimit' ] );
58                          #warn $entry->dump;                  form_submit( label => _('Search LDAP') );
59                          ul {          };
60                                  foreach my $attr ( $entry->attributes ) {  
61                                          li {          if ( my $search = $action->result->content( 'current_search' ) ) {
62                                                  tt { $attr }                  div {
63                                                  span { dump( $entry->get_value( $attr ) ) }                          while ( my $entry = $search->shift_entry ) {
64                                    #warn $entry->dump;
65                                    ul {
66                                            foreach my $attr ( $entry->attributes ) {
67                                                    li {
68                                                            tt { $attr }
69                                                            my $vals = decode('utf-8', join('<b>&bull;</b>', $entry->get_value( $attr ) ));
70                                                            span { outs_raw( $vals ) }
71                                                    }
72                                          }                                          }
73                                  }                                  }
74                          }                          }

Legend:
Removed from v.209  
changed lines
  Added in v.231

  ViewVC Help
Powered by ViewVC 1.1.26