<table class="table table-bordered">
    <tr>
        <td class="doc_heading" id="{{name}}_{{ doc.id }}"  style="cursor:pointer">
            <a href="{{ doc.snippet.url }}" class="unbubble"><strong>{{ doc.snippet.url }}</strong></a><span class= "pull-right"><i class="icon-chevron-down" ></i></span>
        </td>
    </tr>
    <tr>
        <td><div class="muted"><strong>Релевантность: </strong>{{ doc.relevance.value }}</div></td>
    </tr>
    <tr>
        <td class="doc_content" id="data_{{name}}_{{doc.id}}">
            <div><strong>Свойства</strong></div>
            <table class="table table-bordered">
                <tr><td>id</td><td style="word-break: break-all">{{ doc.id }}</td></tr>
                <tr><td>click_urls</td><td style="word-break: break-all">{{ doc.click_urls }}</td></tr>
                <tr><td>doc_source</td><td style="word-break: break-all">{{ doc.doc_source }}</td></tr>
                <tr><td>doc_revision</td><td style="word-break: break-all">{{ doc.doc_revision }}</td></tr>
                <tr><td>doc_index</td><td style="word-break: break-all">{{ doc.doc_index }}</td></tr>
            </table>
            {% if doc.relevance and doc.relevance.factors %}
            <div><strong>Факторы</strong></div>
            <table class="table table-bordered">
                    {% for name, value in doc.relevance.factors.items() %}
                        {% if value or form.cleaned_data.show_all_factors %}
                            <tr><td>{{ name }}</td><td style="width: 100%">{{ value }}</td></tr>
                        {% endif %}
                    {% endfor %}
            </table>
            {% endif %}
            <div>
                {% if doc.passages %}
                <div><strong>Пассажи</strong></div>
                <div class="well">
                <ul>
                    {% for passage in doc.passages %}
                    <li>{{ passage|e }}</li>
                    {% endfor %}
                </ul>
                </div>
                {% endif %}
            </div>
            <div>
                <div><strong>Сниппет</strong></div>
                <pre>{{ doc.snippet|to_json|e }}</pre>
            </div>
        </td>
    </tr>
</table>

