--- lib/A3C/View.pm 2008/06/19 19:52:43 207 +++ lib/A3C/View.pm 2008/06/19 21:24:26 208 @@ -80,29 +80,6 @@ }; -template 'ldap' => page { - h1 { _('LDAP data about Schools in system') }; - my $ldap = A3C::LDAP->new; - div { - $ldap->search( - base => 'dc=skole,dc=hr', - filter => '(objectClass=hrEduOrg)', - sizelimit => 10, - ); - while ( my $entry = $ldap->current_search->shift_entry ) { - #warn $entry->dump; - ul { - foreach my $attr ( $entry->attributes ) { - li { - tt { $attr } - span { dump( $entry->get_value( $attr ) ) } - } - } - } - } - } -}; - template 'people' => page { h1 { _('Find people') } @@ -138,33 +115,6 @@ }; -template 'sync' => page { - - h1 { _('Sync school from LDAP') } - - my $action = new_action( - class => 'SyncOrganization', - moniker => 'sync-organization' - ); - - form { - render_action( $action => [ 'org_uid' ] ); - form_submit( label => _('Sync Organization') ); - }; - - if ( my $users = $action->result->content('synced-users') ) { - ol { - while (my $user = $users->next) { - li { - span { $user->cn } - tt { { class is 'email' } '<' . $user->mail . '>' } - } - } - } - } - -}; - # mount other views use A3C::View::Organization; @@ -175,6 +125,9 @@ object_type => 'hrEduOrg', }; +use A3C::View::LDAP; +alias A3C::View::LDAP under '/ldap'; + use A3C::View::Strix; alias A3C::View::Strix under '/strix';