<commit_before>{# list recently modified source EAD files #}

<div class="section">

<h2>Recently modified files</h2>

{% if error %}<p class="error">Error: {{ error }}</p>{% endif %}

<div>{{ files.paginator.count }} files total</div>
{% with files as items %}
    {% include "snippets/page_navigator.html" %}
{% endwith %}
<table>
    <tr>
        <th colspan="4">Filename</th> {# spans columns for publish, preview, & clean #}
        <th>Last Modified</th>
    </tr>
{% for file, mtime in files.object_list %}
    <tr>
        <td>{{ file }}</td>
        <td><a href="{% url fa-admin:cleaned-ead-about file %}">CLEAN</a></td>
        <td>
            {% if perms.fa_admin.can_preview %}
            <form action="{% url fa-admin:preview-ead %}" method="post">{% csrf_token %}
                <button type="submit" name="filename" value="{{ file }}" >PREVIEW</button>
            </form>
            {% endif %}
        </td>
        <td>
            {% if perms.fa_admin.can_publish %}
            <form action="{% url fa-admin:publish-ead %}" method="post">{% csrf_token %}
                <button type="submit" name="filename" value="{{ file }}" >PUBLISH</button>
            </form>
            {% endif %}
        </td>
        <td>{{ mtime|date}} ({{ mtime|timesince }} ago)</td>
    </tr>
{% empty %}
  <tr><td colspan="2">No files found</td></tr>
{% endfor %}
</table>

{% with files as items %}
    {% include "snippets/page_navigator.html" %}
{% endwith %}

</div><commit_msg>suppress publish button on manage files page #188<commit_after>{# list recently modified source EAD files #}

<div class="section">

<h2>Recently modified files</h2>

{% if error %}<p class="error">Error: {{ error }}</p>{% endif %}

<div>{{ files.paginator.count }} files total</div>
{% with files as items %}
    {% include "snippets/page_navigator.html" %}
{% endwith %}
<table>
    <tr>
        <th colspan="3">Filename</th> {# spans columns for [publish,] preview, & clean #}
        <th>Last Modified</th>
    </tr>
{% for file, mtime in files.object_list %}
    <tr>
        <td>{{ file }}</td>
        <td><a href="{% url fa-admin:cleaned-ead-about file %}">CLEAN</a></td>
        <td>
            {% if perms.fa_admin.can_preview %}
            <form action="{% url fa-admin:preview-ead %}" method="post">{% csrf_token %}
                <button type="submit" name="filename" value="{{ file }}" >PREVIEW</button>
            </form>
            {% endif %}
        </td>
{% comment %} publish temporarily disabled while assessing workflow (publish from preview only)
        <td>
            {% if perms.fa_admin.can_publish %}
            <form action="{% url fa-admin:publish-ead %}" method="post">{% csrf_token %}
                <button type="submit" name="filename" value="{{ file }}" >PUBLISH</button>
            </form>
            {% endif %}
        </td> {% endcomment %}
        <td>{{ mtime|date}} ({{ mtime|timesince }} ago)</td>
    </tr>
{% empty %}
  <tr><td colspan="2">No files found</td></tr>
{% endfor %}
</table>

{% with files as items %}
    {% include "snippets/page_navigator.html" %}
{% endwith %}

</div>
{'fraction_non_alphanumeric': 0.19782678171939916, 'fraction_numerical': 0.003515500159795462, 'mean_word_length': 2.5730593607305936, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, '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': '5443230', 'n_tokens_mistral': 1101, 'n_tokens_neox': 986, 'n_words': 246}