Add Mailto link for mailing to all maintainers (#341)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
6bce11114d
commit
c402d7819a
|
@ -396,6 +396,18 @@ viewResultItem channel showInstallDetails show item =
|
|||
]
|
||||
]
|
||||
|
||||
mailtoAllMaintainers maintainers =
|
||||
let
|
||||
maintainerMails = List.filterMap (\m -> m.email) maintainers
|
||||
in
|
||||
li []
|
||||
[ a
|
||||
[ href <|
|
||||
("mailto:" ++ String.join "," maintainerMails)
|
||||
]
|
||||
[ text "Mail to all maintainers" ]
|
||||
]
|
||||
|
||||
showPlatform platform =
|
||||
case Search.channelDetailsFromId channel of
|
||||
Just channelDetails ->
|
||||
|
@ -421,7 +433,11 @@ viewResultItem channel showInstallDetails show item =
|
|||
[ p [] [ text "This package has no maintainers." ] ]
|
||||
|
||||
else
|
||||
[ ul [] (List.map showMaintainer item.source.maintainers) ]
|
||||
[ ul []
|
||||
(List.singleton (mailtoAllMaintainers item.source.maintainers)
|
||||
|> List.append (List.map showMaintainer item.source.maintainers)
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
, div []
|
||||
|
|
Loading…
Reference in a new issue