diff options
author | Meaglith Ma <genedna@gmail.com> | 2014-04-06 17:28:33 +0800 |
---|---|---|
committer | Meaglith Ma <genedna@gmail.com> | 2014-04-06 17:28:33 +0800 |
commit | 2e8d5c2eb36b63468dc78561566975c72eeaaefa (patch) | |
tree | 92659a09ec784005c8d9a0540e5197a75b0a3ea9 /routers/repo/release.go | |
parent | a044c24c3db4b18b20406045b40e55ce15f941a0 (diff) | |
parent | ef6b9784962d3152d3ec46833303bad72915af57 (diff) | |
download | gitea-2e8d5c2eb36b63468dc78561566975c72eeaaefa.tar.gz gitea-2e8d5c2eb36b63468dc78561566975c72eeaaefa.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'routers/repo/release.go')
-rw-r--r-- | routers/repo/release.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/routers/repo/release.go b/routers/repo/release.go new file mode 100644 index 0000000000..8e8b93c9ea --- /dev/null +++ b/routers/repo/release.go @@ -0,0 +1,22 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "github.com/gogits/gogs/models" + "github.com/gogits/gogs/modules/middleware" +) + +func Releases(ctx *middleware.Context) { + ctx.Data["Title"] = "Releases" + ctx.Data["IsRepoToolbarReleases"] = true + tags, err := models.GetTags(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name) + if err != nil { + ctx.Handle(404, "repo.Releases(GetTags)", err) + return + } + ctx.Data["Releases"] = tags + ctx.HTML(200, "release/list") +} |