customer_galleriesown_1.phtml 2.79 KB
<?php // $NcTexts = Mage::helper('anc_text/ncmodel')->getNcTextsForCustomer();  ?>
<?php 
	if(!$ncalbum_id = $this->getNcalbumId()) {
		$ncalbum_id = Mage::app()->getRequest()->getParam('ncalbum_id');
	}
	if(!$ncalbum_id) {
		$customer = Mage::getSingleton('customer/session')->getCustomer();
		$ncalbum_id = Mage::getModel('anc_album/ncalbum')->load($customer->getId(), 'customer_id')->getId();
	}
	if($ncalbum_id) {
		$NcTexts = Mage::helper('anc_text/ncmodel')->getNcTextsForAlbum($ncalbum_id);	
	} else {
//		D::li('getNcTextsForCustomer() - nix mit album aber anscheinend wohl trotzdem keine texte in der gallerie');
		$NcTexts = Mage::helper('anc_text/ncmodel')->getNcTextsForCustomer();
	}
?>
<ul class="gallery AncGalleryTexts">
	<?php $var_count=0?>
	<?php foreach($NcTexts as $nctext ): ?>
	<?php if($var_count%2 ==0){
			$var_cssanctextwrapper='anc_text_wrapper_bg_white';
		}else{
			$var_cssanctextwrapper='anc_text_wrapper';
		}
		
	?>
		<?php $NcTextPath = Mage::helper('anc_text/nctext')->getNcTextPath($nctext['entity_id'], 'relative', 'thumbnail'); ?>
		<?php $NcTextPath_original = Mage::helper('anc_text/nctext')->getNcTextPath($nctext['entity_id'], 'relative', 'original'); ?>
		<?php $nctext_title = Mage::helper('anc_text/nctext')->getNcTextMetaDataAsHtml($nctext['entity_id']); ?>
		<a data-site="<?php echo $this->getUrl('anctext/customer/showNcTextForm', array('id'=>$nctext['entity_id'])) ?>" 
		   class="anctext-showNcTextForm" 
		   rel="prettyPhoto[pp_gal2]" 
		   href="<?php echo DS.$NcTextPath_original ?>" 
		   >
			<!--<div class="anc_text_wrapper">-->
			<div class="<?php echo $var_cssanctextwrapper?>">
				<a class="anc_text_choose" 
					href="#" 
					data-anc_text_id="<?php echo $nctext['entity_id'] ?>" 
					data-anc_text_url="<?php echo DS.$NcTextPath_original ?>"
					data-site="<?php echo $this->getUrl('anctext/customer/showNcTextForm', array('id'=>$nctext['entity_id'])) ?>" 
					title='<?php if($nctext['name']):?><span class="header"><?php echo $nctext['name']; ?></span><?php endif; ?><span class="content"><?php if($nctext['comment']): echo $nctext['comment'].'<br/><br/>'; endif; ?><?php echo $nctext_title; ?></span>'
				>
					<!--<img src="<?php // echo DS.$NcTextPath ?>" class="anc-text-draggable" id="<?php // echo $nctext['entity_id'] ?>" />-->
					<div class='anctext-gallerie-subheader anctexthead' title="<?php  echo $nctext_title;?>"  id="<?php echo $nctext['entity_id']?>"><?php echo $nctext['name'].' '; ?> ?>  </div><br>
					<div class='anctextcontentpreview' title="<?php  echo $nctext_title;?>"  id="<?php echo $nctext['entity_id']?>"><?php echo Mage::helper('anc_printconfigproduct/placeholder')->replaceStringWithArrayValues($nctext['content']).' '; ?> ?>  </div><br>
				</a>
			</div>
		</a>	
	<?php $var_count++;
//	D::s($nctext,'nctext',5,1,1);?>
	<?php endforeach; ?>
</ul>