<%
/**
 * 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.
 */
%>
<li class="$READ clearfix" data-id="$NOTIFICATION_ID">
  <div class="media">
    <div class="avatarXSmall pull-left">
      <img src="$AVATAR" alt="$USER" />
    </div> 
    <div class="media-body">
      <%
        String URL = PROJECT_URL;
      	String msg = "";
      	String profileUrl = "<a class=\"user-name text-bold\" href=\"" + PROFILE_URL + "\">" + USER + "</a>";
        if (COUNT != null && Integer.parseInt(COUNT) > 1) {
         msg = _ctx.appRes("Notification.message.more.TaskAssignPlugin", profileUrl, COUNT);
        } else {
         URL = TASK_URL;
         msg = _ctx.appRes("Notification.message.TaskAssignPlugin", profileUrl);
        }
       	if (PROJECT_NAME != null && !PROJECT_NAME.isEmpty()) {
       	  msg += " " + _ctx.appRes("Notification.message.inProject", "<b>" + PROJECT_NAME + "</b>");
       	}
      %> 
      <div class="contentSmall" data-link="$URL">
        <div class="status"><%=msg%></div>
        <%if (TASK_TITLE != null && !TASK_TITLE.isEmpty()) {%>
        <div class="content"><i class="uiIcon uiIconTick uiIconLightGray"></i>$TASK_TITLE</div>
        <%} %>
        <div class="lastUpdatedTime">
        		<% if (COUNT != null && Integer.parseInt(COUNT) > 1) {%>
            <i class="uiIcon uiIconAssign uiIconLightGray"></i>
            <%} %>
        		$LAST_UPDATED_TIME
        </div>
      </div>
    </div>
  </div>
  <span class="remove-item" data-rest=""><i class="uiIconClose uiIconLightGray"></i></span>
</li>
