<?php
if ($D->whosee == 0) $icosee = 'ico-see-public.png';
if ($D->whosee == 1) $icosee = 'ico-see-friends.png';
if ($D->whosee == 2) $icosee = 'ico-see-onlyme.png';
?>
<div id="album_<?php echo $D->codealbum?>" class="onealbum">
	<a href="<?php echo $C->SITE_URL?>dashboard/myalbums/a:<?php echo $D->codealbum?>"><div class="photo"><img src="<?php echo($D->numphotos==0)?$C->SITE_URL.'themes/'.$C->THEME.'/imgs/empty-album.png':$C->SITE_URL.$C->FOLDER_ALBUMS.$D->codealbum.'/min1/'.$D->coveralbum?>"></div></a>
    <div class="info">
        <div class="namealbum ellipsis linkblue2"><a href="<?php echo $C->SITE_URL?>dashboard/myalbums/a:<?php echo $D->codealbum?>"><?php echo $D->namealbum?></a></div>
        <div class="numphotos"><span><?php echo $D->numphotos?> <?php echo($D->numphotos==1?$this->lang('global_albums_txt_photo'):$this->lang('global_albums_txt_photos'))?></span> &nbsp;&nbsp; <span><img src="<?php echo $C->SITE_URL.'themes/'.$C->THEME.'/imgs/'.$icosee?>"></span></div>
        
        <?php if ($D->isMyAlbum) { ?>
        <div class="linksactions"><span id="linkedit_<?php echo $D->codealbum?>" class="onlyblue hand"><?php echo $this->lang('global_albums_txt_edit')?></span> <span id="linkdelete_<?php echo $D->codealbum?>" class="onlyblue mrg10L hand"><?php echo $this->lang('global_albums_txt_delete')?></span></div>
        <?php } ?>
	</div>
</div>
<?php if ($D->isMyAlbum) { ?>
<script>
$('#linkedit_<?php echo $D->codealbum?>').click(function(){
	self.location = siteurl + 'dashboard/myalbums/edit/a:<?php echo $D->codealbum?>';
});

$('#linkdelete_<?php echo $D->codealbum?>').click(function(){
	deleteAlbum('#album_<?php echo $D->codealbum?>', '<?php echo $D->codealbum?>');
});
</script>
<?php } ?>