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

Commit 1697eecf authored by David L. L. Thomas's avatar David L. L. Thomas

Unlisted project support.

parent ef13d097
......@@ -191,7 +191,7 @@ projectDiscussionPage project_handle widget = do
getProjectsR :: Handler Html
getProjectsR = do
projects <- runDB fetchAllProjectsDB
projects <- runDB fetchPublicProjectsDB
defaultLayout $ do
setTitle "Projects | Snowdrift.coop"
$(widgetFile "projects")
......
module Model.Project
( ProjectSummary(..)
, UpdateProject(..)
, fetchAllProjectsDB
, fetchPublicProjectsDB
, fetchProjectCommentRethreadsBeforeDB
, fetchProjectCommentsIncludingRethreadedBeforeDB
, fetchProjectDeletedPledgesBeforeDB
......@@ -109,8 +109,10 @@ ticketToOrderable (TaggedTicket ((Entity _ ticket),tags)) = Orderable has_tag ge
--------------------------------------------------------------------------------
-- Database actions
fetchAllProjectsDB :: DB [Entity Project]
fetchAllProjectsDB = select (from return)
fetchPublicProjectsDB :: DB [Entity Project]
fetchPublicProjectsDB = select $ from $ \ p -> do
where_ $ p ^. ProjectPublic
return p
insertProjectPledgeDB :: UserId
-> ProjectId
......
......@@ -95,6 +95,7 @@ Project
lastPayday PaydayId Maybe
githubRepo Text Maybe
discussion DiscussionId default=nextval('discussion_id_seq'::regclass)
public Bool default='t'
UniqueProjectAccount account
UniqueProjectHandle handle
......
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