customer_galleriescategory.phtml
2.85 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!--/**
* wird geladen wenn der eingabetyp @see @anc_image_eingabetyp genutzt wird
* @package anc_image
* @since 20140425
* @author netz.coop eG*
*/
-->
<?php
$SelectedCategoryNcAlbumModel = Mage::helper('anc_album/nccategory')->getSelectedCategoryNcAlbumModel();
if(is_object($SelectedCategoryNcAlbumModel) && $SelectedCategoryNcAlbumModel->getId()) {
$SelectedCategoryNcAlbumModel_id = $SelectedCategoryNcAlbumModel->getId();
} else {
$SelectedCategoryNcAlbumModel_id = false;
}
?>
<div class="ancimage-customer_galleriescategory">
<div class="ancimage-gallerie-subheader">
<?php if($this->getSelectorIdDropzone()): ?>
<div id="<?php echo $this->getSelectorIdDropzone(); ?>" class="dropzone ancimage-dropzone" title="Bitte ziehen Sie aus Ihrem Dateiexplorer einfach ein Bild in diesen Bereich!"></div>
<?php else: ?>
<div> </div>
<?php endif; ?>
<?php $categories_ncalbums = Mage::helper('anc_album/ncmodel')->getAllCategoryNcAlbums(); ?>
<?php if(is_array($categories_ncalbums) && !empty($categories_ncalbums)): ?>
<div id="ancimage-gallerie-subheader-category">
<ul id="menu">
<li>Rubrik <img src="/skin/frontend/base/default/images/anc/image/unten_25x50.png" />
<ul id="categories_ncalbums">
<?php foreach ($categories_ncalbums as $ncalbum): ?>
<?php $ncalbum_id = $ncalbum['entity_id']; ?>
<li data-ncalbum_id="<?php echo $ncalbum['entity_id'] ?>"
class="<?php if($ncalbum_id===$SelectedCategoryNcAlbumModel_id) { echo 'ui-selected'; } ?>"
>
<?php echo $ncalbum['name'] ?>
</li>
<?php endforeach; ?>
</ul>
</li>
</ul>
</div>
<script type="text/javascript">
var selectOpt = {
selected: function(typ, ui) {
var url = "<?php echo $this->getUrl('ancimage/customer/gallerysimple', array()) ?>ncalbum_id/"+ui.selected.dataset['ncalbum_id']+"/ ul.gallery";
var gallerie_csspath = '.ancimage-customer_galleriescategory > .ancimage-gallerie-content > .ancimage-gallerie-content-view';
jQuery(gallerie_csspath).load(url, function() {
Anc_Image_Type.customerGallerysimplePrettyPhoto();
loadNcImageIntoProductGalleryThumbnailButton();
});
jQuery('#menu > li > ul').css('display','none');
}
}
jQuery('#categories_ncalbums').selectable(selectOpt);
jQuery("#menu").menu({
position: {
my:'left top',
at:'left bottom'
}
});
</script>
<?php endif; ?>
</div>
<?php if($SelectedCategoryNcAlbumModel_id === false) { $SelectedCategoryNcAlbumModel_id = $ncalbum_id; } ?>
<div class="ancimage-gallerie-content">
<div class="ancimage-gallerie-content-view">
<?php echo $this->setTemplate('anc/image/customer_gallerysimple.phtml')->setNcalbumId($SelectedCategoryNcAlbumModel_id)->toHtml(); ?>
</div>
</div>
</div>