@@ -76,6 +76,7 @@ import qualified Text.XHtml.Strict as XHtml
76
76
import Text.XHtml.Table (simpleTable )
77
77
import Distribution.PackageDescription (hasLibs )
78
78
import Distribution.PackageDescription.Configuration (flattenPackageDescription )
79
+ import Distribution.Server.Pages.Group (listGroupCompact )
79
80
80
81
81
82
-- TODO: move more of the below to Distribution.Server.Pages.*, it's getting
@@ -590,6 +591,7 @@ mkHtmlCore ServerEnv{serverBaseURI, serverBlobStore}
590
591
docURL = packageDocsContentUri docs realpkg
591
592
execs = rendExecNames render
592
593
pkgdesc = flattenPackageDescription $ pkgDesc pkg
594
+ maintainers = maintainersGroup pkgname
593
595
594
596
prefInfo <- queryGetPreferredInfo pkgname
595
597
distributions <- queryPackageStatus pkgname
@@ -611,6 +613,8 @@ mkHtmlCore ServerEnv{serverBaseURI, serverBlobStore}
611
613
mdocIndex <- maybe (return Nothing )
612
614
(liftM Just . liftIO . cachedTarIndex) mdoctarblob
613
615
analyticsPixels <- getPackageAnalyticsPixels pkgname
616
+ userDb <- queryGetUserDb
617
+ maintainerlist <- liftIO $ queryUserGroup maintainers
614
618
let
615
619
idAndReport = fmap (\ (rptId, rpt, _) -> (rptId, rpt)) rptStats
616
620
install = getInstall $ fmap (fst &&& BR. installOutcome . snd ) idAndReport
@@ -661,6 +665,7 @@ mkHtmlCore ServerEnv{serverBaseURI, serverBlobStore}
661
665
, " candidates" $= case candidates of
662
666
[] -> [ toHtml " No Candidates" ]
663
667
_ -> [ PagesNew. commaList $ flip map candidates $ \ cand -> anchor ! [href $ corePackageIdUri candidatesCore " " $ packageId cand] << display (packageVersion cand) ]
668
+ , " maintainers" $= listGroupCompact (map (Users. userIdToName userDb) (Group. toList maintainerlist))
664
669
] ++
665
670
-- Items not related to IO (mostly pure functions)
666
671
PagesNew. packagePageTemplate render
@@ -1118,7 +1123,7 @@ mkHtmlCandidates utilities@HtmlUtilities{..}
1118
1123
DocumentationFeature {documentationResource, queryDocumentation,.. }
1119
1124
TarIndexCacheFeature {cachedTarIndex}
1120
1125
PackageCandidatesFeature {.. }
1121
- UserFeature { guardAuthorised, guardAuthorised_ }
1126
+ UserFeature { guardAuthorised, guardAuthorised_, queryGetUserDb }
1122
1127
templates = HtmlCandidates {.. }
1123
1128
where
1124
1129
candidates = candidatesResource
@@ -1277,10 +1282,15 @@ mkHtmlCandidates utilities@HtmlUtilities{..}
1277
1282
[] -> []
1278
1283
warn -> [thediv ! [theclass " candidate-warn" ] << [paragraph << strong (toHtml " Warnings:" ), unordList warn]]
1279
1284
1285
+ let maintainers = maintainersGroup pkgname
1286
+ userDb <- queryGetUserDb
1287
+ maintainerlist <- liftIO $ queryUserGroup maintainers
1288
+
1280
1289
return $ toResponse . template $
1281
1290
[ " versions" $= (PagesNew. renderVersion (packageId cand) (classifyVersions prefInfo $ insert version otherVersions) Nothing )
1282
1291
, " maintainHtml" $= [maintainHtml]
1283
1292
, " warningBox" $= warningBox
1293
+ , " maintainers" $= listGroupCompact (map (Users. userIdToName userDb) (Group. toList maintainerlist))
1284
1294
] ++
1285
1295
PagesNew. packagePageTemplate render
1286
1296
mdocIndex Nothing mreadme
0 commit comments