- item_action ||= lambda{|object| url_for(object)}

%tr[booking_template]
  %td
    = link_to booking_template.title, item_action.call(booking_template)
    - if booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= booking_template.comments
  %td= link_to booking_template.credit_account.code, account_path(booking_template.credit_account), :title => booking_template.credit_account.title unless booking_template.credit_account.nil?
  %td= link_to booking_template.debit_account.code, account_path(booking_template.debit_account), :title => booking_template.debit_account.title unless booking_template.debit_account.nil?
  %td.currency= currency_fmt(booking_template.amount)
  %td.action-links
    = icon_edit_link_to edit_booking_template_path(booking_template)
    = icon_delete_link_to booking_template, booking_template_path(booking_template)
    =# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true


- item_action ||= lambda{|object| url_for(object)}

%tr[booking_template]
  %td
    = link_to "%s (%s)" % [booking_template.title, booking_template.code], item_action.call(booking_template)
    - if booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= booking_template.comments
  %td= link_to booking_template.credit_account.code, account_path(booking_template.credit_account), :title => booking_template.credit_account.title unless booking_template.credit_account.nil?
  %td= link_to booking_template.debit_account.code, account_path(booking_template.debit_account), :title => booking_template.debit_account.title unless booking_template.debit_account.nil?
  %td.currency= currency_fmt(booking_template.amount)
  %td.action-links
    = icon_edit_link_to edit_booking_template_path(booking_template)
    = icon_delete_link_to booking_template, booking_template_path(booking_template)
    =# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true


Include booking template code in list.
Include booking template code in list.
