{% extends 'dashboard_screen/base.html' %}

{% block content %}

            <!-- ============================================================== -->
            <!-- Start right Content here -->
            <!-- ============================================================== -->
            <div class="content-page">
                <!-- Start content -->
                <div class="content">
                    <div class="container">
                        <div class="row">

                            <div class="col-lg-12">
                                 <!-- Basic Form Wizard -->

                            	<div class="card-box">

                                <div class="panel">
                                        {% if users %}


                                        <div class="panel-body">

                                             <div class="row">
                                                    <div class="col-sm-12">
                                                        <div class="card-box table-responsive">

                                                            <h4 class="m-t-0 header-title"><b>All Users</b></h4>

                                                            <table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
                                                                <thead>
                                                                    <tr>
                                                                        <th>ID</th>
                                                                        <th>Username</th>
                                                                        <th>Full Name</th>
                                                                        <th>Email</th>
                                                                        <th>Group</th>
                                                                        <th>Actions</th>
                                                                    </tr>
                                                                </thead>
                                                                <tbody>
                                                                {% if users %}
                                                                    {% for user in users %}
                                                                            <tr>
                                                                                <td>{{ user.id }}</td>
                                                                                <td>{{ user.username }}</td>
                                                                                <td>{{ user.first_name }} {{ user.last_name }}</td>
                                                                                <td>{{ user.email }}</td>
                                                                                <td><span class="label label-success">{{ user.get_group_name }}</span></td>
                                                                                <td>
                                                                                        <a href="/dashboard/enter_result/{{ Entry.entry_id }}/">
                                                                                            <button type="link" name="enter_result" class="btn btn-default btn-custom waves-effect waves-light">Edit User</button>
                                                                                        </a>
                                                                                </td>
                                                                            </tr>
                                                                    {% endfor %}
                                                                {% endif %}


                                                                </tbody>
                                                            </table>
                                                        </div>
                                                    </div>
                                                </div>
                                        </div>
                                        <!-- end: page -->
                                        {% endif %}

                                    </div> <!-- end Panel -->



                            	</div>


                            <!-- End row -->

                            </div> <!-- end col -->
                        </div>

						<!-- end row -->



                    </div> <!-- container -->

                </div> <!-- content -->


{% endblock %}