summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-01 00:28:00 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-01 00:28:00 +0000
commit03c60e2b55791945e04573d9e9eb2bbdc869ded3 (patch)
treea2d13eb7d07e83010f1314a5546dd1e95bcfb263
parentcd1d02375400972f2a719852d44c094ab500e8b6 (diff)
Add deepest album link
-rw-r--r--core/controllers/welcome.php2
-rw-r--r--core/views/welcome.html.php6
2 files changed, 8 insertions, 0 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php
index b83ea40d..b3a12952 100644
--- a/core/controllers/welcome.php
+++ b/core/controllers/welcome.php
@@ -37,6 +37,8 @@ class Welcome_Controller extends Template_Controller {
$this->template->photo_count = ORM::factory("item")->where("type", "photo")->count_all();
$this->template->deepest_photo = ORM::factory("item")
->where("type", "photo")->orderby("level", "desc")->find();
+ $this->template->deepest_album = ORM::factory("item")
+ ->where("type", "album")->orderby("level", "desc")->find();
$this->template->album_tree = $this->_load_album_tree();
$this->template->add_photo_html = $this->_get_add_photo_html();
} catch (Exception $e) {
diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php
index e354db76..9300de02 100644
--- a/core/views/welcome.html.php
+++ b/core/views/welcome.html.php
@@ -419,6 +419,12 @@
<i>(<?= $deepest_photo->level ?> levels deep)</i>
</li>
<? endif ?>
+ <? if ($deepest_album): ?>
+ <li>
+ <?= html::anchor("albums/{$deepest_album->id}", "Deepest album") ?>
+ <i>(<?= $deepest_album->level ?> levels deep)</i>
+ </li>
+ <? endif ?>
<? if ($most_tagged): ?>
<li>
<?= html::anchor("items/{$most_tagged->id}", "Most tagged item") ?>