<commit_before>{% import 'admin/lib.html' as lib with context %}
{% import 'admin/actions.html' as actionslib with context %}
{% extends 'admin/file/list.html' %}

{# 
Implementation note -
the template I based this on used get_url
instead of url_for - this may just be because
I grabbed it from the bleeding-edge version -
but I had to replace it to get this to work.
#}

{# Hide breadcrumbs #}
{% block breadcrums %}
<h2>Import Resources</h2>
{% endblock %}

{% block file_list_table %}
<table class="table table-striped table-bordered model-list">
    <thead>
        <tr>
            {% block list_header scoped %}
            {% if actions %}
            <th>
                <input type="checkbox" name="rowtoggle" class="action-rowtoggle" />
            </th>
            {% endif %}
            <th>&nbsp;</th>
            <th>Name</th>
            <th>Size</th>
            <th>Import</th>
            <th>Download</th>
            {% endblock %}
        </tr>
    </thead>
    {% for name, path, is_dir, size, date in items %}
    <tr>
        {% block list_row scoped %}
        {% if actions %}
        <td>
            {% if not is_dir %}
            <input type="checkbox" name="rowid" class="action-checkbox" value="{{ path }}" />
            {% endif %}
        </td>
        {% endif %}
        <td>
            {% block list_row_actions scoped %}
            {% if admin_view.can_rename and path and name != '..' %}
            <a href="{{ url_for('.rename', path=path) }}" title="Rename" class="btn btn-link">
              <span class="glyphicon glyphicon-pencil"></span>
            </a>
            {% endif %}
            {%- if admin_view.can_delete and path -%}
              <form method="POST" action="{{ url_for('.delete') }}" class="form-inline">
              	<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
                <input type="hidden" name="path" value="{{ path }}" />
                <button title="Delete" class='btn btn-link'
                	onclick="return confirm('{{ _gettext('Are you sure you want to delete \\\'%(name)s\\\'?', name=name) }}')">
                    <span class="glyphicon glyphicon-remove"></span>
                </button>
              </form>
            {%- endif -%}
            {% endblock %}
        </td>
        <td>
            {{ name }}
        </td>
        <td>
            {{ size|filesizeformat }}
        </td>
        <td>
            <a href="{{ url_for('resourceimportview.index', file=path) }}">
                Import
            </a>
        </td>
        <td>
            {% if admin_view.can_download %}
            <a href="{{ get_file_url(path)|safe }}">Download</a>
            {% endif %}
        </td>
        {% endblock %}
    </tr>
    {% endfor %}
</table>
{% endblock %}<commit_msg>Fixing style of CSV import list<commit_after>{% import 'admin/lib.html' as lib with context %}
{% import 'admin/actions.html' as actionslib with context %}
{% extends 'admin/file/list.html' %}

{# 
Implementation note -
the template I based this on used get_url
instead of url_for - this may just be because
I grabbed it from the bleeding-edge version -
but I had to replace it to get this to work.
#}

{# Hide breadcrumbs #}
{% block breadcrums %}
<h2>Import Resources</h2>
{% endblock %}

{% block file_list_table %}
<table class="table table-striped table-bordered model-list">
  <thead>
    <tr>
      {% block list_header scoped %}
      {% if actions %}
      <th>
        <input type="checkbox" name="rowtoggle" class="action-rowtoggle" />
      </th>
      {% endif %}
      <th>Actions</th>
      <th>Name</th>
      <th>Size</th>
      <th>Import</th>
      <th>Download</th>
      {% endblock %}
    </tr>
  </thead>
  {% for name, path, is_dir, size, date in items %}
  <tr>
    {% block list_row scoped %}
    {% if actions %}
    <td>
      {% if not is_dir %}
      <input type="checkbox" name="rowid" class="action-checkbox" value="{{ path }}" />
      {% endif %}
    </td>
    {% endif %}
    <td>
      {% block list_row_actions scoped %}
      {% if admin_view.can_rename and path and name != '..' %}
      <a href="{{ url_for('.rename', path=path) }}" title="Rename" class="btn btn-link pull-left">
        <span class="glyphicon glyphicon-pencil"></span>
      </a>
      {% endif %}
      {%- if admin_view.can_delete and path -%}
      <form method="POST" action="{{ url_for('.delete') }}" class="form-inline pull-left">
      	<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
        <input type="hidden" name="path" value="{{ path }}" />
        <button title="Delete" class='btn btn-link'
        	onclick="return confirm('{{ _gettext('Are you sure you want to delete \\\'%(name)s\\\'?', name=name) }}')">
          <span class="glyphicon glyphicon-remove"></span>
        </button>
      </form>
      {%- endif -%}
      {% endblock %}
    </td>
    <td>
      {{ name }}
    </td>
    <td>
      {{ size|filesizeformat }}
    </td>
    <td>
      <a href="{{ url_for('resourceimportview.index', file=path) }}">
        Import
      </a>
    </td>
    <td>
      {% if admin_view.can_download %}
      <a href="{{ get_file_url(path)|safe }}">Download</a>
      {% endif %}
    </td>
    {% endblock %}
  </tr>
  {% endfor %}
</table>
{% endblock %}
{'fraction_non_alphanumeric': 0.17581588379551027, 'fraction_numerical': 0.0007545746085644218, 'mean_word_length': 2.026255707762557, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1782943', 'n_tokens_mistral': 1776, 'n_tokens_neox': 1642, 'n_words': 419}