$def with (title, query, fields, BASE_URL, add_link=True, tab=None)
$var title = title
$var hierarchy = []
$var css = ["admin.css"]
$var tab = tab
    $if add_link:
        <a href="$BASE_URL/add">A&ntilde;adir</a>
    <table class="text-centered">
        <tr>
            $for field in fields:
                <th>$field</th>
            <th>Borrar</th>
        </tr>
        $for item in query:
            <tr class="$loop.parity">
                $for field in fields:
                    <td>
                        <a href="$BASE_URL/edit/$item.id">
                            $getattr(item, field)
                        </a>
                    </td>

                <td>
                    <a href="$BASE_URL/del/$item.id">
                        x
                    </a>
                </td>
            </tr>
    </table>
