<commit_before>-title = "Details about this setup"
-meta title: title

-#- source = setup_url(@setup)
-#- caption = ""
-#- caption_twitter = ""
-#- description = ""
-#- thumb = ""
-#- keywords = %w{' '}
-#- meta title: title,
  -#keywords: keywords,
  -#description: description,
  -#og: { title: :title,
    -#description: description,
    -#image: thumb,
    -#url: request.url,
  -#}
-#- img_size =  browser.mobile? ? :index : :grande
-#-cache ['v1', admin?,  img_size, @setup] do

-cache ['v1', admin?,  @setup, @affordances, @outputs, @setup.file_format, @setup.renderer] do
  .entity-outer<
    .entity<
      .entity-inner<
        %header<
          %h1#page-title{tabindex: -1}
            =title
            %small
              Last Updated:
              %time= @setup.updated_at.strftime("%a, %d %b %Y")
            
        .panel.panel-default<
          %table.table<
            %caption.sr-only Attributes for #{@setup}
            %thead<
              %tr<
                %th<
                %th<
                  %h2 Selected Setup 
                %th<
                  %h2 Notes
                  
            %tbody<
              %tr<
                %th{scope: "row"} Platform 
                %td= link_to @setup.platform_version, platform_version_path(@setup.platform_version)
                %td<
                  .truncate=to_html @setup.platform_version.notes

              %tr<
                %th{scope: "row"} Assistive technology 
                %td= link_to @setup.assistive_technology_version, assistive_technology_version_path(@setup.assistive_technology_version)
                %td<
                  .truncate= to_html @setup.assistive_technology_version.notes
              %tr<
                %th{scope: "row"} Application 
                %td= link_to @setup.browser_reader_version, browser_reader_version_path(@setup.browser_reader_version)
                %td<
                  .truncate= to_html @setup.browser_reader_version.notes
              %tr<
                %th{scope: "row"} File format
                %td= link_to @setup.file_format, file_format_path(@setup.file_format)
                %td<
                  .truncate= to_html @setup.file_format.notes
              %tr<
                %th{scope: "row"} Required Renderer
                %td= link_to @setup.renderer, renderer_path(@setup.renderer)
                %td<
                  .truncate= to_html @setup.renderer.notes
              %tr<
                %th{scope: "row"} Testing Status
                %td=labeled @setup.workflow_status
                %td

        %h2 Notes
        = to_html(@setup.notes)

        .panel.panel-default<
          %h2.panel-heading Access Mode
          %table.table<
            %tbody<
              - capabilities = @setup.capabilities
              - outputs = []
              -@outputs.each do |o|
                %th{scope: 'col'}<
                  =o
                - these_outputs = []
                - affordances = @setup.affordances.sorted.where output_id: o.id
                - affordances.each do |a|
                  - capability = capabilities.find{|c| a.id == c.affordance_id}
                  - these_outputs.push(capability)
                - @setup.other_affordances.sorted.where(output_id: o.id).each do |a|
                  - these_outputs.push(a)
                - outputs.push(these_outputs)
              -count = Feature.all.count
              -0.upto(count) do |c|
                -if !outputs.collect{|o| o[c]}.compact.empty?
                  %tr<
                    -outputs.each do |e|
                      -if e[c].kind_of?(Capability)
                        = render "capabilities/capability", capability: e[c]
                      -elsif e[c].kind_of?(Affordance)
                        = render "affordances/affordance", affordance: e[c]
                      -else
                        %td.disabled

        -if @setup.content_sources.length > 0
          .panel.panel-default<
            %h2.panel-heading Content Sources
            %ul<
              - @setup.content_sources.each do |c|
                %li= link_to c, content_source_path(c)

        -if admin?
          %nav.show-nav{role:"navigation"}
            = link_to edit_setup_path(@setup), title: "Edit this Setup", class: 'btn btn-primary' do
              %i.fa.fa-fw.fa-pencil{title: 'Pencil'}
              Edit
            = link_to setups_path, class: 'btn btn-info', title: "View the setups index" do
              %i.fa.fa-fw.fa-list{title: 'List'}
              Setups
            = link_to new_setup_path, class: 'btn btn-success' do
              %i.fa.fa-fw.fa-plus{title: 'plus'}
              Add another Setup
            %br
            %br
            = link_to new_setup_path(id: @setup.id), class: 'btn btn-success' do
              %i.fa.fa-fw.fa-mail-forward{title: 'forward arrow'}
              Copy this setup

        -#%h3 Content Sources
        -#%ul
        -#- @setup.content_sources.each do |c|
          -#%li= link_to c, content_source_path(c)
<commit_msg>notes as panel<commit_after>-title = "Details about this setup"
-meta title: title

-#- source = setup_url(@setup)
-#- caption = ""
-#- caption_twitter = ""
-#- description = ""
-#- thumb = ""
-#- keywords = %w{' '}
-#- meta title: title,
  -#keywords: keywords,
  -#description: description,
  -#og: { title: :title,
    -#description: description,
    -#image: thumb,
    -#url: request.url,
  -#}
-#- img_size =  browser.mobile? ? :index : :grande
-#-cache ['v1', admin?,  img_size, @setup] do

-cache ['v1', admin?,  @setup, @affordances, @outputs, @setup.file_format, @setup.renderer] do
  .entity-outer<
    .entity<
      .entity-inner<
        %header<
          %h1#page-title{tabindex: -1}
            =title
            %small
              Last Updated:
              %time= @setup.updated_at.strftime("%a, %d %b %Y")
            
        .panel.panel-default<
          %table.table<
            %caption.sr-only Attributes for #{@setup}
            %thead<
              %tr<
                %th<
                %th<
                  %h2 Selected Setup 
                %th<
                  %h2 Notes
                  
            %tbody<
              %tr<
                %th{scope: "row"} Platform 
                %td= link_to @setup.platform_version, platform_version_path(@setup.platform_version)
                %td<
                  .truncate=to_html @setup.platform_version.notes

              %tr<
                %th{scope: "row"} Assistive technology 
                %td= link_to @setup.assistive_technology_version, assistive_technology_version_path(@setup.assistive_technology_version)
                %td<
                  .truncate= to_html @setup.assistive_technology_version.notes
              %tr<
                %th{scope: "row"} Application 
                %td= link_to @setup.browser_reader_version, browser_reader_version_path(@setup.browser_reader_version)
                %td<
                  .truncate= to_html @setup.browser_reader_version.notes
              %tr<
                %th{scope: "row"} File format
                %td= link_to @setup.file_format, file_format_path(@setup.file_format)
                %td<
                  .truncate= to_html @setup.file_format.notes
              %tr<
                %th{scope: "row"} Required Renderer
                %td= link_to @setup.renderer, renderer_path(@setup.renderer)
                %td<
                  .truncate= to_html @setup.renderer.notes
              %tr<
                %th{scope: "row"} Testing Status
                %td=labeled @setup.workflow_status
                %td

        -unless @setup.notes.blank?
          .panel.panel-default
            %h2.panel-heading Notes
            .panel-body= to_html(@setup.notes)

        .panel.panel-default<
          %h2.panel-heading Access Mode
          %table.table<
            %tbody<
              - capabilities = @setup.capabilities
              - outputs = []
              -@outputs.each do |o|
                %th{scope: 'col'}<
                  =o
                - these_outputs = []
                - affordances = @setup.affordances.sorted.where output_id: o.id
                - affordances.each do |a|
                  - capability = capabilities.find{|c| a.id == c.affordance_id}
                  - these_outputs.push(capability)
                - @setup.other_affordances.sorted.where(output_id: o.id).each do |a|
                  - these_outputs.push(a)
                - outputs.push(these_outputs)
              -count = Feature.all.count
              -0.upto(count) do |c|
                -if !outputs.collect{|o| o[c]}.compact.empty?
                  %tr<
                    -outputs.each do |e|
                      -if e[c].kind_of?(Capability)
                        = render "capabilities/capability", capability: e[c]
                      -elsif e[c].kind_of?(Affordance)
                        = render "affordances/affordance", affordance: e[c]
                      -else
                        %td.disabled

        -if @setup.content_sources.length > 0
          .panel.panel-default<
            %h2.panel-heading Content Sources
            %ul.list-group<
              - @setup.content_sources.each do |c|
                %li.list-group-item= link_to c, content_source_path(c)

        -if admin?
          %nav.show-nav{role:"navigation"}
            = link_to edit_setup_path(@setup), title: "Edit this Setup", class: 'btn btn-primary' do
              %i.fa.fa-fw.fa-pencil{title: 'Pencil'}
              Edit
            = link_to setups_path, class: 'btn btn-info', title: "View the setups index" do
              %i.fa.fa-fw.fa-list{title: 'List'}
              Setups
            = link_to new_setup_path, class: 'btn btn-success' do
              %i.fa.fa-fw.fa-plus{title: 'plus'}
              Add another Setup
            %br
            %br
            = link_to new_setup_path(id: @setup.id), class: 'btn btn-success' do
              %i.fa.fa-fw.fa-mail-forward{title: 'forward arrow'}
              Copy this setup

        -#%h3 Content Sources
        -#%ul
        -#- @setup.content_sources.each do |c|
          -#%li= link_to c, content_source_path(c)

{'fraction_non_alphanumeric': 0.12132710644094181, 'fraction_numerical': 0.002335084646818447, 'mean_word_length': 1.4386714116251482, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 5, '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': '6251019', 'n_tokens_mistral': 3161, 'n_tokens_neox': 3003, 'n_words': 602}