summaryrefslogtreecommitdiffstats
path: root/templates/user/dashboard
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-08-09 20:08:51 +0200
committerGitHub <noreply@github.com>2021-08-09 14:08:51 -0400
commitd9ef43a7126ab83af563c1c9b54cdf0092327b2a (patch)
treefabc9a9d24d42bb0de6dd9557c9e07e95bd5722b /templates/user/dashboard
parent23d438f56524a7c3fc185df66d6d95f797a80eee (diff)
downloadgitea-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.tmpl20
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>