<commit_before>

<!-- Bill Options -->
<div class="row">
  <div class="right button-bar">
    <!-- Action Buttons -->
    <ul class="button-group">
      <li><%= link_to 'All', bills_path, class:'tiny button' %></li>
    </ul>
    <ul class="admin button-group">
      <li><%= link_to 'Edit', edit_bill_path(@bill), class:'tiny admin button' %></li>
      <li><%= link_to('Delete', bill_path,
                      method: "delete", class: 'tiny admin alert button',
                      data: { confirm: 'Are you sure you want to delete this?'}) %></li>
    </ul>
    <!-- Download PDF Button -->
    <ul class="button-group">
      <li><%= link_to 'Download PDF',
                      bill_path(id: @bill.id, format: 'pdf'),
                      class: 'dropdown button',
                      :'data-dropdown' => 'bill-pdf-options',
                      :'aria-controls' => 'bill-pdf-options',
                      :'aria-expanded' => 'false' %><br />
        <!--Agenda Download Dropdown-->
        <ul id="legislation-pdf-options" data-dropdown-content class="f-dropdown" aria-hidden="true">
          <!--Bill with attachments-->
          <li>
            <%= link_to 'with attachments',
                        bill_path(id: @bill.id, format: 'pdf',
                                         attach: { attachments: true }) %>
          </li>
          <!--Bill only-->
          <li><%= link_to 'bill only',
                          bill_path(id: @bill.id, format: 'pdf',
                                           attach: { false: false }) %></li>
        </ul>
      </li>

    </ul>
  </div>
</div>




<div class="row">

  <!-- Bill Title -->
  <h2><%= @bill.title.titleize %><br />
    <small><%= @bill.legislative_numbering %></small>
  </h2>


  <!----- BEGIN CONTENT TABS ----->

  <!--Tab headers-->
  <ul class="tabs" data-tab>
    <li class="tab-title active"><a href="#fulltext_tab">Full Text</a></li>
    <% unless @attachments.empty? %>
        <li class='tab-title'><a href='#attachments_tab'>Attachments (<%= @attachments.count %>)</a></li>
    <% end %>
    <li class="tab-title"><a href="#changelog_tab">Changelog</a></li>
  </ul>

  <div class="tabs-content">

    <!--Bill Full Text-->
    <div class="content active" id="fulltext_tab">
      <%= @bill.body.html_safe %>
      <!--todo: how does this impact security?-->
    </div>

    <!-- Attachment List -->
    <div class="content" id="attachments_tab">
      <h4>Attached Material:</h4>
      <dl>
        <% @attachments.each do |attachment| %>
            <dt><%= link_to file_name(attachment), attachment.file.url %></dt>
            <dd><%= attachment.description %></dd>
        <% end %>
      </dl>
    </div>

    <!--Changelog Table-->
    <div class="content" id="changelog_tab">
      <p>
      <table width="100%" role="grid" summary="All changes (creates, updates, and destroys) to the legislation in question, including the attributes changed, the time changed, and links to a detailed diff and rollback button.">
        <caption>Legislation Changelog</caption>
        <thead>
        <tr>
          <th>Action</th>
          <th>Changed Attributes</th>
          <th>Time</th>
          <th>&Delta;</th>
          <th>Rollback</th>
        </tr>
        </thead>
        <tbody>
        <!--Diff Modal Cache-->
        <% cache [changelog_cache_name(@bill), @versions.last] do %>
            <% @versions.each do |version| %>
                <tr>
                  <td><%= version.event %></td>
                  <td><%= @bill.list_changed_attributes version %></td>
                  <td><%= version.created_at.to_formatted_s(:long_ordinal) %></td>
                  <td><a href="#" data-no-turbolink data-reveal-id="diffModal<%=version.id%>">View Diff</a></td>
                  <td><%= link_to 'Rollback', revert_version_path(id: version.id),
                                  method: :post %></td>
                  <%= render 'application/diff_modal', version: version,
                             legislation: @bill,
                             version_count: @versions.count %>
                </tr>
            <% end %>
        <% end %>
        </tbody>
      </table>
      </p>
    </div>
  </div>

  <!----- END CONTENT TABS ----->
</div><commit_msg>refactor controllers - remove .json comments - remove unneeded respond_to blocks - fix diff_modal gets passed :bill instead of :legislation<commit_after>

<!-- Bill Options -->
<div class="row">
  <div class="right button-bar">
    <!-- Action Buttons -->
    <ul class="button-group">
      <li><%= link_to 'All', bills_path, class:'tiny button' %></li>
    </ul>
    <ul class="admin button-group">
      <li><%= link_to 'Edit', edit_bill_path(@bill), class:'tiny admin button' %></li>
      <li><%= link_to('Delete', bill_path,
                      method: "delete", class: 'tiny admin alert button',
                      data: { confirm: 'Are you sure you want to delete this?'}) %></li>
    </ul>
    <!-- Download PDF Button -->
    <ul class="button-group">
      <li><%= link_to 'Download PDF',
                      bill_path(id: @bill.id, format: 'pdf'),
                      class: 'dropdown button',
                      :'data-dropdown' => 'bill-pdf-options',
                      :'aria-controls' => 'bill-pdf-options',
                      :'aria-expanded' => 'false' %><br />
        <!--Agenda Download Dropdown-->
        <ul id="legislation-pdf-options" data-dropdown-content class="f-dropdown" aria-hidden="true">
          <!--Bill with attachments-->
          <li>
            <%= link_to 'with attachments',
                        bill_path(id: @bill.id, format: 'pdf',
                                         attach: { attachments: true }) %>
          </li>
          <!--Bill only-->
          <li><%= link_to 'bill only',
                          bill_path(id: @bill.id, format: 'pdf',
                                           attach: { false: false }) %></li>
        </ul>
      </li>

    </ul>
  </div>
</div>




<div class="row">

  <!-- Bill Title -->
  <h2><%= @bill.title.titleize %><br />
    <small><%= @bill.legislative_numbering %></small>
  </h2>


  <!----- BEGIN CONTENT TABS ----->

  <!--Tab headers-->
  <ul class="tabs" data-tab>
    <li class="tab-title active"><a href="#fulltext_tab">Full Text</a></li>
    <% unless @attachments.empty? %>
        <li class='tab-title'><a href='#attachments_tab'>Attachments (<%= @attachments.count %>)</a></li>
    <% end %>
    <li class="tab-title"><a href="#changelog_tab">Changelog</a></li>
  </ul>

  <div class="tabs-content">

    <!--Bill Full Text-->
    <div class="content active" id="fulltext_tab">
      <%= @bill.body.html_safe %>
      <!--todo: how does this impact security?-->
    </div>

    <!-- Attachment List -->
    <div class="content" id="attachments_tab">
      <h4>Attached Material:</h4>
      <dl>
        <% @attachments.each do |attachment| %>
            <dt><%= link_to file_name(attachment), attachment.file.url %></dt>
            <dd><%= attachment.description %></dd>
        <% end %>
      </dl>
    </div>

    <!--Changelog Table-->
    <div class="content" id="changelog_tab">
      <p>
      <table width="100%" role="grid" summary="All changes (creates, updates, and destroys) to the legislation in question, including the attributes changed, the time changed, and links to a detailed diff and rollback button.">
        <caption>Legislation Changelog</caption>
        <thead>
        <tr>
          <th>Action</th>
          <th>Changed Attributes</th>
          <th>Time</th>
          <th>&Delta;</th>
          <th>Rollback</th>
        </tr>
        </thead>
        <tbody>
        <!--Diff Modal Cache-->
        <% cache [changelog_cache_name(@bill), @versions.last] do %>
            <% @versions.each do |version| %>
                <tr>
                  <td><%= version.event %></td>
                  <td><%= @bill.list_changed_attributes version %></td>
                  <td><%= version.created_at.to_formatted_s(:long_ordinal) %></td>
                  <td><a href="#" data-no-turbolink data-reveal-id="diffModal<%=version.id%>">View Diff</a></td>
                  <td><%= link_to 'Rollback', revert_version_path(id: version.id),
                                  method: :post %></td>
                  <%= render 'application/diff_modal', version: version,
                             bill: @bill,
                             version_count: @versions.count %>
                </tr>
            <% end %>
        <% end %>
        </tbody>
      </table>
      </p>
    </div>
  </div>

  <!----- END CONTENT TABS ----->
</div>
{'fraction_non_alphanumeric': 0.18450525343493823, 'fraction_numerical': 0.0016164415194550282, 'mean_word_length': 1.8014230271668823, 'pattern_counts': {'":': 0, '<': 281, '<?xml version=': 0, '>': 287, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2825802', 'n_tokens_mistral': 2759, 'n_tokens_neox': 2547, 'n_words': 607}