1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-27 16:24:52 +09:00

Rename TicketDepR to TicketDepOldR; we're going to use TicketDepR in a new way

This commit is contained in:
fr33domlover 2019-07-08 15:54:41 +00:00
parent d2d51cb45a
commit 828e015c54
4 changed files with 11 additions and 11 deletions

View file

@ -145,7 +145,7 @@
/s/#ShrIdent/p/#PrjIdent/t/#Int/d/#MessageKeyHashid/reply TicketReplyR GET
/s/#ShrIdent/p/#PrjIdent/t/#Int/deps TicketDepsR GET POST
/s/#ShrIdent/p/#PrjIdent/t/#Int/deps/!new TicketDepNewR GET
/s/#ShrIdent/p/#PrjIdent/t/#Int/deps/#Int TicketDepR POST DELETE
/s/#ShrIdent/p/#PrjIdent/t/#Int/deps/#Int TicketDepOldR POST DELETE
/s/#ShrIdent/p/#PrjIdent/t/#Int/rdeps TicketReverseDepsR GET
/s/#ShrIdent/p/#PrjIdent/t/#Int/participants TicketParticipantsR GET
/s/#ShrIdent/p/#PrjIdent/t/#Int/team TicketTeamR GET

View file

@ -356,7 +356,7 @@ instance Yesod App where
(TicketReplyR _ _ _ _ , _ ) -> personAny
(TicketDepsR s j _ , True) -> projOp ProjOpAddTicketDep s j
(TicketDepNewR s j _ , _ ) -> projOp ProjOpAddTicketDep s j
(TicketDepR s j _ _ , True) -> projOp ProjOpRemoveTicketDep s j
(TicketDepOldR s j _ _ , True) -> projOp ProjOpRemoveTicketDep s j
_ -> return Authorized
where
nobody :: Handler AuthResult
@ -913,7 +913,7 @@ instance YesodBreadcrumbs App where
TicketDepNewR shr prj num -> ( "New dependency"
, Just $ TicketDepsR shr prj num
)
TicketDepR shr prj pnum cnum -> ( T.pack $ '#' : show cnum
TicketDepOldR shr prj pnum cnum -> ( T.pack $ '#' : show cnum
, Just $ TicketDepsR shr prj pnum
)
TicketReverseDepsR shr prj num -> ( "Dependants"

View file

@ -45,8 +45,8 @@ module Vervis.Handler.Ticket
, getTicketDepsR
, postTicketDepsR
, getTicketDepNewR
, postTicketDepR
, deleteTicketDepR
, postTicketDepOldR
, deleteTicketDepOldR
, getTicketReverseDepsR
, getTicketParticipantsR
, getTicketTeamR
@ -915,15 +915,15 @@ getTicketDepNewR shr prj num = do
((_result, widget), enctype) <- runFormPost $ ticketDepForm jid tid
defaultLayout $(widgetFile "ticket/dep/new")
postTicketDepR :: ShrIdent -> PrjIdent -> Int -> Int -> Handler Html
postTicketDepR shr prj pnum cnum = do
postTicketDepOldR :: ShrIdent -> PrjIdent -> Int -> Int -> Handler Html
postTicketDepOldR shr prj pnum cnum = do
mmethod <- lookupPostParam "_method"
case mmethod of
Just "DELETE" -> deleteTicketDepR shr prj pnum cnum
Just "DELETE" -> deleteTicketDepOldR shr prj pnum cnum
_ -> notFound
deleteTicketDepR :: ShrIdent -> PrjIdent -> Int -> Int -> Handler Html
deleteTicketDepR shr prj pnum cnum = do
deleteTicketDepOldR :: ShrIdent -> PrjIdent -> Int -> Int -> Handler Html
deleteTicketDepOldR shr prj pnum cnum = do
runDB $ do
Entity sid _ <- getBy404 $ UniqueSharer shr
Entity jid _ <- getBy404 $ UniqueProject prj sid

View file

@ -32,7 +32,7 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
#{show status}
$if forward
<td>
^{buttonW DELETE "Remove" (TicketDepR shr prj num number)}
^{buttonW DELETE "Remove" (TicketDepOldR shr prj num number)}
$if forward
<p>