<table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#ffffff" align="center" style="background-color: #ffffff; font-size: 12px;color:#333333;line-height: 18px;font-family: HelveticaNeue, Helvetica, Arial, sans-serif;">
    <%
      String headerTitle = "";
      if(org.exoplatform.agenda.constant.AgendaEventModificationType.ADDED.name().equals(modificationType) && isCreator){
        headerTitle = _ctx.appRes("Notification.title.AgendaInvitationPlugin.created", eventTitle);
      } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.ADDED.name().equals(modificationType)){
        headerTitle = _ctx.appRes("Notification.title.AgendaInvitationPlugin", eventTitle);
      } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.UPDATED.name().equals(modificationType) && isCreator){
        headerTitle = _ctx.appRes("Notification.title.AgendaInvitationPlugin.updateForUpdater", eventTitle);
      } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.UPDATED.name().equals(modificationType)){
        headerTitle = _ctx.appRes("Notification.title.AgendaInvitationPlugin.update", eventTitle);
      } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.DELETED.name().equals(modificationType)){
        headerTitle = _ctx.appRes("Notification.title.AgendaInvitationPlugin.deleted", eventTitle);
      } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.DATES_UPDATED.name().equals(modificationType)){
        headerTitle = _ctx.appRes("Notification.title.AgendaInvitationPlugin.dates.update", eventTitle);
      } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.SWITCHED_EVENT_TO_DATE_POLL.name().equals(modificationType)){
        headerTitle = _ctx.appRes("Notification.title.AgendaInvitationPlugin.switchedToDatePoll", eventTitle);
      } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.SWITCHED_DATE_POLL_TO_EVENT.name().equals(modificationType)){
        headerTitle = _ctx.appRes("Notification.title.AgendaInvitationPlugin.switchedToEvent", eventTitle);
      }
      _templateContext.put("header_title", headerTitle);
      _ctx.include("war:/notification/templates/mail/NotificationHeader.gtmpl", _templateContext);
    %>
    <tr>
        <td bgcolor="#ffffff" style="background-color: #ffffff;">
            <table cellpadding="0" cellspacing="0" width="100%"  bgcolor="#ffffff" style="background-color: #ffffff; border-bottom:1px solid #d8d8d8;border-left:1px solid #d8d8d8;border-right:1px solid #d8d8d8;">
                <tr>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" width="92%" bgcolor="#ffffff" align="center" style="background-color: #ffffff; color:#333333;line-height:20px;">
                            <tr>
                                <td align="left" bgcolor="#ffffff" style="background-color: #ffffff;padding: 10px 0;">
                                    <p style="margin: 10px 0;"><%=_ctx.appRes("Notification.label.SayHello")%>
                                      <% if (!isGuest) { %>
                                       <%=_ctx.escapeHTML(FIRSTNAME)%>,
                                      <% } %>
                                    </p>
                                    <table border="0" cellpadding="0" cellspacing="0" >
                                        <tr>
                                            <td>
                                                <p style="margin: 10px 0 13px;">
                                                    <%
                                                    String eventTitle = "<span style=\"color: #2f5e92; text-decoration: none; font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif\" >" + _ctx.escapeHTML(eventTitle) + "</span>";
                                                    String creatorName = "<span style=\"color: #2f5e92; text-decoration: none; font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif\" >" + _ctx.escapeHTML(creatorName) + "</span>";
                                                    if (org.exoplatform.agenda.constant.AgendaEventModificationType.ADDED.name().equals(modificationType) && isCreator) { %>
                                                      <%= _ctx.appRes("Notification.agenda.event.createdForCreator", eventTitle, creatorName) %>
                                                    <% } else if (org.exoplatform.agenda.constant.AgendaEventModificationType.ADDED.name().equals(modificationType)) { %>
                                                      <%= _ctx.appRes("Notification.agenda.event.created", eventTitle, creatorName) %>
                                                      <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.UPDATED.name().equals(modificationType) && org.exoplatform.agenda.constant.EventStatus.CONFIRMED.name().equals(eventStatus) && isCreator){ %>
                                                      <%
                                                        String profileModifierUrl = "<a target=\"_blank\" style=\"color: #2f5e92; font-size: 13px; text-decoration: none; font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif\" href=\""+ modifierProfileUrl + "\">" + _ctx.escapeHTML(modifierName) + "</a>";
                                                      %>
                                                      <%= _ctx.appRes("Notification.agenda.event.mail.body.updatedForUpdater", eventTitle, profileModifierUrl) %>
                                                      <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.UPDATED.name().equals(modificationType) && org.exoplatform.agenda.constant.EventStatus.CONFIRMED.name().equals(eventStatus)){ %>
                                                      <%
                                                        String profileModifierUrl = "<a target=\"_blank\" style=\"color: #2f5e92; font-size: 13px; text-decoration: none; font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif\" href=\""+ modifierProfileUrl + "\">" + _ctx.escapeHTML(modifierName) + "</a>";
                                                      %>
                                                      <%= _ctx.appRes("Notification.agenda.event.mail.body.updated", eventTitle, profileModifierUrl) %>
                                                      <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.DELETED.name().equals(modificationType) && org.exoplatform.agenda.constant.EventStatus.CONFIRMED.name().equals(eventStatus)){ %>
                                                         <%= _ctx.appRes("Notification.agenda.event.canceled", eventTitle) %>
                                                      <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.DELETED.name().equals(modificationType) && org.exoplatform.agenda.constant.EventStatus.TENTATIVE.name().equals(eventStatus)){ %>
                                                        <%= _ctx.appRes("Notification.agenda.event.mail.body.datePoll.deleted", eventTitle) %>
                                                      <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.DATES_UPDATED.name().equals(modificationType) && isCreator){ %>
                                                      <%
                                                        String profileModifierUrl = "<a target=\"_blank\" style=\"color: #2f5e92; font-size: 13px; text-decoration: none; font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif\" href=\""+ modifierProfileUrl + "\">" + _ctx.escapeHTML(modifierName) + "</a>";
                                                      %>
                                                      <%= _ctx.appRes("Notification.agenda.event.mail.body.updatedForUpdater", eventTitle) %>
                                                                <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.DATES_UPDATED.name().equals(modificationType)){ %>
                                                      <%
                                                        String profileModifierUrl = "<a target=\"_blank\" style=\"color: #2f5e92; font-size: 13px; text-decoration: none; font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif\" href=\""+ modifierProfileUrl + "\">" + _ctx.escapeHTML(modifierName) + "</a>";
                                                      %>
                                                      <%= _ctx.appRes("Notification.agenda.event.mail.body.dates.updated", eventTitle, profileModifierUrl) %>
                                                                <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.DATES_UPDATED.name().equals(modificationType) && org.exoplatform.agenda.constant.EventStatus.TENTATIVE.name().equals(eventStatus)){ %>
                                                      <%= _ctx.appRes("Notification.agenda.event.datePoll.dates.updated", eventTitle) %>
                                                      <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.UPDATED.name().equals(modificationType) && org.exoplatform.agenda.constant.EventStatus.TENTATIVE.name().equals(eventStatus)){ %>
                                                         <%= _ctx.appRes("Notification.agenda.event.datePoll.updated", eventTitle) %>
                                                    <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.SWITCHED_EVENT_TO_DATE_POLL.name().equals(modificationType)){ %>
                                                      <%
                                                        String profileModifierUrl = "<a target=\"_blank\" style=\"color: #2f5e92; font-size: 13px; text-decoration: none; font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif\" href=\""+ modifierProfileUrl + "\">" + _ctx.escapeHTML(modifierName) + "</a>";
                                                      %>
                                                      <%= _ctx.appRes("Notification.agenda.event.mail.body.switchedToDatePoll", eventTitle, profileModifierUrl) %>
                                                    <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.SWITCHED_DATE_POLL_TO_EVENT.name().equals(modificationType)){ %>
                                                      <%
                                                        String profileModifierUrl = "<a target=\"_blank\" style=\"color: #2f5e92; font-size: 13px; text-decoration: none; font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif\" href=\""+ modifierProfileUrl + "\">" + _ctx.escapeHTML(modifierName) + "</a>";
                                                      %>
                                                      <%= _ctx.appRes("Notification.agenda.event.mail.body.switchedToEvent", eventTitle, profileModifierUrl) %>
                                                    <% } %>
                                                </p>
                                                <br/>
                                                <%
                                                if (!org.exoplatform.agenda.constant.AgendaEventModificationType.DELETED.name().equals(modificationType) && !isGuest && !isCreator) { %>
                                                <p style="margin: 0 0 20px;">
                                                    <a target="_blank" style="
                                                        display: inline-block;
                                                        text-decoration: none;
                                                        font-size: 11px;
                                                        font-family:HelveticaNeue,arial,tahoma,serif;
                                                        color: #333333;
                                                        padding: 5px 8px;
                                                        line-height: 100%;
                                                        text-align: center;
                                                        vertical-align: middle;"
                                                        href="<%= acceptedResponseURL %>">
                                                        <%= _ctx.appRes("Notification.agenda.event.accepted") %>
                                                    </a>

                                                    <a target="_blank" style="
                                                        display: inline-block;
                                                        text-decoration: none;
                                                        font-size: 11px;
                                                        font-family:HelveticaNeue,arial,tahoma,serif;
                                                        color: #333333;
                                                        padding: 5px 8px;
                                                        line-height: 100%;
                                                        text-align: center;
                                                        vertical-align: middle;"
                                                        href="<%= declinedResponseURL %>">
                                                        <%
                                                         if (!org.exoplatform.agenda.constant.AgendaEventModificationType.DELETED.name().equals(modificationType) && !isCreator) { %>
                                                          <%= _ctx.appRes("Notification.agenda.event.declined") %>
                                                        <% } %>
                                                    </a>

                                                    <a target="_blank" style="
                                                        display: inline-block;
                                                        text-decoration: none;
                                                        font-size: 11px;
                                                        font-family:HelveticaNeue,arial,tahoma,serif;
                                                        color: #333333;
                                                        padding: 5px 8px;
                                                        line-height: 100%;
                                                        text-align: center;
                                                        vertical-align: middle;"
                                                        href="<%= tentativeResponseURL %>">
                                                        <%
                                                        if (!org.exoplatform.agenda.constant.AgendaEventModificationType.DELETED.name().equals(modificationType) && !isCreator) { %>
                                                          <%= _ctx.appRes("Notification.agenda.event.tentative") %>
                                                         <% } %>
                                                    </a>

                                                    &nbsp; &nbsp; &nbsp;
                                                    <a target="_blank" style="
                                                        display: inline-block;
                                                        text-decoration: none;
                                                        font-size: 11px;
                                                        font-family:HelveticaNeue,arial,tahoma,serif;
                                                        color: #333333;
                                                        padding: 5px 8px;
                                                        line-height: 100%;
                                                        text-align: center;
                                                        vertical-align: middle;"
                                                        href="<%= eventURL %>">
                                                        <%
                                                        if (org.exoplatform.agenda.constant.AgendaEventModificationType.ADDED.name().equals(modificationType) && !isCreator) { %>
                                                          <%= _ctx.appRes("Notification.agenda.event.reply") %>
                                                        <% } else if(org.exoplatform.agenda.constant.AgendaEventModificationType.UPDATED.name().equals(modificationType)){ %>
                                                          <%= _ctx.appRes("Notification.agenda.event.view") %>
                                                        <% } %>
                                                    </a>
                                                </p>
                                               <% } %>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr><!--end content area-->

    <!-- start content details -->
    <tr>
        <td bgcolor="#ffffff" style="background-color: #ffffff;">
            <table cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff" style="background-color: #ffffff; border-bottom:1px solid #d8d8d8;border-left:1px solid #d8d8d8;border-right:1px solid #d8d8d8;">
                <tbody>
                <tr>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" width="92%" bgcolor="#ffffff" align="center" style="background-color: #ffffff; color:#333333;line-height:20px;">
                            <tbody>
                            <tr>
                                <tr>
                                    <td style="font-family: 'HelveticaNeue Bold',Helvetica, Arial, sans-serif;font-size:13px;font-weight:bold"><%=_ctx.appRes("Notification.agenda.event.details")%></td>
                                </tr>
                                <td align="left" bgcolor="#ffffff" style="background-color: #ffffff;padding: 10px 0;">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%"  align="left">
                                        <tbody>
                                        <tr>
                                            <td style="color:#999999; font-size:13px;font-family:HelveticaNeue,arial,tahoma,serif; font-weight:bold;width: 100px;"><%=_ctx.appRes("Notification.agenda.event.space.name")%></td>
                                            <td align="left"><%= agendaName %></td>
                                        </tr>
                                        <tr>
                                            <td style="color:#999999; font-size:13px;font-family:HelveticaNeue,arial,tahoma,serif; font-weight:bold;width: 100px;"><%=_ctx.appRes("Notification.agenda.event.date")%></td>
                                            <td align="left" ><%= _ctx.appRes("Notification.agenda.event.mail.body.date", monthYearDate, startDate, endDate) %> (<%= timeZoneName %>)</td>
                                        </tr>
                                        <tr>
                                            <td style="color:#999999; font-size:13px;font-family:HelveticaNeue,arial,tahoma,serif; font-weight:bold;width: 100px;"></td>
                                            <td align="left" style="color:#999999; font-size:11px;font-family:HelveticaNeue,arial,tahoma,serif" ><%= recurrenceDetails %></td>
                                        </tr>
                                        <tr>
                                            <td style="color:#999999; font-size:13px;font-family:HelveticaNeue,arial,tahoma,serif; font-weight:bold;vertical-align:top;width: 100px;"><%=_ctx.appRes("Notification.agenda.event.location")%></td>
                                            <td align="left"><%= eventLocation %></td>
                                        </tr>
                                        <tr>
                                            <td style="color:#999999; font-size:13px;font-family:HelveticaNeue,arial,tahoma,serif;font-weight:bold;vertical-align:top;width: 100px;"><%=_ctx.appRes("Notification.agenda.event.description")%></td>
                                            <td align="left"><%= eventDescription %></td>
                                        </tr>
                                        <tr>
                                            <td style="color:#999999; font-size:13px;font-family:HelveticaNeue,arial,tahoma,serif; font-weight:bold;vertical-align:top;width: 100px;"><%=_ctx.appRes("Notification.agenda.event.attendees")%></td>
                                            <td align="left"><%= attendees %></td>
                                        </tr>
                                        <% try { %>
                                        <% if (conference != null) { %>
                                          <tr>
                                              <td style="color:#999999; font-size:13px;font-family:HelveticaNeue,arial,tahoma,serif; font-weight:bold"><%=_ctx.appRes("Notification.agenda.event.webconference")%></td>
                                              <td align="left">
                                                 <a target="_blank" style="color: #2f5e92;font-size:13px;margin: 10px 0 13px;"
                                                 href="<%= conference %>"><%=_ctx.appRes("Notification.agenda.event.webconference.link")%></a>
                                              </td>
                                          </tr>
                                        <% } %>
                                        <% } catch (MissingPropertyException e) { %>
                                        <% } %>
                                        </tbody>
                                    </table>
                                <% if (!isGuest) {%>
                                <tr>
                                    <td align="left" bgcolor="#ffffff" style="background-color: #ffffff;padding: 10px 0;">
                                        <p style="margin:30px 0 10px 0; color: #999999;font-size:13px;font-family:HelveticaNeue,arial,tahoma,serif">
                                            <%=_ctx.appRes("Notification.label.footer", FOOTER_LINK)%>
                                        </p>
                                    </td>
                                </tr>
                                <%}%>
                            </tbody>
                        </table>
                    </td>
                </tr>
                </tbody>
            </table>
        </td>
    </tr>
    <% _ctx.include("war:/notification/templates/mail/NotificationFooter.gtmpl", _templateContext);%>
</table>
