<commit_before>- event = booking.event
- trip = booking.trip

%tr[booking]
  %td{:style => 'width: 150px'}
    = icon :calendar
    = link_to [:edit, event] do
      = l event.start_time, format: :short

  %td
    - trip = booking.trip
    - if trip.present?
      - if trip.code.present?
        .label.label-default{ :style => 'background-color: %s;' % trip.color }<
          = trip.code
      = trip.name

  %td
    - unless event.guided_dive?
      %small.text-muted<
        %i.fa.fa-star-o
        non-guided dive

  %td
    - if event.guided_dive?
      %small.text-muted<
        %i.fa.fa-star
        guided dive

  %td
    - if event.boat_dive?
      %small.text-muted<
        %i.fa.fa-anchor
        boat dive

  %td
    - if event.night_dive?
      %small.text-muted<
        %i.fa.fa-moon-o
        night dive

  %td.text-right
    - if booking.price.present?
      .btn-group
        %button.btn.btn-default.btn-xs.dropdown-toggle{type: 'button', data: { toggle: 'dropdown' }}
          = icon :money
          = '%0.2f' % booking.price
          %span.caret

        %ul.dropdown-menu{role: 'menu'}
          %li
            = link_to customer_booking_path(customer, booking, booking: { price: 0 }), method: :patch do
              %small
                = icon :times, 'Mark as free', class: 'fa-fw'
                .text-muted
                  = icon :money, '0.00', class: 'fa-fw'
          %li<commit_msg>Show 'free' instead of 0.00<commit_after>- event = booking.event
- trip = booking.trip

%tr[booking]
  %td{:style => 'width: 150px'}
    = icon :calendar
    = link_to [:edit, event] do
      = l event.start_time, format: :short

  %td
    - trip = booking.trip
    - if trip.present?
      - if trip.code.present?
        .label.label-default{ :style => 'background-color: %s;' % trip.color }<
          = trip.code
      = trip.name

  %td
    - unless event.guided_dive?
      %small.text-muted<
        %i.fa.fa-star-o
        non-guided dive

  %td
    - if event.guided_dive?
      %small.text-muted<
        %i.fa.fa-star
        guided dive

  %td
    - if event.boat_dive?
      %small.text-muted<
        %i.fa.fa-anchor
        boat dive

  %td
    - if event.night_dive?
      %small.text-muted<
        %i.fa.fa-moon-o
        night dive

  %td.text-right
    - if booking.price.present?
      .btn-group
        %button.btn.btn-default.btn-xs.dropdown-toggle{type: 'button', data: { toggle: 'dropdown' }}
          = icon :money
          - if booking.price > 0
            = '%0.2f' % booking.price
          - else
            free
          %span.caret

        %ul.dropdown-menu{role: 'menu'}
          %li
            = link_to customer_booking_path(customer, booking, booking: { price: 0 }), method: :patch do
              %small
                = icon :times, 'Mark as free', class: 'fa-fw'
                .text-muted
                  = icon :money, '0.00', class: 'fa-fw'
          %li
{'fraction_non_alphanumeric': 0.13993871297242083, 'fraction_numerical': 0.00749063670411985, 'mean_word_length': 1.616206589492431, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6191156', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1006, 'n_words': 212}