Browse Source

Merge with dev branch and resolve conflicts

pull/946/head
Alexey Makhov 10 years ago
parent
commit
d23594191a
  1. 2
      models/action.go
  2. 6
      public/ng/css/gogs.css
  3. 4
      routers/repo/commit.go

2
models/action.go

@ -242,7 +242,7 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com
} }
// If commit happened in the referenced repository, it means the issue can be closed. // If commit happened in the referenced repository, it means the issue can be closed.
if _, err = CreateComment(userId, repoId, issue.Id, 0, 0, COMMENT_TYPE_REOPEN, "", nil); err != nil { if _, err = CreateComment(userId, repoId, issue.Id, "", "", COMMENT_TYPE_REOPEN, "", nil); err != nil {
return err return err
} }
} }

6
public/ng/css/gogs.css

@ -1457,14 +1457,10 @@ The register and sign-in page style
.code-view .lines-num span { .code-view .lines-num span {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
line-height: 20px; line-height: 20px;
padding: 0 15px; padding: 0 10px;
cursor: pointer; cursor: pointer;
display: block; display: block;
} }
.code-view .comment {
background-color: #fafafa;
}
.code-view .lines-code > pre { .code-view .lines-code > pre {
border: none; border: none;
border-left: 1px solid #ddd; border-left: 1px solid #ddd;

4
routers/repo/commit.go

@ -267,7 +267,7 @@ func Diff(ctx *middleware.Context) {
} }
comments[i].Poster = u comments[i].Poster = u
if comments[i].Type == models.COMMENT { if comments[i].Type == models.COMMENT_TYPE_COMMENT {
comments[i].Content = string(base.RenderMarkdown([]byte(comments[i].Content), ctx.Repo.RepoLink)) comments[i].Content = string(base.RenderMarkdown([]byte(comments[i].Content), ctx.Repo.RepoLink))
} }
@ -393,7 +393,7 @@ func CreateCommitComment(ctx *middleware.Context) {
if len(content) > 0 && lineRe.MatchString(line) { if len(content) > 0 && lineRe.MatchString(line) {
switch ctx.Params(":action") { switch ctx.Params(":action") {
case "new": case "new":
if comment, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, 0, commitId, line, models.COMMENT, content, nil); err != nil { if comment, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, 0, commitId, line, models.COMMENT_TYPE_COMMENT, content, nil); err != nil {
send(500, nil, err) send(500, nil, err)
return return
} }

Loading…
Cancel
Save