Fork to maintain patches against the official gitea for https://code.ceondo.com https://github.com/go-gitea/gitea

search.tmpl 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {{template "base/head" .}}
  2. <div class="repository file list">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui repo-search">
  6. <form class="ui form" method="get">
  7. <div class="ui fluid action input">
  8. <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
  9. <button class="ui button" type="submit">
  10. <i class="search icon"></i>
  11. </button>
  12. </div>
  13. </form>
  14. </div>
  15. {{if .Keyword}}
  16. <h3>
  17. {{.i18n.Tr "repo.search.results" .Keyword .RepoLink .RepoName | Str2html}}
  18. </h3>
  19. <div class="repository search">
  20. {{range $result := .SearchResults}}
  21. <div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result">
  22. <h4 class="ui top attached normal header">
  23. <span class="file">{{.Filename}}</span>
  24. <a class="ui basic grey tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Filename}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
  25. </h4>
  26. <div class="ui attached table segment">
  27. <div class="file-body file-code code-view">
  28. <table>
  29. <tbody>
  30. <tr>
  31. <td class="lines-num">
  32. {{range .LineNumbers}}
  33. <a href="{{EscapePound $.SourcePath}}/{{EscapePound $result.Filename}}#L{{.}}"><span>{{.}}</span></a>
  34. {{end}}
  35. </td>
  36. <td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol class="linenums">{{.FormattedLines}}</ol></code></pre></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. </div>
  41. </div>
  42. </div>
  43. {{end}}
  44. </div>
  45. {{template "base/paginate" .}}
  46. {{end}}
  47. </div>
  48. </div>
  49. {{template "base/footer" .}}