Dummy handlers for ticket editing and deletion
This commit is contained in:
parent
349d089019
commit
88569a08ad
3 changed files with 20 additions and 1 deletions
|
@ -55,7 +55,8 @@
|
||||||
|
|
||||||
/u/#Text/p/#Text/t TicketsR GET POST
|
/u/#Text/p/#Text/t TicketsR GET POST
|
||||||
/u/#Text/p/#Text/t/!new TicketNewR GET
|
/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 WikiR GET
|
||||||
-- /u/#Text/p/#Text/w/+Texts WikiPageR GET
|
-- /u/#Text/p/#Text/w/+Texts WikiPageR GET
|
||||||
|
|
|
@ -18,6 +18,9 @@ module Vervis.Handler.Ticket
|
||||||
, postTicketsR
|
, postTicketsR
|
||||||
, getTicketNewR
|
, getTicketNewR
|
||||||
, getTicketR
|
, getTicketR
|
||||||
|
, putTicketR
|
||||||
|
, deleteTicketR
|
||||||
|
, getTicketEditR
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
|
@ -114,3 +117,12 @@ getTicketR shar proj num = do
|
||||||
setTitle $ toHtml $ T.intercalate " :: "
|
setTitle $ toHtml $ T.intercalate " :: "
|
||||||
[shar, proj, "Tickets", T.pack ('#' : show num)]
|
[shar, proj, "Tickets", T.pack ('#' : show num)]
|
||||||
$(widgetFile "ticket/one")
|
$(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"
|
||||||
|
|
|
@ -14,6 +14,12 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
|
|
||||||
<h1>#{shar} :: #{proj} :: Tickets :: ##{num}
|
<h1>#{shar} :: #{proj} :: Tickets :: ##{num}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href=@{TicketEditR shar proj num}>Edit this ticket
|
||||||
|
<p>
|
||||||
|
<form method=DELETE action=@{TicketR shar proj num}>
|
||||||
|
<input type=submit value="Delete this ticket">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Created on #{formatTime defaultTimeLocale "%F" $ ticketCreated ticket} by
|
Created on #{formatTime defaultTimeLocale "%F" $ ticketCreated ticket} by
|
||||||
#{fromMaybe (sharerIdent author) $ sharerName author}
|
#{fromMaybe (sharerIdent author) $ sharerName author}
|
||||||
|
|
Loading…
Reference in a new issue