From 0fad1e7c393cbe8ff372b71ccafa9df26fe37af4 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Thu, 31 Jul 2025 11:58:35 +0100 Subject: [PATCH] appview/pages: simplify styles in all pulls page Change-Id: nmxxwsqslknmwlqqyywstorwzosqzkzl Signed-off-by: oppiliappan --- appview/pages/templates/repo/pulls/pulls.html | 82 ++++++++----------- 1 file changed, 33 insertions(+), 49 deletions(-) diff --git a/appview/pages/templates/repo/pulls/pulls.html b/appview/pages/templates/repo/pulls/pulls.html index 7836be2..43d35fd 100644 --- a/appview/pages/templates/repo/pulls/pulls.html +++ b/appview/pages/templates/repo/pulls/pulls.html @@ -83,63 +83,47 @@ {{ template "repo/fragments/time" .Created }} + + {{ $latestRound := .LastRoundNumber }} + {{ $lastSubmission := index .Submissions $latestRound }} + - targeting - - {{ .TargetBranch }} - - - {{ if not .IsPatchBased }} - from - - {{ if .IsForkBased }} - {{ if .PullSource.Repo }} - {{ $owner }}/{{ .PullSource.Repo.Name }}: - {{- else -}} - [deleted fork] - {{- end -}} - {{- end -}} - {{- .PullSource.Branch -}} + {{ $commentCount := len $lastSubmission.Comments }} + {{ $s := "s" }} + {{ if eq $commentCount 1 }} + {{ $s = "" }} + {{ end }} + + {{ len $lastSubmission.Comments}} comment{{$s}} - {{ end }} - - {{ $latestRound := .LastRoundNumber }} - {{ $lastSubmission := index .Submissions $latestRound }} - round - - #{{ .LastRoundNumber }} - - {{ $commentCount := len $lastSubmission.Comments }} - {{ $s := "s" }} - {{ if eq $commentCount 1 }} - {{ $s = "" }} - {{ end }} - {{ if eq $commentCount 0 }} - awaiting comments - {{ else }} - recieved {{ len $lastSubmission.Comments}} comment{{$s}} - {{ end }} + + round + + #{{ .LastRoundNumber }} +

{{ if .StackId }} {{ $otherPulls := index $.Stacks .StackId }} -
- - {{ $s := "s" }} - {{ if eq (len $otherPulls) 1 }} - {{ $s = "" }} - {{ end }} -
- {{ i "chevrons-up-down" "w-4 h-4" }} expand {{ len $otherPulls }} pull{{$s}} in this stack -
- -
- {{ block "pullList" (list $otherPulls $) }} {{ end }} -
+ {{ if gt (len $otherPulls) 0 }} +
+ + {{ $s := "s" }} + {{ if eq (len $otherPulls) 1 }} + {{ $s = "" }} + {{ end }} +
+ {{ i "chevrons-up-down" "w-4 h-4" }} expand {{ len $otherPulls }} pull{{$s}} in this stack +
+ +
+ {{ block "pullList" (list $otherPulls $) }} {{ end }} +
+ {{ end }} {{ end }} {{ end }} -- 2.43.0