customer_galleriescategory.phtml
3.09 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
74
75
<!--/**
* wird geladen wenn der eingabetyp @see @anc_text_eingabetyp genutzt wird
* @package anc_text
* @since 20140425
* @author netz.coop eG*
*/
-->
<?php
$SelectedCategoryNcAlbumModel = Mage::helper('anc_album/nccategory')->getSelectedCategoryNcAlbumModel();
// $SelectedCategoryNcAlbumModel = Mage::helper('anc_album/ncmodel')->getAllCategoryNcAlbums();;
if(is_object($SelectedCategoryNcAlbumModel) && $SelectedCategoryNcAlbumModel->getId()) {
$SelectedCategoryNcAlbumModel_id = $SelectedCategoryNcAlbumModel->getId();
} else {
$SelectedCategoryNcAlbumModel_id = false;
}
?>
<div class="anctext-customer_galleriescategory">
<div class="anctext-gallerie-subheader">
<?php if($this->getSelectorIdDropzone()): ?>
<div id="<?php echo $this->getSelectorIdDropzone(); ?>" class="dropzone anctext-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 // $categories_ncalbums = Mage::getModel('anc_album/ncmodel')->getAllCategoryNcAlbums(); ?>
<?php // D::s($categories_ncalbums,'$categories_ncalbum',5,1,1);?>
<?php if(is_array($categories_ncalbums) && !empty($categories_ncalbums)): ?>
<div id="anctext-gallerie-subheader-category">
<ul id="menu">
<li>Rubrik <img src="/skin/frontend/base/default/texts/anc/text/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('anctext/customer/gallerysimple', array()) ?>ncalbum_id/"+ui.selected.dataset['ncalbum_id']+"/ ul.gallery";
var gallerie_csspath = '.anctext-customer_galleriescategory > .anctext-gallerie-content > .anctext-gallerie-content-view';
jQuery(gallerie_csspath).load(url, function() {
Anc_Text_Type.customerGallerysimplePrettyPhoto();
loadNcTextIntoProductGalleryThumbnailButton();
});
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="anctext-gallerie-content">
<div class="anctext-gallerie-content-view">
<?php echo $this->setTemplate('anc/text/customer_gallerysimple.phtml')->setNcalbumId($SelectedCategoryNcAlbumModel_id)->toHtml(); ?>
</div>
</div>
</div>