From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/user/notification/notification.tmpl | 3 + templates/user/notification/notification_div.tmpl | 130 +++++++++++++++++++++ .../notification/notification_subscriptions.tmpl | 84 +++++++++++++ 3 files changed, 217 insertions(+) create mode 100644 templates/user/notification/notification.tmpl create mode 100644 templates/user/notification/notification_div.tmpl create mode 100644 templates/user/notification/notification_subscriptions.tmpl (limited to 'templates/user/notification') diff --git a/templates/user/notification/notification.tmpl b/templates/user/notification/notification.tmpl new file mode 100644 index 0000000..b483c15 --- /dev/null +++ b/templates/user/notification/notification.tmpl @@ -0,0 +1,3 @@ +{{template "base/head" .}} +{{template "user/notification/notification_div" .}} +{{template "base/footer" .}} diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl new file mode 100644 index 0000000..5c27ba8 --- /dev/null +++ b/templates/user/notification/notification_div.tmpl @@ -0,0 +1,130 @@ +
+
+ {{$notificationUnreadCount := call .NotificationUnreadCount}} +
+ +
+ + {{ctx.Locale.Tr "notification.subscriptions"}} + + {{if and (eq .Status 1)}} +
+ {{$.CsrfTokenHtml}} +
+ +
+
+ {{end}} +
+
+
+
+ {{if not .Notifications}} +
+ {{svg "octicon-inbox" 56 "tw-mb-4"}} + {{if eq .Status 1}} + {{ctx.Locale.Tr "notification.no_unread"}} + {{else}} + {{ctx.Locale.Tr "notification.no_read"}} + {{end}} +
+ {{else}} + {{range $notification := .Notifications}} +
+
+ {{if .Issue}} + {{template "shared/issueicon" .Issue}} + {{else}} + {{svg "octicon-repo" 16 "text grey"}} + {{end}} +
+ +
+ {{.Repository.FullName}} {{if .Issue}}#{{.Issue.Index}}{{end}} + {{if eq .Status 3}} + {{svg "octicon-pin" 13 "text blue tw-mt-0.5 tw-ml-1"}} + {{end}} +
+
+ + {{if .Issue}} + {{RenderRefIssueTitle $.Context .Issue.Title}} + {{else}} + {{.Repository.FullName}} + {{end}} + +
+
+
+ {{if .Issue}} + {{TimeSinceUnix .Issue.UpdatedUnix ctx.Locale}} + {{else}} + {{TimeSinceUnix .UpdatedUnix ctx.Locale}} + {{end}} +
+
+ {{if ne .Status 3}} +
+ {{$.CsrfTokenHtml}} + + + +
+ {{end}} + {{if or (eq .Status 1) (eq .Status 3)}} +
+ {{$.CsrfTokenHtml}} + + + + +
+ {{else if eq .Status 2}} +
+ {{$.CsrfTokenHtml}} + + + + +
+ {{end}} +
+
+ {{end}} + {{end}} +
+
+ {{template "base/paginate" .}} +
+
diff --git a/templates/user/notification/notification_subscriptions.tmpl b/templates/user/notification/notification_subscriptions.tmpl new file mode 100644 index 0000000..0a3ae99 --- /dev/null +++ b/templates/user/notification/notification_subscriptions.tmpl @@ -0,0 +1,84 @@ +{{template "base/head" .}} +
+
+ +
+ {{if eq .Status 1}} + +
+ {{if not .Issues}} + {{ctx.Locale.Tr "notification.no_subscriptions"}} + {{else}} + {{template "shared/issuelist" dict "." . "listType" "dashboard"}} + {{end}} + {{else}} + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} + {{end}} +
+
+
+{{template "base/footer" .}} -- cgit v1.2.3