{% load i18n staticfiles brightcove %}

<div class="brightcove_widget">
    {{ select }} {% if pk %} <!--<a href="{% url 'brightcove-refresh-item-list' pk %}" class="brightcove_widget_refresh"><span class="fa fa-refresh"> </span>{% trans 'refresh' %}</a>-->{% endif %}
    
    {% if item %}
    <table>
        <tbody>
            <tr>
                <td class="label">{% trans 'Video name' %}</td>
                <td>{{ item.name }}</td>
            </tr>
            <tr>
                <td class="label">{% trans 'Video' %}</td>
                <td>{% brightcove_player item.brightcove_id width=360 height=200 %}</td>
            </tr>
            <tr>
                <td class="label">{% trans 'Thumbnail' %}</td>
                <td><img src="{{ item.thumbnail_URL }}"></td>
            </tr>
            {% if item.short_description %}
            <tr>
                <td class="label">{% trans 'Short description' %}</td>
                <td>{{ item.short_description }}</td>
            </tr>
            {% endif %}
            {% if item.long_description %}
            <tr>
                <td class="label">{% trans 'Long description' %}</td>
                <td>{{ item.long_description|default_if_none:"" }}</td>
            </tr>
            {% endif %}
            <tr>
                <td class="label">{% trans 'length' %}</td>
                <td>{{ item.length_seconds }}</td>
            </tr>
            <tr>
                <td class="label">{% trans 'Total times played' %}</td>
                <td>{{ item.plays_total|default_if_none:"0" }}</td>
            </tr>
            <tr>
                <td class="label">{% trans 'Creation date' %}</td>
                <td>{{ item.creation_date }}</td>
            </tr>
            <tr>
                <td class="label">{% trans 'Publication date' %}</td>
                <td>{{ item.published_date }}</td>
            </tr>
        </tbody>
    </table>
    {% endif %}
</div>
