mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:10:50 +00:00
simplify template
This commit is contained in:
parent
ed15c92668
commit
4a061ca26c
4 changed files with 6 additions and 6 deletions
|
@ -24,10 +24,10 @@
|
|||
{{else}}
|
||||
<span class="file gt-f1">{{.Filename}}</span>
|
||||
{{end}}
|
||||
<a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/{{if eq $.CodeIndexerEnabled false}}branch{{else}}commit{{end}}/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
|
||||
<a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/{{if $.CodeIndexerDisabled}}branch{{else}}commit{{end}}/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
{{template "shared/searchfile" dict "RepoLink" $repo.Link "CodeIndexerEnabled" $.CodeIndexerEnabled "SearchResult" .}}
|
||||
{{template "shared/searchfile" dict "RepoLink" $repo.Link "CodeIndexerDisabled" $.CodeIndexerDisabled "SearchResult" .}}
|
||||
</div>
|
||||
{{template "shared/searchbottom" dict "root" $ "result" .}}
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<form class="ui form ignore-dirty">
|
||||
{{if ne $.CodeIndexerEnabled false}}
|
||||
{{if not $.CodeIndexerDisabled}}
|
||||
{{template "shared/search/combo_fuzzy" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable "IsFuzzy" .IsFuzzy "Placeholder" (ctx.Locale.Tr "search.code_kind")}}
|
||||
{{else}}
|
||||
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.code_kind")}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue