Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve empty notifications display #24668

Merged
merged 6 commits into from
May 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions templates/user/notification/notification_div.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}" data-sequence-number="{{.SequenceNumber}}">
<div class="ui container">
<h1 class="ui dividing header">{{.locale.Tr "notification.notifications"}}</h1>
<h1 class="ui header">{{.locale.Tr "notification.notifications"}}</h1>
<div class="ui top attached tabular menu">
{{$notificationUnreadCount := call .NotificationUnreadCount}}
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active {{end}}item">
Expand All @@ -23,11 +23,14 @@
</div>
<div class="ui bottom attached active tab segment gt-p-3">
{{if eq (len .Notifications) 0}}
{{if eq .Status 1}}
{{.locale.Tr "notification.no_unread"}}
{{else}}
{{.locale.Tr "notification.no_read"}}
{{end}}
<div class="gt-df gt-ac gt-jc gt-fc gt-p-4 gt-tc">
{{svg "octicon-inbox" 48 "gt-mb-3"}}
{{if eq .Status 1}}
{{.locale.Tr "notification.no_unread"}}
{{else}}
{{.locale.Tr "notification.no_read"}}
{{end}}
</div>
{{else}}
<table class="ui unstackable very compact small table" id="notification_table">
<tbody>
Expand Down