<%
  isCreator = "true".equals(isCreator);
%>
<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;">
    <%
      _templateContext.put("header_title", _ctx.appRes("Notification.title.AgendaInvitationPlugin.reply", eventTitle));
      _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")%> <%=_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 participantName = "<a class=\"user-name text-bold\">" + participantName +"</a>";
                                                    if (org.exoplatform.agenda.constant.EventAttendeeResponse.ACCEPTED.name().equals(responseType)) { %>
                                                      <% if (isCreator) { %>
                                                        <%=  _ctx.appRes("Notification.agenda.event.creator.response.accepted", participantName, eventTitle) %>
                                                      <% } else { %>
                                                        <%=  _ctx.appRes("Notification.agenda.event.participant.response.accepted", participantName, eventTitle) %>
                                                      <% } %>
                                                    <% } else if(org.exoplatform.agenda.constant.EventAttendeeResponse.DECLINED.name().equals(responseType)){ %>
                                                      <% if (isCreator) { %>
                                                        <%=  _ctx.appRes("Notification.agenda.event.creator.response.declined", participantName, eventTitle) %>
                                                      <% } else { %>
                                                        <%=  _ctx.appRes("Notification.agenda.event.participant.response.declined", participantName, eventTitle) %>
                                                      <% } %>
                                                    <% } else { %>
                                                      <% if (isCreator) { %>
                                                        <%=  _ctx.appRes("Notification.agenda.event.creator.response.mayBe", participantName, eventTitle) %>
                                                      <% } else { %>
                                                        <%=  _ctx.appRes("Notification.agenda.event.participant.response.mayBe", participantName, eventTitle) %>
                                                      <% } %>
                                                    <% } %>
                                                </p>
                                                <br/>
                                                <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="<%= eventURL %>">
                                                          <%= _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"><%=_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"><%=_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"></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"><%=_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"><%=_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"><%=_ctx.appRes("Notification.agenda.event.attendees")%></td>
                                        <td align="left"><%= attendees %></td>
                                    </tr>
                                    </tbody>
                                </table>
                                <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>
