1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/views/album.html.php
Fredrik Erlandsson 5929bd2774 Squashed '3.0/themes/pear4gallery3/' changes from 11c3c2a..08def4b
08def4b nicer flow and better handling of thumb padding
f1ead59 fix for scrolling even when hovering over a thumb
9a094c2 sidebar overflow fix

git-subtree-dir: 3.0/themes/pear4gallery3
git-subtree-split: 08def4bcfbd4bc35e9bac0ed3868fa0b2413986b
2012-01-11 14:16:07 +01:00

124 lines
5.4 KiB
PHP

<?php defined("SYSPATH") or die("No direct script access.") ?>
<? /* Placeholder for infromation in mosaic view. */ ?>
<script type="text/javascript">
$(function() {
slideshowTimeout = <?=module::get_var("th_pear4gallery3", "slideshow_time", "5000")?>;
mosaicEffect = "<?
$mosaic_effect = module::get_var("th_pear4gallery3", "mosaic_effect", "blind");
if ($mosaic_effect == "none") print "";
else print $mosaic_effect;
?>";
sidebarInit('<?=module::get_var("th_pear4gallery3", "sidebar_view")?>');
bodyLoad( "<?=module::get_var("th_pear4gallery3", "mainmenu_view")?>",
"<?=module::get_var("th_pear4gallery3", "background")?>");
});
</script>
<table id="mosaicTable" style="width: 100%; margin: -2px -2px 0px 0px; overflow: hidden">
<tr>
<td class="left" style=" width: 65%; vertical-align: middle; padding: 0px;">
<div id="gsImageView" class="gbBlock gcBorder1" style="padding: 0px !important; text-align: center;">
<div style="padding: 0px; width: 0px; margin-top: 0px; opacity: 0.999999; display: none;" id="mosaicDetail">
<div id="photo"> <img id="mosaicImg" src="" alt="Main image"/> </div>
<div class="gsContentDetail" style="width: 100%;">
<div class="gbBlock gcBorder1" id="imageTitle"> </div>
</div>
</div>
</div>
</td>
<td class="right" style="margin: 0px; padding: 0px; width: 35%; vertical-align: top;">
<div class="gallery-album" id="mosaicGridContainer" style="display: block;">
<script type="text/javascript">
var slideshowImages = new Array();
</script>
<? if (count($children)): ?>
<? foreach ($children as $i => $child): ?>
<? $item_class = "g-photo"; ?>
<? if ($child->is_album()): ?>
<? $item_class = "g-album\" onclick=\"window.location='".$child->url()."/'+getAlbumHash(skimimg);"; ?>
<? endif ?>
<? $img_class = "g-thumbnail"; ?>
<? if ($child->is_photo()): ?>
<? $img_class = "g-thumbnail p-photo"; ?>
<? endif ?>
<? if ($child->is_movie()): ?>
<a href="<?= $child->url() ?>">
<? endif ?>
<div id="g-thumb-id-<?= $child->id ?>" class="g-item gallery-thumb <?= $item_class ?>" title="<?= $child->description?>">
<?= $theme->thumb_top($child) ?>
<? if ($child->is_album() || $child->is_movie()): ?>
<div class="gallery-thumb-round"></div>
<? endif ?>
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
<? if ($child->has_thumb()): ?>
<?= $child->thumb_img(array("class" => $img_class, "id" => "thumb_$child->id", "style" => "width: 200px; height 200px;")) ?>
<? else: ?>
<span style="display: block; width: 200px; height: 200px;"></span>
<? endif ?>
<? if ($child->is_movie()): ?>
<span class="p-video"></span>
<? endif ?>
<?// Begin skimming
if($child->is_album()):
$granchildren = $child->viewable()->children();
$offset = 0;
$step = round(200/min(count($granchildren),50));
foreach ($granchildren as $i => $granchild):?>
<? if(++$i > 50) break; ?>
<? if ($granchild->has_thumb()): ?>
<?= $granchild->thumb_img(array("style" => "display: none;")) ?>
<div class="skimm_div" style="height: 200px; width: <?=$step?>px; left: <?=$offset?>px; top: 0px;" onmouseover="$('#thumb_<?=$child->id?>').attr('src', '<?=$granchild->thumb_url()?>');skimimg=<?=$i-1?>;" id="area_<?=$granchild->id?>"></div>
<? endif ?>
<? $offset+=$step;
endforeach;
endif;
// End skimming // ?>
<p class="giTitle <? if(!$child->is_album()) print 'center';?>"><?= html::purify(text::limit_chars($child->title, 20)) ?> </p>
<? if($child->is_album()): ?><div class="giInfo"><?= count($granchildren)?> photos</div><? endif ?>
</div>
<? if ($child->is_movie()): ?>
</a>
<? endif ?>
<?/* <?= $theme->thumb_bottom($child) ?>
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
<h2><span class="<?= $item_class ?>"></span>
<a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2>
<div class="g-metadata">
<ol><?= $theme->thumb_info($child) ?></ol>
</div>
</div>*/?>
<? endforeach ?>
<script>
<? foreach ($children as $i => $child): ?>
<? if(!($child->is_album() || $child->is_movie())): ?>
slideshowImages.push(['<?= $child->resize_url() ?>', '<?= url::site("exif/show/$child->id") ?>', '<?= $child->width ?>','<?= $child->height ?>', '<?= htmlentities($child->title, ENT_QUOTES) ?>', '<?= $child->file_url() ?>', '<?= $child->url() ?>']);
<? endif ?>
<? endforeach ?>
</script>
<? else: ?>
<? if ($user->admin || access::can("add", $item)): ?>
<? $addurl = url::site("uploader/index/$item->id") ?>
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li>
<? else: ?>
<li><?= t("There aren't any photos here yet!") ?></li>
<? endif; ?>
<? endif; ?>
</div>
<? if (module::get_var("th_pear4gallery3", "sidebar_view") != ''): ?>
</td><td>
<div id="sidebarContainer" style="overflow-y: auto;">
<div id="sidebarBorder" style="background-color: darkGrey; width: 5px; height: 100%; position: absolute;"></div>
<div id="sidebar" class="sidebar" style="width: 220px; position: aboslute; padding-left: 5px;">
<? if ($theme->page_subtype != "login"): ?>
<?= new View("sidebar.html") ?>
<? endif ?>
</div>
</div>
<? endif ?>
</td></tr></table>
<div id="pearFlowPadd" class="imageflow" style="display: none;"></div>
<div id="pearImageFlow" class="imageflow" style="display: none;"> </div>
<?= $theme->album_bottom() ?>
<?= $theme->paginator() ?>