Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixes #15, support for dynamic page view.

  • Loading branch information...
commit b88215929ad27bd0b278b47a5ba17ad74fe9decd 1 parent 70391a7
@fredrike authored
Showing with 18 additions and 27 deletions.
  1. +3 −26 views/dynamic.html.php
  2. +15 −1 views/page.html.php
View
29 views/dynamic.html.php
@@ -1,29 +1,6 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="g-album-header">
- <div id="g-album-header-buttons">
- <?= $theme->dynamic_top() ?>
- </div>
- <h1><?= html::clean($title) ?></h1>
-</div>
-
-<ul id="g-album-grid" class="ui-helper-clearfix">
- <? foreach ($children as $i => $child): ?>
- <li class="g-item <?= $child->is_album() ? "g-album" : "" ?>">
- <?= $theme->thumb_top($child) ?>
- <a href="<?= $child->url() ?>">
- <img id="g-photo-id-<?= $child->id ?>" class="g-thumbnail"
- alt="photo" src="<?= $child->thumb_url() ?>"
- width="<?= $child->thumb_width ?>"
- height="<?= $child->thumb_height ?>" />
- </a>
- <h2><?= html::purify($child->title) ?></h2>
- <?= $theme->thumb_bottom($child) ?>
- <ul class="g-metadata">
- <?= $theme->thumb_info($child) ?>
- </ul>
- </li>
- <? endforeach ?>
-</ul>
+<?= $theme->dynamic_top() ?>
+<?/* Treat dynamic pages just lite album pages. */ ?>
+<?= new View("album.html") ?>
<?= $theme->dynamic_bottom() ?>
-<?= $theme->paginator() ?>
View
16 views/page.html.php
@@ -124,7 +124,6 @@
<div class="pear">
<div id="gsNavBar" class="gcBorder1">
-<? if ($theme->item()): ?>
<div class="lNavBar">
<? if(!empty($parents)): ?>
<? foreach ($parents as $parent): ?>
@@ -132,13 +131,28 @@
<button class="large push large-with-push" onclick="window.location='<?= $parent->url() ?>' + '#viewMode=' + viewMode;"> <div class="outer"> <div class="label"> <?= html::purify(text::limit_chars($parent->title, module::get_var("gallery", "visible_title_length"))) ?></div> </div></button>
<? if (!module::get_var("th_pear4gallery3", "show_breadcrumbs")) break; ?>
<? endforeach ?>
+ <? elseif (!($theme->item() && $theme->item()->id == item::root()->id)): ?>
+ <button class="large push large-with-push" onclick="window.location='<?= item::root()->url() ?>' + '#viewMode=' + viewMode;"> <div class="outer"> <div class="label"> <?= t("go back to the Gallery home")->for_html_attr() ?></div> </div></button>
<? endif ?>
</div>
+<? if ($theme->item()): ?>
<div class="pearTitle" title="<?= $theme->item()->description ?>"> <?= html::purify(text::limit_chars($theme->item()->title, 40)) ?> &nbsp;
<? if (!module::get_var("th_pear4gallery3", "hide_item_count")): ?>
<span class="count">(<?= count($theme->item()->children()) ?>)</span>
<? endif ?>
</div>
+<? else: ?>
+ <div class="pearTitle">
+ <? if ($page_title): ?>
+ <?= html::purify(text::limit_chars($page_title, 40)) ?> &nbsp;
+ <? else: ?>
+ <? if ($theme->tag()): ?>
+ <?= t("Photos tagged with %tag_title", array("tag_title" => $theme->tag()->name)) ?>
+ <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?>
+ <?= html::purify(text::limit_chars(item::root()->title, 40)) ?> &nbsp;
+ <? endif ?>
+ <? endif ?>
+ </div>
<? endif ?>
<div class="rNavBar">
<button class="large push large-with-push" onclick="$('#g-header').slideToggle('normal', function(){$('#g-header').is(':hidden') ? $('#sidebarButton').text('Show Options') : $('#sidebarButton').text('Hide Options')});//);toggleSidebar('ContentAlbum','sidebar'); return false;"> <div class="outer"> <div class="label" id="sidebarButton">Show Options</div></div></button>
Please sign in to comment.
Something went wrong with that request. Please try again.