diff --git a/config/routes b/config/routes index f636db2..2694682 100644 --- a/config/routes +++ b/config/routes @@ -55,7 +55,8 @@ /u/#Text/p/#Text/t TicketsR GET POST /u/#Text/p/#Text/t/!new TicketNewR GET -/u/#Text/p/#Text/t/#Int TicketR GET +/u/#Text/p/#Text/t/#Int TicketR GET PUT DELETE +/u/#Text/p/#Text/t/#Int/edit TicketEditR GET -- /u/#Text/p/#Text/w WikiR GET -- /u/#Text/p/#Text/w/+Texts WikiPageR GET diff --git a/src/Vervis/Handler/Ticket.hs b/src/Vervis/Handler/Ticket.hs index 388c0ed..28a25b8 100644 --- a/src/Vervis/Handler/Ticket.hs +++ b/src/Vervis/Handler/Ticket.hs @@ -18,6 +18,9 @@ module Vervis.Handler.Ticket , postTicketsR , getTicketNewR , getTicketR + , putTicketR + , deleteTicketR + , getTicketEditR ) where @@ -114,3 +117,12 @@ getTicketR shar proj num = do setTitle $ toHtml $ T.intercalate " :: " [shar, proj, "Tickets", T.pack ('#' : show num)] $(widgetFile "ticket/one") + +putTicketR :: Text -> Text -> Int -> Handler Html +putTicketR shar proj num = error "Not implemented" + +deleteTicketR :: Text -> Text -> Int -> Handler Html +deleteTicketR shar proj num = error "Not implemented" + +getTicketEditR :: Text -> Text -> Int -> Handler Html +getTicketEditR shar proj num = error "Not implemented" diff --git a/templates/ticket/one.hamlet b/templates/ticket/one.hamlet index 96b5da3..022d74b 100644 --- a/templates/ticket/one.hamlet +++ b/templates/ticket/one.hamlet @@ -14,6 +14,12 @@ $# .

#{shar} :: #{proj} :: Tickets :: ##{num} +

+ Edit this ticket +

+

+ +

Created on #{formatTime defaultTimeLocale "%F" $ ticketCreated ticket} by #{fromMaybe (sharerIdent author) $ sharerName author}