- ids = @records.map(&:id)
ul
  li = context_menu_link t('hourglass.ui.lists.button_book'), hourglass_ui_bulk_book_time_logs_path(ids: ids), class: 'icon icon-time js-show-inline-form-multi', title: t('hourglass.ui.lists.button_book'), remote: true, data: {type: 'html'}, disabled: !@records.all? { |time_log| policy(time_log).book? }
  li = context_menu_link t(:button_edit), hourglass_ui_bulk_edit_time_logs_path(ids: ids), class: 'icon icon-edit js-show-inline-form-multi', title: t(:button_edit), remote: true, data: {type: 'html'}, disabled: !@records.all? { |time_log| policy(time_log).change? }
  li = context_menu_link t(:button_delete), @records.length == 1 ? hourglass_time_log_path(@records.first) : bulk_destroy_hourglass_time_logs_path(time_logs: ids), class: 'icon icon-del js-hourglass-remote', title: t(:button_delete), remote: true, method: :delete, data: {confirm: t(:text_are_you_sure)}, disabled: !@records.all? { |time_log| policy(time_log).destroy? }
  li = context_menu_link t('hourglass.ui.time_logs.button_join'), join_hourglass_time_logs_path(ids: ids), class: 'icon icon-hourglass-join js-hourglass-remote', title: t('hourglass.ui.time_logs.button_join'), remote: true, data: {method: 'post'}, disabled: ids.length == 1 || !@records.all? { |time_log| policy(time_log).join? } && Hourglass::TimeLog.joinable?(*ids)
  - time_bookings = @records.map(&:time_booking).compact
  li = context_menu_link t('hourglass.ui.lists.button_delete_booking'), time_bookings.length == 1 ? hourglass_time_booking_path(time_bookings.first) : bulk_destroy_hourglass_time_bookings_path(time_bookings: time_bookings.map(&:id)), class: 'icon icon-del js-hourglass-remote', title: t('hourglass.ui.lists.button_delete_booking'), remote: true, method: :delete, data: {confirm: t(:text_are_you_sure)}, disabled: !time_bookings.present? || !time_bookings.all? { |time_booking| policy(time_booking).destroy? }
