news.go 901 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Copyright 2018 Gitote. All rights reserved.
  3. //
  4. // This source code is licensed under the MIT license found in the
  5. // LICENSE file in the root directory of this source tree.
  6. package admin
  7. import (
  8. "gitote/gitote/pkg/context"
  9. )
  10. const (
  11. // NEWS list page template
  12. NEWS = "admin/news/list"
  13. // NEWS_NEW page template
  14. NEWS_NEW = "admin/news/new"
  15. // NEWS_EDIT page template
  16. NEWS_EDIT = "admin/news/edit"
  17. )
  18. // News shows news page
  19. func News(c *context.Context) {
  20. c.Data["Title"] = "News"
  21. c.Data["PageIsAdminNews"] = true
  22. c.HTML(200, NEWS)
  23. }
  24. // News shows news page
  25. func NewsNew(c *context.Context) {
  26. c.Data["Title"] = "News"
  27. c.Data["PageIsAdminNews"] = true
  28. c.HTML(200, NEWS_NEW)
  29. }
  30. // News shows news page
  31. func NewsEdit(c *context.Context) {
  32. c.Data["Title"] = "News"
  33. c.Data["PageIsAdminNews"] = true
  34. c.HTML(200, NEWS_EDIT)
  35. }