# Build action buttons and dialogs given specifications as follows.
# actions = [ { name: { href: h, method: m, fields: [ { name: n, value: v, options: [...] } ] } ]
- _actions: (actions) ->
+ _actions: (actions, id) ->
tpl = _.template """
<div>
$buttons = for n, action of actions
# Extend the action object with context
- $.extend action, _of: $tr, _name: n
+ $.extend action, _of: $tr, _name: n, _id: id
# Create a button for this action
$ tpl href: action.href, action_name: n, label: Labels?[n] or n
._holds_row_avail1 hold
.end()
.find 'td.actions'
- ._actions hold.actions
+ ._actions hold.actions, hold.reserveId
.end()
# Show a title, author, or format by using the given metadata object
._checkouts_row_avail circ
.end()
.find 'td.actions'
- ._actions circ.actions
+ ._actions circ.actions, circ.reserveId
.end()
.find 'td.formats'
- ._formats circ.formats
+ ._formats circ.formats, circ.reserveId
.end()
_checkouts_row_avail: (circ) ->
# Build action buttons
.find 'td.actions'
- ._actions avail.actions
+ ._actions avail.actions, avail.id
.end()
# Illuminate areas of this row according to the holdings status