materio-flag-mylists-nav-block.tpl.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <section class="mylists">
  2. <ul>
  3. <?php if($flags): ?>
  4. <?php foreach ($flags as $name => $flag): ?>
  5. <?php //dsm($flag, 'flag') ;?>
  6. <li class="flaglist <?php print $flag->name; ?>">
  7. <?php print l($flag->title . '<span class="count">('.count($flag->flaged_content).')</span>', 'lists/'.$flag->fid, array('html'=>true,'attributes'=>array('class'=>array('open-list', $flag->name)))); ?>
  8. <?php if(flag_lists_is_owner('edit', $flag->fid)): ?>
  9. <?php
  10. print l('<i class="icon-wrench"></i>',
  11. 'flags/lists/edit/'.$flag->fid,
  12. array(
  13. 'html'=>true,
  14. 'attributes'=>array('class'=>array('edit-list', $flag->name)),
  15. )
  16. );
  17. ?>
  18. <?php endif; ?>
  19. </li>
  20. <?php endforeach; ?>
  21. <?php else: ?>
  22. <?php
  23. #create new list
  24. $create_link = l(
  25. '<i class="icon-plus"></i>&nbsp;<span>' . t('New @name', array('@name' => t(variable_get('flag_lists_name', 'list')))) . '</span>',
  26. 'flag-lists/add/materiau',
  27. array(
  28. 'attributes' => array(
  29. 'class' => array('flag-lists-create'),
  30. 'title' => t('create a new @name.', array('@name'=>t(variable_get('flag_lists_name', 'list')))),
  31. ),
  32. 'html' => TRUE,
  33. )
  34. );
  35. ?>
  36. <li class="flag-lists-create"><?php print $create_link; ?> </li>
  37. <?php endif; ?>
  38. </ul>
  39. </section>