<commit_before>=render({ :partial => '/shared/work_tabs', :locals => { :selected => 6, :work_id => @work.id }})

.columns
  article.maincol
    =form_for :work, url: { action: :update, id: @work.id }, html: { 'data-areyousure' => '' } do |f|
      table.form
        tr.big
          th =f.label :title, 'Work title'
          td.w100 =f.text_field :title, value: @work.title
        tr
          th =f.label :collection_id
          td =f.collection_select(:collection_id, @collections, :id, :title)
        tr
          th =f.label :author
          td =f.text_field :author, value: @work.author
        tr
          th =f.label :location_of_composition, 'Location'
          td =f.text_field :location_of_composition, value: @work.location_of_composition
        tr
          th
          td
            p <b>Pages Are Meaningful</b>: Pages can be meaningful semantic divisions of a work (such as in a journal with a date for each page), or they might not be (as in letters or books, where the text should not be divided into sections based on pages).  When checked, the work will have page titles prominently displayed.
            =f.check_box :pages_are_meaningful, value: @work.pages_are_meaningful
            |&nbsp;
            =f.label :pages_are_meaningful
        
        tr
          th
          td
            p <b>Supports Translation</b>: A work can be translated as well as transcribed.  When checked, the work will have a Translation tab for each page.
            =f.check_box :supports_translation, value: @work.supports_translation
            |&nbsp;
            =f.label :supports_translation
        tr
          td(colspan="2")
            =f.label :description, class: 'above'
            =f.text_area :description, rows: 5, value: @work.description
        tr
          td(colspan="2")
            =f.label :physical_description, class: 'above'
            =f.text_area :physical_description, rows: 5, value: @work.physical_description
        tr
          td(colspan="2")
            =f.label :document_history, class: 'above'
            =f.text_area :document_history, rows: 5, value: @work.document_history
        tr
          td(colspan="2")
            =f.label :permission_description, class: 'above'
            =f.text_area :permission_description, rows: 5, value: @work.permission_description
        tr
          td(colspan="2")
            =f.label :transcription_conventions, class: 'above', id: 'convention'
            =f.text_area :transcription_conventions, rows: 5, value: @work.set_transcription_conventions
        tr
          td(colspan="2")
            -if @work.transcription_conventions.present?
              .aright =button_tag 'Revert', :work_id => @work.id, disabled: false, id: 'revert'
            -else
              .aright =button_tag 'Revert', :work_id => @work.id, disabled: true, id: 'revert'

       
        tr
          td(colspan="2")
            =f.label :translation_instructions, class: 'above'
            =f.text_area :translation_instructions, rows: 5, value: @work.translation_instructions
      .toolbar
        .toolbar_group
          =link_to({ :controller => 'work', :action => 'delete', :work_id => @work.id }, data: { :confirm => 'Are you sure you want to delete this work? After deleting you won\'t be able to recover it!' })
            =svg_symbol '#icon-remove-sign', class: 'icon'
            span Delete Work<commit_msg>updated work settings view<commit_after>=render({ :partial => '/shared/work_tabs', :locals => { :selected => 6, :work_id => @work.id }})

.columns
  article.maincol
    =form_for :work, url: { action: :update, id: @work.id }, html: { 'data-areyousure' => '' } do |f|
      table.form
        tr.big
          th =f.label :title, 'Work title'
          td.w100 =f.text_field :title, value: @work.title
        tr
          th =f.label :collection_id
          td =f.collection_select(:collection_id, @collections, :id, :title)
        tr
          th =f.label :author
          td =f.text_field :author, value: @work.author
        tr
          th =f.label :location_of_composition, 'Location'
          td =f.text_field :location_of_composition, value: @work.location_of_composition
        tr
          th
          td
            p <b>Pages Are Meaningful</b>: Pages can be meaningful semantic divisions of a work (such as in a journal with a date for each page), or they might not be (as in letters or books, where the text should not be divided into sections based on pages).  When checked, the work will have page titles prominently displayed.
            =f.check_box :pages_are_meaningful, value: @work.pages_are_meaningful
            |&nbsp;
            =f.label :pages_are_meaningful
        
        tr
          th
          td
            p <b>Supports Translation</b>: A work can be translated as well as transcribed.  When checked, the work will have a Translation tab for each page.
            =f.check_box :supports_translation, value: @work.supports_translation
            |&nbsp;
            =f.label :supports_translation
        tr
          td(colspan="2")
            =f.label :description, class: 'above'
            =f.text_area :description, rows: 5, value: @work.description
        tr
          td(colspan="2")
            =f.label :physical_description, class: 'above'
            =f.text_area :physical_description, rows: 5, value: @work.physical_description
        tr
          td(colspan="2")
            =f.label :document_history, class: 'above'
            =f.text_area :document_history, rows: 5, value: @work.document_history
        tr
          td(colspan="2")
            =f.label :permission_description, class: 'above'
            =f.text_area :permission_description, rows: 5, value: @work.permission_description
        tr
          td(colspan="2")
            =f.label :transcription_conventions, class: 'above', id: 'convention'
            =f.text_area :transcription_conventions, rows: 5, value: @work.set_transcription_conventions
        tr
          td(colspan="2")
            
            .aright
              -if @work.transcription_conventions.present?
                =button_tag 'Revert', :work_id => @work.id, disabled: false, id: 'revert'
                |&nbsp; Revert transcription conventions to collection default  
              -else
                =button_tag 'Revert', :work_id => @work.id, disabled: true, id: 'revert'
                |&nbsp; Revert transcription conventions to collection default  
        tr
          td(colspan="2")
            =f.label :translation_instructions, class: 'above'
            =f.text_area :translation_instructions, rows: 5, value: @work.translation_instructions
      .toolbar
        .toolbar_group
          =link_to({ :controller => 'work', :action => 'delete', :work_id => @work.id }, data: { :confirm => 'Are you sure you want to delete this work? After deleting you won\'t be able to recover it!' })
            =svg_symbol '#icon-remove-sign', class: 'icon'
            span Delete Work
{'fraction_non_alphanumeric': 0.1090520313613685, 'fraction_numerical': 0.004846756949394155, 'mean_word_length': 2.236162361623616, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 33, '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': '216963', 'n_tokens_mistral': 2086, 'n_tokens_neox': 2012, 'n_words': 603}