{% extends "new/adminLTE2_base.html" %}
{% load staticfiles %}

{% load humanize %}
{% load mathfilters %}
{% block headMedia %}
        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.css"/>
{% endblock %}

{% block leftbar %}
        {% include "new/index-leftbar.html" %}
{% endblock %}

{% block dash-title %}

		<b>{{form.text.value|default:"Fuentes de Información en Audio"|capfirst}}</b>


{% endblock %}


{% block dash %}

            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Fuentes de Información
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">



                            <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">
                                <thead>
                                    <tr>
                                        <th>Nombre</th>
					<th>ID</th>
                                        <th>url</th>
					<th>Desde</th>
					<th>Horas</th>
					<th>Tipo</th>
                                    </tr>
                                </thead>
                                <tbody>
					{% for p in publishers %}
                                    <tr class="odd gradeX">
                                        <td><a href="{% url 'audio'%}{{p.publisher.shortName}}">{{p.publisher.name}}</a></td>
					<td>{{p.publisher.shortName}}</td>
                                        <td ><a class="CropLongTexts" href="{{p.publisher.url}}" target="blank">{{p.publisher.url}}</a></td>
                                        <td>{{p.startDate}}</td>

					<td>{{p.minutes|div:60|floatformat:2 }}</td>
					<td>{{p.publisher.type}}</td>
                                    </tr>
					{% endfor %}
                                </tbody>
                            </table>
                            <!-- /.table-responsive -->



                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->

{% endblock %}


{% block scripts %}
        <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.js"></script>

    <script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
            responsive: true,
                "language": {"url": "/static/languages/Spanish.json" }
        });
    });
    </script>

{% endblock %}

