{% load i18n admin_static %}
{% for app in available_apps %}
<li class="grp-collapse grp-closed">
  <a href="{{ app.app_url }}">{{ app.name }}</a>
  <ul class="">
      {% for model in app.models %}
      {% if model.admin_url %}
    <li class="">
    	<a href="{{ model.admin_url }}" style="display:inline-block">
    	{{ model.name }}
    	</a>
    	{% if model.add_url %}
            <a href="{{ model.add_url }}" style="display:inline">+</a>
         {% endif %}
    </li>
      {% endif %}
      {% endfor %}
  </ul>
</li>
{% endfor %}
<script>
    (function($) {
        $(document).ready(function() {
            $("#grp-navigation .grp-collapse").mouseover(function(){
                $("#grp-navigation .grp-collapse").removeClass('grp-open');
                $("#grp-navigation .grp-collapse").removeClass('grp-closed');
                $(this).addClass('grp-open');
            }).mouseleave(function(){
                $("#grp-navigation .grp-collapse").removeClass('grp-open');
            });
        });
    })(grp.jQuery);
</script>
