You are here

views-view-fullcalendar.html.twig in Fullcalendar View 8.3

{#
/**
 * Default theme implementation for Views to output a Fullcalendar View.
 *
 * Available variables:
 * - options: View plugin style options:
 *   - classes: CSS classes.
 *   - defaultDate: Default date of the calendar
 *   - start: Field name of start date
 *   - end: Field name of end date
 *
 * @see template_preprocess_views_view_fullcalendar()
 *
 * @ingroup themeable
 */
#}
{%
  set classes = [
    options.classes
  ]
%}
<div{{ attributes.addClass(classes) }}>
  <div class="js-drupal-fullcalendar"></div>
  <div id="bottom-buttons fc-button-group">
    {% if showAddEvent %}
    <div class="fullcalendar-bottom-btn add-event-btn">
        <a id="calendar-add-event"  href="{{ language }}fullcalendar-view-event-add?entity={{ entity_id }}&bundle={{ options.bundle_type }}&start_field={{ options.start }}&end_field={{ options.end }}&destination={{ path('<current>') }}" class="use-ajax" data-dialog-type="dialog" data-dialog-renderer="off_canvas" 
   data-dialog-options="{&quot;width&quot;:400}">{{ 'Add event'|t }}</a>
    </div>
    {% endif %}
    <div class="fullcalendar-bottom-btn locale-selector">
      <label for="locale-selector">{{ 'Select Language:'|t }}</label>
      <select id='locale-selector'></select>
    </div>
  </div>
</div>

File

templates/views-view-fullcalendar.html.twig
View source
  1. {#
  2. /**
  3. * Default theme implementation for Views to output a Fullcalendar View.
  4. *
  5. * Available variables:
  6. * - options: View plugin style options:
  7. * - classes: CSS classes.
  8. * - defaultDate: Default date of the calendar
  9. * - start: Field name of start date
  10. * - end: Field name of end date
  11. *
  12. * @see template_preprocess_views_view_fullcalendar()
  13. *
  14. * @ingroup themeable
  15. */
  16. #}
  17. {%
  18. set classes = [
  19. options.classes
  20. ]
  21. %}
  22. <div{{ attributes.addClass(classes) }}>
  23. <div class="js-drupal-fullcalendar"></div>
  24. <div id="bottom-buttons fc-button-group">
  25. {% if showAddEvent %}
  26. <div class="fullcalendar-bottom-btn add-event-btn">
  27. <a id="calendar-add-event" href="{{ language }}fullcalendar-view-event-add?entity={{ entity_id }}&bundle={{ options.bundle_type }}&start_field={{ options.start }}&end_field={{ options.end }}&destination={{ path('<current>') }}" class="use-ajax" data-dialog-type="dialog" data-dialog-renderer="off_canvas"
  28. data-dialog-options="{&quot;width&quot;:400}">{{ 'Add event'|t }}</a>
  29. </div>
  30. {% endif %}
  31. <div class="fullcalendar-bottom-btn locale-selector">
  32. <label for="locale-selector">{{ 'Select Language:'|t }}</label>
  33. <select id='locale-selector'></select>
  34. </div>
  35. </div>
  36. </div>