[% INCLUDE "header.tt" %]
[% PROCESS "list_macros.tt" %]

<div class="list">
<table id="matrix">
    <tr>
    [% primary = crud.model.primary_column %]
    [% FOR column = crud.model.columns %]
        [% NEXT IF column == primary %]
        <th>[% crud.column_monikers.$column %]</th> <!-- TODO: sorting asc/desc-->
    [% END %]

    [% list_additional_column_headings(); %]

    <th id="actionth"></th>
    </tr>

    [%  SET count = 0; %]
    [% FOR item = items %] <!-- TODO: search -->
        [% SET count = count + 1 %]
        <tr [% ' class="alternate"' IF count % 2; %]>

            [% list_row_columns(item); %]
            <td class="actions">[% list_actions(item); %]</td>

        </tr>
    [% END %]
</table>

[% INCLUDE "pager.tt" %]

<a href="[% c.uri_for('add') %]">Add</a>

[% INCLUDE "footer.tt" %]
