<section class="mylists"> <ul> <?php if($flags): ?> <?php foreach ($flags as $name => $flag): ?> <?php //dsm($flag, 'flag') ;?> <li class="flaglist <?php print $flag->name; ?>"> <?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)))); ?> <?php if(flag_lists_is_owner('edit', $flag->fid)): ?> <?php print l('<i class="icon-wrench"></i>', 'flags/lists/edit/'.$flag->fid, array( 'html'=>true, 'attributes'=>array('class'=>array('edit-list', $flag->name)), ) ); ?> <?php endif; ?> </li> <?php endforeach; ?> <?php else: ?> <?php #create new list $create_link = l( '<i class="icon-plus"></i> <span>' . t('New @name', array('@name' => t(variable_get('flag_lists_name', 'list')))) . '</span>', 'flag-lists/add/materiau', array( 'attributes' => array( 'class' => array('flag-lists-create'), 'title' => t('create a new @name.', array('@name'=>t(variable_get('flag_lists_name', 'list')))), ), 'html' => TRUE, ) ); ?> <li class="flag-lists-create"><?php print $create_link; ?> </li> <?php endif; ?> </ul> </section>