<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>

<?php if($this->showIconText == 1): ?>
	<div class="poke_buttons_block poke_buttons_onlyicons">
<?php elseif($this->showIconText == 2): ?>
	<div class="poke_buttons_block poke_buttons_onlytext">
<?php elseif($this->showIconText == 3): ?>
	<div class="poke_buttons_block poke_buttons_both">
<?php endif; ?>
  <?php foreach($this->results as $item):
    $name  = ucfirst($item['name']);
    $icon = $item['icon'];
  ?>
  <?php if($item['action'] == 'action'): ?>
   <?php $title = $this->translate($name). ' ' .$this->item->getTitle(false); ?>
  <?php else: ?>
    <?php $title = $this->translate("Send %s", $name); ?>
  <?php endif; ?>
    <?php if(!empty($icon)) { ?>
      <?php $icon = Engine_Api::_()->core()->getFileUrl($icon) ?>
    <?php } else { ?>
      <?php $icon = 'application/modules/Poke/externals/images/action_icons/'.$item['slug'].'.png'; ?>
    <?php } ?>
    <?php if($this->showIconText == 1): ?>
      <?php	echo $this->htmlLink(array('route' => 'default', 'module' => 'poke', 'controller' => 'index', 'action' => 'poke', 'id' => $this->id, 'manageaction_id' => $item['manageaction_id']), "<i style='background-image:url($icon);'></i>", array('title' => $title, 'class' => 'smoothbox poke_button')) ;	?>
    <?php elseif($this->showIconText == 2): ?>
      <?php	echo $this->htmlLink(array('route' => 'default', 'module' => 'poke', 'controller' => 'index', 'action' => 'poke', 'id' => $this->id, 'manageaction_id' => $item['manageaction_id']), $this->translate($name), array('title' => $title, 'class' => 'smoothbox poke_button')) ;	?>
    <?php elseif($this->showIconText == 3): ?>
      <?php	echo $this->htmlLink(array('route' => 'default', 'module' => 'poke', 'controller' => 'index', 'action' => 'poke', 'id' => $this->id, 'manageaction_id' => $item['manageaction_id']), $this->translate("<i style='background-image:url($icon);'></i> %s", $name), array('title' => $title, 'class' => 'smoothbox poke_button')) ;	?>
    <?php endif; ?>
  <?php endforeach; ?>
</div>
