appview/pages: show login/signup CTA in pulls submissions only once

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>

anirudh.fi 1abafd05 904c3497

verified
+4 -3
+4 -3
appview/pages/templates/repo/pulls/pull.html
··· 203 204 {{ define "submissions" }} 205 {{ $lastIdx := sub (len .Pull.Submissions) 1 }} 206 {{ range $ridx, $item := reverse .Pull.Submissions }} 207 {{ $idx := sub $lastIdx $ridx }} 208 {{ template "submission" (list $item $idx $lastIdx $) }} ··· 234 "ResubmitCheck" $root.ResubmitCheck 235 "BranchDeleteStatus" $root.BranchDeleteStatus 236 "Stack" $root.Stack) }} 237 - {{ else }} 238 - {{ template "loginPrompt" $ }} 239 {{ end }} 240 </div> 241 {{ end }} ··· 279 </span> 280 <span class="select-none before:content-['\00B7']"></span> 281 <a class="text-gray-500 dark:text-gray-400 hover:text-gray-500" href="#round-#{{ $round }}"> 282 - {{ template "repo/fragments/shortTimeAgo" $item.Created }} 283 </a> 284 </span> 285 <div class="flex gap-2 items-center">
··· 203 204 {{ define "submissions" }} 205 {{ $lastIdx := sub (len .Pull.Submissions) 1 }} 206 + {{ if not .LoggedInUser }} 207 + {{ template "loginPrompt" $ }} 208 + {{ end }} 209 {{ range $ridx, $item := reverse .Pull.Submissions }} 210 {{ $idx := sub $lastIdx $ridx }} 211 {{ template "submission" (list $item $idx $lastIdx $) }} ··· 237 "ResubmitCheck" $root.ResubmitCheck 238 "BranchDeleteStatus" $root.BranchDeleteStatus 239 "Stack" $root.Stack) }} 240 {{ end }} 241 </div> 242 {{ end }} ··· 280 </span> 281 <span class="select-none before:content-['\00B7']"></span> 282 <a class="text-gray-500 dark:text-gray-400 hover:text-gray-500" href="#round-#{{ $round }}"> 283 + {{ template "repo/fragments/shortTime" $item.Created }} 284 </a> 285 </span> 286 <div class="flex gap-2 items-center">