2010-01-24 22:37:13 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
|
|
|
2010-06-02 10:07:14 +00:00
|
|
|
<? if (access::can("view_full", $theme->item())): ?>
|
|
|
|
<!-- Use javascript to show the full size as an overlay on the current page -->
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
2010-11-14 18:23:28 +00:00
|
|
|
full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>];
|
2010-06-02 10:07:14 +00:00
|
|
|
$(".g-fullsize-link").click(function() {
|
2010-11-14 18:23:28 +00:00
|
|
|
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
|
2010-06-02 10:07:14 +00:00
|
|
|
return false;
|
|
|
|
});
|
2010-11-14 18:23:28 +00:00
|
|
|
|
|
|
|
// After the image is rotated or replaced we have to reload the image dimensions
|
|
|
|
// so that the full size view isn't distorted.
|
|
|
|
$("#g-photo").bind("gallery.change", function() {
|
|
|
|
$.ajax({
|
|
|
|
url: "<?= url::site("items/dimensions/" . $theme->item()->id) ?>",
|
|
|
|
dataType: "json",
|
|
|
|
success: function(data, textStatus) {
|
|
|
|
full_dims = data.full;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2010-06-02 10:07:14 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<? endif ?>
|
2010-01-24 22:37:13 +00:00
|
|
|
|
2010-06-02 10:07:14 +00:00
|
|
|
<div id="g-item">
|
|
|
|
<?= $theme->photo_top() ?>
|
2010-01-24 22:37:13 +00:00
|
|
|
|
2010-06-02 10:07:14 +00:00
|
|
|
<?= $theme->paginator() ?>
|
2010-01-24 22:37:13 +00:00
|
|
|
|
2010-06-02 10:07:14 +00:00
|
|
|
<div id="g-photo">
|
|
|
|
<?= $theme->resize_top($item) ?>
|
|
|
|
<? if (access::can("view_full", $item)): ?>
|
|
|
|
<a href="<?= $item->file_url() ?>" class="g-fullsize-link" title="<?= t("View full size")->for_html_attr() ?>">
|
|
|
|
<? endif ?>
|
|
|
|
<?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
|
|
|
|
<? if (access::can("view_full", $item)): ?>
|
|
|
|
</a>
|
|
|
|
<? endif ?>
|
|
|
|
<?= $theme->resize_bottom($item) ?>
|
|
|
|
</div>
|
2010-01-24 22:37:13 +00:00
|
|
|
|
2010-06-02 10:07:14 +00:00
|
|
|
<div id="g-info">
|
|
|
|
<h1><?= html::purify($item->title) ?></h1>
|
|
|
|
<div><?= nl2br(html::purify($item->description)) ?></div>
|
2010-01-24 22:37:13 +00:00
|
|
|
</div>
|
2010-06-20 15:45:35 +00:00
|
|
|
<?= new View("sobriety_actions.html") ?>
|
2010-01-24 22:37:13 +00:00
|
|
|
|
|
|
|
<?= $theme->photo_bottom() ?>
|
2010-06-02 10:07:14 +00:00
|
|
|
</div>
|