aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/message.html
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-03-27 10:46:32 +0100
committerSimon Ser <contact@emersion.fr>2020-03-27 10:46:32 +0100
commit81f52cc90653c210998a0d85951ef65f09e0f491 (patch)
tree94761f1ce17635716c891d7ccab6af81bb0677e0 /themes/alps/message.html
parent5af6c6adc172ac9cc2d24d0507adfeb45773373b (diff)
downloadalps-81f52cc90653c210998a0d85951ef65f09e0f491.tar.gz
alps-81f52cc90653c210998a0d85951ef65f09e0f491.zip
themes/alps: better redirect after performing message operations
Go back to the right page.
Diffstat (limited to 'themes/alps/message.html')
-rw-r--r--themes/alps/message.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/themes/alps/message.html b/themes/alps/message.html
index 38ae948..3f5a689 100644
--- a/themes/alps/message.html
+++ b/themes/alps/message.html
@@ -25,13 +25,15 @@
<th colspan="2">
<div class="actions-wrap">
<div class="actions-message">
- <a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}" class="button-link">« Back</a>
+ {{$back := printf "%v?page=%v" .Mailbox.URL .MailboxPage}}
+ <a href="{{$back}}" class="button-link">« Back</a>
&nbsp;&nbsp;
{{ if and (ne .Mailbox.Name "Archive") (ne .Mailbox.Name "Drafts") (ne .Mailbox.Name "Sent") }}
<form method="post" action="/message/{{.Mailbox.Name | pathescape}}/move">
<input type="hidden" name="uids" value="{{.Message.Uid}}">
<input type="hidden" name="to" value="Archive">
+ <input type="hidden" name="next" value="{{$back}}">
<button>Archive</button>
</form>
{{ end }}
@@ -53,6 +55,7 @@
{{ if or (eq .Mailbox.Name "INBOX") (eq .Mailbox.Name "Trash") }}
<form method="post" action="/message/{{.Mailbox.Name | pathescape}}/move">
<input type="hidden" name="uids" value="{{.Message.Uid}}">
+ <input type="hidden" name="next" value="{{$back}}">
&nbsp;&nbsp;
<input type="hidden" name="to" value="Junk">
<button>Report Spam</button>
@@ -62,11 +65,13 @@
{{ if or (eq .Mailbox.Name "Trash") (eq .Mailbox.Name "Junk") }}
<form method="post" action="/message/{{.Mailbox.Name | pathescape}}/delete">
<input type="hidden" name="uids" value="{{.Message.Uid}}">
+ <input type="hidden" name="next" value="{{$back}}">
<button>Delete Permanently</button>
</form>
{{ else }}
<form method="post" action="/message/{{.Mailbox.Name | pathescape}}/move">
<input type="hidden" name="uids" value="{{.Message.Uid}}">
+ <input type="hidden" name="next" value="{{$back}}">
&nbsp;&nbsp;
<input type="hidden" name="to" value="Trash">
<button>Delete</button>
@@ -75,8 +80,9 @@
<form method="post" action="/message/{{.Mailbox.Name | pathescape}}/flag">
<input type="hidden" name="uids" value="{{.Message.Uid}}">
- <input type="hidden" name="flags" value="\Seen">
<input type="hidden" name="action" value="remove">
+ <input type="hidden" name="flags" value="\Seen">
+ <input type="hidden" name="next" value="{{$back}}">
<button>Mark&nbsp;Unread</button>
</form>