diff options
author | Jimmy Praet <jimmy.praet@telenet.be> | 2021-11-26 09:49:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 16:49:31 +0800 |
commit | fcc11253ac34bdee98dce8a5dae74d5bf483fa6e (patch) | |
tree | ab5ebfed207af3a98491ffc66e31a78918992429 /templates/explore | |
parent | 371ebce2524f013986401af84732fb27bdbc4f96 (diff) | |
download | gitea-fcc11253ac34bdee98dce8a5dae74d5bf483fa6e.tar.gz gitea-fcc11253ac34bdee98dce8a5dae74d5bf483fa6e.zip |
Add archived label for code search results in archived repo's (#17817)
* Add archived label for code search results in archived repo's
* Remove trailing whitespace
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates/explore')
-rw-r--r-- | templates/explore/code.tmpl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl index 29d4075cce..573c096f83 100644 --- a/templates/explore/code.tmpl +++ b/templates/explore/code.tmpl @@ -37,7 +37,13 @@ {{$repo := (index $.RepoMaps .RepoID)}} <div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result"> <h4 class="ui top attached normal header"> - <span class="file"><a rel="nofollow" href="{{$repo.HTMLURL}}">{{$repo.FullName}}</a> - {{.Filename}}</span> + <span class="file"> + <a rel="nofollow" href="{{$repo.HTMLURL}}">{{$repo.FullName}}</a> + {{if $repo.IsArchived}} + <span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span> + {{end}} + - {{.Filename}} + </span> <a class="ui basic tiny button" rel="nofollow" href="{{$repo.HTMLURL}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> </h4> <div class="ui attached table segment"> |