|
Lines 27-32
Link Here
|
| 27 |
yield ('TICKET_VIEW', ((list,), (list, str)), self.query) |
27 |
yield ('TICKET_VIEW', ((list,), (list, str)), self.query) |
| 28 |
yield ('TICKET_VIEW', ((list, xmlrpclib.DateTime),), self.getRecentChanges) |
28 |
yield ('TICKET_VIEW', ((list, xmlrpclib.DateTime),), self.getRecentChanges) |
| 29 |
yield ('TICKET_VIEW', ((list, int),), self.getAvailableActions) |
29 |
yield ('TICKET_VIEW', ((list, int),), self.getAvailableActions) |
|
|
30 |
yield ('TICKET_VIEW', ((list, int),), self.getAvailableActions2) |
| 30 |
yield ('TICKET_VIEW', ((list, int),), self.get) |
31 |
yield ('TICKET_VIEW', ((list, int),), self.get) |
| 31 |
yield ('TICKET_CREATE', ((int, str, str), (int, str, str, dict), (int, str, str, dict, bool)), self.create) |
32 |
yield ('TICKET_CREATE', ((int, str, str), (int, str, str, dict), (int, str, str, dict, bool)), self.create) |
| 32 |
yield ('TICKET_ADMIN', ((list, int, str), (list, int, str, dict), (list, int, str, dict, bool)), self.update) |
33 |
yield ('TICKET_ADMIN', ((list, int, str), (list, int, str, dict), (list, int, str, dict, bool)), self.update) |
|
Lines 68-73
Link Here
|
| 68 |
t = model.Ticket(self.env, id) |
69 |
t = model.Ticket(self.env, id) |
| 69 |
return ticketSystem.get_available_actions(req, t) |
70 |
return ticketSystem.get_available_actions(req, t) |
| 70 |
|
71 |
|
|
|
72 |
def getAvailableActions2(self, req, id): |
| 73 |
"""Returns the actions that can be performed on the ticket.""" |
| 74 |
from trac.ticket.default_workflow import ConfigurableTicketWorkflow |
| 75 |
controller = ConfigurableTicketWorkflow(self.env) |
| 76 |
ticketSystem = TicketSystem(self.env) |
| 77 |
ticket = model.Ticket(self.env, id) |
| 78 |
for controller in TicketSystem(self.env).action_controllers: |
| 79 |
actions = controller.get_ticket_actions(req, ticket) |
| 80 |
for k, action in actions: |
| 81 |
(label, control, hint) = controller.render_ticket_action_control(req, ticket, action) |
| 82 |
changes = controller.get_ticket_changes(req, ticket, action) |
| 83 |
yield (k, action, label, hint, changes) |
| 84 |
|
| 71 |
def get(self, req, id): |
85 |
def get(self, req, id): |
| 72 |
""" Fetch a ticket. Returns [id, time_created, time_changed, attributes]. """ |
86 |
""" Fetch a ticket. Returns [id, time_created, time_changed, attributes]. """ |
| 73 |
t = model.Ticket(self.env, id) |
87 |
t = model.Ticket(self.env, id) |