From 527bbf67e85ea20a35269c4d700cdcb04c65aaab Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 15 Mar 2023 05:34:05 -0400 Subject: [PATCH] Fix 'View File' button in code search (#23478) (#23483) Backport #23478 by @silverwind - Right-align 'View File' button - Add 'role' attribute to button link Before: Screenshot 2023-03-14 at 22 02 16 After: Screenshot 2023-03-14 at 22 02 33 Co-authored-by: silverwind Co-authored-by: Lunny Xiao Co-authored-by: KN4CK3R --- templates/code/searchresults.tmpl | 6 +++--- templates/repo/search.tmpl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/code/searchresults.tmpl b/templates/code/searchresults.tmpl index 74721a5a6..684e2860b 100644 --- a/templates/code/searchresults.tmpl +++ b/templates/code/searchresults.tmpl @@ -11,15 +11,15 @@ {{range $result := .SearchResults}} {{$repo := (index $.RepoMaps .RepoID)}}
-

- +

+ {{$repo.FullName}} {{if $repo.IsArchived}} {{$.locale.Tr "repo.desc.archived"}} {{end}} - {{.Filename}} - {{$.locale.Tr "repo.diff.view_file"}} + {{$.locale.Tr "repo.diff.view_file"}}

diff --git a/templates/repo/search.tmpl b/templates/repo/search.tmpl index 21f758e4a..ff4e218e2 100644 --- a/templates/repo/search.tmpl +++ b/templates/repo/search.tmpl @@ -39,9 +39,9 @@