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/user/dashboard | |
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/user/dashboard')
-rw-r--r-- | templates/user/dashboard/feeds.tmpl | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index 745fb1ec63..1b770d4472 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -89,17 +89,15 @@ <ul> {{ $push := ActionContent2Commits .}} {{ $repoLink := .GetRepoLink}} - {{if $push.Commits}} - {{range $push.Commits}} - {{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}} - <li> - {{avatarHTML ($push.AvatarLink .AuthorEmail) 16 "mr-2" .AuthorName}} - <a class="commit-id mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a> - <span class="text truncate light grey"> - {{RenderCommitMessage .Message $repoLink $.ComposeMetas}} - </span> - </li> - {{end}} + {{range $push.Commits}} + {{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}} + <li> + {{avatarHTML ($push.AvatarLink .AuthorEmail) 16 "mr-2" .AuthorName}} + <a class="commit-id mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a> + <span class="text truncate light grey"> + {{RenderCommitMessage .Message $repoLink $.ComposeMetas}} + </span> + </li> {{end}} {{if and (gt (len $push.Commits) 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.i18n.Tr "action.compare_commits" (len $push.Commits)}} ยป</a></li>{{end}} </ul> |