<section class="mylists">
	<ul>
		<?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; ?>
	</ul>
</section>