<!DOCTYPE html>
{% load djeddit_tags %}
<li class="list-group-item">
    <div class="row vertical-align">
        <div class="col-sm-1 hidden-xs col-icon hover-point" onclick="window.location='{% threadUrl thread %}'">
            <i class="fa {% threadIconClass thread %} fa-2x"></i>
        </div>
        <div class="col-sm-8 col-xs-9 list-group-item-main-col">
            <a href="{% threadUrl thread %}"><h4 class="inline">{% firstLine thread.title 50 %}</h4></a>
            <div class="text-muted inline">
                {% with thread.op.getReplies|length as commentsCount %}
                    {% if commentsCount %}
                        <a href='{{ thread.relativeUrl }}/#comments-callout'>{% getAmount commentsCount 'comment' %}</a>
                    {% else %}
                        {% getAmount commentsCount 'comment' %}
                    {% endif %}
                    {% if thread.is_stickied %}
                        &nbsp;<i class="fa fa-map-pin"></i>
                    {% endif %}
                {% endwith %}
                {% if showTopic %}on <a href="{% url 'topicPage' thread.topic.urlTitle %}">{{ thread.topic.title }}</a> {% endif %}
            </div>
            <br>
            <div class="text-muted inline full-line">
                {% if showCreatedBy %}
                    Submitted by {% if thread.op.created_by %}
                                    <a href="{% url 'userSummary' thread.op.created_by %}">{% postUserName thread.op.created_by %}</a> {% else %} {% postUserName thread.op.created_by %} {% endif %} {% postDate thread.op.created_on 'on ' %}
                {% else %}
                    {{ thread.op.created_on }}
                {% endif %}
            </div>
        </div>
        <div class="col-xs-3">
            <div class="count-box" onclick="window.location='{{ thread.relativeUrl }}'">
                <div class="count-box-score text-muted">{{ thread.op.score }}</div>
                <div class="count-box-context text-muted">Points</div>
            </div>
            <div class="count-box" onclick="window.location='{{ thread.relativeUrl }}'">
                <div class="count-box-score text-muted">{{ thread.views }}</div>
                <div class="count-box-context text-muted">Views</div>
            </div>
        </div>
    </div>
</li>
