From 56fb4a154f9852b251d6eef1c05e8e5877cf0a0c Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 18 Nov 2019 12:35:11 -0500 Subject: [PATCH] hide notification help text when notifications are present --- .../templates/notification/index.html.slime | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/philomena_web/templates/notification/index.html.slime b/lib/philomena_web/templates/notification/index.html.slime index 93ccd547..5478763b 100644 --- a/lib/philomena_web/templates/notification/index.html.slime +++ b/lib/philomena_web/templates/notification/index.html.slime @@ -5,8 +5,13 @@ h1 Notification Area .block__header = render PhilomenaWeb.PaginationView, "_pagination.html", page: @notifications, route: route, conn: @conn - = for notification <- @notifications do - = render PhilomenaWeb.NotificationView, "_notification.html", notification: notification, conn: @conn + = cond do + - Enum.any?(@notifications) -> + = for notification <- @notifications do + = render PhilomenaWeb.NotificationView, "_notification.html", notification: notification, conn: @conn -p To get notifications on new comments and forum posts, click the 'Subscribe' button in the bar at the top of an image or forum topic. You'll get notifications here for any new posts or comments. -p By default you'll be subscribed to any images or topics you reply to. You can configure this in your user settings page. + - true -> + p + ' To get notifications on new comments and forum posts, click the + ' 'Subscribe' button in the bar at the top of an image or forum topic. + ' You'll get notifications here for any new posts or comments.