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

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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
  8. //dsm($list, 'list');
  9. $flag_title = $flag->title;
  10. $flag_title = (strlen($flag_title) > 20) ? substr($flag_title,0,20).'...' : $flag_title;
  11. ?>
  12. <?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)))); ?>
  13. <?php if(flag_lists_is_owner('edit', $flag->fid)): ?>
  14. <?php
  15. print l('<i class="fi-wrench"></i>',
  16. 'flags/lists/edit/'.$flag->fid,
  17. array(
  18. 'html'=>true,
  19. 'attributes'=>array('class'=>array('edit-list', $flag->name)),
  20. )
  21. );
  22. ?>
  23. <?php endif; ?>
  24. </li>
  25. <?php endforeach; ?>
  26. <?php else: ?>
  27. <?php
  28. #create new list
  29. $create_link = l(
  30. '<i class="fi-plus"></i>&nbsp;<span>' . t('New @name', array('@name' => t(variable_get('flag_lists_name', 'list')))) . '</span>',
  31. 'flag-lists/add/materiau',
  32. array(
  33. 'attributes' => array(
  34. 'class' => array('flag-lists-create'),
  35. 'title' => t('create a new @name.', array('@name'=>t(variable_get('flag_lists_name', 'list')))),
  36. ),
  37. 'html' => TRUE,
  38. )
  39. );
  40. ?>
  41. <li class="flag-lists-create"><?php print $create_link; ?> </li>
  42. <?php endif; ?>
  43. </ul>
  44. </section>