{{define "title"}}{{ call $.T "users_list" }}{{end}}
{{define "content"}}
<div class="results box">
    <h1>{{ call $.T "users_list" }}</h1>
    <table class="table">
        <thead class="torrent-info">
            <tr>
                <th class="tr-name">{{ call $.T "username" }}</th>
                <th class="tr-actions">{{ call $.T "actions" }}</th>
            </tr>
        </thead>
        <tbody>
        {{ range .Models}}
        <tr>
            <td class="tr-name home-td"><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
            <td class="tr-actions home-td">{{if gt .ID 0}}<a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a>{{end}}</td>
        </tr>
        {{end}}
        </tbody>
    </table>
</div>
{{end}}
