From b0c62846f10dfe91481371d3d7e1860d292d1058 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 26 Aug 2022 21:07:06 +0800 Subject: [PATCH 1/7] Fix download archiver of a commit (#20962) --- modules/context/repo.go | 1 + templates/repo/home.tmpl | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/context/repo.go b/modules/context/repo.go index 1e0f6461a28f4..5404acc05a3a6 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -987,6 +987,7 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context } ctx.Data["BranchName"] = ctx.Repo.BranchName + ctx.Data["RefName"] = ctx.Repo.RefName ctx.Data["BranchNameSubURL"] = ctx.Repo.BranchNameSubURL() ctx.Data["TagName"] = ctx.Repo.TagName ctx.Data["CommitID"] = ctx.Repo.CommitID diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 7b74c1cc76e75..fd1b60bef8284 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -121,9 +121,9 @@ {{svg "octicon-download"}} From 94549bcd115e4b6da9f636293e50f65c708df681 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 26 Aug 2022 18:49:40 +0200 Subject: [PATCH 2/7] Change review buttons to icons to make space for text (#20934) The layout on the review code view was broken depending on length of the text. Change all three buttons to icons with tooltip to make more space for these long texts. Fixes: #20922 --- public/img/svg/gitea-join.svg | 1 + public/img/svg/gitea-split.svg | 1 + public/img/svg/gitea-whitespace.svg | 1 + templates/repo/diff/box.tmpl | 4 ++-- templates/repo/diff/new_review.tmpl | 2 +- templates/repo/diff/options_dropdown.tmpl | 5 ++--- templates/repo/diff/whitespace_dropdown.tmpl | 6 +++--- web_src/less/_base.less | 6 ++++++ web_src/svg/gitea-join.svg | 1 + web_src/svg/gitea-split.svg | 1 + web_src/svg/gitea-whitespace.svg | 1 + 11 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 public/img/svg/gitea-join.svg create mode 100644 public/img/svg/gitea-split.svg create mode 100644 public/img/svg/gitea-whitespace.svg create mode 100644 web_src/svg/gitea-join.svg create mode 100644 web_src/svg/gitea-split.svg create mode 100644 web_src/svg/gitea-whitespace.svg diff --git a/public/img/svg/gitea-join.svg b/public/img/svg/gitea-join.svg new file mode 100644 index 0000000000000..678b9374f7313 --- /dev/null +++ b/public/img/svg/gitea-join.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/gitea-split.svg b/public/img/svg/gitea-split.svg new file mode 100644 index 0000000000000..f819255cca68f --- /dev/null +++ b/public/img/svg/gitea-split.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/gitea-whitespace.svg b/public/img/svg/gitea-whitespace.svg new file mode 100644 index 0000000000000..6b34f33736ff4 --- /dev/null +++ b/public/img/svg/gitea-whitespace.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 464b1359d8247..35b8b3956da74 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -13,14 +13,14 @@

{{.locale.Tr "repo.diff.data_not_available"}}

{{else}}
-
+
{{svg "octicon-diff" 16 "mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} -