{% extends "MuzichHomeBundle::layout.html.twig" %}

{% block title %}Réseau{% endblock %}

{% block content %}

  <div id="element_add_box" style="display: none;">
    
    <a href="#" id="element_add_close_link" class="button">
      &lt;&lt; {{ 'home.add_element_box.close'|trans({}, 'navigationui') }}
    </a>
    
    <form novalidate name="{{ add_form_name }}" action="{{ path('element_add') }}" method="post" {{ form_enctype(add_form) }}>

      {% include "MuzichCoreBundle:Element:form.add.html.twig" with { 
        'form'          : add_form, 
        'form_name'     : add_form_name
      } %}

      <input type="submit" class="button" />
      <img class="tag_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
    </form>
  </div>

  <div id="added_element_to_group" style="display: none;">
    <img class="loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
    <p class="help">
      {{ 'element_add.added_to_group.sentence'|trans({}, 'userui') }}
    </p>
    <ul id="groups_to_add_element"></ul>
    <p class="cancel">
      <a href="" class="cancel">
        {{ 'element_add.added_to_group.nothanks'|trans({}, 'userui') }}
      </a>
    </p>
  </div>

  <a href="#" id="element_add_link" class="button">
    {{ 'home.add_element'|trans({}, 'navigationui') }} &gt;&gt;
  </a>

  <form name="{{ search_form_name }}" action="{{ path('search_elements') }}" method="post" {{ form_enctype(search_form) }}>

    {% include "MuzichCoreBundle:SearchElement:form.html.twig" with { 
      'form_name'               : search_form_name,
      'search_tags'             : search_tags_id,
      'display_specials_buttons': true
    } %}
    
    <input class="main button" type="submit" value="{{ 'filter.submit'|trans({}, 'userui') }}"/>
  </form>

  <div class="display_more_elements" style="display: none;">
    <span></span>
  </div>

  <div class="elements_loader_div">
    <img class="elements_new_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
  </div>

  {% include "MuzichCoreBundle:SearchElement:default.html.twig" with {'noelements_filter' : true }%}
    
  <div class="elements_loader_div">
    <img class="elements_more_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
  </div>
  
  {% if more_count is defined %} 
  {% if elements|length %}
     <span class="elements_more">
       <a href="{{ path('search_elements') }}" class="elements_more button">
         {{ 'more'|trans({}, 'userui') }}
       </a>
     </span>
  {% endif %}
  {% endif %}
  
{% endblock %}