2023-08-22 16:45:34 (UTC-03:00)
Marcel Rodrigues <marcelgmr@gmail.com>
allow shifting from ticket page
diff --git a/skopos.lua b/skopos.lua index 64b2b58..477c7a9 100644 --- a/skopos.lua +++ b/skopos.lua @@ -415,6 +415,8 @@ function App:routes() local path = "/" if req.query.from == "proj" then path = "/p/"..name + elseif req.query.from == "tick" then + path = "/p/"..name.."/t/"..tcode end return path, 303 end}, diff --git a/view/ticket.html b/view/ticket.html index f48d4d4..2eccd48 100644 --- a/view/ticket.html +++ b/view/ticket.html @@ -6,6 +6,13 @@ <style> .centered { text-align: center; } .menu a { margin: 7px; } + .shift-button { + margin: 0 5px; + padding: 5px; + border: none; + background-color: #bbb; + cursor: pointer; + } % include view/menu.css % include view/ticket.css </style> @@ -24,8 +31,17 @@ </div> <pre>{{$tick.desc}}</pre> <div class="footer-details"> - <p><strong>Status:</strong> {{$states[$tick.state_id]}}</p> <p><strong>Priority:</strong> {{$tick.priority}}</p> + <div> + % set shift_path = "/p/"..$proj.name.."/t/"..$tick.code.."/shift" + <form action="{{$shift_path}}/left?from=tick" method="post"> + <button class="shift-button" type="submit">←</button> + </form> + {{$states[$tick.state_id]}} + <form action="{{$shift_path}}/right?from=tick" method="post"> + <button class="shift-button" type="submit">→</button> + </form> + </div> <div class="menu"> <a href="/p/{{$proj.name}}/t/{{$tick.code}}/edit">edit</a> <form action="/p/{{$proj.name}}/t/{{$tick.code}}/del" method="post">