<%
  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;">
    <tr>
        <td align="center"  valign="middle" >
            <table  cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff" align="center" style="border:1px solid #d8d8d8;">
                <tr>
                    <td  height="45" valign="middle" style="margin:0;height:45px;font-weight:bold;vertical-align:middle;;background-color: #efefef;font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif;color:#2f5e92;font-size:18px;text-align:center">
                        <%
                          out.write(_ctx.appRes("Notification.title.AgendaInvitationPlugin.reply", eventTitle));
                        %>
                    </td>
                </tr>
            </table>
        </td>
    </tr><!--end header area-->
    <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 valign="top" width="90px" style="mso-hide:all;">
                                    <img width="70px" height="70px" style="margin-top: 5px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;" src="<%= participantAvatarUrl %>">
                                </td>
                                <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>
    <!-- -->

    <tr>
        <td bgcolor="#456693" align="center"  style="border:1px solid #456693;">
            <table border="0" cellpadding="0" cellspacing="0" width="92%"  style="font-size: 12px;line-height:20px; font-family:HelveticaNeue,arial,tahoma,serif">
                <tr>
                    <td align="left" valign="top" style="font-family:HelveticaNeue,arial,tahoma,serif;color:#ffffff;font-size:13px;" >
                        <h3 style="text-align: center; margin: 0; padding: 10px 0;">
                            <a target="_blank" style="color: #ffffff; font-size: 13px;font-family:'HelveticaNeue Bold',arial,tahoma,serif; font-weight: bold; text-decoration: none;" href="http://www.exoplatform.com/company/en/home" title="eXo Platform">eXo Platform</a>
                        </h3>
                    </td>
                </tr>
            </table>
        </td>
    </tr><!--end footer area-->
</table>