{% load i18n humanize %}

            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            {% if ticket_list_caption %}{{ ticket_list_caption }}{% else %}{% trans "Your Tickets" %}{% endif %}
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                        <tr>
                                            <th>#</th>
                                            <th>{% trans "Pr" %}</th>
                                            <th>{% trans "Title" %}</th>
                                            <th>{% trans "Queue" %}</th>
                                            <th>{% trans "Status" %}</th>
                                            <th>{% trans "Last Update" %}</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for ticket in ticket_list %}
                                        <tr class="{{ ticket.get_priority_css_class }}">
                                            <td><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></td>
                                            <td>{{ ticket.priority }}</td>
                                            <td><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></td>
                                            <td>{{ ticket.queue }}</td>
                                            <td>{{ ticket.get_status }}</td>
                                            <td><span title='{{ ticket.modified|date:"r" }}'>{{ ticket.modified|naturaltime }}</span></td>
                                        </tr>
                                        {% empty %}
                                        <tr>{% if ticket_list_empty_message %}<td colspan='6'>{{ ticket_list_empty_message }}</td>{% else %}<td colspan='6'>{% trans "You do not have any pending tickets." %}</td>{% endif %}</tr>
                                        {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                            {% if ticket_list.has_other_pages %}
                                <ul class="pagination">
                                    <!-- if we aren't on page one, go back to start and go back one controls -->
                                    {% if ticket_list.has_previous %}
                                        <li><a href="?{{ page_var }}=1">&laquo;&laquo;</a></li>
                                        <li><a href="?{{ page_var }}={{ ticket_list.previous_page_number }}">&laquo;</a></li>
                                    {% else %}
                                        <li class="disabled"><span>&laquo;&laquo;</span></li>
                                        <li class="disabled"><span>&laquo;</span></li>
                                    {% endif %}
                                    <!-- other pages, set thresh to the number to show before and after active -->
                                    {% with 5 as thresh %}
                                    {% for i in ticket_list.paginator.page_range %}
                                        {% if ticket_list.number == i %}
                                            <li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
                                        {% elif i <= ticket_list.number|add:5 and i >= ticket_list.number|add:-5 %}
                                            <li><a href="?{{ page_var }}={{ i }}">{{ i }}</a></li>
                                        {% endif %}
                                    {% endfor %}
                                    {% endwith %}
                                    <!-- if we aren't on the last page, go forward one and go to end controls -->
                                    {% if ticket_list.has_next %}
                                        <li><a href="?{{ page_var }}={{ ticket_list.next_page_number }}">&raquo;</a></li>
                                        <li><a href="?{{ page_var }}={{ ticket_list.paginator.num_pages }}">&raquo;&raquo;</a></li>
                                    {% else %}
                                        <li class="disabled"><span>&raquo;</span></li>
                                        <li class="disabled"><span>&raquo;&raquo;</span></li>
                                    {% endif %}
                                </ul>
                            {% endif %}
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
            </div>

