<commit_before>{% extends "admin/core/base.html" %}}
{% load foundation %}

{% block title %}Edit Identifiers - {{ article.pk }}{% endblock title %}


{% block breadcrumbs %}
{{ block.super }}
<li>Edit</li>
<li>{{ article.title }}</li>
<li>Identifiers</li>
{% endblock breadcrumbs %}

{% block body %}
<div class="large-12 columns box">
    <div class="pull-right">

    </div>
    <div class="title-area">
        <h2>Edit Identifiers</h2>
        <a href="{% url 'add_new_identifier' article.pk %}" class="button">Add Identifier</a>
    </div>
    <table class="small scroll">
        <tr>
            <th>Type</th>
            <th>Identifier</th>
            <th>Edit</th>
            <th>Enabled</th>
            <th>Status</th>
            <th>Register</th>
            <th>Deposit</th>
            <th>Response</th>
            <th>Poll</th>
            <th>Delete</th>
        </tr>
        {% for ident in identifiers %}
        <tr>
            <form method="POST">
                {% csrf_token %}
                <td>{{ ident.get_id_type_display }}</td>
                <td>{{ ident.identifier }}</td>
                <td>
                    <a href="{% url 'edit_identifier' article.pk ident.pk %}" class="small button">
                        <i class="fa fa-edit">&nbsp;</i>
                        Edit
                    </a>
                </td>
                <td>
                    {% if ident.enabled %}
                        <i class="fa fa-check"></i>
                    {% else %}
                        <i class="fa fa-times"></i>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' %}
                        {% if ident.crossref_status %}
                            {{ ident.crossref_status.get_message_display }}
                        {% endif %}
                    {% else %}
                        <i class="fa fa-check"></i>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' %}
                        <button type="submit" class="small success button" formaction="{% url 'issue_doi' article.pk ident.pk %}">
                            Register
                        </button>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' %}
                        <a class="small success button" href="{% url 'show_doi' article.pk ident.pk %}">
                            {% if ident.crossref_status.latest_deposit %}
                                View XML
                            {% else %}
                                Preview XML
                            {% endif %}
                        </a>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' and ident.crossref_status.latest_deposit %}
                        <a class="small success button" href="{% url 'poll_doi_output' article.pk ident.pk %}">
                            View XML
                        </a>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' %}
                        <a class="small success button" href="{% url 'poll_doi' article.pk ident.pk %}">
                            Poll for status
                        </a>
                    {% endif %}
                </td>
                <td>
                    <button class="small button warning" name="delete" formaction="{% url 'delete_identifier' article.pk ident.pk %}">
                        <i class="fa fa-trash">&nbsp;</i>
                        Delete
                    </button>
                </td>
            </form>
        </tr>
        {% endfor %}
    </table>
</div>
{% endblock body %}<commit_msg>#3267 Fix bug that hid registration status<commit_after>{% extends "admin/core/base.html" %}}
{% load foundation %}

{% block title %}Edit Identifiers - {{ article.pk }}{% endblock title %}


{% block breadcrumbs %}
{{ block.super }}
<li>Edit</li>
<li>{{ article.title }}</li>
<li>Identifiers</li>
{% endblock breadcrumbs %}

{% block body %}
<div class="large-12 columns box">
    <div class="pull-right">

    </div>
    <div class="title-area">
        <h2>Edit Identifiers</h2>
        <a href="{% url 'add_new_identifier' article.pk %}" class="button">Add Identifier</a>
    </div>
    <table class="small scroll">
        <tr>
            <th>Type</th>
            <th>Identifier</th>
            <th>Edit</th>
            <th>Enabled</th>
            <th>Status</th>
            <th>Register</th>
            <th>Deposit</th>
            <th>Response</th>
            <th>Poll</th>
            <th>Delete</th>
        </tr>
        {% for ident in identifiers %}
        <tr>
            <form method="POST">
                {% csrf_token %}
                <td>{{ ident.get_id_type_display }}</td>
                <td>{{ ident.identifier }}</td>
                <td>
                    <a href="{% url 'edit_identifier' article.pk ident.pk %}" class="small button">
                        <i class="fa fa-edit">&nbsp;</i>
                        Edit
                    </a>
                </td>
                <td>
                    {% if ident.enabled %}
                        <i class="fa fa-check"></i>
                    {% else %}
                        <i class="fa fa-times"></i>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' %}
                        {% if ident.crossrefstatus %}
                            {{ ident.crossrefstatus.get_message_display }}
                        {% endif %}
                    {% else %}
                        <i class="fa fa-check"></i>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' %}
                        <button type="submit" class="small success button" formaction="{% url 'issue_doi' article.pk ident.pk %}">
                            Register
                        </button>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' %}
                        <a class="small success button" href="{% url 'show_doi' article.pk ident.pk %}">
                            {% if ident.crossrefstatus.latest_deposit %}
                                View XML
                            {% else %}
                                Preview XML
                            {% endif %}
                        </a>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' and ident.crossrefstatus.latest_deposit %}
                        <a class="small success button" href="{% url 'poll_doi_output' article.pk ident.pk %}">
                            View XML
                        </a>
                    {% endif %}
                </td>
                <td>
                    {% if ident.get_id_type_display == 'DOI' %}
                        <a class="small success button" href="{% url 'poll_doi' article.pk ident.pk %}">
                            Poll for status
                        </a>
                    {% endif %}
                </td>
                <td>
                    <button class="small button warning" name="delete" formaction="{% url 'delete_identifier' article.pk ident.pk %}">
                        <i class="fa fa-trash">&nbsp;</i>
                        Delete
                    </button>
                </td>
            </form>
        </tr>
        {% endfor %}
    </table>
</div>
{% endblock body %}
{'fraction_non_alphanumeric': 0.13982032139693787, 'fraction_numerical': 0.0015184107301024928, 'mean_word_length': 1.0251088905969767, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 175, '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': '4737182', 'n_tokens_mistral': 2281, 'n_tokens_neox': 1990, 'n_words': 442}