{% extends "base_generic.html" %}
{% block lefPanel %}{% include "leftMenuBar.html" %}{% endblock %}
{% load humanize %}

{% block dash-title %}

		<b>{{form.text.value|default:"Fuentes de Información"|capfirst}}</b>
		[{{form.startDate.value}}, {{form.endDate.value}}]

{% 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>Noticias</th>
					<th>Tipo</th>
                                    </tr>
                                </thead>
                                <tbody>
					{% for p in publishers %}
                                    <tr class="odd gradeX">
                                        <td>{{p.name}}</td>
					<td>{{p.shortName}}</td>
                                        <td><a href="{{p.url}}" target="blank">{{p.url}}</a></td>
					<td>{{p.date}}</td>
					<td><a href="{% url 'news-list'%}?publishers={{p.id}}&{{queryurl}}">{{p.news|intcomma}}</a></td>
					<td>{{p.type}}</td>
                                    </tr>
					{% endfor %}
                                </tbody>
                            </table>
                            <!-- /.table-responsive -->



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

{% endblock %}


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

{% endblock %}

