diff options
author | 6543 <m.huber@kithara.com> | 2024-01-21 14:42:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-21 21:42:35 +0800 |
commit | 49d76639295a89bac8a656360782f0c3a1d2707c (patch) | |
tree | 0cd381a1969ebb0248959e9c08d6cf63ec916504 /templates | |
parent | 1df06e3f399307c14b60a2b88e1b26cedc1ae2f9 (diff) | |
download | gitea-49d76639295a89bac8a656360782f0c3a1d2707c.tar.gz gitea-49d76639295a89bac8a656360782f0c3a1d2707c.zip |
Revert adding htmx until we finaly decide to add it (#28879)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 14 | ||||
-rw-r--r-- | templates/repo/issue/view_content/watching.tmpl | 13 | ||||
-rw-r--r-- | templates/shared/user/profile_big_avatar.tmpl | 8 |
3 files changed, 17 insertions, 18 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 6c13eef023..4334e4bcbd 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -270,7 +270,19 @@ <div class="ui watching"> <span class="text"><strong>{{ctx.Locale.Tr "notification.notifications"}}</strong></span> <div class="gt-mt-3"> - {{template "repo/issue/view_content/watching" .}} + <form method="post" action="{{.Issue.Link}}/watch"> + <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> + {{$.CsrfTokenHtml}} + <button class="fluid ui button"> + {{if $.IssueWatch.IsWatching}} + {{svg "octicon-mute" 16 "gt-mr-3"}} + {{ctx.Locale.Tr "repo.issues.unsubscribe"}} + {{else}} + {{svg "octicon-unmute" 16 "gt-mr-3"}} + {{ctx.Locale.Tr "repo.issues.subscribe"}} + {{end}} + </button> + </form> </div> </div> {{end}} diff --git a/templates/repo/issue/view_content/watching.tmpl b/templates/repo/issue/view_content/watching.tmpl deleted file mode 100644 index 06b9d9af33..0000000000 --- a/templates/repo/issue/view_content/watching.tmpl +++ /dev/null @@ -1,13 +0,0 @@ -<form hx-boost="true" hx-sync="this:replace" hx-target="this" hx-push-url="false" hx-swap="show:no-scroll" method="post" action="{{.Issue.Link}}/watch"> - <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> - {{$.CsrfTokenHtml}} - <button class="fluid ui button"> - {{if $.IssueWatch.IsWatching}} - {{svg "octicon-mute" 16 "gt-mr-3"}} - {{ctx.Locale.Tr "repo.issues.unsubscribe"}} - {{else}} - {{svg "octicon-unmute" 16 "gt-mr-3"}} - {{ctx.Locale.Tr "repo.issues.subscribe"}} - {{end}} - </button> -</form> diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl index 7afc852d1b..a637a9a5f9 100644 --- a/templates/shared/user/profile_big_avatar.tmpl +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -1,4 +1,4 @@ -<div id="profile-avatar-card" class="ui card"> +<div class="ui card"> <div id="profile-avatar" class="content gt-df"> {{if eq .SignedUserID .ContextUser.ID}} <a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{ctx.Locale.Tr "user.change_avatar"}}"> @@ -110,13 +110,13 @@ </li> {{end}} {{if and .IsSigned (ne .SignedUserID .ContextUser.ID)}} - <li class="follow" hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}' hx-target="#profile-avatar-card" hx-swap="outerHTML"> + <li class="follow"> {{if $.IsFollowing}} - <button hx-post="{{.ContextUser.HomeLink}}?action=unfollow" class="ui basic red button"> + <button class="ui basic red button link-action" data-url="{{.ContextUser.HomeLink}}?action=unfollow"> {{svg "octicon-person"}} {{ctx.Locale.Tr "user.unfollow"}} </button> {{else}} - <button hx-post="{{.ContextUser.HomeLink}}?action=follow" class="ui basic primary button"> + <button class="ui basic primary button link-action" data-url="{{.ContextUser.HomeLink}}?action=follow"> {{svg "octicon-person"}} {{ctx.Locale.Tr "user.follow"}} </button> {{end}} |