<commit_before>{% import 'OroCalendarBundle::invitations.html.twig' as invitations %}

{% macro calendar_event_view_template(id) %}

<script type="text/template" id="activity-context-activity-list">
    <div class="context-item" style="border: none" data-cid="<%= entity.cid %>">
        <span data-id="<%= entity.get('targetId') %>">
            <span class="<%= entity.get('icon') %>"></span>

            <% if (entity.get('link')) { %>
                <a href="<%= entity.get('link') %>">
                    <span class="context-label"><%= entity.get('title') %></span>
                </a>
            <% } else { %>
                <span class="context-label"><%= entity.get('title') %></span>
            <% } %>
            <% if (editable) { %>
                <i class="icon-remove"></i>
            <% } %>
        </span>
    </div>
</script>

<script type="text/html" id="{{ id }}">
    {% import 'OroUIBundle::macros.html.twig' as UI %}
    <div class="widget-content">
        <div class="row-fluid form-horizontal">
            <div class="responsive-block">
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.title.label'|trans, '<%= formatter.string(title) %>') }}
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.description.label'|trans, '<%= formatter.html(description) %>') }}
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.start.label'|trans, '<%= formatter.dateTime(start) %>') }}
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.end.label'|trans, '<%= formatter.dateTime(end) %>') }}
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.all_day.label'|trans, '<%= formatter.bool(allDay) %>') }}
                <% if (recurrence) { %>
                    {{ UI.renderHtmlProperty('oro.calendar.calendarevent.recurrence.label'|trans, '<%= formatter.string(recurrencePattern) %>') }}
                <% } %>
                <% if (recurringEventId && recurrencePattern) { %>
                    {{ UI.renderHtmlProperty('oro.calendar.calendarevent.recurrence.exception.label'|trans, '<%= formatter.string(recurrencePattern) %>') }}
                <% } %>

                <% var attendeesView = [];
                _.each(attendees, function (element) {
                    var result = '';
                    if (_.isEmpty(element.email)  ){
                        result = element.displayName
                    } else {
                        result = element.displayName + ' (' + element.email + ')';
                    }
                     attendeesView.push(result);
                }); %>
                {{ UI.renderAttribute('oro.calendar.calendarevent.attendees.label'|trans, '<div class="calendar-event-guests-widget"><%= attendeesView.join() %></div>') }}

                <div class="activity-context-activity">
                {{ UI.renderAttribute('oro.activity.contexts.label'|trans, '<div class="activity-context-activity-items"></div>') }}
                </div>
                {% placeholder calendar_event_widget_view_additional_properties %}
            </div>
            <div class="widget-actions form-actions" style="display: none;">
                <% if (id != null && removable) { %><commit_msg>AEIV-538: Recurring Calendar events + Outlook Improvements - Phase 1 - fixed displaying guests<commit_after>{% import 'OroCalendarBundle::invitations.html.twig' as invitations %}

{% macro calendar_event_view_template(id) %}

<script type="text/template" id="activity-context-activity-list">
    <div class="context-item" style="border: none" data-cid="<%= entity.cid %>">
        <span data-id="<%= entity.get('targetId') %>">
            <span class="<%= entity.get('icon') %>"></span>

            <% if (entity.get('link')) { %>
                <a href="<%= entity.get('link') %>">
                    <span class="context-label"><%= entity.get('title') %></span>
                </a>
            <% } else { %>
                <span class="context-label"><%= entity.get('title') %></span>
            <% } %>
            <% if (editable) { %>
                <i class="icon-remove"></i>
            <% } %>
        </span>
    </div>
</script>

<script type="text/html" id="{{ id }}">
    {% import 'OroUIBundle::macros.html.twig' as UI %}
    <div class="widget-content">
        <div class="row-fluid form-horizontal">
            <div class="responsive-block">
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.title.label'|trans, '<%= formatter.string(title) %>') }}
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.description.label'|trans, '<%= formatter.html(description) %>') }}
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.start.label'|trans, '<%= formatter.dateTime(start) %>') }}
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.end.label'|trans, '<%= formatter.dateTime(end) %>') }}
                {{ UI.renderHtmlProperty('oro.calendar.calendarevent.all_day.label'|trans, '<%= formatter.bool(allDay) %>') }}
                <% if (recurrence) { %>
                    {{ UI.renderHtmlProperty('oro.calendar.calendarevent.recurrence.label'|trans, '<%= formatter.string(recurrencePattern) %>') }}
                <% } %>
                <% if (recurringEventId && recurrencePattern) { %>
                    {{ UI.renderHtmlProperty('oro.calendar.calendarevent.recurrence.exception.label'|trans, '<%= formatter.string(recurrencePattern) %>') }}
                <% } %>

                <% var attendeesView = [];
                _.each(attendees, function (element) {
                    var result = '';
                    if (_.isEmpty(element.email)  ){
                        result = element.displayName
                    } else {
                        result = element.displayName + ' (' + element.email + ')';
                    }
                     attendeesView.push(result);
                }); %>
                <% if (attendeesView.length > 0) { %>
                    {{ UI.renderAttribute('oro.calendar.calendarevent.attendees.label'|trans, '<div class="calendar-event-guests-widget"><%= attendeesView.join() %></div>') }}
                <% } %>

                <div class="activity-context-activity">
                {{ UI.renderAttribute('oro.activity.contexts.label'|trans, '<div class="activity-context-activity-items"></div>') }}
                </div>
                {% placeholder calendar_event_widget_view_additional_properties %}
            </div>
            <div class="widget-actions form-actions" style="display: none;">
                <% if (id != null && removable) { %>
{'fraction_non_alphanumeric': 0.1801409929503525, 'fraction_numerical': 0.0007499625018749063, 'mean_word_length': 2.1158878504672898, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 112, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5711755', 'n_tokens_mistral': 2025, 'n_tokens_neox': 1817, 'n_words': 249}