% my $title =  'manage/Потребители';
% layout 'upravlenie'; title $title;
<h1><%== $title %></h1>

% my @columns = qw(login_name first_name last_name start_date stop_date); #table columns
%= link_to 'New record in table "users"' => 'create_users'
<table>
    <thead>
        <tr>
            <th>ID</th>
    % for my $column (@columns) {
            <th><%= uc($column) %></th>
    % }
        </tr>
    </thead>
    <tbody>
<%
for my $item (@$users) {
  my $class = ($user->{id} == $item->{id} ? 'b' : '')
    . ($item->{disabled} ? ' disabled' : '');
%>
        <tr <%== $class ? qq|class="$class"| : '' %>>
            <td><%= link_to $item->{id} => show_users => {id => $item->{id}} %></td>
    % for my $column (@columns) {
            <td><%= $item->{$column} %></td>
    % }
        </tr>
% }
    </tbody>
</table>