2022-10-11 04:42:03 +05:30
|
|
|
<div class="df ac fw">
|
|
|
|
{{range $term := .SearchResultLanguages}}
|
|
|
|
<a class="ui text-label df ac mr-1 my-1 {{if eq $.Language $term.Language}}primary {{end}}basic label" href="{{AppSubUrl}}{{if $.ContextUser}}/{{$.ContextUser.Name}}/-/code{{else}}/explore/code{{end}}?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}{{if ne $.queryType ""}}&t={{$.queryType}}{{end}}">
|
|
|
|
<i class="color-icon mr-3" style="background-color: {{$term.Color}}"></i>
|
|
|
|
{{$term.Language}}
|
|
|
|
<div class="detail">{{$term.Count}}</div>
|
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="repository search">
|
|
|
|
{{range $result := .SearchResults}}
|
|
|
|
{{$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">
|
2023-02-06 23:39:18 +05:30
|
|
|
<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a>
|
2022-10-11 04:42:03 +05:30
|
|
|
{{if $repo.IsArchived}}
|
|
|
|
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span>
|
|
|
|
{{end}}
|
|
|
|
- {{.Filename}}
|
|
|
|
</span>
|
2023-02-06 23:39:18 +05:30
|
|
|
<a class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{$.locale.Tr "repo.diff.view_file"}}</a>
|
2022-10-11 04:42:03 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
|
|
|
<div class="file-body file-code code-view">
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="lines-num">
|
|
|
|
{{range .LineNumbers}}
|
2023-02-06 23:39:18 +05:30
|
|
|
<a href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{$result.Filename | PathEscapeSegments}}#L{{.}}"><span>{{.}}</span></a>
|
2022-10-11 04:42:03 +05:30
|
|
|
{{end}}
|
|
|
|
</td>
|
|
|
|
<td class="lines-code chroma"><code class="code-inner">{{.FormattedLines | Safe}}</code></td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{template "shared/searchbottom" dict "root" $ "result" .}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|