Skip to content

Commit f08b007

Browse files
committed
change format
1 parent d83421e commit f08b007

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

templates/code/searchresults.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
2323
</h4>
2424
<div class="ui attached table segment">
25-
{{template "shared/searchfile" dict "repolink" $repo.Link "result" .}}
25+
{{template "shared/searchfile" dict "RepoLink" $repo.Link "SearchResult" .}}
2626
</div>
2727
{{template "shared/searchbottom" dict "root" $ "result" .}}
2828
</div>

templates/repo/search.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<a role="button" class="ui basic tiny button" rel="nofollow" href="{{$.SourcePath}}/src/commit/{{PathEscape $result.CommitID}}/{{PathEscapeSegments .Filename}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
4545
</h4>
4646
<div class="ui attached table segment">
47-
{{template "shared/searchfile" dict "repolink" $.SourcePath "result" .}}
47+
{{template "shared/searchfile" dict "RepoLink" $.SourcePath "SearchResult" .}}
4848
</div>
4949
{{template "shared/searchbottom" dict "root" $ "result" .}}
5050
</div>

templates/shared/searchfile.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<div class="file-body file-code code-view">
22
<table>
33
<tbody>
4-
{{range .result.Lines}}
4+
{{range .SearchResult.Lines}}
55
<tr>
66
<td class="lines-num">
7-
<a href="{{$.repolink}}/src/commit/{{PathEscape $.result.CommitID}}/{{PathEscapeSegments $.result.Filename}}#L{{.Num}}"><span>{{.Num}}</span></a>
7+
<a href="{{$.RepoLink}}/src/commit/{{PathEscape $.SearchResult.CommitID}}/{{PathEscapeSegments $.SearchResult.Filename}}#L{{.Num}}"><span>{{.Num}}</span></a>
88
</td>
99
<td class="lines-code chroma"><code class="code-inner">{{.FormattedContent}}</code></td>
1010
</tr>

0 commit comments

Comments
 (0)