From e10096ee2e7985cfd73553f52b09994af025cd93 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 2 May 2014 19:23:06 -0400 Subject: [PATCH] Mirror fix on UI --- README.md | 3 ++- README_ZH.md | 3 ++- modules/middleware/repo.go | 1 + routers/repo/issue.go | 1 + templates/issue/view.tmpl | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fbee7769dd..cebb577aa1 100644 --- a/README.md +++ b/README.md @@ -52,11 +52,12 @@ More importantly, Gogs only needs one binary to setup your own project hosting o Make sure you install [Prerequirements](http://gogs.io/docs/installation/) first. -There are 3 ways to install Gogs: +There are 4 ways to install Gogs: - [Install from binary](http://gogs.io/docs/installation/install_from_binary.md): **STRONGLY RECOMMENDED** - [Install from source](http://gogs.io/docs/installation/install_from_source.md) - [Ship with Docker](https://github.com/gogits/gogs/tree/master/dockerfiles) +- [Install with Vagrant](https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs) ## Acknowledgments diff --git a/README_ZH.md b/README_ZH.md index a58bb1b54e..d93a4921a0 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -44,11 +44,12 @@ Gogs 完全使用 Go 语言来实现对 Git 数据的操作,实现 **零** 依 在安装 Gogs 之前,您需要先安装 [基本环境](http://gogs.io/docs/installation/)。 -然后,您可以通过以下 3 种方式来安装 Gogs: +然后,您可以通过以下 4 种方式来安装 Gogs: - [二进制安装](http://gogs.io/docs/installation/install_from_binary.md): **强烈推荐** - [源码安装](http://gogs.io/docs/installation/install_from_source.md) - [采用 Docker 部署](https://github.com/gogits/gogs/tree/master/dockerfiles) +- [通过 Vagrant 安装](https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs) ## 特别鸣谢 diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index c31090b4d5..f681ac139a 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -45,6 +45,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { repoName := params["reponame"] refName := params["branchname"] + // TODO: check collaborators // get repository owner ctx.Repo.IsOwner = ctx.IsSigned && ctx.User.LowerName == strings.ToLower(userName) diff --git a/routers/repo/issue.go b/routers/repo/issue.go index edcc3ea61b..e761d9a2e9 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -252,6 +252,7 @@ func Comment(ctx *middleware.Context, params martini.Params) { return } + // TODO: check collaborators // Check if issue owner changes the status of issue. var newStatus string if ctx.Repo.IsOwner || issue.PosterId == ctx.User.Id { diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl index 16d60d3584..90c9361241 100644 --- a/templates/issue/view.tmpl +++ b/templates/issue/view.tmpl @@ -86,9 +86,9 @@
- {{if .Issue.IsClosed}} + {{if .IsIssueOwner}}{{if .Issue.IsClosed}} {{else}} - {{end}}   + {{end}}{{end}}