92 |
|
|
93 |
}; |
}; |
94 |
|
|
95 |
|
=head2 instances |
96 |
|
|
97 |
|
=cut |
98 |
|
|
99 |
|
template 'instances' => page { |
100 |
|
|
101 |
|
title is _('Strix instances'); |
102 |
|
|
103 |
|
my $sql = A3C::SQL->new({ query => qq{ |
104 |
|
select |
105 |
|
hrEduOrgUrl, o, l, postalAddress, telephoneNumber, facsimileTelephoneNumber |
106 |
|
from strix_instances |
107 |
|
join hr_edu_orgs on cn = instance |
108 |
|
order by l,o |
109 |
|
}}); |
110 |
|
|
111 |
|
if ( $sql->count > 0 ) { |
112 |
|
|
113 |
|
table { |
114 |
|
row { |
115 |
|
th { _('hrEduOrgUrl') } |
116 |
|
th { _('o') } |
117 |
|
th { _('l') } |
118 |
|
th { _('postalAddress') } |
119 |
|
th { _('telephoneNumber') } |
120 |
|
th { _('facsimileTelephoneNumber') } |
121 |
|
}; |
122 |
|
while ( my $row = $sql->next ) { |
123 |
|
row { |
124 |
|
cell { outs_raw '<a href="' . $row->hrEduOrgUrl . '">' . $row->hrEduOrgUrl . '</a>' } |
125 |
|
cell { $row->o } |
126 |
|
cell { $row->l } |
127 |
|
cell { $row->postalAddress } |
128 |
|
cell { $row->telephoneNumber } |
129 |
|
cell { $row->facsimileTelephoneNumber } |
130 |
|
} |
131 |
|
} |
132 |
|
} |
133 |
|
|
134 |
|
div { _("Found total of %1 strix instances", $sql->count) } |
135 |
|
|
136 |
|
} else { |
137 |
|
div { _("Can't find any strix instances") } |
138 |
|
} |
139 |
|
|
140 |
|
}; |
141 |
|
|
142 |
=head2 sql |
=head2 sql |
143 |
|
|
144 |
Execute SQL query on instance |
Execute SQL query on instance |