Simplify views.
This commit is contained in:
parent
76fbbd6446
commit
e207872c1c
@ -1,64 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
||||||
<div id="g-header" class="ui-helper-clearfix">
|
|
||||||
<? // The following code was modifed to allow module-defined breadcrumbs.
|
|
||||||
// Everything else in this file is a copy of the default page.html.php file.
|
|
||||||
?>
|
|
||||||
<? if (!empty($breadcrumbs)): ?>
|
|
||||||
<ul class="g-breadcrumbs">
|
|
||||||
<? $i = 0 ?>
|
|
||||||
<? foreach ($breadcrumbs as $breadcrumb): ?>
|
|
||||||
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
|
|
||||||
<!-- Adding ?show=<id> causes Gallery3 to display the page
|
|
||||||
containing that photo. For now, we just do it for
|
|
||||||
the immediate parent so that when you go back up a
|
|
||||||
level you're on the right page. -->
|
|
||||||
<? if ($breadcrumb->url) : ?>
|
|
||||||
<a href="<?= $breadcrumb->url ?>"><?= html::purify($breadcrumb->title) ?></a>
|
|
||||||
<? else : ?>
|
|
||||||
<?= html::purify($breadcrumb->title) ?>
|
|
||||||
<? endif ?>
|
|
||||||
</li>
|
|
||||||
<? $i++ ?>
|
|
||||||
<? endforeach ?>
|
|
||||||
</ul>
|
|
||||||
<? endif ?>
|
|
||||||
<? // End modified code ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="g-info">
|
|
||||||
<?= $theme->dynamic_top() ?>
|
|
||||||
<h1><?= html::purify($title) ?></h1>
|
|
||||||
<div class="g-description"><?= nl2br(html::purify($description)) ?></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul id="g-album-grid" class="ui-helper-clearfix">
|
|
||||||
<? if (count($children)): ?>
|
|
||||||
<? foreach ($children as $i => $child): ?>
|
|
||||||
<? $item_class = "g-photo"; ?>
|
|
||||||
<? if ($child->is_album()): ?>
|
|
||||||
<? $item_class = "g-album"; ?>
|
|
||||||
<? endif ?>
|
|
||||||
<li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
|
|
||||||
<?= $theme->thumb_top($child) ?>
|
|
||||||
<a href="<?= $child->url() ?>">
|
|
||||||
<? if ($child->has_thumb()): ?>
|
|
||||||
<?= $child->thumb_img(array("class" => "g-thumbnail")) ?>
|
|
||||||
<? endif ?>
|
|
||||||
</a>
|
|
||||||
<?= $theme->thumb_bottom($child) ?>
|
|
||||||
<h2><span class="<?= $item_class ?>"></span>
|
|
||||||
<a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2>
|
|
||||||
<ul class="g-metadata">
|
|
||||||
<?= $theme->thumb_info($child) ?>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<? endforeach ?>
|
|
||||||
<? else: ?>
|
|
||||||
<li><?= t("There aren't any photos here yet!") ?></li>
|
|
||||||
<? endif; ?>
|
|
||||||
</ul>
|
|
||||||
<?= $theme->dynamic_bottom() ?>
|
|
||||||
|
|
||||||
<?= $theme->paginator() ?>
|
|
@ -1,44 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
||||||
<div id="g-header" class="ui-helper-clearfix">
|
|
||||||
<? // The following code was modifed to allow module-defined breadcrumbs.
|
|
||||||
// Everything else in this file is a copy of the default page.html.php file.
|
|
||||||
?>
|
|
||||||
<? if (!empty($breadcrumbs)): ?>
|
|
||||||
<ul class="g-breadcrumbs">
|
|
||||||
<? $i = 0 ?>
|
|
||||||
<? foreach ($breadcrumbs as $breadcrumb): ?>
|
|
||||||
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
|
|
||||||
<!-- Adding ?show=<id> causes Gallery3 to display the page
|
|
||||||
containing that photo. For now, we just do it for
|
|
||||||
the immediate parent so that when you go back up a
|
|
||||||
level you're on the right page. -->
|
|
||||||
<? if ($breadcrumb->url) : ?>
|
|
||||||
<a href="<?= $breadcrumb->url ?>"><?= html::purify($breadcrumb->title) ?></a>
|
|
||||||
<? else : ?>
|
|
||||||
<?= html::purify($breadcrumb->title) ?>
|
|
||||||
<? endif ?>
|
|
||||||
</li>
|
|
||||||
<? $i++ ?>
|
|
||||||
<? endforeach ?>
|
|
||||||
</ul>
|
|
||||||
<? endif ?>
|
|
||||||
<? // End modified code ?>
|
|
||||||
</div>
|
|
||||||
<div id="g-item">
|
|
||||||
<?= $theme->photo_top() ?>
|
|
||||||
|
|
||||||
<?= $theme->paginator() ?>
|
|
||||||
|
|
||||||
<div id="g-movie" class="ui-helper-clearfix">
|
|
||||||
<?= $theme->resize_top($item) ?>
|
|
||||||
<?= $item->movie_img(array("class" => "g-movie", "id" => "g-item-id-{$item->id}")) ?>
|
|
||||||
<?= $theme->resize_bottom($item) ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="g-info">
|
|
||||||
<h1><?= html::purify($item->title) ?></h1>
|
|
||||||
<div><?= nl2br(html::purify($item->description)) ?></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?= $theme->photo_bottom() ?>
|
|
||||||
</div>
|
|
@ -1,75 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
||||||
<div id="g-header" class="ui-helper-clearfix">
|
|
||||||
<? // The following code was modifed to allow module-defined breadcrumbs.
|
|
||||||
// Everything else in this file is a copy of the default page.html.php file.
|
|
||||||
?>
|
|
||||||
<? if (!empty($breadcrumbs)): ?>
|
|
||||||
<ul class="g-breadcrumbs">
|
|
||||||
<? $i = 0 ?>
|
|
||||||
<? foreach ($breadcrumbs as $breadcrumb): ?>
|
|
||||||
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
|
|
||||||
<!-- Adding ?show=<id> causes Gallery3 to display the page
|
|
||||||
containing that photo. For now, we just do it for
|
|
||||||
the immediate parent so that when you go back up a
|
|
||||||
level you're on the right page. -->
|
|
||||||
<? if ($breadcrumb->url) : ?>
|
|
||||||
<a href="<?= $breadcrumb->url ?>"><?= html::purify($breadcrumb->title) ?></a>
|
|
||||||
<? else : ?>
|
|
||||||
<?= html::purify($breadcrumb->title) ?>
|
|
||||||
<? endif ?>
|
|
||||||
</li>
|
|
||||||
<? $i++ ?>
|
|
||||||
<? endforeach ?>
|
|
||||||
</ul>
|
|
||||||
<? endif ?>
|
|
||||||
<? // End modified code ?>
|
|
||||||
</div>
|
|
||||||
<? if (access::can("view_full", $item)): ?>
|
|
||||||
<!-- Use javascript to show the full size as an overlay on the current page -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>];
|
|
||||||
$(".g-fullsize-link").click(function() {
|
|
||||||
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<? endif ?>
|
|
||||||
|
|
||||||
<div id="g-item">
|
|
||||||
<?= $theme->photo_top() ?>
|
|
||||||
|
|
||||||
<?= $theme->paginator() ?>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<div id="g-info">
|
|
||||||
<h1><?= html::purify($item->title) ?></h1>
|
|
||||||
<div><?= nl2br(html::purify($item->description)) ?></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?= $theme->photo_bottom() ?>
|
|
||||||
</div>
|
|
@ -1,64 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
||||||
<div id="g-header" class="ui-helper-clearfix">
|
|
||||||
<? // The following code was modifed to allow module-defined breadcrumbs.
|
|
||||||
// Everything else in this file is a copy of the default page.html.php file.
|
|
||||||
?>
|
|
||||||
<? if (!empty($breadcrumbs)): ?>
|
|
||||||
<ul class="g-breadcrumbs">
|
|
||||||
<? $i = 0 ?>
|
|
||||||
<? foreach ($breadcrumbs as $breadcrumb): ?>
|
|
||||||
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
|
|
||||||
<!-- Adding ?show=<id> causes Gallery3 to display the page
|
|
||||||
containing that photo. For now, we just do it for
|
|
||||||
the immediate parent so that when you go back up a
|
|
||||||
level you're on the right page. -->
|
|
||||||
<? if ($breadcrumb->url) : ?>
|
|
||||||
<a href="<?= $breadcrumb->url ?>"><?= html::purify($breadcrumb->title) ?></a>
|
|
||||||
<? else : ?>
|
|
||||||
<?= html::purify($breadcrumb->title) ?>
|
|
||||||
<? endif ?>
|
|
||||||
</li>
|
|
||||||
<? $i++ ?>
|
|
||||||
<? endforeach ?>
|
|
||||||
</ul>
|
|
||||||
<? endif ?>
|
|
||||||
<? // End modified code ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="g-info">
|
|
||||||
<?= $theme->dynamic_top() ?>
|
|
||||||
<h1><?= html::purify($title) ?></h1>
|
|
||||||
<div class="g-description"><?= nl2br(html::purify($description)) ?></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul id="g-album-grid" class="ui-helper-clearfix">
|
|
||||||
<? if (count($children)): ?>
|
|
||||||
<? foreach ($children as $i => $child): ?>
|
|
||||||
<? $item_class = "g-photo"; ?>
|
|
||||||
<? if ($child->is_album()): ?>
|
|
||||||
<? $item_class = "g-album"; ?>
|
|
||||||
<? endif ?>
|
|
||||||
<li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
|
|
||||||
<?= $theme->thumb_top($child) ?>
|
|
||||||
<a href="<?= $child->url() ?>">
|
|
||||||
<? if ($child->has_thumb()): ?>
|
|
||||||
<?= $child->thumb_img(array("class" => "g-thumbnail")) ?>
|
|
||||||
<? endif ?>
|
|
||||||
</a>
|
|
||||||
<?= $theme->thumb_bottom($child) ?>
|
|
||||||
<h2><span class="<?= $item_class ?>"></span>
|
|
||||||
<a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2>
|
|
||||||
<ul class="g-metadata">
|
|
||||||
<?= $theme->thumb_info($child) ?>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<? endforeach ?>
|
|
||||||
<? else: ?>
|
|
||||||
<li><?= t("There aren't any photos here yet!") ?></li>
|
|
||||||
<? endif; ?>
|
|
||||||
</ul>
|
|
||||||
<?= $theme->dynamic_bottom() ?>
|
|
||||||
|
|
||||||
<?= $theme->paginator() ?>
|
|
@ -1,44 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
||||||
<div id="g-header" class="ui-helper-clearfix">
|
|
||||||
<? // The following code was modifed to allow module-defined breadcrumbs.
|
|
||||||
// Everything else in this file is a copy of the default page.html.php file.
|
|
||||||
?>
|
|
||||||
<? if (!empty($breadcrumbs)): ?>
|
|
||||||
<ul class="g-breadcrumbs">
|
|
||||||
<? $i = 0 ?>
|
|
||||||
<? foreach ($breadcrumbs as $breadcrumb): ?>
|
|
||||||
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
|
|
||||||
<!-- Adding ?show=<id> causes Gallery3 to display the page
|
|
||||||
containing that photo. For now, we just do it for
|
|
||||||
the immediate parent so that when you go back up a
|
|
||||||
level you're on the right page. -->
|
|
||||||
<? if ($breadcrumb->url) : ?>
|
|
||||||
<a href="<?= $breadcrumb->url ?>"><?= html::purify($breadcrumb->title) ?></a>
|
|
||||||
<? else : ?>
|
|
||||||
<?= html::purify($breadcrumb->title) ?>
|
|
||||||
<? endif ?>
|
|
||||||
</li>
|
|
||||||
<? $i++ ?>
|
|
||||||
<? endforeach ?>
|
|
||||||
</ul>
|
|
||||||
<? endif ?>
|
|
||||||
<? // End modified code ?>
|
|
||||||
</div>
|
|
||||||
<div id="g-item">
|
|
||||||
<?= $theme->photo_top() ?>
|
|
||||||
|
|
||||||
<?= $theme->paginator() ?>
|
|
||||||
|
|
||||||
<div id="g-movie" class="ui-helper-clearfix">
|
|
||||||
<?= $theme->resize_top($item) ?>
|
|
||||||
<?= $item->movie_img(array("class" => "g-movie", "id" => "g-item-id-{$item->id}")) ?>
|
|
||||||
<?= $theme->resize_bottom($item) ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="g-info">
|
|
||||||
<h1><?= html::purify($item->title) ?></h1>
|
|
||||||
<div><?= nl2br(html::purify($item->description)) ?></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?= $theme->photo_bottom() ?>
|
|
||||||
</div>
|
|
@ -1,75 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
||||||
<div id="g-header" class="ui-helper-clearfix">
|
|
||||||
<? // The following code was modifed to allow module-defined breadcrumbs.
|
|
||||||
// Everything else in this file is a copy of the default page.html.php file.
|
|
||||||
?>
|
|
||||||
<? if (!empty($breadcrumbs)): ?>
|
|
||||||
<ul class="g-breadcrumbs">
|
|
||||||
<? $i = 0 ?>
|
|
||||||
<? foreach ($breadcrumbs as $breadcrumb): ?>
|
|
||||||
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
|
|
||||||
<!-- Adding ?show=<id> causes Gallery3 to display the page
|
|
||||||
containing that photo. For now, we just do it for
|
|
||||||
the immediate parent so that when you go back up a
|
|
||||||
level you're on the right page. -->
|
|
||||||
<? if ($breadcrumb->url) : ?>
|
|
||||||
<a href="<?= $breadcrumb->url ?>"><?= html::purify($breadcrumb->title) ?></a>
|
|
||||||
<? else : ?>
|
|
||||||
<?= html::purify($breadcrumb->title) ?>
|
|
||||||
<? endif ?>
|
|
||||||
</li>
|
|
||||||
<? $i++ ?>
|
|
||||||
<? endforeach ?>
|
|
||||||
</ul>
|
|
||||||
<? endif ?>
|
|
||||||
<? // End modified code ?>
|
|
||||||
</div>
|
|
||||||
<? if (access::can("view_full", $item)): ?>
|
|
||||||
<!-- Use javascript to show the full size as an overlay on the current page -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>];
|
|
||||||
$(".g-fullsize-link").click(function() {
|
|
||||||
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<? endif ?>
|
|
||||||
|
|
||||||
<div id="g-item">
|
|
||||||
<?= $theme->photo_top() ?>
|
|
||||||
|
|
||||||
<?= $theme->paginator() ?>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<div id="g-info">
|
|
||||||
<h1><?= html::purify($item->title) ?></h1>
|
|
||||||
<div><?= nl2br(html::purify($item->description)) ?></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?= $theme->photo_bottom() ?>
|
|
||||||
</div>
|
|
Reference in New Issue
Block a user