Show an "add photos" message on empty albums for those who can.

This commit is contained in:
Chad Kieffer
2009-06-03 19:04:44 -06:00
parent 3845dba196
commit 0746e7e10d
+9
View File
@@ -7,6 +7,7 @@
</div>
<ul id="gAlbumGrid">
<? if (count($children)): ?>
<? foreach ($children as $i => $child): ?>
<? $item_class = "gPhoto"; ?>
<? if ($child->is_album()): ?>
@@ -24,6 +25,14 @@
</ul>
</li>
<? endforeach ?>
<? else: ?>
<? if ($user->admin || access::can("add", $item)): ?>
<? $addurl = url::file("index.php/simple_uploader/app/$item->id") ?>
<li><?= t("There aren't any photos here yet! <a href=\"$addurl\" class=\"gDialogLink\">Add some</a>.") ?></li>
<? else: ?>
<li><?= t("There aren't any photos here yet!") ?></li>
<? endif; ?>
<? endif; ?>
</ul>
<?= $theme->album_bottom() ?>