<commit_before>#keepalive

.row
  .col-xs-6
    %h1 Timesheet
    %h3= link_to "Filter", "#", class: "reveal-target", target: "#filter-table"
  .col-xs-6= render partial: "totals"

= render partial: "filters"

%hr

- if params[:filter].nil?
  = form_for current_user.work_entries.new(project: current_user.last_project) do |f|
    %p
      %strong New timer: &nbsp;
      = f.select :project_id, @projects.collect{ |p| ["#{p.client.name} - #{p.name}", p.id] }, {}, class: "form-control", style: "display: inline-block; width: 250px;"
      &nbsp;
      = f.submit "Start", class: "btn btn-success btn-sm"
      &nbsp;
      = f.submit "Create and edit", class: "btn btn-info btn-sm"

%table.form.nowrap.striped
  %tr
    %th Date
    %th Client
    %th Project
    %th Duration
    %th Billable?
    %th Notes
    %th

  - @entries.each do |entry|
    %tr.highlight-on-hover
      %td
        %strong= entry.date.strftime('%a')
        = date entry.date
      %td= link_to entry.project.client.name, entry.project.client
      %td= link_to entry.project.name, entry.project

      %td
        - if entry.duration
          <strong>#{entry.duration.round(1)}</strong> hrs
        - else
          %span.label.label-success= time entry.created_at
          \-
          = link_to "stop", stop_work_entry_path(entry), class: "btn btn-xs btn-danger stop-work-entry"

      %td
        - if entry.will_bill?
          - if entry.is_billed?
            %span.text-success billed
          - else
            %span.text-danger Yes
            = link_to glyph("check"), work_entry_path(entry), class: "btn btn-xs btn-default mark-billed-work-entry has-tooltip", tooltip: "Mark as billed"
        - else
          %span.text-muted no

      %td
        - if entry.invoice_notes.present?
          %span.label.label-info.def.has-tooltip{tooltip: entry.invoice_notes}
            = entry.invoice_notes[0..7]
        - if entry.admin_notes.present?
          %span.label.label-warning.def.has-tooltip{tooltip: entry.admin_notes}
            = entry.admin_notes[0..7]

      %td
        = link_to glyph("pencil"), edit_work_entry_path(entry)
        &nbsp;
        = link_to glyph("trash"), work_entry_path(entry), class: "text-danger delete-work-entry"

= will_paginate @entries<commit_msg>Single space between Invoice and Admin Notes<commit_after>#keepalive

.row
  .col-xs-6
    %h1 Timesheet
    %h3= link_to "Filter", "#", class: "reveal-target", target: "#filter-table"
  .col-xs-6= render partial: "totals"

= render partial: "filters"

%hr

- if params[:filter].nil?
  = form_for current_user.work_entries.new(project: current_user.last_project) do |f|
    %p
      %strong New timer: &nbsp;
      = f.select :project_id, @projects.collect{ |p| ["#{p.client.name} - #{p.name}", p.id] }, {}, class: "form-control", style: "display: inline-block; width: 250px;"
      &nbsp;
      = f.submit "Start", class: "btn btn-success btn-sm"
      &nbsp;
      = f.submit "Create and edit", class: "btn btn-info btn-sm"

%table.form.nowrap.striped
  %tr
    %th Date
    %th Client
    %th Project
    %th Duration
    %th Billable?
    %th Notes
    %th

  - @entries.each do |entry|
    %tr.highlight-on-hover
      %td
        %strong= entry.date.strftime('%a')
        = date entry.date
      %td= link_to entry.project.client.name, entry.project.client
      %td= link_to entry.project.name, entry.project

      %td
        - if entry.duration
          <strong>#{entry.duration.round(1)}</strong> hrs
        - else
          %span.label.label-success= time entry.created_at
          \-
          = link_to "stop", stop_work_entry_path(entry), class: "btn btn-xs btn-danger stop-work-entry"

      %td
        - if entry.will_bill?
          - if entry.is_billed?
            %span.text-success billed
          - else
            %span.text-danger Yes
            = link_to glyph("check"), work_entry_path(entry), class: "btn btn-xs btn-default mark-billed-work-entry has-tooltip", tooltip: "Mark as billed"
        - else
          %span.text-muted no

      %td
        - if entry.invoice_notes.present?
          %span.label.label-info.def.has-tooltip{tooltip: entry.invoice_notes}
            = entry.invoice_notes[0..7]
          &nbsp;
        - if entry.admin_notes.present?
          %span.label.label-warning.def.has-tooltip{tooltip: entry.admin_notes}
            = entry.admin_notes[0..7]

      %td
        = link_to glyph("pencil"), edit_work_entry_path(entry)
        &nbsp;
        = link_to glyph("trash"), work_entry_path(entry), class: "text-danger delete-work-entry"

= will_paginate @entries
{'fraction_non_alphanumeric': 0.14118158123370983, 'fraction_numerical': 0.005212858384013901, 'mean_word_length': 2.341799709724238, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4101957', 'n_tokens_mistral': 1591, 'n_tokens_neox': 1547, 'n_words': 328}