<commit_before><%inherit file="layout.html"/>
<%namespace name="partials" file="partials.html"/>
<%
event_classes = {
    event.USER_WAITING: 'waiting',
    event.USER_MAYBE: 'maybe',
    event.USER_CONFIRMED: 'confirmed',
    event.USER_DECLINED: 'declined',
}
%>

<article class="info event">
<section>
<h2>${event.title | h}</h2>

% if error_message is not None:
    <p class="error message"><span>${error_message | h}</span</p>
% endif
% if confirm_message is not None:
    <p class="confirm message"><span>${confirm_message | h}</span></p>
% endif

<p>${event.summary | h}</p>
</section>

<section>
<h3>Date</h3>
<p><time datetime="${event.date.strftime('%Y-%m-%dT%H:%M') | h}">${event.date.strftime('%A %d %B %Y, %H:%M') | h}</time></p>
</section>

<section>
<h3>Place</h3>
<p>${event.place | h}</p>
</section>

<section>
<h3>Attendees</h3>
<ul class="users">
% for event_user in event.iter_users():
    <% state = event.users[event_user.name] %>
    <li class="${event_classes[state] | h}">
        <span class="state">[${event.get_sign(state) | h}]</span> ${partials.display_user(event_user)}
    </li>
% endfor
</ul>
</section>

% if user_state is not None:
<section>
<h3>Confirmation</h3>
    <p>
    Your current status is:
    % if user_state == event.USER_WAITING:
        <strong>waiting</strong>.
    % elif user_state == event.USER_CONFIRMED:
        <strong>confirmed</strong>.
    % elif user_state == event.USER_MAYBE:
        <strong>maybe</strong>.
    % elif user_state == event.USER_DECLINED:
        <strong>declined</strong>.
    % endif
    </p>
        % if user_state != event.USER_CONFIRMED:<commit_msg>simplify code<commit_after><%inherit file="layout.html"/>
<%namespace name="partials" file="partials.html"/>

<article class="info event">
<section>
<h2>${event.title | h}</h2>

% if error_message is not None:
    <p class="error message"><span>${error_message | h}</span</p>
% endif
% if confirm_message is not None:
    <p class="confirm message"><span>${confirm_message | h}</span></p>
% endif

<p>${event.summary | h}</p>
</section>

<section>
<h3>Date</h3>
<p><time datetime="${event.date.strftime('%Y-%m-%dT%H:%M') | h}">${event.date.strftime('%A %d %B %Y, %H:%M') | h}</time></p>
</section>

<section>
<h3>Place</h3>
<p>${event.place | h}</p>
</section>

<section>
<h3>Attendees</h3>
<ul class="users">
% for event_user in event.iter_users():
    <% state = event.users[event_user.name] %>
    <li class="${event.STATES_LABEL[state] | h}">
        <span class="state">[${event.get_sign(state) | h}]</span> ${partials.display_user(event_user)}
    </li>
% endfor
</ul>
</section>

% if user_state is not None:
<section>
<h3>Confirmation</h3>
    <p>
    Your current status is: <strong>${event.STATES_LABEL[user_state]}</strong>.
    </p>
        % if user_state != event.USER_CONFIRMED:
{'fraction_non_alphanumeric': 0.21415929203539824, 'fraction_numerical': 0.007079646017699115, 'mean_word_length': 4.282242990654206, 'pattern_counts': {'":': 0, '<': 108, '<?xml version=': 0, '>': 106, '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': '6405270', 'n_tokens_mistral': 1096, 'n_tokens_neox': 1074, 'n_words': 201}