<commit_before>= setup_page 'clothing'

Tags:
= link_to 'all', clothing_index_path
- tag_cloud(@tags, %w(css1 css2 css3 css4)) do |tag, css_class| 
  = link_to tag.name, { :action => :tag, :id => tag.name }, :class => css_class
%p
  Status:
  = link_to 'all', clothing_by_status_path('all')
  - statuses = current_account.clothing.select('DISTINCT(status)')
  - statuses.each do |s|
    - if s and !s.status.blank?
      = link_to s.status, clothing_by_status_path(s.status)

- today = Date.today.strftime('%Y-%m-%d')
= render "clothing_log_entry"
= set_focus_to_id("#clothing")

- Clothing.tag_counts do |tag, css_class|
  = link_to tag.name, { :action => :tag, :id => tag.name }, :class => css_class

- if managing?
  %p= link_to 'New Clothing', new_clothing_path

= render "clothing_thumbnails"

- if @clothing.count > 0
  = form_tag clothing_bulk_path do
    - if managing?
      = select_tag 'op', options_for_select(['Store', 'Donate', 'Activate'])
      = submit_tag 'Save changes', :class => 'btn'
    %table.lined
      %tr
        - if can? :update, Clothing
          %th
        %th= sortable_column "Name"
        %th= sortable_column "Status"
        %th= sortable_column "Count", :column => "clothing_logs_count", :direction => :desc
        %th= sortable_column "Last worn"
        %th= sortable_column "Colour", :column => "hue"
        - if managing?
          %th
      - @clothing.each do |clothing|
        %tr
          - if can? :update, Clothing
            %td= check_box_tag 'bulk[]', clothing.id
          %td= link_to clothing.name, clothing
          %td= clothing.status
          %td= clothing.clothing_logs_count
          %td= date_ago_future(clothing.last_worn)
          %td
            - if clothing.color then
              - clothing.color.split(",").each do |x|
                .color-box{:style => "background: ##{x}"}
                  &nbsp;
          - if managing?<commit_msg>Restore yesterday/today/tomorrow actions<commit_after>= setup_page 'clothing'

Tags:
= link_to 'all', clothing_index_path
- tag_cloud(@tags, %w(css1 css2 css3 css4)) do |tag, css_class| 
  = link_to tag.name, { :action => :tag, :id => tag.name }, :class => css_class
%p
  Status:
  = link_to 'all', clothing_by_status_path('all')
  - statuses = current_account.clothing.select('DISTINCT(status)')
  - statuses.each do |s|
    - if s and !s.status.blank?
      = link_to s.status, clothing_by_status_path(s.status)

- today = Date.today.strftime('%Y-%m-%d')
= render "clothing_log_entry"
= set_focus_to_id("#clothing")

- Clothing.tag_counts do |tag, css_class|
  = link_to tag.name, { :action => :tag, :id => tag.name }, :class => css_class

- if managing?
  %p= link_to 'New Clothing', new_clothing_path

= render "clothing_thumbnails"

- if @clothing.count > 0
  = form_tag clothing_bulk_path do
    - if managing?
      = select_tag 'op', options_for_select(['Store', 'Donate', 'Activate'])
      = submit_tag 'Save changes', :class => 'btn'
    %table.lined
      %tr
        - if can? :update, Clothing
          %th
        %th= sortable_column "Name"
        - if managing?
          %th Actions
        %th= sortable_column "Status"
        %th= sortable_column "Count", :column => "clothing_logs_count", :direction => :desc
        %th= sortable_column "Last worn"
        %th= sortable_column "Colour", :column => "hue"
        - if managing?
          %th
      - @clothing.each do |clothing|
        %tr
          - if can? :update, Clothing
            %td= check_box_tag 'bulk[]', clothing.id
          %td= link_to clothing.name, clothing
          - if managing?
            %td
              = link_to 'Yesterday', clothing_logs_path + "?clothing_id=" + clothing.id.to_s + "&date=" + Date.yesterday.to_s, :method => :post
              = link_to 'Today', clothing_logs_path + "?clothing_id=" + clothing.id.to_s + "&date=" + Date.today.to_s, :method => :post
              = link_to 'Tomorrow', clothing_logs_path + "?clothing_id=" + clothing.id.to_s + "&date=" + Date.tomorrow.to_s, :method => :post
          %td= clothing.status
          %td= clothing.clothing_logs_count
          %td= date_ago_future(clothing.last_worn)
          %td
            - if clothing.color then
              - clothing.color.split(",").each do |x|
                .color-box{:style => "background: ##{x}"}
                  &nbsp;
          - if managing?
{'fraction_non_alphanumeric': 0.14468571428571428, 'fraction_numerical': 0.002285714285714286, 'mean_word_length': 2.589827727645611, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 30, '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': '909229', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1498, 'n_words': 337}