{% load i18n %}{% if is_staff %}

<script language="javascript">
(function ($) {
  $(document).ready(function () {
    var messages_dict = {
       form_title: "{% trans "Create a new block" %}"
    };
    var add_url = "{% url ajax_block_add %}";
    var config_url = "{% url get_block_config %}";

    var toolbar_tpl = '\
        <div class="blockToolbarContainer">\
            <span class="blockToolbarActions">\
                <span class="blockToolbarAction hightlightBlock">{% trans "See block containers" %}</span>\
            </span>\
            <a href="#blockToolbarFormContainer" class="blockToolbarFormContainerTrigger" style="display: none;" rel="shadowbox;type=inline;height=200;width=600">form trigger</a>\
            <div id="blockToolbarFormContainer" style="display: none;"></div>\
        </div>';
    // init block toolbar
    $('#{{ node_id }}').blocktoolbar(toolbar_tpl, add_url, config_url, messages_dict);
  });
})(jQuery);
</script>
{% endif %}
