views-view-fullcalendar.html.twig in Fullcalendar View 6.x
{#
/**
* 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
* - languageSelector: Flag for the language dropdown box
* - view_index: View index
* - showAddEvent: Show add event button
* - entity_id: The Entity type machine name
*
* @see template_preprocess_views_view_fullcalendar()
*
* @ingroup themeable
*/
#}
{%
set classes = [
options.classes
]
%}
<div{{ attributes.addClass(classes) }}>
<div class="js-drupal-fullcalendar" calendar-view-index="{{ view_index }}" calendar-view-name="{{ view_id }}" calendar-display="{{ display_id }}"></div>
<div class="bottom-buttons fc-button-group">
{% if showAddEvent %}
<div class="fullcalendar-bottom-btn add-event-btn">
<a id="calendar-add-event" href="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="{"width":400}">{{ 'Add event'|t }}</a>
</div>
{% endif %}
{% if options.languageSelector == 1 %}
<div class="fullcalendar-bottom-btn locale-selector">
<label for="locale-selector">{{ 'Select Language:'|t }}</label>
<select id='locale-selector-{{ view_index }}' calendar-view-index="{{ view_index }}"></select>
</div>
{% endif %}
</div>
</div>
File
templates/views-view-fullcalendar.html.twig
View source
- {#
- /**
- * 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
- * - languageSelector: Flag for the language dropdown box
- * - view_index: View index
- * - showAddEvent: Show add event button
- * - entity_id: The Entity type machine name
- *
- * @see template_preprocess_views_view_fullcalendar()
- *
- * @ingroup themeable
- */
- #}
- {%
- set classes = [
- options.classes
- ]
- %}
- <div{{ attributes.addClass(classes) }}>
- <div class="js-drupal-fullcalendar" calendar-view-index="{{ view_index }}" calendar-view-name="{{ view_id }}" calendar-display="{{ display_id }}"></div>
- <div class="bottom-buttons fc-button-group">
- {% if showAddEvent %}
- <div class="fullcalendar-bottom-btn add-event-btn">
- <a id="calendar-add-event" href="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="{"width":400}">{{ 'Add event'|t }}</a>
- </div>
- {% endif %}
- {% if options.languageSelector == 1 %}
- <div class="fullcalendar-bottom-btn locale-selector">
- <label for="locale-selector">{{ 'Select Language:'|t }}</label>
- <select id='locale-selector-{{ view_index }}' calendar-view-index="{{ view_index }}"></select>
- </div>
- {% endif %}
- </div>
- </div>