<commit_before>{% extends "jobs/base.html" %}

{% block page_title %}Moderate Job Posts | {{ SITE_INFO.site_name }}{% endblock %}

{% block content %}
<div class="row">
    <h1>Job Listing Reviews</h1>
    <table>
        <thead>
            <tr>
                <th>ID</th>
                <th>Description</th>
                <th>Status</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
    {% for object in object_list %}
    <tr>
        <td><a href="{% url 'jobs:job_detail_review' pk=object.pk %}">{{ object.pk }}</a></td>
        <td class="description">
            <p><strong>Category:</strong> {{ object.category }}</p>
            <p><strong>Company:</strong> {{ object.display_name }}</p>
            {{ object.description|truncatewords:"50" }}
        </td>
        <td>{{ object.status }}</td>
        <td>
          <form action="." method="post">
            {% csrf_token %}
            <input type="hidden" name="job_id" value="{{ object.id }}">
            <div>
              <a class="button" href="{% url 'jobs:job_detail_review' pk=object.pk %}">Review</a>
              <button name="action" value="approve">Approve</button>
              <button name="action" value="reject">Reject</button>
              <button name="action" value="remove">Remove</button>
            </div>
          </form>
        </td>
    </tr>
    {% endfor %}
        </tbody>
    </table>

    <!-- Pagination -->
    {% if page_obj.has_previous or page_obj.has_next %}
    <ul class="pagination menu">
        {% if page_obj.has_previous %}
            <li class="previous"><a href="?page={{ page_obj.previous_page_number }}">Prev</a></li>
        {% else %}
            <li class="previous"><a class="disabled" href="">Prev</a></li>
        {% endif %}

        {% for page in paginator.page_range %}
        <li><a {% if page_obj.number == page %}class="active" {% endif %}href="?page={{ page }}">{{ page }}</a></li>
        {% endfor %}

        {% if page_obj.has_next %}
            <li class="next"><a href="?page={{ page_obj.next_page_number }}">Next</a></li>
        {% else %}
            <li class="next"><a class="disabled" href="">Next</a></li>
        {% endif %}
    </ul>
    {% endif %}

</div>
{% endblock content %}

{% block right_sidebar %}
{% endblock right_sidebar %}
<commit_msg>Add "archive" button to jobs review page<commit_after>{% extends "jobs/base.html" %}

{% block page_title %}Moderate Job Posts | {{ SITE_INFO.site_name }}{% endblock %}

{% block content %}
<div class="row">
    <h1>Job Listing Reviews</h1>
    <table>
        <thead>
            <tr>
                <th>ID</th>
                <th>Description</th>
                <th>Status</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
    {% for object in object_list %}
    <tr>
        <td><a href="{% url 'jobs:job_detail_review' pk=object.pk %}">{{ object.pk }}</a></td>
        <td class="description">
            <p><strong>Category:</strong> {{ object.category }}</p>
            <p><strong>Company:</strong> {{ object.display_name }}</p>
            {{ object.description|truncatewords:"50" }}
        </td>
        <td>{{ object.status }}</td>
        <td>
          <form action="." method="post">
            {% csrf_token %}
            <input type="hidden" name="job_id" value="{{ object.id }}">
            <div>
              <a class="button" href="{% url 'jobs:job_detail_review' pk=object.pk %}">Review</a>
              <button name="action" value="approve">Approve</button>
              <button name="action" value="reject">Reject</button>
              <button name="action" value="archive">Archive</button>
              <button name="action" value="remove">Remove</button>
            </div>
          </form>
        </td>
    </tr>
    {% endfor %}
        </tbody>
    </table>

    <!-- Pagination -->
    {% if page_obj.has_previous or page_obj.has_next %}
    <ul class="pagination menu">
        {% if page_obj.has_previous %}
            <li class="previous"><a href="?page={{ page_obj.previous_page_number }}">Prev</a></li>
        {% else %}
            <li class="previous"><a class="disabled" href="">Prev</a></li>
        {% endif %}

        {% for page in paginator.page_range %}
        <li><a {% if page_obj.number == page %}class="active" {% endif %}href="?page={{ page }}">{{ page }}</a></li>
        {% endfor %}

        {% if page_obj.has_next %}
            <li class="next"><a href="?page={{ page_obj.next_page_number }}">Next</a></li>
        {% else %}
            <li class="next"><a class="disabled" href="">Next</a></li>
        {% endif %}
    </ul>
    {% endif %}

</div>
{% endblock content %}

{% block right_sidebar %}
{% endblock right_sidebar %}

{'fraction_non_alphanumeric': 0.198870765370138, 'fraction_numerical': 0.001672940192388122, 'mean_word_length': 2.0957928802589, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 157, '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': '2244756', 'n_tokens_mistral': 1606, 'n_tokens_neox': 1472, 'n_words': 297}