You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

blame.tmpl 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <div class="tab-size-8 non-diff-file-content">
  2. <h4 class="ui top attached header" id="repo-read-file">
  3. <div class="ui stackable grid">
  4. <div class="ten wide column">
  5. <i class="file text outline icon ui left"></i>
  6. <strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span>
  7. </div>
  8. <div class="six wide right aligned column">
  9. <div class="ui right file-actions">
  10. <div class="ui buttons">
  11. {{if not .IsViewCommit}}
  12. <a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
  13. {{end}}
  14. <a class="ui button" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.normal_view"}}</a>
  15. <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
  16. <a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
  17. </div>
  18. {{if .Repository.CanEnableEditor}}
  19. {{if .CanEditFile}}
  20. <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-pencil btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
  21. {{else}}
  22. <i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
  23. {{end}}
  24. {{if .CanDeleteFile}}
  25. <a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-trashcan btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
  26. {{else}}
  27. <i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
  28. {{end}}
  29. {{end}}
  30. </div>
  31. </div>
  32. </div>
  33. </h4>
  34. <div class="ui attached table unstackable segment">
  35. <div class="file-view code-view has-emoji">
  36. <table>
  37. <tbody>
  38. <tr>
  39. <td class="lines-commit">{{.BlameCommitInfo}}</td>
  40. <td class="lines-num">{{.BlameLineNums}}</td>
  41. <td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol class="linenums">{{.BlameContent}}</ol></code></pre></td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </div>
  46. </div>
  47. </div>