aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-07-08 01:27:00 +0000
committerMax Magorsch <arzano@gentoo.org>2020-07-08 01:27:00 +0000
commita75c412644372d9c588f29c83127e865fc4e4b6c (patch)
tree7c575e1f3ea7401719b02890fed9f73c8d043503 /web
parentGo fmt the project (diff)
downloadsoko-a75c412644372d9c588f29c83127e865fc4e4b6c.tar.gz
soko-a75c412644372d9c588f29c83127e865fc4e4b6c.tar.bz2
soko-a75c412644372d9c588f29c83127e865fc4e4b6c.zip
Fix duplicatedly displayed pull requests
So far pull requests were displayed multiple times on the maintianer page if they affected more than one package. This has been fixed in this commit. Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'web')
-rw-r--r--web/templates/maintainer/components/pullrequests.tmpl56
1 files changed, 27 insertions, 29 deletions
diff --git a/web/templates/maintainer/components/pullrequests.tmpl b/web/templates/maintainer/components/pullrequests.tmpl
index 1c786bc..3cf8d8e 100644
--- a/web/templates/maintainer/components/pullrequests.tmpl
+++ b/web/templates/maintainer/components/pullrequests.tmpl
@@ -8,38 +8,36 @@
<h3 class="mb-4">Pull Requests</h3>
<ul class="list-group">
- {{range .Packages}}
- {{range .PullRequests}}
+ {{range getPullRequests .Packages}}
- <li class="list-group-item">
- <div class="row">
- <div class="col-md-11">
- <span class="octicon octicon-git-pull-request opticon-resource-icon ml-1" style="color:SeaGreen;"></span>
- <a href="https://github.com/gentoo/gentoo/pull/{{.Id}}" class="text-dark"><b>{{.Title}}</b></a>
- {{if eq .CiState "SUCCESS"}}
- <a href="{{.CiStateLink}}"><i class="fa fa-check mx-1" aria-hidden="true" style="color: SeaGreen;"></i></a>
- {{else}}
- <a href="{{.CiStateLink}}"><i class="fa fa-times mx-1" aria-hidden="true" style="color: #b60205;"></i></a>
- {{end}}
- {{range .Labels}}
- <span class="badge badge-pill badge-light p-1" style="font-weight: normal; {{if eq .Color "5319e7" "0052cc" "b60205"}}color:#FFF;{{end}} background-color: #{{.Color}}!important;">{{.Name}}</span>
- {{end}}
- </div>
- <div class="col-md-1 text-right">
- <a href="https://github.com/gentoo/gentoo/pull/{{.Id}}" class="text-muted">
- <i class="fa fa-comment-o" aria-hidden="true"></i>
- {{.Comments}}
- </a>
- </div>
- <div class="col-md-12 text-muted">
- <span style="font-size: 90%;">
- #{{.Id}} opened {{.CreatedAt}} by {{.Author}}
- </span>
- </div>
+ <li class="list-group-item">
+ <div class="row">
+ <div class="col-md-11">
+ <span class="octicon octicon-git-pull-request opticon-resource-icon ml-1" style="color:SeaGreen;"></span>
+ <a href="https://github.com/gentoo/gentoo/pull/{{.Id}}" class="text-dark"><b>{{.Title}}</b></a>
+ {{if eq .CiState "SUCCESS"}}
+ <a href="{{.CiStateLink}}"><i class="fa fa-check mx-1" aria-hidden="true" style="color: SeaGreen;"></i></a>
+ {{else}}
+ <a href="{{.CiStateLink}}"><i class="fa fa-times mx-1" aria-hidden="true" style="color: #b60205;"></i></a>
+ {{end}}
+ {{range .Labels}}
+ <span class="badge badge-pill badge-light p-1" style="font-weight: normal; {{if eq .Color "5319e7" "0052cc" "b60205"}}color:#FFF;{{end}} background-color: #{{.Color}}!important;">{{.Name}}</span>
+ {{end}}
</div>
- </li>
+ <div class="col-md-1 text-right">
+ <a href="https://github.com/gentoo/gentoo/pull/{{.Id}}" class="text-muted">
+ <i class="fa fa-comment-o" aria-hidden="true"></i>
+ {{.Comments}}
+ </a>
+ </div>
+ <div class="col-md-12 text-muted">
+ <span style="font-size: 90%;">
+ #{{.Id}} opened {{.CreatedAt}} by {{.Author}}
+ </span>
+ </div>
+ </div>
+ </li>
- {{end}}
{{end}}
</ul>