Rework blame template and styling (#11885)
* Rework blame template and styling * cleanup template and add missing NumLines Co-authored-by: techknowlogick <techknowlogick@gitea.io>tokarchuk/v1.17
parent
a7f7d1399f
commit
c8780984f8
@ -1,51 +1,37 @@ |
|||||||
<div class="tab-size-8 non-diff-file-content"> |
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content"> |
||||||
|
<h4 class="file-header ui top attached header"> |
||||||
<h4 class="ui top attached header" id="repo-read-file"> |
<div class="file-header-left"> |
||||||
<div class="ui stackable grid"> |
<div class="file-info text grey normal mono"> |
||||||
<div class="eight wide column"> |
<div class="file-info-entry"> |
||||||
<i class="file text outline icon ui left"></i> |
{{.NumLines}} {{.i18n.Tr (TrN .i18n.Lang .NumLines "repo.line" "repo.lines") }} |
||||||
<strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span> |
</div> |
||||||
|
<div class="file-info-entry">{{FileSize .FileSize}}</div> |
||||||
</div> |
</div> |
||||||
<div class="eight wide right aligned column"> |
</div> |
||||||
<div class="ui right file-actions"> |
<div class="file-header-right"> |
||||||
<div class="ui buttons"> |
<div class="ui right file-actions"> |
||||||
<a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> |
<div class="ui buttons"> |
||||||
{{if not .IsViewCommit}} |
<a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> |
||||||
<a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> |
{{if not .IsViewCommit}} |
||||||
{{end}} |
<a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> |
||||||
<a class="ui button" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.normal_view"}}</a> |
{{end}} |
||||||
<a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> |
<a class="ui button" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.normal_view"}}</a> |
||||||
</div> |
<a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> |
||||||
{{if .Repository.CanEnableEditor}} |
</div> |
||||||
{{if .CanEditFile}} |
|
||||||
<a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil" 16}}</span></a> |
|
||||||
{{else}} |
|
||||||
<span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil" 16}}</span> |
|
||||||
{{end}} |
|
||||||
{{if .CanDeleteFile}} |
|
||||||
<a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan" 16}}</span></a> |
|
||||||
{{else}} |
|
||||||
<span class="btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan" 16}}</span> |
|
||||||
{{end}} |
|
||||||
{{end}} |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</h4> |
</h4> |
||||||
|
|
||||||
<div class="ui attached table unstackable segment"> |
<div class="ui attached table unstackable segment"> |
||||||
<div class="file-view code-view"> |
<div class="file-view code-view"> |
||||||
<table> |
<table> |
||||||
<tbody> |
<tbody> |
||||||
<tr> |
<tr> |
||||||
<td class="lines-commit">{{.BlameCommitInfo}}</td> |
<td class="lines-commit">{{.BlameCommitInfo}}</td> |
||||||
<td class="lines-num">{{.BlameLineNums}}</td> |
<td class="lines-num">{{.BlameLineNums}}</td> |
||||||
<td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol class="linenums">{{.BlameContent}}</ol></code></pre></td> |
<td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol class="linenums">{{.BlameContent}}</ol></code></pre></td> |
||||||
</tr> |
</tr> |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
|
||||||
</div> |
</div> |
||||||
|
Loading…
Reference in new issue