<commit_before><div id="submenu">
  <ul>
    <li><%= link_to ('Add a work'), works_path -%></li>
    <li><%= link_to ('New expression'), new_work_expression_path -%></li>
  </ul>
</div>

<div id="content_detail">
  <h1>
    [W]
    <%= link_to h(@work.original_title), @work -%>
  </h1>
  <p>
    <%= patrons_list(@work.patrons) -%>
  </p>

  <%- form_for :expressions, :url => work_expressions_path(@work), :html => {:method => 'get'} do -%>
    <p>
      <%= t('page.search_term') -%>: <%= text_field_tag 'query', h(@query) -%>
      <%- if_authorized?(:destroy, @work) do -%>
        <%- if params[:mode] == 'add' -%>
          <%= radio_button_tag 'mode', 'show' -%> <%= t('page.show') -%>
          <%= radio_button_tag 'mode', 'add', :checked => true -%> <%= t('page.add') -%>
        <%- else -%>
          <%= radio_button_tag 'mode', 'show', :checked => true -%> <%= t('page.show') -%>
          <%= radio_button_tag 'mode', 'add' -%> <%= t('page.add') -%>
        <%- end -%>
      <%- end -%>
      <%= submit_tag t('page.search') -%>
      <%= link_to t('page.back_to_index'), work_expressions_path(@work) -%>
    </p>
  <%- end -%>

<table style="width:100%">
  <tr>
    <th><%= t('page.title') -%></th>
    <th><%= t('page.language') -%></th>
  </tr>
  
<%- for expression in @expressions -%>
  <tr>
    <td>
      [E]
      <%= link_to h(expression.original_title), work_expression_path(@work, expression) -%>
      <%= expression_form_icon(expression.expression_form) -%><br />
      <%= patrons_list(expression.authors) -%>
      <%= patrons_list(expression.patrons) -%>
    </td>
    <td><%=h expression.language.display_name -%></td>
    <td>
      <%- if_authorized?(:destroy, expression) do -%>
        <%- if params[:mode] == "add" -%>
          <%= link_to t('page.add'), new_work_reify_path(@work, :expression_id => expression.id, :mode => 'add') unless @work.expressions.include?(expression) -%>
        <%- else -%>
          <%- reify = @work.reifies.find_by_expression_id(expression.id) -%>
          <%= link_to t('page.destroy'), work_reify_path(@work, reify), :confirm => t('page.are_you_sure'), :method => :delete -%>
        <%- end -%>
      <%- end -%>
    </td>
  </tr>
<%- end -%>
</table>

<%= will_paginate(@expressions) -%>
</div>
<commit_msg>fixed some html tags<commit_after><div id="submenu">
  <ul>
    <li><%= link_to ('Add a work'), works_path -%></li>
    <li><%= link_to ('New expression'), new_work_expression_path -%></li>
  </ul>
</div>

<div id="content_detail">
  <h1>
    [W]
    <%= link_to h(@work.original_title), @work -%>
  </h1>
  <p>
    <%= patrons_list(@work.patrons) -%>
  </p>

  <%- form_for :expressions, :url => work_expressions_path(@work), :html => {:method => 'get'} do -%>
    <p>
      <%= t('page.search_term') -%>: <%= text_field_tag 'query', h(@query) -%>
      <%- if_authorized?(:destroy, @work) do -%>
        <%- if params[:mode] == 'add' -%>
          <%= radio_button_tag 'mode', 'show' -%> <%= t('page.show') -%>
          <%= radio_button_tag 'mode', 'add', :checked => true -%> <%= t('page.add') -%>
        <%- else -%>
          <%= radio_button_tag 'mode', 'show', :checked => true -%> <%= t('page.show') -%>
          <%= radio_button_tag 'mode', 'add' -%> <%= t('page.add') -%>
        <%- end -%>
      <%- end -%>
      <%= submit_tag t('page.search') -%>
      <%= link_to t('page.back_to_index'), work_expressions_path(@work) -%>
    </p>
  <%- end -%>

<table style="width:100%">
  <tr>
    <th><%= t('page.title') -%></th>
    <th><%= t('page.language') -%></th>
  </tr>
  
<%- for expression in @expressions -%>
  <tr class="line<%= cycle("0", "1") -%>">
    <td>
      [E]
      <%= link_to h(expression.original_title), work_expression_path(@work, expression) -%>
      <%= expression_form_icon(expression.expression_form) -%><br />
      <%= patrons_list(expression.authors) -%>
      <%= patrons_list(expression.patrons) -%>
    </td>
    <td><%=h expression.language.display_name -%></td>
    <td>
      <%- if_authorized?(:destroy, expression) do -%>
        <%- if params[:mode] == "add" -%>
          <%= link_to t('page.add'), new_work_reify_path(@work, :expression_id => expression.id, :mode => 'add') unless @work.expressions.include?(expression) -%>
        <%- else -%>
          <%- reify = @work.reifies.find_by_expression_id(expression.id) -%>
          <%= link_to t('page.destroy'), work_reify_path(@work, reify), :confirm => t('page.are_you_sure'), :method => :delete -%>
        <%- end -%>
      <%- end -%>
    </td>
  </tr>
<%- end -%>
</table>

<%= will_paginate(@expressions) -%>
</div>

{'fraction_non_alphanumeric': 0.2529832935560859, 'fraction_numerical': 0.002603601648947711, 'mean_word_length': 2.800494641384996, 'pattern_counts': {'":': 0, '<': 152, '<?xml version=': 0, '>': 170, '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': '5514704', 'n_tokens_mistral': 1876, 'n_tokens_neox': 1768, 'n_words': 290}