diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-04-05 15:30:49 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-04-05 15:30:49 +0800 |
commit | a92826a8feee904440d86fd851ac4ecce35520fd (patch) | |
tree | e813b36b2b6db0807e02abd61a4f220a971cc84e /modules | |
parent | 493b0c5ac212a28f46938cf8dfb2efb79f658548 (diff) | |
parent | e41ab839c7dbbdffc60a4e02775f24add9d126d9 (diff) |
Merge branch 'dev' of github.com:gogits/gogs into dev
Conflicts:
routers/repo/repo.go
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base/tool.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go index 6876da76..3946c4b5 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -494,6 +494,8 @@ func ActionIcon(opType int) string { return "arrow-circle-o-right" case 6: // Create issue. return "exclamation-circle" + case 8: // Transfer repository. + return "share" default: return "invalid type" } @@ -503,8 +505,9 @@ const ( TPL_CREATE_REPO = `<a href="/user/%s">%s</a> created repository <a href="/%s">%s</a>` TPL_COMMIT_REPO = `<a href="/user/%s">%s</a> pushed to <a href="/%s/src/%s">%s</a> at <a href="/%s">%s</a>%s` TPL_COMMIT_REPO_LI = `<div><img src="%s?s=16" alt="user-avatar"/> <a href="/%s/commit/%s">%s</a> %s</div>` - TPL_CREATE_Issue = `<a href="/user/%s">%s</a> opened issue <a href="/%s/issues/%s">%s#%s</a> + TPL_CREATE_ISSUE = `<a href="/user/%s">%s</a> opened issue <a href="/%s/issues/%s">%s#%s</a> <div><img src="%s?s=16" alt="user-avatar"/> %s</div>` + TPL_TRANSFER_REPO = `<a href="/user/%s">%s</a> transfered repository <code>%s</code> to <a href="/%s">%s</a>` ) type PushCommit struct { @@ -547,8 +550,11 @@ func ActionDesc(act Actioner) string { buf.String()) case 6: // Create issue. infos := strings.SplitN(content, "|", 2) - return fmt.Sprintf(TPL_CREATE_Issue, actUserName, actUserName, repoLink, infos[0], repoLink, infos[0], + return fmt.Sprintf(TPL_CREATE_ISSUE, actUserName, actUserName, repoLink, infos[0], repoLink, infos[0], AvatarLink(email), infos[1]) + case 8: // Transfer repository. + newRepoLink := content + "/" + repoName + return fmt.Sprintf(TPL_TRANSFER_REPO, actUserName, actUserName, repoLink, newRepoLink, newRepoLink) default: return "invalid type" } |