<commit_before><%- model_class = MaterialFolder -%>
<div class="page-header">
  <h1>Materials: <%= @folder.name %></h1>
</div>
<% if @folder.description %>
<div>
<h2 class="materials-description-title">Folder Description</h2>
  <p><%= @folder.description %></p>
  <hr />
</div>
<% end %>
<div>
  <% if can? :manage, Material %>
      <%= link_to t('.new', :default => t("Upload file")),
                  course_new_material_path(@course, @folder),
                  :class => 'btn btn-primary' %>
      <%= link_to t('.new', :default => t("Create folder")),
                  course_new_material_folder_path(@course, @folder),
                  :class => 'btn btn-primary' %>
  <% end %>
</div>
<div>
  <p></p>
</div>
<table class="table assignments materials-list-table">
  <thead>
    <tr>
      <th>Name</th>
      <th style="width: 20%">Date uploaded</th>
      <th style="width: 7%">Size</th>
      <% if can? :manage, Material %>
      <th style="width: 10%">&nbsp;</th>
      <% end %>
    </tr>
  </thead>

  <tbody class="table-hover">
    <% @folder.subfolders.each do |subfolder| %>
      <tr>
        <td>
          <%= link_to course_material_folders_path(@course, subfolder) do %>
            <%= render partial: "layouts/material_subfolder_title", locals: {subfolder: subfolder} %>
          <% end %>
        </td>

        <td>
          <%= subfolder.updated_at %>
        </td>

        <td>
          &nbsp;
        </td>

        <% if can? :manage, Material %>
          <td>
            <%= link_to course_material_folders_path(@course, subfolder), class: 'btn' do %>
              <i class="icon-edit"></i>
            <% end %>
            <%= link_to course_material_folders_path(@course, subfolder),
              method: :delete,
              data: { confirm: t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
              class: 'btn btn-danger' do %>
                <i class="icon-trash"></i>
            <% end %>
          </td>
        <% end %>

      </tr>
    <% end %>

    <% @folder.files.each do |material| %>
      <tr>
        <td>
          <%= link_to course_material_path(@course, material) do %>
            <%= render partial: "layouts/material_title", locals: {material: material} %>
          <% end %>
        </td>

        <td>
          <%= datetime_format(material.updated_at) %>
        </td>

        <td>
          <%= get_pretty_file_size(material.filesize) %>
        </td>

        <% if can? :manage, Material %>
          <td>
            <%= link_to edit_course_material_path(@course, material), class: 'btn' do %>
              <i class="icon-edit"></i>
            <% end %>
            <%= link_to course_material_path(@course, material),
              method: :delete,
              data: { confirm: t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
              class: 'btn btn-danger' do %>
                <i class="icon-trash"></i>
            <% end %>
          </td>
        <% end %>

      </tr>
    <% end %>
  </tbody>
</table>
<commit_msg>Increase width of Size column in folder listing.<commit_after><%- model_class = MaterialFolder -%>
<div class="page-header">
  <h1>Materials: <%= @folder.name %></h1>
</div>
<% if @folder.description %>
<div>
<h2 class="materials-description-title">Folder Description</h2>
  <p><%= @folder.description %></p>
  <hr />
</div>
<% end %>
<div>
  <% if can? :manage, Material %>
      <%= link_to t('.new', :default => t("Upload file")),
                  course_new_material_path(@course, @folder),
                  :class => 'btn btn-primary' %>
      <%= link_to t('.new', :default => t("Create folder")),
                  course_new_material_folder_path(@course, @folder),
                  :class => 'btn btn-primary' %>
  <% end %>
</div>
<div>
  <p></p>
</div>
<table class="table assignments materials-list-table">
  <thead>
    <tr>
      <th>Name</th>
      <th style="width: 20%">Date uploaded</th>
      <th style="width: 10%">Size</th>
      <% if can? :manage, Material %>
      <th style="width: 10%">&nbsp;</th>
      <% end %>
    </tr>
  </thead>

  <tbody class="table-hover">
    <% @folder.subfolders.each do |subfolder| %>
      <tr>
        <td>
          <%= link_to course_material_folders_path(@course, subfolder) do %>
            <%= render partial: "layouts/material_subfolder_title", locals: {subfolder: subfolder} %>
          <% end %>
        </td>

        <td>
          <%= subfolder.updated_at %>
        </td>

        <td>
          &nbsp;
        </td>

        <% if can? :manage, Material %>
          <td>
            <%= link_to course_material_folders_path(@course, subfolder), class: 'btn' do %>
              <i class="icon-edit"></i>
            <% end %>
            <%= link_to course_material_folders_path(@course, subfolder),
              method: :delete,
              data: { confirm: t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
              class: 'btn btn-danger' do %>
                <i class="icon-trash"></i>
            <% end %>
          </td>
        <% end %>

      </tr>
    <% end %>

    <% @folder.files.each do |material| %>
      <tr>
        <td>
          <%= link_to course_material_path(@course, material) do %>
            <%= render partial: "layouts/material_title", locals: {material: material} %>
          <% end %>
        </td>

        <td>
          <%= datetime_format(material.updated_at) %>
        </td>

        <td>
          <%= get_pretty_file_size(material.filesize) %>
        </td>

        <% if can? :manage, Material %>
          <td>
            <%= link_to edit_course_material_path(@course, material), class: 'btn' do %>
              <i class="icon-edit"></i>
            <% end %>
            <%= link_to course_material_path(@course, material),
              method: :delete,
              data: { confirm: t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
              class: 'btn btn-danger' do %>
                <i class="icon-trash"></i>
            <% end %>
          </td>
        <% end %>

      </tr>
    <% end %>
  </tbody>
</table>

{'fraction_non_alphanumeric': 0.18615483456472856, 'fraction_numerical': 0.0030517185994217797, 'mean_word_length': 1.9193624003750587, 'pattern_counts': {'":': 0, '<': 197, '<?xml version=': 0, '>': 213, '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': '5757672', 'n_tokens_mistral': 2125, 'n_tokens_neox': 1920, 'n_words': 413}