You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
597 B

10 years ago
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package repo
  5. import (
  6. "github.com/gogits/gogs/models"
  7. "github.com/gogits/gogs/modules/middleware"
  8. )
  9. func Releases(ctx *middleware.Context) {
  10. ctx.Data["Title"] = "Releases"
  11. ctx.Data["IsRepoToolbarReleases"] = true
  12. tags, err := models.GetTags(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name)
  13. if err != nil {
  14. ctx.Handle(404, "repo.Releases(GetTags)", err)
  15. return
  16. }
  17. ctx.Data["Releases"] = tags
  18. ctx.HTML(200, "release/list")
  19. }