Add "about" field to person table, display in person page
This commit is contained in:
parent
e9ac361f27
commit
577df6ddcf
4 changed files with 18 additions and 2 deletions
|
@ -33,6 +33,7 @@ Person
|
|||
verifiedKeyCreated UTCTime
|
||||
resetPassKey Text
|
||||
resetPassKeyCreated UTCTime
|
||||
about Text
|
||||
|
||||
UniquePersonIdent ident
|
||||
UniquePersonLogin login
|
||||
|
|
|
@ -487,7 +487,18 @@ instance AccountDB AccountPersistDB' where
|
|||
return $ Left $ mr $ MsgUsernameExists name
|
||||
Right sid -> do
|
||||
let defTime = UTCTime (ModifiedJulianDay 0) 0
|
||||
person = Person sid name pwd email False key now "" defTime
|
||||
person = Person
|
||||
{ personIdent = sid
|
||||
, personLogin = name
|
||||
, personPassphraseHash = pwd
|
||||
, personEmail = email
|
||||
, personVerified = False
|
||||
, personVerifiedKey = key
|
||||
, personVerifiedKeyCreated = now
|
||||
, personResetPassKey = ""
|
||||
, personResetPassKeyCreated = defTime
|
||||
, personAbout = ""
|
||||
}
|
||||
pid <- insert person
|
||||
return $ Right $ Entity pid person
|
||||
|
||||
|
|
|
@ -132,6 +132,8 @@ changes =
|
|||
, renameField "ProjectCollabAnon" "repo" "project"
|
||||
-- 24
|
||||
, renameField "ProjectCollabUser" "repo" "project"
|
||||
-- 25
|
||||
, addFieldPrimRequired "Person" ("" :: Text) "about"
|
||||
]
|
||||
|
||||
migrateDB :: MonadIO m => ReaderT SqlBackend m (Either Text (Int, Int))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$# This file is part of Vervis.
|
||||
$#
|
||||
$# Written in 2016, 2018 by fr33domlover <fr33domlover@riseup.net>.
|
||||
$# Written in 2016, 2018, 2019 by fr33domlover <fr33domlover@riseup.net>.
|
||||
$#
|
||||
$# ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
$#
|
||||
|
@ -14,6 +14,8 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|||
|
||||
^{avatarW secure $ emailText $ personEmail person}
|
||||
|
||||
<p>#{personAbout person}
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href=@{ProjectsR shr}>Projects
|
||||
|
|
Loading…
Reference in a new issue