diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-08-09 20:08:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 14:08:51 -0400 |
commit | d9ef43a7126ab83af563c1c9b54cdf0092327b2a (patch) | |
tree | fabc9a9d24d42bb0de6dd9557c9e07e95bd5722b /templates/repo/commits_list_small.tmpl | |
parent | 23d438f56524a7c3fc185df66d6d95f797a80eee (diff) | |
download | gitea-d9ef43a7126ab83af563c1c9b54cdf0092327b2a.tar.gz gitea-d9ef43a7126ab83af563c1c9b54cdf0092327b2a.zip |
Replace `list.List` with slices (#16311)
* Replaced list with slice.
* Fixed usage of pointer to temporary variable.
* Replaced LIFO list with slice.
* Lint
* Removed type check.
* Removed duplicated code.
* Lint
* Fixed merge.
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates/repo/commits_list_small.tmpl')
-rw-r--r-- | templates/repo/commits_list_small.tmpl | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/templates/repo/commits_list_small.tmpl b/templates/repo/commits_list_small.tmpl index acab040a45..bdbee816cc 100644 --- a/templates/repo/commits_list_small.tmpl +++ b/templates/repo/commits_list_small.tmpl @@ -1,7 +1,6 @@ -{{ $r:= List .comment.Commits}} {{ $index := 0}} <div class="timeline-item commits-list"> -{{range $r}} +{{range .comment.Commits}} {{ $tag := printf "%s-%d" $.comment.HashTag $index }} {{ $index = Add $index 1}} <div class="singular-commit" id="{{$tag}}"> @@ -15,9 +14,7 @@ {{end}} <span class="ui float right shabox"> - {{if eq (CommitType .) "SignCommitWithStatuses"}} - {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}} - {{end}} + {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}} {{$class := "ui sha label"}} {{if .Signature}} {{$class = (printf "%s%s" $class " isSigned")}} |