<div class="rioccurrences">
    <% occurrences.forEach(function(occurrence) { %>
        <div class="d-flex justify-content-between occurrence <%= occurrence.type %>">
            <span>
                <%= occurrence.formattedDate %>
                <% if(occurrence.type === "start") { %>
                    <span class="rlabel"><%= localization.recurrenceStart %></span>
                <% } %>
                <% if(occurrence.type === "rdate") { %>
                    <span class="rlabel"><%= localization.additionalDate %></span>
                <% } %>
            </span>
            <% if(!readOnly) { %>
                <span class="action">
                    <% if(occurrence.type === "rrule") { %>
                        <button type="button" date="<%= occurrence.date %>"
                           class="btn btn-sm btn-outline-secondary <%= occurrence.type %>" title="<%= localization.exclude %>">
                            <%= icons.exclude %>
                        </button>
                    <% } %>
                    <% if(occurrence.type === "rdate") { %>
                        <button type="button" date="<%= occurrence.date %>"
                           class="btn btn-sm btn-outline-secondary <%= occurrence.type %>" title="<%= localization.remove %>">
                            <%= icons.remove %>
                        </button>
                    <% } %>
                    <% if(occurrence.type === "exdate") { %>
                        <button type="button" date="<%= occurrence.date %>"
                           class="btn btn-sm btn-outline-secondary <%= occurrence.type %>" title="<%= localization.include %>">
                           <%= icons.include %>
                        </button>
                    <% } %>
                </span>
            <% } %>
        </div>
    <% }) %>
    <div class="batching">
        <% for(var index=0; index < batch.batches.length; index++) { %>
            <span <% if(index === batch.currentBatch) { %>class="current"<% } %>>
                <a href="#" start="<%= batch.batches[index][0] %>">[<%= batch.batches[index][0] %> - <%= batch.batches[index][1] %>]</a>
            </span>
        <% } %>
    </div>
</div>
