themes/alps: better redirect after performing message operations
Go back to the right page.
This commit is contained in:
parent
5af6c6adc1
commit
81f52cc906
2 changed files with 10 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
|||
<a href="/compose" class="compose-mail">Compose Mail</a>
|
||||
{{$current := .Mailbox}}
|
||||
{{range .Mailboxes}}
|
||||
<a href="/mailbox/{{.Name | pathescape}}"
|
||||
<a href="{{.URL}}"
|
||||
{{ if eq $current.Name .Name }}class="active"{{ end }}>
|
||||
{{ if eq .Name "INBOX" }}
|
||||
Inbox
|
||||
|
@ -44,7 +44,7 @@
|
|||
{{ end }}
|
||||
</td>
|
||||
<td width="80%" class="message-list-subject">
|
||||
<a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
|
||||
<a href="{{.URL}}?part={{.TextPartName}}">
|
||||
{{if .Envelope.Subject}}
|
||||
{{.Envelope.Subject}}
|
||||
{{else}}
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
||||
{{ 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}}">
|
||||
|
||||
<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}}">
|
||||
|
||||
<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 Unread</button>
|
||||
</form>
|
||||
|
||||
|
|
Loading…
Reference in a new issue