summaryrefslogtreecommitdiffstats
path: root/routers/repo/commit.go
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2015-12-26 12:26:26 +0100
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-01-05 19:21:41 +0100
commit0df39b33ebcff50df537f4682a72dcc29f046d01 (patch)
tree9454f38fb3a9ce16d58d20dc9a9a7016dba3359f /routers/repo/commit.go
parent7392b6a755300e9f921535d2c1ec6358d4e8bfe8 (diff)
downloadgitea-0df39b33ebcff50df537f4682a72dcc29f046d01.tar.gz
gitea-0df39b33ebcff50df537f4682a72dcc29f046d01.zip
Implement Split Diff-View
- Unified/Inline Diff-View Selectable
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r--routers/repo/commit.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index 10c2f8a1c7..997c16183d 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -168,6 +168,7 @@ func Diff(ctx *middleware.Context) {
}
}
+ ctx.Data["Style"] = ctx.Query("style") == "split"
ctx.Data["Username"] = userName
ctx.Data["Reponame"] = repoName
ctx.Data["IsImageFile"] = commit.IsImageFile
@@ -213,6 +214,7 @@ func CompareDiff(ctx *middleware.Context) {
}
commits = models.ValidateCommitsWithEmails(commits)
+ ctx.Data["Style"] = ctx.Query("style") == "split"
ctx.Data["CommitRepoLink"] = ctx.Repo.RepoLink
ctx.Data["Commits"] = commits
ctx.Data["CommitCount"] = commits.Len()