summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2011-08-11 19:07:45 +0000
committerNathan Kinkade <nath@nkinka.de>2011-08-11 19:07:45 +0000
commitd8dffba94277c2179a59eb72d6927a5bdb879648 (patch)
treed377bd9d2e1e277ca93cc7fc17c73edae5286706 /themes
parent2ec6e8d61b63ac5d3fc5cbd6761360539cd9d5e9 (diff)
parenta5b1972bbe9676479886ca94bb23f09407a87561 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'themes')
-rw-r--r--themes/wind/views/page.html.php27
1 files changed, 7 insertions, 20 deletions
diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php
index 045e3c45..534b7de4 100644
--- a/themes/wind/views/page.html.php
+++ b/themes/wind/views/page.html.php
@@ -107,28 +107,15 @@
<?= $theme->header_bottom() ?>
</div>
- <? if ($theme->item() && !empty($parents)): ?>
+ <? if (!empty($breadcrumbs)): ?>
<ul class="g-breadcrumbs">
- <? $i = 0 ?>
- <? foreach ($parents as $parent): ?>
- <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. ?>
- <a href="<?= $parent->url($parent->id == $theme->item()->parent_id ?
- "show={$theme->item()->id}" : null) ?>">
- <? // limit the title length to something reasonable (defaults to 15) ?>
- <?= html::purify(text::limit_chars($parent->title,
- module::get_var("gallery", "visible_title_length"))) ?>
- </a>
- </li>
- <? $i++ ?>
+ <? foreach ($breadcrumbs as $breadcrumb): ?>
+ <li class="<?= $breadcrumb->last ? "g-active" : "" ?>
+ <?= $breadcrumb->first ? "g-first" : "" ?>">
+ <? if (!$breadcrumb->last): ?> <a href="<?= $breadcrumb->url ?>"><? endif ?>
+ <?= html::purify(text::limit_chars($breadcrumb->title, module::get_var("gallery", "visible_title_length"))) ?>
+ <? if (!$breadcrumb->last): ?></a><? endif ?>
<? endforeach ?>
- <li class="g-active<? if ($i == 0) print " g-first" ?>">
- <?= html::purify(text::limit_chars($theme->item()->title,
- module::get_var("gallery", "visible_title_length"))) ?>
- </li>
</ul>
<? endif ?>
</div>