How can I add buttons to the sidebar? I can't find a way to include buttons on the correct place at the sidebar of my plugin.

So I noticed that on the sidebar markup, there's a div for buttons, there's created automatically:



I can easily add anything to the sidebar, I can include the buttons on the top, as you can see on the example, but my question is, how do I add the buttons to that div?

I couldn't find on the templates the correct place.

[EDIT]

Here's my template.

{% extends "_layouts/elementindex" %}
{% includeCssResource "crashC/css/crashC.css" %}

{% set title = "Entries" %}
{% set selectedTab = 'entries' %}
{% set elementType = "CrashC" %}
{% set docsUrl = '' %}

{% block sidebar %}
  &lt;a href="http://##" class="btn submit"&gt;Download CSV&lt;/a&gt;
  {{ parent() }}
{% endblock %}


Thanks a lot for the help!
I found a solution for this one, actually, you can do this with:

Javascript: Craft.elementIndex.addButton($('&lt;a href="http:/##" class="btn submit" /&gt;').html('test'))

Template: Just add a div with class .buttons, Craft's javascript will check for that and you won't get duplicated divs.

{% block sidebar %}
  &lt;div class="buttons"&gt;
     &lt;a href="http://##" class="btn submit"&gt;Download CSV&lt;/a&gt;
  &lt;/div&gt;
  {{ parent() }}
{% endblock %}


Done.
I hope this helps others too.