summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/gallery_menu.php6
-rw-r--r--modules/info/views/info_block.html.php11
-rw-r--r--modules/notification/helpers/notification_menu.php16
3 files changed, 20 insertions, 13 deletions
diff --git a/modules/gallery/helpers/gallery_menu.php b/modules/gallery/helpers/gallery_menu.php
index 854086c1..9729a868 100644
--- a/modules/gallery/helpers/gallery_menu.php
+++ b/modules/gallery/helpers/gallery_menu.php
@@ -100,12 +100,6 @@ class gallery_menu_Core {
->url("#")
->css_class("gFullSizeLink"));
}
- $menu
- ->append(Menu::factory("link")
- ->id("album")
- ->label(t("Return to album"))
- ->url($theme->item()->parent()->url("show={$theme->item->id}"))
- ->css_id("gAlbumLink"));
}
static function admin($menu, $theme) {
diff --git a/modules/info/views/info_block.html.php b/modules/info/views/info_block.html.php
index db664894..f8e5f35e 100644
--- a/modules/info/views/info_block.html.php
+++ b/modules/info/views/info_block.html.php
@@ -17,6 +17,17 @@
<td><?= p::clean($item->name) ?></td>
</tr>
<? endif ?>
+ <? if ($item->id != 1): ?>
+ <? $parent = $item->parent(); ?>
+ <tr>
+ <th><?= t("Album: ") ?></th>
+ <td>
+ <a href="<?= url::site("albums/{$parent->id}?show=$item->id") ?>">
+ <?= p::clean($parent->title) ?>
+ </a>
+ </td>
+ </tr>
+ <? endif ?>
<? if ($item->captured): ?>
<tr>
<th><?= t("Captured:") ?></th>
diff --git a/modules/notification/helpers/notification_menu.php b/modules/notification/helpers/notification_menu.php
index 87927874..696aad62 100644
--- a/modules/notification/helpers/notification_menu.php
+++ b/modules/notification/helpers/notification_menu.php
@@ -18,19 +18,21 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class notification_menu_Core {
- static function album($menu, $theme) {
+ static function site($menu, $theme) {
if (!user::active()->guest) {
$item = $theme->item();
-
- if ($item) {
+
+ if ($item && $item->is_album()) {
$watching = notification::is_watching($item);
- $menu
+ $watching ? $label = t("Remove notifications") : $label = t("Enable notifications");
+
+ $menu->get("options_menu")
->append(Menu::factory("link")
->id("watch")
- ->label(t("Enable notifications for this album"))
- ->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token()))
- ->css_id($watching ? "gRemoveNotifyLink" : "gAddNotifyLink"));
+ ->label($label)
+ ->css_id("gNotifyLink")
+ ->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token())));
}
}
}