customer_galleriesown_1.phtml
2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?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>