diff --git a/routers/web/repo/editor.go b/routers/web/repo/editor.go index 474f7ff1da4..474d7503e4c 100644 --- a/routers/web/repo/editor.go +++ b/routers/web/repo/editor.go @@ -419,11 +419,9 @@ func DiffPreviewPost(ctx *context.Context) { return } - if diff.NumFiles == 0 { - ctx.PlainText(http.StatusOK, ctx.Locale.TrString("repo.editor.no_changes_to_show")) - return + if diff.NumFiles != 0 { + ctx.Data["File"] = diff.Files[0] } - ctx.Data["File"] = diff.Files[0] ctx.HTML(http.StatusOK, tplEditDiffPreview) } diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 7e9a59a6bfb..5433f01530f 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -8,7 +8,7 @@
{{template "org/team/navbar" .}} {{if .IsOrganizationOwner}} -
+
{{.CsrfTokenHtml}} @@ -21,7 +21,7 @@
{{end}} -
+
{{range .Team.Members}}
diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl index 8f2571e1f6a..9704f63f6fb 100644 --- a/templates/org/team/navbar.tmpl +++ b/templates/org/team/navbar.tmpl @@ -1,4 +1,4 @@ -
{{end}} -
+
{{range .Team.Repos}}
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 938d93b323a..b8195ac5449 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -139,7 +139,7 @@ {{end}} {{template "repo/commit_load_branches_and_tags" .}}
-
+
{{if .Author}} {{ctx.AvatarUtils.Avatar .Author 28 "tw-mr-2"}} diff --git a/templates/repo/editor/diff_preview.tmpl b/templates/repo/editor/diff_preview.tmpl index e2e922be343..fd543a5ab96 100644 --- a/templates/repo/editor/diff_preview.tmpl +++ b/templates/repo/editor/diff_preview.tmpl @@ -1,3 +1,4 @@ +{{if .File}}
@@ -9,3 +10,8 @@
+{{else}} +
+ {{ctx.Locale.Tr "repo.editor.no_changes_to_show"}} +
+{{end}} diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl index d52e5a047ab..ae3f12669c2 100644 --- a/templates/repo/editor/edit.tmpl +++ b/templates/repo/editor/edit.tmpl @@ -26,14 +26,14 @@
-