<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<?php
  $notification = $this->notification; 
  $manageActions = Engine_Api::_()->getItem('poke_manageaction', $notification->params['manageaction_id']); 
  $icon = Engine_Api::_()->storage()->get($manageActions['icon'], '');
?>
<li <?php if( !$notification->read ): ?> class="notifications_unread"<?php endif; ?> id="notifications_<?php echo $notification->getIdentity();?>" value="<?php echo $notification->getIdentity();?>">
  <div class="notification_item_photo">
    <?php $user = Engine_Api::_()->getItem('user', $notification->subject_id);?>
    <?php if($notification->getContentObject() && ($notification->getContentObject() instanceof Core_Model_Item_Abstract)): ?>
      <?php echo $this->htmlLink($user->getHref(), $this->itemBackgroundPhoto($user, 'thumb.icon',$notification->getContentObject()->getTitle(),array("class"=>"notification_subject_icon"))) ?>
    <?php endif; ?>
  </div>
  <div class="notification_item_content">
    <div class="notification_item_title">
      <?php echo $notification->__toString() ?>
    </div>
    <div class="notification_item_date notification_item_general notification_type_<?php echo $notification->type ?>">
      <?php echo $this->timestamp($notification->date); ?>
    </div>
    <div class="notification_item_buttons">
      <a data-class="notifications_donotclose" href="javascript:void(0);" class="button btn btn-primary" onclick="backRequest(<?php echo $notification->params['poke_id'] ?>, <?php echo $notification->notification_id ?>)">
        <?php if($icon) { ?>
          <i style="background-image:url(<?php echo $icon->getPhotoUrl() ?>);"></i>
        <?php } ?>
        <?php echo $this->translate("Send Back"); ?>
      </a>
      
      <a data-class="notifications_donotclose" href="javascript:void(0)" class="button btn btn-alt" onclick="cancelRequest(<?php echo $notification->params['poke_id'] ?>, <?php echo $notification->notification_id ?>)" class="poke_close_btn fa fa-times"><?php echo $this->translate('Ignore');?></a>
    </div>
  </div>
  <div class="notifications_item_delete">
    <a href="javascript:void(0);" class="notifications_delete_show"><i class="fa fa-ellipsis-h"></i></a>
    <div class="notifications_delete_dropdown" id="notifications_delete_dropdown" style="display:none;">
      <a id="remove_notification_update" data-class="notifications_donotclose" href="javascript:void(0);" onclick="removenotification('<?php echo $notification->getIdentity(); ?>');"><i id="remove_notification_update" data-class="notifications_donotclose" class="far fa-times-circle"></i><?php echo $this->translate("Remove this Notification"); ?></a>
    </div>
  </div>
</li>
