From 311ce2d1d06c26d0d5a3b745493995813e2ea6f2 Mon Sep 17 00:00:00 2001 From: Mario Lubenka Date: Fri, 7 Jun 2019 22:29:29 +0200 Subject: Compare branches, commits and tags with each other (#6991) * Supports tags when comparing commits or branches Signed-off-by: Mario Lubenka * Hide headline when only comparing and don't load unused data Signed-off-by: Mario Lubenka * Merges compare logics to allow comparing branches, commits and tags with eachother Signed-off-by: Mario Lubenka * Display branch or tag instead of commit when used for comparing Signed-off-by: Mario Lubenka * Show pull request form after click on button Signed-off-by: Mario Lubenka * Transfers relevant pull.go changes from master to compare.go Signed-off-by: Mario Lubenka * Fixes error when comparing forks against a commit or tag Signed-off-by: Mario Lubenka * Removes console.log from JavaScript file Signed-off-by: Mario Lubenka * Show icon next to commit reference when comparing branch or tag Signed-off-by: Mario Lubenka * Updates css file Signed-off-by: Mario Lubenka * Fixes import order * Renames template variable * Update routers/repo/compare.go Co-Authored-By: zeripath * Update from master Signed-off-by: Mario Lubenka * Allow short-shas in compare * Renames prInfo to compareInfo Signed-off-by: Mario Lubenka * Check PR permissions only if compare is pull request Signed-off-by: Mario Lubenka * Adjusts comment Signed-off-by: Mario Lubenka * Use compareInfo instead of prInfo --- templates/repo/commits_table.tmpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'templates/repo/commits_table.tmpl') diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 66bfd0d831..10f4b60483 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -1,13 +1,13 @@

-
+
{{if or .PageIsCommits (gt .CommitCount 0)}} {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}} {{else}} {{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}} {{end}}
-