示例#1
0
<?php

if ($this->images) {
    ?>
		<div class="images-area">
			<?php 
    foreach ($this->images as $image) {
        if ($this->withMain && $image['is_main'] || !$this->withMain && !$image['is_main'] || !$image['is_main']) {
            ?>
						<div class="image-area-item">
						<?php 
            $imgTag = CHtml::image(Images::getThumbUrl($image, 150, 100), Images::getAlt($image));
            echo CHtml::link($imgTag, Images::getFullSizeUrl($image), array('rel' => 'prettyPhoto[img-gallery]', 'title' => Images::getAlt($image)));
            ?>
                        </div>
						<?php 
        }
    }
    ?>
			<div class="clear"></div>
		</div>
		<?php 
}
if ($this->images) {
    ?>
		<div class="images-area">
			<?php 
    foreach ($this->images as $image) {
        if ($this->withMain && $image['is_main'] || !$this->withMain && !$image['is_main'] || !$image['is_main']) {
            ?>
						<div class="image-item" id="image_<?php 
            echo $image['id'];
            ?>
">
                            <div class="image-drag-area"></div>
                        	<div class="image-link-item">
								<?php 
            $imgTag = CHtml::image(Images::getThumbUrl($image, 150, 100), Images::getAlt($image));
            echo CHtml::link($imgTag, Images::getFullSizeUrl($image), array('class' => 'fancy', 'rel' => 'gallery', 'title' => Images::getAlt($image)));
            ?>
<br/>
								<span class="setAsMain" link-id="<?php 
            echo $image['id'];
            ?>
">
									<?php 
            if ($image['is_main']) {
                echo tc('Main photo');
            } else {
                echo '<a class="setAsMainLink" href="#">' . tc('Set as main photo') . '</a>';
            }
            ?>
								</span><br/>
                                <a class="deleteImageLink" link-id="<?php 
示例#3
0
        ?>
">
				<?php 
        /*$imgTag = CHtml::image(Images::getThumbUrl($image, 640, 400), Images::getAlt($image));
        
        					echo CHtml::link($imgTag, Images::getThumbUrl($image, 640, 400),
        						array(
        							'title' => Images::getAlt($image),
        						)
        					);*/
        //$imgTag = CHtml::image(Images::getThumbUrl($image, 69, 66), Images::getAlt($image), array(
        //						'onclick' => 'setImgGalleryIndex("'.$count.'");',
        //					));
        //					echo CHtml::link($imgTag, Images::getFullSizeUrl($image), array(
        //						'rel' => 'prettyPhoto[img-gallery]',
        //						'title' => Images::getAlt($image),
        //					));
        $count++;
        ?>
                <img width="1280px" src="<?php 
        echo Images::getFullSizeUrl($image);
        ?>
">
                
			</div>
		<?php 
    }
    ?>
	<!--</ul>-->
<?php 
}