Skip to content

Commit fcc1125

Browse files
jpraetlafriks
andauthored
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 <[email protected]>
1 parent 371ebce commit fcc1125

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

templates/explore/code.tmpl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@
3737
{{$repo := (index $.RepoMaps .RepoID)}}
3838
<div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result">
3939
<h4 class="ui top attached normal header">
40-
<span class="file"><a rel="nofollow" href="{{$repo.HTMLURL}}">{{$repo.FullName}}</a> - {{.Filename}}</span>
40+
<span class="file">
41+
<a rel="nofollow" href="{{$repo.HTMLURL}}">{{$repo.FullName}}</a>
42+
{{if $repo.IsArchived}}
43+
<span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span>
44+
{{end}}
45+
- {{.Filename}}
46+
</span>
4147
<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>
4248
</h4>
4349
<div class="ui attached table segment">

0 commit comments

Comments
 (0)