<%
/**
 * This file is part of the Meeds project (https://meeds.io/).
 * Copyright (C) 2022 Meeds Association
 * contact@meeds.io
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
%>
<style>
        a{
            color: #2f5e92;
            text-decoration: none;
            font-family: 'HelveticaNeue Bold', Helvetica, Arial, HelveticaNeue, sans-serif, serif, tahoma;
        }
</style>

<table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#ffffff" align="center" style="background-color: #ffffff; font-size: 13px;color:#333333;line-height: 18px;font-family: HelveticaNeue, Helvetica, Arial, sans-serif;">
    <%
      _templateContext.put("header_title", _ctx.appRes("Notification.title.TaskTitlePlugin"));
      _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-left:1px solid #d8d8d8;border-right:1px solid #d8d8d8;">
                <tr>
                    <td bgcolor="#ffffff" style="background-color: #ffffff;">
                        <table border="0" cellpadding="0" cellspacing="0" width="92%" bgcolor="#ffffff" align="center" style="background-color: #ffffff; font-size: 13px;color:#333333;line-height: 18px;">
                            <tr>
                                <td align="left" bgcolor="#ffffff" style="background-color: #ffffff;padding: 20px 0 10px;">
                                    <p style="margin: 0 0 10px; color: #333333; font-size: 13px; line-height: 18px;">
                                        <%=_ctx.appRes("Notification.label.SayHello")%> $FIRST_NAME,
                                    </p>
    <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff" align="center" style="background-color: #ffffff; font-size: 13px;color:#333333;line-height: 18px;">
        <tbody>
            <tr>
                <td align="left" style="padding: 0;">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff" align="center" style="width: 100%; background-color: #ffffff; font-size: 13px; color:#333333;line-height: 18px;">
                        <tr>
                             <td align="left" valign="top" bgcolor="#ffffff" style="vertical-align: top; background-color: #ffffff; padding: 0 15px 0 0;">
                                 <a href="#" style="margin: 4px 0 0; padding: 0; display: block;">
                                    <img style="border-radius: 4px;" height="76" width="76" src="$AVATAR" alt="$USER" />
                                  </a>
                                                            </td>
                            <td align="left" bgcolor="#ffffff" width="90%" align="top" style="width: 90%; background-color: #ffffff; padding: 0 0; vertical-align: top;">
                                 <p style="margin: 0 0 10px; color: #333333; font-size: 13px; line-height: 18px;">
                                    <%
                                        String profileUrl = "<a href=\""+ PROFILE_URL + "\"><strong>" + USER + "</strong></a>";
                                           String msg="";

                                            if(ACTION_NAME=="edit_workplan") {
                                             msg = _ctx.appRes("Notification.message.TaskSchedulePlugin", profileUrl);

                                            } else if (ACTION_NAME=="edit_description"){
                                                 msg = _ctx.appRes("Notification.message.TaskDescriptionPlugin", profileUrl);

                                            } else if(ACTION_NAME=="edit_title"){
                                                 msg = _ctx.appRes("Notification.message.TaskTitlePlugin", profileUrl);

                                            } else if(ACTION_NAME=="edit_status"){
                                                 msg = _ctx.appRes("Notification.message.TaskStatusPlugin", profileUrl);

                                            } else if(ACTION_NAME=="edit_priority"){
                                                 msg = _ctx.appRes("Notification.message.TaskPriorityPlugin", profileUrl);
                                            }


                                                if (PROJECT_NAME != null && !PROJECT_NAME.isEmpty()) {
                                                    msg +=  " " + _ctx.appRes("Notification.message.inProject",
                                                        " <a href=\"" + PROJECT_URL + "\" ><strong>" + PROJECT_NAME + "</strong></a>");
                                                }
                                                        %>
                                         <%=msg%>:
                                  </p>

                            <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#f9f9f9" align="center" style="margin:0 0 10px; width: 100%; background-color: #f9f9f9; font-size: 13px; color:#333333;line-height: 18px;">
                                  <tr>
                                       <td align="left" valign="top" bgcolor="#f9f9f9" style="vertical-align: top; background-color: #f9f9f9; padding: 10px 15px;">
                                            <p style="margin: 0 0 10px; color: #333333; font-size: 13px; line-height: 18px;">
                                                 <a href="$TASK_URL">
                                                      <strong>$TASK_TITLE</strong>
                                                 </a>
                                             </p>
                                             <%if (TASK_DESCRIPTION != null && !TASK_DESCRIPTION.isEmpty()) { %>
                                             <p style="margin: 0; color: #333333; font-size: 13px; line-height: 18px;">
                                             $TASK_DESCRIPTION
                                            </p>
                                             <%} %>
                                       </td>
                                  </tr>
                                  <tr>

                                        <td align="left" valign="top" bgcolor="#ffffff" style="vertical-align: top; background-color: #ffffff; padding: 10px 0 0">
                                               <p style="margin: 0">
                                                   <!-- <a target="_blank" style="
                                                            display: inline-block;
                                                            text-decoration: none;
                                                            font-size: 11px;
                                                            font-family: 'HelveticaNeue Bold', Helvetica, Arial, sans-serif;
                                                            color: #ffffff;

                                                             background-color: #567ab6;
                                                            background-image: -moz-linear-gradient(top, #638acd, #426393);
                                                            background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#638acd), to(#426393));
                                                            background-image: -webkit-linear-gradient(top, #638acd, #426393);
                                                            background-image: -o-linear-gradient(top, #638acd, #426393);
                                                            background-image: linear-gradient(to bottom, #638acd, #426393);
                                                            background-repeat: repeat-x;
                                                            border-radius: 4px;
                                                            -moz-border-radius: 4px;
                                                            padding: 5px 8px;
                                                            line-height: 100%;
                                                            text-align: center;
                                                            border: 1px solid #224886;
                                                            font-weight: bold;
                                                            -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
                                                            -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
                                                            box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
                                                            vertical-align: middle;
                                                            " href="http://www.exoplatform.com/company/en/home" title="Reply">Reply</a> -->

                                                     <a target="_blank" style="
                                                            display: inline-block;
                                                            font-size: 11px;
                                                            color: #333333;
                                                            background-color: #f1f1f1;
                                                            background-image: -moz-linear-gradient(top, #ffffff, #f1f1f1);
                                                            background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f1f1f1));
                                                            background-image: -webkit-linear-gradient(top, #ffffff, #f1f1f1);
                                                            background-image: -o-linear-gradient(top, #ffffff, #f1f1f1);
                                                            background-image: linear-gradient(to bottom, #ffffff, #f1f1f1);
                                                            background-repeat: repeat-x;
                                                            border-radius: 4px;
                                                            -moz-border-radius: 4px;
                                                            padding: 5px 8px;
                                                            line-height: 100%;
                                                            text-align: center;
                                                            border: 1px solid #c7c7c7;
                                                            -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
                                                            -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
                                                            box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
                                                            vertical-align: middle;
                                                            margin-left: 3px;
                                                            " href="$TASK_URL" target="_blank"><%=_ctx.appRes("Notification.label.openTask")%></a>
                                                </p>
                                        </td>
                                   </tr>
                            </table>
                        </td>
                </tr>
            </table>
        </td>
    </tr>
</tbody>
</table>
          <br>
            <p style="margin: 0 0 10px; color: #999999; font-size: 13px; line-height: 18px;">
               <%=_ctx.appRes("Notification.label.footer", "" + FOOTER_LINK)%>
            </p>
            </td>
        </tr>
    </table>
    </td>
    </tr>
    </table>

</td>
    </tr><!--end content area-->
    <% _ctx.include("war:/notification/templates/mail/NotificationFooter.gtmpl", _templateContext);%>
</table>
