{% block leftbar %}

<ul class="sidebar-menu tree" data-widget="tree">
        <li class="header">Busqueda</li>
	<li class=" menu-open">
	    <a href="{% url 'index' %}?{{ request.GET.urlencode }}"><i class="fa fa-dashboard fa-fw"></i><span>Dashboard</span></a>
	</li>
	<li class="treeview menu-open">
		<a href="#"><i class="fa fa-search fa-fw"></i><span>Busqueda</span>
			<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
		</a>
		<ul class="treeview-menu" style="display: block;">
			<form role="form" >			
				<li class="treeview menu-open">
                			{{form}}
				</li>
				<li  class="treeview menu-open">
			                <button type="submit" class="btn btn-default" style="width:100%;">Buscar</button>
				</li>
			</form>
		</ul><!-- /.nav-second-level -->
	</li>
	<li class="treeview menu-open">

		<a href="#"><i class="fa fa-download fa-fw"></i><span>Descargar</span>
                        <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
		</a>

		<ul class="treeview-menu" style="display: block;">
			<form role="form">
			        <li class="">
			               <a href="{% url 'ws-download-news' %}?{{ request.GET.urlencode }}&format=JSON" target="_blank">JSON</a>
			        </li>

				<li class="">
			      		<a href="{% url 'ws-download-news' %}?{{ request.GET.urlencode }}&format=CSV" target="_blank">CSV</a>
				</li>


			</form>
		</ul>
	</li>

</ul>
{% endblock %}
