index.html.twig 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {% extends "MuzichHomeBundle::layout.html.twig" %}
  2. {% block title %}{{ 'title.home'|trans({}, 'userui') }}{% endblock %}
  3. {% block mainbox_classes %}mainbox_margintop mainbox_nopadding{% endblock %}
  4. {% block content %}
  5. {% include 'MuzichCoreBundle:Component:element_add_buttons.html.twig' %}
  6. {% include 'MuzichHomeBundle:Component:filter_menu.html.twig' %}
  7. {% include 'MuzichCoreBundle:Component:element_add_box.html.twig' with {
  8. 'box_title': 'home.add_element_box.title'|trans({}, 'navigationui')
  9. } %}
  10. {% if app.user.wantSeeHelp('home') %}
  11. {% include 'MuzichCoreBundle:HelpTour:home.html.twig' %}
  12. {% endif %}
  13. {# TODO: Cette partie de javascript ne devra plus exister après la réecriture du code javascript #}
  14. {% if from_url is defined %}
  15. {% if from_url %}
  16. <script type="text/javascript">
  17. $(document).ready(function(){
  18. $('#element_add_box').slideDown("slow");
  19. $('#element_add_link').hide();
  20. $('form[name="search"]').slideUp();
  21. $('img#form_add_loader').show();
  22. $('input#element_add_url').val("{{ from_url }}");
  23. $('form[name="add"]').submit();
  24. });
  25. </script>
  26. {% endif %}
  27. {% endif %}
  28. <div class="top_tools" {% if search_tags_id|length == 0 %}style="display: none;"{% endif %}>
  29. <div class="search_tools">
  30. <form name="{{ search_form_name }}" action="{{ path('search_elements', {'context':'home'}) }}" method="post" {{ form_enctype(search_form) }}>
  31. {% include "MuzichCoreBundle:SearchElement:form.html.twig" with {
  32. 'form_name' : search_form_name,
  33. 'search_tags' : search_tags_id
  34. } %}
  35. <input class="main button" type="submit" value="{{ 'filter.submit'|trans({}, 'userui') }}"/>
  36. </form>
  37. </div>
  38. </div>
  39. <div id="elements_list">
  40. {% include "MuzichCoreBundle:SearchElement:default.html.twig" with {
  41. 'noelements_filter' : true,
  42. 'display_new_elements' : true,
  43. 'display_autoplay' : true,
  44. 'autoplay_context' : 'home'
  45. }%}
  46. </div>
  47. {% if elements|length %}
  48. {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
  49. 'more_path' : path('search_elements', {'context':'home'})
  50. }%}
  51. {% endif %}
  52. {% endblock %}