equal
deleted
inserted
replaced
109 state = entity.in_state[0] |
109 state = entity.in_state[0] |
110 transitions = list(state.transitions(entity)) |
110 transitions = list(state.transitions(entity)) |
111 if transitions: |
111 if transitions: |
112 menu_title = u'%s: %s' % (_('state'), state.view('text')) |
112 menu_title = u'%s: %s' % (_('state'), state.view('text')) |
113 menu_items = [] |
113 menu_items = [] |
114 for tr in state.transitions(entity): |
114 for tr in transitions: |
115 url = entity.absolute_url(vid='statuschange', treid=tr.eid) |
115 url = entity.absolute_url(vid='statuschange', treid=tr.eid) |
116 menu_items.append(self.mk_action(_(tr.name), url)) |
116 menu_items.append(self.mk_action(_(tr.name), url)) |
117 box.append(BoxMenu(menu_title, menu_items)) |
117 box.append(BoxMenu(menu_title, menu_items)) |
118 # when there are no possible transition, put state if the menu if |
118 # when there are no possible transition, put state if the menu if |
119 # there are some other actions |
119 # there are some other actions |