<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<h3><?php echo $this->translate("Group Info") ?></h3>

<ul>
  <li class="group_stats_title">
    <span class="font_bold d-block">
      <?php echo $this->group->getTitle() ?>
    </span>
    <?php if( !empty($this->group->category_id) &&
    ($category = $this->group->getCategory()) instanceof Core_Model_Item_Abstract &&
    !empty($category->title)): ?>
    <?php echo $this->htmlLink(array('route' => 'group_general', 'action' => 'browse', 'category_id' => $this->group->category_id), $this->translate((string)$category->title), array('class' => 'font_color icon_category d-flex gap-1')) ?>
    <?php endif; ?>
    <?php if( '' !== ($description = Engine_Api::_()->core()->smileyToEmoticons($this->group->description)) ): ?>
    <div class="group_stats_description">
      <?php echo $this->viewMore($description, null, null, null, true) ?>
    </div>
    <?php endif; ?>
  </li>
  <li class="group_stats_info">
   <div class="group_stats_staff d-block font_bold" >
      <?php foreach( $this->staff as $info ): ?>
        <?php echo $info['user']->__toString() ?>
        <?php if( $this->group->isOwner($info['user']) ): ?>
        (<?php echo ( !empty($info['membership']) && $info['membership']->title ? $info['membership']->title : $this->translate('owner') ) ?>)
        <?php else: ?>  
        (<?php echo ( !empty($info['membership']) && $info['membership']->title ? $info['membership']->title : $this->translate('officer') ) ?>)
        <?php endif; ?>
      <?php endforeach; ?>
    </div>
    <ul>
      <li><i class="icon_view"></i><?php echo $this->translate(array('%s total view', '%s Total views', $this->group->view_count), $this->locale()->toNumber($this->group->view_count)) ?></li>
      <li><i class="icon_user"></i><?php echo $this->translate(array('%s total member', '%s Total members', $this->group->member_count), $this->locale()->toNumber($this->group->member_count)) ?></li>
      <li><i class="icon_time"></i><span><?php echo $this->translate('Last updated %s', $this->timestamp($this->group->modified_date)) ?></span></li>
      

      <?php if(Engine_Api::_()->getApi('settings', 'core')->getSetting('group.enable.location', 0) && Engine_Api::_()->getApi('settings', 'core')->getSetting('enableglocation', 0) && !empty($this->group->location)) { ?>
        <li><i class="icon_location"></i><span><a href="<?php echo 'http://maps.google.com/?q='.$this->group->location; ?>" class="font_color" target="_blank"><?php echo $this->group->location; ?></a></span>
      <?php } ?>
    </ul>
  </li>
  <?php if(Engine_Api::_()->getApi('settings', 'core')->getSetting('group.enable.rating', 1)) { ?>
    <li>
      <?php echo $this->partial('_rating.tpl', 'core', array('item' => $this->group, 'module' => 'group', 'param' => 'create', 'notificationType' => 'group_rating')); ?>
    </li>
  <?php } ?>
</ul>

<script type="text/javascript">
    scriptJquery('.core_main_group').parent().addClass('active');
</script>
