item.php 913 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * User view in User Picker
  4. *
  5. * @package Elgg
  6. * @subpackage Core
  7. *
  8. * @uses $vars['entity'] User entity
  9. * @uses $vars['input_name'] Name of the returned data array
  10. */
  11. /* @var ElggEntity $entity */
  12. $entity = $vars['entity'];
  13. $input_name = $vars['input_name'];
  14. $icon = elgg_view_entity_icon($entity, 'tiny', array('use_hover' => false));
  15. $name = $entity->name;
  16. if ($name == '') {
  17. $name = $entity->title;
  18. }
  19. ?>
  20. <li data-guid='<?php echo $entity->guid ?>'>
  21. <div class='elgg-image-block'>
  22. <div class='elgg-image'><?php echo $icon ?></div>
  23. <div class='elgg-image-alt'><?php echo elgg_view_icon('delete-alt', 'elgg-user-picker-remove'); ?></div>
  24. <div class='elgg-body'><?php echo htmlspecialchars($name, ENT_QUOTES, 'UTF-8'); ?></div>
  25. </div>
  26. <input type="hidden"
  27. name="<?php echo htmlspecialchars($input_name, ENT_QUOTES, 'UTF-8'); ?>[]"
  28. value="<?php echo $entity->guid ?>">
  29. </li>