<commit_before>.contextual
  = icon_link_to :pdf, :format => :pdf
  = icon_link_to(:payslip, {:action => :payslip, :format => :pdf, :target => '_blank'})
  = contextual_links_for

%h1= resource.title
.box
  %table{:style => "width: 100%"}
    %tr
      %th= t_attr(:customer)
      %td= link_to(full_address(resource.customer.vcard, ', '), resource.customer)
      %th= t_attr(:company)
      %td= link_to(full_address(resource.company.vcard, ', '), resource.company)
    %tr
      %th= t_attr(:amount)
      %td= currency_fmt(resource.amount)
    %tr
      %th= t_attr(:duration_from, Invoice)
      %td= l(resource.duration_from) if resource.duration_from
      %th= t_attr(:duration_to, Invoice)
      %td= l(resource.duration_to) if resource.duration_to

.contextual
  = form_tag new_direct_booking_path(:direct_booking => {:reference_id => resource.id, :reference_type => resource_class.base_class}), :method => :get, :remote => true do
    = collection_select :direct_booking, :booking_template_id, BookingTemplate.by_type(resource_class.name.underscore), :id, :title
    = submit_tag t_action('new')
<commit_msg>Fix link to open payslip in new tag.<commit_after>.contextual
  = icon_link_to :pdf, :format => :pdf
  = icon_link_to(:payslip, {:action => :payslip, :format => :pdf}, :target => '_blank')
  = contextual_links_for

%h1= resource.title
.box
  %table{:style => "width: 100%"}
    %tr
      %th= t_attr(:customer)
      %td= link_to(full_address(resource.customer.vcard, ', '), resource.customer)
      %th= t_attr(:company)
      %td= link_to(full_address(resource.company.vcard, ', '), resource.company)
    %tr
      %th= t_attr(:amount)
      %td= currency_fmt(resource.amount)
    %tr
      %th= t_attr(:duration_from, Invoice)
      %td= l(resource.duration_from) if resource.duration_from
      %th= t_attr(:duration_to, Invoice)
      %td= l(resource.duration_to) if resource.duration_to

.contextual
  = form_tag new_direct_booking_path(:direct_booking => {:reference_id => resource.id, :reference_type => resource_class.base_class}), :method => :get, :remote => true do
    = collection_select :direct_booking, :booking_template_id, BookingTemplate.by_type(resource_class.name.underscore), :id, :title
    = submit_tag t_action('new')

{'fraction_non_alphanumeric': 0.14993365767359576, 'fraction_numerical': 0.0035382574082264487, 'mean_word_length': 4.476997578692494, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '5428816', 'n_tokens_mistral': 805, 'n_tokens_neox': 779, 'n_words': 147}