We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit d35844a5 authored by wolftune's avatar wolftune

Merge remote-tracking branch 'dlthomas/master'

parents 4d930877 321c4a8d
......@@ -124,11 +124,15 @@ makeCommentForestWidget
earlier_closures_map <- fetchCommentsAncestorClosuresDB root_ids
earlier_retracts_map <- fetchCommentsAncestorRetractsDB root_ids
user_map <- entitiesMap <$> fetchUsersInDB (S.toList $ makeCommentUsersSet all_comments)
claim_map <- makeClaimedTicketMapDB all_comment_ids
let claiming_users_set = S.fromList $ map ticketClaimingUser $ M.elems claim_map
user_map <- entitiesMap <$> fetchUsersInDB (S.toList $ makeCommentUsersSet all_comments <> claiming_users_set)
closure_map <- makeCommentClosingMapDB all_comment_ids
retract_map <- makeCommentRetractingMapDB all_comment_ids
ticket_map <- makeTicketMapDB all_comment_ids
claim_map <- makeClaimedTicketMapDB all_comment_ids
flag_map <- makeFlagMapDB all_comment_ids
return (children, user_map, earlier_closures_map, earlier_retracts_map,
......
......@@ -270,6 +270,7 @@ fetchProjectCommentsIncludingRethreadedBeforeDB project_id muser_id before lim =
ecp ^. EventCommentPostedTs <=. val before &&.
exprCommentProjectPermissionFilterIncludingRethreaded muser_id (val project_id) c &&.
c ^. CommentDiscussion `in_` valList project_discussions
orderBy [ desc $ ecp ^. EventCommentPostedTs, desc $ ecp ^. EventCommentPostedId ]
limit lim
return c
......@@ -284,6 +285,7 @@ fetchProjectCommentRethreadsBeforeDB project_id muser_id before lim = fetchProje
ecr ^. EventCommentRethreadedTs <=. val before &&.
exprCommentProjectPermissionFilter muser_id (val project_id) c &&.
c ^. CommentDiscussion `in_` valList project_discussions
orderBy [ desc $ ecr ^. EventCommentRethreadedTs, desc $ ecr ^. EventCommentRethreadedId ]
limit lim
return r
......@@ -296,6 +298,7 @@ fetchProjectWikiPagesBeforeDB project_id before lim =
where_ $
ewp ^. EventWikiPageTs <=. val before &&.
exprWikiPageOnProject wp project_id
orderBy [ desc $ ewp ^. EventWikiPageTs, desc $ ewp ^. EventWikiPageId ]
limit lim
return wp
......@@ -309,6 +312,7 @@ fetchProjectWikiEditsBeforeDB project_id before lim =
where_ $
ewe ^. EventWikiEditTs <=. val before &&.
exprWikiPageOnProject wp project_id
orderBy [ desc $ ewe ^. EventWikiEditTs, desc $ ewe ^. EventWikiEditId ]
limit lim
return we
......@@ -321,6 +325,7 @@ fetchProjectNewPledgesBeforeDB project_id before lim =
where_ $
enp ^. EventNewPledgeTs <=. val before &&.
sp ^. SharesPledgedProject ==. val project_id
orderBy [ desc $ enp ^. EventNewPledgeTs, desc $ enp ^. EventNewPledgeId ]
limit lim
return sp
......@@ -333,6 +338,7 @@ fetchProjectUpdatedPledgesBeforeDB project_id before lim = fmap (map (\(Value n,
where_ $
eup ^. EventUpdatedPledgeTs <=. val before &&.
sp ^. SharesPledgedProject ==. val project_id
orderBy [ desc $ eup ^. EventUpdatedPledgeTs, desc $ eup ^. EventUpdatedPledgeId ]
limit lim
return (eup ^. EventUpdatedPledgeOldShares, sp)
......@@ -344,6 +350,7 @@ fetchProjectDeletedPledgesBeforeDB project_id before lim = fmap (map entityVal)
where_ $
edp ^. EventDeletedPledgeTs <=. val before &&.
edp ^. EventDeletedPledgeProject ==. val project_id
orderBy [ desc $ edp ^. EventDeletedPledgeTs, desc $ edp ^. EventDeletedPledgeId ]
limit lim
return edp
......
......@@ -438,6 +438,13 @@ commentWidget (Entity comment_id comment)
M.lookup comment_id <$>
(fetchCommentCommentTagsDB comment_id >>= buildAnnotatedCommentTagsDB mviewer_id)
user_map <- case mclaim of
Nothing -> return M.empty
Just claim -> do
let claiming_user_id = ticketClaimingUser claim
Just claiming_user <- runDB $ get claiming_user_id
return $ M.singleton claiming_user_id claiming_user
let ticket_str = case mticket of
Just (Entity (Key (PersistInt64 tid)) _) -> T.pack $ show tid
_ -> "???"
......
......@@ -39,18 +39,20 @@
$else
$maybe claim <- mclaim
<span .claimed-by>
claimed
^{renderTime (ticketClaimingTs claim)}
by
<a href="@{UserR user_id}">#{userDisplayName (Entity user_id user)}#
$maybe note <- ticketClaimingNote claim
: #{note}
$if can_unclaim
<div :is_preview:.preview .comment-action>
<a href="@{comment_route_unclaim comment_id}">
(unclaim)
$with claiming_user_id <- ticketClaimingUser claim
$maybe claiming_user <- M.lookup claiming_user_id user_map
<span .claimed-by>
claimed
^{renderTime (ticketClaimingTs claim)}
by
<a href="@{UserR claiming_user_id}">#{userDisplayName $ Entity claiming_user_id claiming_user}#
$maybe note <- ticketClaimingNote claim
: #{note}
$if can_unclaim
<div :is_preview:.preview .comment-action>
<a href="@{comment_route_unclaim comment_id}">
(unclaim)
$if is_unapproved
<div .awaiting-approval>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment