--- lib/A3C/View/Strix.pm 2008/09/01 18:44:33 233 +++ lib/A3C/View/Strix.pm 2008/09/01 18:53:59 234 @@ -92,6 +92,53 @@ }; +=head2 instances + +=cut + +template 'instances' => page { + + title is _('Strix instances'); + + my $sql = A3C::SQL->new({ query => qq{ + select + hrEduOrgUrl, o, l, postalAddress, telephoneNumber, facsimileTelephoneNumber + from strix_instances + join hr_edu_orgs on cn = instance + order by l,o + }}); + + if ( $sql->count > 0 ) { + + table { + row { + th { _('hrEduOrgUrl') } + th { _('o') } + th { _('l') } + th { _('postalAddress') } + th { _('telephoneNumber') } + th { _('facsimileTelephoneNumber') } + }; + while ( my $row = $sql->next ) { + row { + cell { outs_raw '' . $row->hrEduOrgUrl . '' } + cell { $row->o } + cell { $row->l } + cell { $row->postalAddress } + cell { $row->telephoneNumber } + cell { $row->facsimileTelephoneNumber } + } + } + } + + div { _("Found total of %1 strix instances", $sql->count) } + + } else { + div { _("Can't find any strix instances") } + } + +}; + =head2 sql Execute SQL query on instance