<commit_before>.span10
  %br
  - if not @attachments.empty?
    %br
      %h3
        Current Attachments
      %br
      %a{ :class => "btn btn-danger", :href => "/report/#{@report.id}/attachments/delete/",  :id => "deletemultiple"}
        Delete selected
      %br
      %br
      .table.table-striped
        %table{ :id => "mytable"}
          %thead
            %th
              %input{ :type=>"checkbox", :id=>"checkall"}
            %th
              Attachment Name
            %th
              Edit
            %th
              Delete
          %tbody
          - @attachments.each do |attachment|
            %tr
              %td
                %input.checkbox{ :type=>"checkbox", :name=>"#{attachment.id}"}
              %td{:style => 'width: 70%'}
                #{attachment.description}
              %td
                %a{ :class => "btn btn-info", :href => "/report/#{attachment.report_id}/attachments/#{attachment.id}"}
                  %i{:class => 'icon-play-circle icon-white', :title => 'Preview'}
              %td
                %a{ :class => "btn btn-danger", :href => "/report/#{attachment.report_id}/attachments/delete/#{attachment.id}"}
                  %i{:class => 'icon-remove icon-white', :title => 'Preview'}

  - else
    %h3 No Attachments Available.
  %br
  - if not @screenshot_names_from_report.to_s.empty?
    %h3 The following screenshot variables were found in your report template:
    %br
    .table.table-striped
      %table
        %tbody
          %col{:align => "left"}
          %col{:align => "center"}
          %tr
            %td
              %strong
                Screenshot Name
            %td
              %strong
                Uploaded?
          - @screenshot_names_from_report.split(",").each do |ss|
            %tr
              %td
                #{ss}
              %td{:style => "text-align: center"}
                - found = false
                - @attachments.each do |att|
                  - if att.description.downcase == ss.downcase
                    - found = true
                    %i.fa.fa-check{:style => "color:green"}
                - if found == false
                  %i.fa.fa-times{:style => "color:red"}
  %br
  - if not @screenshot_names_from_findings.to_s.empty?
    %h3 The following screenshot variables were found in your report findings:
    %br
    .table.table-striped
      %table
        %tbody
          %col{:align => "left"}
          %col{:align => "center"}
          %tr
            %td
              %strong
                Screenshot Name
            %td
              %strong
                From vuln
            %td
              %strong
                Uploaded?
          - @screenshot_names_from_findings.each do |id, screenshots|
            - find = Findings.first(id: id)
            - screenshots.each do |ss|
              %tr
                %td
                  #{ss}
                %td
                  <a href=/report/#{find.report_id}/findings/#{find.id}/edit#pocu> #{find.title}</a>
                %td{:style => "text-align: center"}
                  - found = false
                  - @attachments.each do |att|
                    - if att.description.downcase == ss.downcase
                      - found = true
                      %i.fa.fa-check{:style => "color:green"}
                  - if found == false
                    %i.fa.fa-times{:style => "color:red"}
<commit_msg>Change "vuln" to "Finding" to stay coherent with naming<commit_after>.span10
  %br
  - if not @attachments.empty?
    %br
      %h3
        Current Attachments
      %br
      %a{ :class => "btn btn-danger", :href => "/report/#{@report.id}/attachments/delete/",  :id => "deletemultiple"}
        Delete selected
      %br
      %br
      .table.table-striped
        %table{ :id => "mytable"}
          %thead
            %th
              %input{ :type=>"checkbox", :id=>"checkall"}
            %th
              Attachment Name
            %th
              Edit
            %th
              Delete
          %tbody
          - @attachments.each do |attachment|
            %tr
              %td
                %input.checkbox{ :type=>"checkbox", :name=>"#{attachment.id}"}
              %td{:style => 'width: 70%'}
                #{attachment.description}
              %td
                %a{ :class => "btn btn-info", :href => "/report/#{attachment.report_id}/attachments/#{attachment.id}"}
                  %i{:class => 'icon-play-circle icon-white', :title => 'Preview'}
              %td
                %a{ :class => "btn btn-danger", :href => "/report/#{attachment.report_id}/attachments/delete/#{attachment.id}"}
                  %i{:class => 'icon-remove icon-white', :title => 'Preview'}

  - else
    %h3 No Attachments Available.
  %br
  - if not @screenshot_names_from_report.to_s.empty?
    %h3 The following screenshot variables were found in your report template:
    %br
    .table.table-striped
      %table
        %tbody
          %col{:align => "left"}
          %col{:align => "center"}
          %tr
            %td
              %strong
                Screenshot Name
            %td
              %strong
                Uploaded?
          - @screenshot_names_from_report.split(",").each do |ss|
            %tr
              %td
                #{ss}
              %td{:style => "text-align: center"}
                - found = false
                - @attachments.each do |att|
                  - if att.description.downcase == ss.downcase
                    - found = true
                    %i.fa.fa-check{:style => "color:green"}
                - if found == false
                  %i.fa.fa-times{:style => "color:red"}
  %br
  - if not @screenshot_names_from_findings.to_s.empty?
    %h3 The following screenshot variables were found in your report findings:
    %br
    .table.table-striped
      %table
        %tbody
          %col{:align => "left"}
          %col{:align => "center"}
          %tr
            %td
              %strong
                Screenshot Name
            %td
              %strong
                From Finding
            %td
              %strong
                Uploaded?
          - @screenshot_names_from_findings.each do |id, screenshots|
            - find = Findings.first(id: id)
            - screenshots.each do |ss|
              %tr
                %td
                  #{ss}
                %td
                  <a href=/report/#{find.report_id}/findings/#{find.id}/edit#pocu> #{find.title}</a>
                %td{:style => "text-align: center"}
                  - found = false
                  - @attachments.each do |att|
                    - if att.description.downcase == ss.downcase
                      - found = true
                      %i.fa.fa-check{:style => "color:green"}
                  - if found == false
                    %i.fa.fa-times{:style => "color:red"}

{'fraction_non_alphanumeric': 0.1305543493993342, 'fraction_numerical': 0.002315819944999276, 'mean_word_length': 1.2515477354187032, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 61, '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': '5973744', 'n_tokens_mistral': 2030, 'n_tokens_neox': 1945, 'n_words': 426}