Browse Source

Fix admin notices (#10480)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
tags/v1.10.5
John Olheiser 4 years ago
parent
commit
bcd16cec63
No account linked to committer's email address
3 changed files with 6 additions and 3 deletions
  1. 1
    1
      routers/routes/routes.go
  2. 4
    1
      templates/admin/notice.tmpl
  3. 1
    1
      web_src/less/_admin.less

+ 1
- 1
routers/routes/routes.go View File

m.Group("/notices", func() { m.Group("/notices", func() {
m.Get("", admin.Notices) m.Get("", admin.Notices)
m.Post("/delete", admin.DeleteNotices) m.Post("/delete", admin.DeleteNotices)
m.Get("/empty", admin.EmptyNotices)
m.Post("/empty", admin.EmptyNotices)
}) })
}, adminReq) }, adminReq)
// ***** END: Admin ***** // ***** END: Admin *****

+ 4
- 1
templates/admin/notice.tmpl View File

<th></th> <th></th>
<th colspan="5"> <th colspan="5">
<div class="ui right"> <div class="ui right">
<a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
<form method="post" action="{{AppSubUrl}}/admin/notices/empty">
{{.CsrfTokenHtml}}
<button type="submit" class="ui red small button">{{.i18n.Tr "admin.notices.delete_all"}}</button>
</form>
</div> </div>
<div class="ui floating upward dropdown small button"> <div class="ui floating upward dropdown small button">
<span class="text">{{.i18n.Tr "admin.notices.actions"}}</span> <span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>

+ 1
- 1
web_src/less/_admin.less View File

} }
} }


form button[type='submit'] {
form tbody button[type='submit'] {
padding: 5px 8px; padding: 5px 8px;
} }
} }

Loading…
Cancel
Save