summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
author0ko <0ko@noreply.codeberg.org>2024-04-20 07:27:15 +0200
committer0ko <0ko@noreply.codeberg.org>2024-04-20 07:27:15 +0200
commit8947948a0ac4172bad57c99bbddb254f1be3093b (patch)
treefac26a28d89223754b385b9389006b5eb474f7ef /templates
parentMerge pull request 'Remove EasyMDE from various areas' (#2916) from 0ko/forge... (diff)
parentVarious improvements to pages: notifications and subscriptions (diff)
downloadforgejo-8947948a0ac4172bad57c99bbddb254f1be3093b.tar.xz
forgejo-8947948a0ac4172bad57c99bbddb254f1be3093b.zip
Merge pull request 'Various improvements to pages: notifications and subscriptions' (#3175) from 0ko/forgejo:meet-your-subscribtions into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3175 Reviewed-by: Otto <otto@codeberg.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_title.tmpl8
-rw-r--r--templates/user/notification/notification_div.tmpl29
-rw-r--r--templates/user/notification/notification_subscriptions.tmpl19
3 files changed, 33 insertions, 23 deletions
diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl
index 3a5ba0f4a3..66afd49090 100644
--- a/templates/repo/issue/view_title.tmpl
+++ b/templates/repo/issue/view_title.tmpl
@@ -12,16 +12,16 @@
<input value="{{.Issue.Title}}" maxlength="255" autocomplete="off">
</div>
</h1>
- <div class="issue-title-buttons">
+ <div class="top-right-buttons">
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
- <button id="edit-title" class="ui small basic button edit-button not-in-edit tw-mr-0">{{ctx.Locale.Tr "repo.issues.edit"}}</button>
+ <button id="edit-title" class="ui small basic button edit-button not-in-edit">{{ctx.Locale.Tr "repo.issues.edit"}}</button>
{{end}}
{{if not .Issue.IsPull}}
- <a role="button" class="ui small primary button new-issue-button tw-mr-0" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
+ <a role="button" class="ui small primary button new-issue-button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
{{end}}
</div>
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
- <div class="edit-buttons">
+ <div class="top-right-buttons">
<button id="cancel-edit-title" class="ui small basic button in-edit tw-hidden">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
<button id="save-edit-title" class="ui small primary button in-edit tw-hidden tw-mr-0" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{ctx.Locale.Tr "repo.issues.save"}}</button>
</div>
diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl
index bf3b51ee3b..99da119901 100644
--- a/templates/user/notification/notification_div.tmpl
+++ b/templates/user/notification/notification_div.tmpl
@@ -1,8 +1,8 @@
<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-sequence-number="{{.SequenceNumber}}">
<div class="ui container">
{{$notificationUnreadCount := call .NotificationUnreadCount}}
- <div class="tw-flex tw-items-center tw-justify-between tw-mb-[--page-spacing]">
- <div class="small-menu-items ui compact tiny menu">
+ <div class="tw-flex tw-items-center tw-justify-between tw-mb-4">
+ <div class="ui secondary partial menu">
<a class="{{if eq .Status 1}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=unread">
{{ctx.Locale.Tr "notification.unread"}}
<div class="notifications-unread-count ui label {{if not $notificationUnreadCount}}tw-hidden{{end}}">{{$notificationUnreadCount}}</div>
@@ -11,16 +11,21 @@
{{ctx.Locale.Tr "notification.read"}}
</a>
</div>
- {{if and (eq .Status 1)}}
- <form action="{{AppSubUrl}}/notifications/purge" method="post">
- {{$.CsrfTokenHtml}}
- <div class="{{if not $notificationUnreadCount}}tw-hidden{{end}}">
- <button class="ui mini button primary tw-mr-0" title="{{ctx.Locale.Tr "notification.mark_all_as_read"}}">
- {{svg "octicon-checklist"}}
- </button>
- </div>
- </form>
- {{end}}
+ <div class="tw-flex top-right-buttons">
+ <a class="ui tiny button" href="{{AppSubUrl}}/notifications/subscriptions">
+ {{ctx.Locale.Tr "notification.subscriptions"}}
+ </a>
+ {{if and (eq .Status 1)}}
+ <form class="{{if not $notificationUnreadCount}}tw-hidden{{end}}" action="{{AppSubUrl}}/notifications/purge" method="post">
+ {{$.CsrfTokenHtml}}
+ <div>
+ <button class="ui mini button primary tw-mr-0" title="{{ctx.Locale.Tr "notification.mark_all_as_read"}}">
+ {{svg "octicon-checklist"}}
+ </button>
+ </div>
+ </form>
+ {{end}}
+ </div>
</div>
<div class="tw-p-0">
<div id="notification_table">
diff --git a/templates/user/notification/notification_subscriptions.tmpl b/templates/user/notification/notification_subscriptions.tmpl
index a5a965ca52..0a3ae99b40 100644
--- a/templates/user/notification/notification_subscriptions.tmpl
+++ b/templates/user/notification/notification_subscriptions.tmpl
@@ -1,15 +1,20 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content user notification">
<div class="ui container">
- <div class="ui top attached tabular menu">
- <a href="{{AppSubUrl}}/notifications/subscriptions" class="{{if eq .Status 1}}active {{end}}item">
- {{ctx.Locale.Tr "notification.subscriptions"}}
- </a>
- <a href="{{AppSubUrl}}/notifications/watching" class="{{if eq .Status 2}}active {{end}}item">
- {{ctx.Locale.Tr "notification.watching"}}
+ <div class="tw-flex tw-items-center tw-justify-between tw-mb-4">
+ <div class="ui secondary partial menu">
+ <a href="{{AppSubUrl}}/notifications/subscriptions" class="{{if eq .Status 1}}active {{end}}item">
+ {{ctx.Locale.Tr "notification.subscriptions"}}
+ </a>
+ <a href="{{AppSubUrl}}/notifications/watching" class="{{if eq .Status 2}}active {{end}}item">
+ {{ctx.Locale.Tr "notification.watching"}}
+ </a>
+ </div>
+ <a class="ui tiny button" href="{{AppSubUrl}}/notifications">
+ {{ctx.Locale.Tr "notifications"}}
</a>
</div>
- <div class="ui bottom attached active tab segment">
+ <div class="ui bottom active tab segment">
{{if eq .Status 1}}
<div class="tw-flex tw-justify-between">
<div class="tw-flex">