feat: format html templates and update VS Code settings

Formatted multiple HTML templates in the project for better readability and maintainability. Introduced indentation, adjusted spacing, and improved overall structure without altering the business logic or functionality.

Added VS Code settings to associate HTML files with Jinja syntax highlighting to enhance the development experience.

No functional changes introduced, focused solely on code readability and development efficiency improvements.
This commit is contained in:
Kumi 2024-06-23 14:37:15 +02:00
parent 1ba8f68a0e
commit 7e328f5554
Signed by: kumi
GPG key ID: ECBCC9082395383F
18 changed files with 439 additions and 336 deletions

5
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"files.associations": {
"*.html": "jinja-html"
}
}

View file

@ -1,9 +1,8 @@
{% extends "base_generic.html" %} {% block title %}Email Sent{% endblock %} {% extends "base_generic.html" %}
{% block title %}Email Sent{% endblock %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<h2>Email Sent</h2> <h2>Email Sent</h2>
<p> <p>A login link has been sent to your email address. Please check your inbox.</p>
A login link has been sent to your email address. Please check your inbox.
</p>
</div> </div>
{% endblock %} {% endblock %}

View file

@ -1,13 +1,19 @@
{% extends "base_generic.html" %} {% block title %}Email Login{% endblock %} {% extends "base_generic.html" %}
{% block content %}{% load crispy_forms_tags %} {% block title %}Email Login{% endblock %}
{% block content %}
{% load crispy_forms_tags %}
<div class="container"> <div class="container">
<h2>Login</h2> <h2>Login</h2>
<p class="text-muted">Please login to access FreeDOI. If you don't have an <p class="text-muted">
account yet, one will be created for you.</p> Please login to access FreeDOI. If you don't have an
account yet, one will be created for you.
</p>
<form method="post"> <form method="post">
{% csrf_token %} {{ form | crispy }} {% csrf_token %} {{ form | crispy }}
<p class="text-muted">We will send you an email with a link to login. <p class="text-muted">
By submitting this form, you agree to our Privacy Policy.</p> We will send you an email with a link to login.
By submitting this form, you agree to our Privacy Policy.
</p>
<button type="submit" class="btn btn-primary">Send Login Link</button> <button type="submit" class="btn btn-primary">Send Login Link</button>
</form> </form>
</div> </div>

View file

@ -1,5 +1,6 @@
{% extends "base_generic.html" %} {% extends "base_generic.html" %}
{% block title %}Welcome to FreeDOI{% endblock%} {% block content %} {% block title %}Welcome to FreeDOI{% endblock title %}
{% block content %}
<div class="jumbotron text-center"> <div class="jumbotron text-center">
<h1 class="display-4">Welcome to FreeDOI</h1> <h1 class="display-4">Welcome to FreeDOI</h1>
<p class="lead"> <p class="lead">
@ -20,7 +21,6 @@
around is possible, however. around is possible, however.
</div> </div>
</div> </div>
<div id="learn-more" class="container mt-5"> <div id="learn-more" class="container mt-5">
<h2>What is FreeDOI?</h2> <h2>What is FreeDOI?</h2>
<p> <p>
@ -29,20 +29,35 @@
prefixes (20. to 29.) to categorize different fields, such as: prefixes (20. to 29.) to categorize different fields, such as:
</p> </p>
<ul> <ul>
<li><strong>20.</strong> Science / Research / Education</li> <li>
<li><strong>21.</strong> Computers / IT</li> <strong>20.</strong> Science / Research / Education
<li><strong>22.</strong> Entertainment / Art / Music / Video</li> </li>
<li><strong>23.</strong> Literature</li> <li>
<li><strong>24.</strong> Charity / Non-Profit</li> <strong>21.</strong> Computers / IT
<li><strong>25.</strong> Business</li> </li>
<li><strong>26.</strong> Government</li> <li>
<li><strong>29.</strong> Personal / Other</li> <strong>22.</strong> Entertainment / Art / Music / Video
</li>
<li>
<strong>23.</strong> Literature
</li>
<li>
<strong>24.</strong> Charity / Non-Profit
</li>
<li>
<strong>25.</strong> Business
</li>
<li>
<strong>26.</strong> Government
</li>
<li>
<strong>29.</strong> Personal / Other
</li>
</ul> </ul>
<p> <p>
FreeDOI also supports resolving official DOI prefixes (10.) to access FreeDOI also supports resolving official DOI prefixes (10.) to access
content from the official DOI system. content from the official DOI system.
</p> </p>
<h2>How Does It Work?</h2> <h2>How Does It Work?</h2>
<p> <p>
FreeDOI provides a simple and intuitive interface for creating and managing FreeDOI provides a simple and intuitive interface for creating and managing
@ -53,7 +68,7 @@
<strong>Register:</strong> Create an account to start managing DOIs. <strong>Register:</strong> Create an account to start managing DOIs.
</li> </li>
<li> <li>
<strong>Create Suffixes:</strong> Define suffixes for your organization or <strong>Request Suffixes:</strong> Get suffixes for your organization or
project. project.
</li> </li>
<li> <li>
@ -65,7 +80,6 @@
associated with any DOI. associated with any DOI.
</li> </li>
</ol> </ol>
<h2>Get Started</h2> <h2>Get Started</h2>
{% if user.is_authenticated %} {% if user.is_authenticated %}
<p> <p>
@ -81,7 +95,6 @@
<a class="btn btn-primary" href="{% url 'login' %}">Login or Sign Up</a> <a class="btn btn-primary" href="{% url 'login' %}">Login or Sign Up</a>
{% endif %} {% endif %}
</div> </div>
<div class="container mt-5"> <div class="container mt-5">
<h2>Contact Us</h2> <h2>Contact Us</h2>
<p> <p>
@ -90,4 +103,4 @@
<a href="mailto:support@freedoi.org">support@freedoi.org</a>. <a href="mailto:support@freedoi.org">support@freedoi.org</a>.
</p> </p>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,5 +1,6 @@
{% extends "base_generic.html" %} {% block title %}Delete Identifier {% extends "base_generic.html" %}
{% endblock %} {% block content %} {% block title %}Delete Identifier{% endblock title %}
{% block content %}
<div class="container mt-5"> <div class="container mt-5">
<h1>Delete Identifier</h1> <h1>Delete Identifier</h1>
<p>Are you sure you want to delete "{{ object.identifier }}"?</p> <p>Are you sure you want to delete "{{ object.identifier }}"?</p>
@ -7,10 +8,7 @@
{% csrf_token %} {% csrf_token %}
<button type="submit" class="btn btn-danger">Delete</button> <button type="submit" class="btn btn-danger">Delete</button>
</form> </form>
<a <a class="btn btn-link mt-3"
class="btn btn-link mt-3" href="{% url 'identifier_list' suffix_pk=object.suffix.pk %}">Back to identifiers</a>
href="{% url 'identifier_list' suffix_pk=object.suffix.pk %}"
>Back to identifiers</a
>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,26 +1,27 @@
{% extends "base_generic.html" %} {% block title %}Identifier Detail {% extends "base_generic.html" %}
{% endblock %} {% block content %} {% block title %}
Identifier Detail
{% endblock title %}
{% block content %}
<div class="container mt-5"> <div class="container mt-5">
<h1>{{ object.identifier }}</h1> <h1>{{ object.suffix.prefix.prefix }}.{{ object.suffix.suffix }}/{{ object.identifier }}</h1>
<p><strong>Suffix:</strong> {{ object.suffix }}</p> <p>
<p><strong>Target URL:</strong> {{ object.target_url }}</p> <strong>Prefix:</strong> {{ object.suffix.prefix.prefix }} ({{ object.suffix.prefix.name }})
<a <p>
class="btn btn-secondary" <strong>Suffix:</strong> {{ object.suffix.suffix }} ({{ object.suffix.name }})
href="{% url 'identifier_update' suffix_pk=object.suffix.pk pk=object.pk %}" </p>
>Edit</a <p>
> <strong>Target URL:</strong> {{ object.target_url }}
<form </p>
method="post" <a class="btn btn-secondary"
href="{% url 'identifier_update' suffix_pk=object.suffix.pk pk=object.pk %}">Edit</a>
<form method="post"
action="{% url 'identifier_delete' suffix_pk=object.suffix.pk pk=object.pk %}" action="{% url 'identifier_delete' suffix_pk=object.suffix.pk pk=object.pk %}"
style="display: inline" style="display: inline">
>
{% csrf_token %} {% csrf_token %}
<input class="btn btn-danger" type="submit" value="Delete" /> <input class="btn btn-danger" type="submit" value="Delete" />
</form> </form>
<a <a class="btn btn-link"
class="btn btn-link" href="{% url 'identifier_list' suffix_pk=object.suffix.pk %}">Back to identifiers</a>
href="{% url 'identifier_list' suffix_pk=object.suffix.pk %}"
>Back to identifiers</a
>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,21 +1,30 @@
{% extends "base_generic.html" %} {% block title %} {% extends "base_generic.html" %}
{% if form.instance.pk %}Edit{% else %}Create{% endif %} Identifier {% load crispy_forms_tags %}
{% endblock %} {% load crispy_forms_tags %} {% block content %} {% block title %}
<div class="container mt-5"> {% if form.instance.pk %}
<h1>{% if form.instance.pk %}Edit{% else %}Create{% endif %} Identifier</h1> Edit
<form method="post"> {% else %}
{% if form.errors %} Create
<div class="alert alert-danger" role="alert">
{{ form.errors }}
</div>
{% endif %} {% endif %}
{% csrf_token %} {{ form | crispy }} Identifier
{% endblock title %}
{% block content %}
<div class="container mt-5">
<h1>
{% if form.instance.pk %}
Edit
{% else %}
Create
{% endif %}
Identifier
</h1>
<form method="post">
{% if form.errors %}<div class="alert alert-danger" role="alert">{{ form.errors }}</div>{% endif %}
{% csrf_token %}
{{ form | crispy }}
<button type="submit" class="btn btn-primary">Save</button> <button type="submit" class="btn btn-primary">Save</button>
</form> </form>
<a <a class="btn btn-link mt-3"
class="btn btn-link mt-3" href="{% url 'identifier_list' suffix_pk=form.instance.suffix.pk %}">Back to identifiers</a>
href="{% url 'identifier_list' suffix_pk=form.instance.suffix.pk %}"
>Back to identifiers</a
>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,24 +1,22 @@
{% extends "base_generic.html" %} {% block title %}Identifiers{% endblock %} {% extends "base_generic.html" %}
{% block title %}
Identifiers
{% endblock title %}
{% block content %} {% block content %}
<div class="container mt-5"> <div class="container mt-5">
<h1>Identifiers{% if suffix %} for {{ suffix.name }}{% endif %}</h1> <h1>
Identifiers
{% if suffix %}for {{ suffix.name }}{% endif %}
</h1>
<ul class="list-group"> <ul class="list-group">
{% for identifier in object_list %} {% for identifier in object_list %}
<li class="list-group-item"> <li class="list-group-item">
<a <a href="{% url 'identifier_detail' suffix_pk=identifier.suffix.pk pk=identifier.pk %}">{{ identifier.suffix.prefix.prefix }}.{{ identifier.suffix.suffix }}/{{ identifier.identifier }}</a>
href="{% url 'identifier_detail' suffix_pk=identifier.suffix.pk pk=identifier.pk %}"
>{{ identifier.identifier }}</a
>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<a <a class="btn btn-primary mt-3"
class="btn btn-primary mt-3" href="{% if suffix.pk %}{% url 'identifier_create' suffix_pk=suffix.pk %}{% else %}{% url 'identifier_create' %}{% endif %}">Create new identifier</a>
href="{% if suffix.pk %}{% url 'identifier_create' suffix_pk=suffix.pk %}{% else %}{% url 'identifier_create' %}{% endif %}" <a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to suffixes</a>
>Create new identifier</a
>
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}"
>Back to suffixes</a
>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -3,6 +3,9 @@
<div class="container mt-5"> <div class="container mt-5">
<h1>Pending Suffixes</h1> <h1>Pending Suffixes</h1>
<ul class="list-group"> <ul class="list-group">
{% if pending_suffixes|length == 0 %}
<li class="list-group-item">No pending suffixes</li>
{% endif %}
{% for suffix in pending_suffixes %} {% for suffix in pending_suffixes %}
<li class="list-group-item"> <li class="list-group-item">
<a href="{% url 'suffix_approval' suffix.pk %}">{{ suffix.prefix.prefix }}.{{ suffix.suffix }} &dash; {{ suffix.name }}</a> <a href="{% url 'suffix_approval' suffix.pk %}">{{ suffix.prefix.prefix }}.{{ suffix.suffix }} &dash; {{ suffix.name }}</a>

View file

@ -1,4 +1,5 @@
{% extends "base_generic.html" %} {% block title %}Delete Prefix{% endblock %} {% extends "base_generic.html" %}
{% block title %}Delete Prefix{% endblock title %}
{% block content %} {% block content %}
<h1>Delete Prefix</h1> <h1>Delete Prefix</h1>
<p>Are you sure you want to delete "{{ object.name }}"?</p> <p>Are you sure you want to delete "{{ object.name }}"?</p>
@ -7,4 +8,4 @@
<input class="btn btn-danger" type="submit" value="Delete" /> <input class="btn btn-danger" type="submit" value="Delete" />
</form> </form>
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a> <a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
{% endblock %} {% endblock content %}

View file

@ -1,17 +1,26 @@
{% extends "base_generic.html" %} {% block title %}Prefix Detail{% endblock %} {% extends "base_generic.html" %}
{% block title %}
Prefix Detail
{% endblock title %}
{% block content %} {% block content %}
<h1>{{ object.name }}</h1> <h1>{{ object.name }}</h1>
<p><strong>Prefix:</strong> {{ object.prefix }}</p> <p>
<p><strong>Type:</strong> {{ object.get_type_display }}</p> <strong>Prefix:</strong> {{ object.prefix }} ({{ object.prefix.name }})
<p><strong>Remote Resolver:</strong> {{ object.remote_resolver }}</p> </p>
<p>
<strong>Type:</strong> {{ object.get_type_display }}
</p>
{% if object.type == "remote" %}
<p>
<strong>Remote Resolver:</strong> {{ object.remote_resolver }}
</p>
{% endif %}
<a class="btn btn-secondary" href="{% url 'prefix_update' object.pk %}">Edit</a> <a class="btn btn-secondary" href="{% url 'prefix_update' object.pk %}">Edit</a>
<form <form method="post"
method="post"
action="{% url 'prefix_delete' object.pk %}" action="{% url 'prefix_delete' object.pk %}"
style="display: inline" class="d-inline">
>
{% csrf_token %} {% csrf_token %}
<input class="btn btn-danger" type="submit" value="Delete" /> <input class="btn btn-danger" type="submit" value="Delete" />
</form> </form>
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a> <a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
{% endblock %} {% endblock content %}

View file

@ -1,15 +1,26 @@
{% extends "base_generic.html" %} {% block title %} {% extends "base_generic.html" %}
{% if form.instance.pk %}Edit{% else %}Create{% endif %} Prefix{% endblock %} {% block title %}
{% load crispy_forms_tags %} {% block content %} {% if form.instance.pk %}
<h1>{% if form.instance.pk %}Edit{% else %}Create{% endif %} Prefix</h1> Edit
<form method="post"> {% else %}
{% if form.errors %} Create
<div class="alert alert-danger" role="alert">
{{ form.errors }}
</div>
{% endif %} {% endif %}
Prefix
{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
<h1>
{% if form.instance.pk %}
Edit
{% else %}
Create
{% endif %}
Prefix
</h1>
<form method="post">
{% if form.errors %}<div class="alert alert-danger" role="alert">{{ form.errors }}</div>{% endif %}
{% csrf_token %} {{ form | crispy }} {% csrf_token %} {{ form | crispy }}
<input class="btn btn-primary" type="submit" value="Save" /> <input class="btn btn-primary" type="submit" value="Save" />
</form> </form>
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a> <a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
{% endblock %} {% endblock content %}

View file

@ -1,7 +1,18 @@
{% extends "base_generic.html" %} {% block title %}Prefixes{% endblock %} {% extends "base_generic.html" %}
{% block title %}
Prefixes
{% endblock title %}
{% block content %} {% block content %}
<h1>Prefixes</h1> <h1>Prefixes</h1>
<ul class="list-group"> <ul class="list-group">
{% if object_list|length == 0 %}
<li class="list-group-item">
No prefixes.
{% if not user.is_superuser}You can request prefixes by contacting the administrator.
{% endif %}
{% endif %}
</li>
{% endif %}
{% for prefix in object_list %} {% for prefix in object_list %}
<li class="list-group-item"> <li class="list-group-item">
<a href="{% url 'prefix_detail' prefix.pk %}">{{ prefix.prefix }} &dash; {{ prefix.name }}</a> <a href="{% url 'prefix_detail' prefix.pk %}">{{ prefix.prefix }} &dash; {{ prefix.name }}</a>
@ -9,8 +20,6 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% if user.is_superuser %} {% if user.is_superuser %}
<a class="btn btn-primary mt-3" href="{% url 'prefix_create' %}" <a class="btn btn-primary mt-3" href="{% url 'prefix_create' %}">Create new prefix</a>
>Create new prefix</a
>
{% endif %} {% endif %}
{% endblock %} {% endblock content %}

View file

@ -1,13 +1,15 @@
{% extends "base_generic.html" %} {% block title %}Approve Suffix{% endblock %} {% extends "base_generic.html" %}
{% load crispy_forms_tags %}{% block content %} {% block title %}
Approve Suffix
{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
<div class="container mt-5"> <div class="container mt-5">
<h1>Approve Suffix</h1> <h1>Approve Suffix</h1>
<form method="post"> <form method="post">
{% csrf_token %} {{ form | crispy }} {% csrf_token %} {{ form | crispy }}
<button type="submit" class="btn btn-primary">Approve</button> <button type="submit" class="btn btn-primary">Approve</button>
<a class="btn btn-link" href="{% url 'pending_suffixes' %}" <a class="btn btn-link" href="{% url 'pending_suffixes' %}">Back to pending suffixes</a>
>Back to pending suffixes</a
>
</form> </form>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,4 +1,7 @@
{% extends "base_generic.html" %} {% block title %}Delete Suffix{% endblock %} {% extends "base_generic.html" %}
{% block title %}
Delete Suffix
{% endblock title %}
{% block content %} {% block content %}
<div class="container mt-5"> <div class="container mt-5">
<h1>Delete Suffix</h1> <h1>Delete Suffix</h1>
@ -9,4 +12,4 @@
</form> </form>
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to list</a> <a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to list</a>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,30 +1,41 @@
{% extends "base_generic.html" %} {% block title %}Suffix Detail{% endblock %} {% extends "base_generic.html" %}
{% block title %}
Suffix Detail
{% endblock title %}
{% block content %} {% block content %}
<div class="container mt-5"> <div class="container mt-5">
<h1>{{ object.name }}</h1> <h1>{{ object.name }}</h1>
<p><strong>Suffix:</strong> {{ object.suffix }}</p> <p>
<p><strong>Prefix:</strong> {{ object.prefix }}</p> <strong>Suffix:</strong> {{ object.suffix }}
<p><strong>Type:</strong> {{ object.get_type_display }}</p> </p>
<p>
<strong>Prefix:</strong> {{ object.prefix }}
</p>
<p>
<strong>Type:</strong> {{ object.get_type_display }}
</p>
{% if object.type == "remote" %} {% if object.type == "remote" %}
<p><strong>Remote Resolver:</strong> {{ object.remote_resolver }}</p> <p>
<strong>Remote Resolver:</strong> {{ object.remote_resolver }}
</p>
{% endif %} {% endif %}
<p><strong>Approval:</strong> {% if object.approved %}Approved{% else %}Pending{% endif %}</p> <p>
<a class="btn btn-secondary" href="{% url 'suffix_update' object.pk %}" <strong>Approval:</strong>
>Edit</a {% if object.approved %}
> Approved
<form {% else %}
method="post" Pending
{% endif %}
</p>
<a class="btn btn-secondary" href="{% url 'suffix_update' object.pk %}">Edit</a>
<form method="post"
action="{% url 'suffix_delete' object.pk %}" action="{% url 'suffix_delete' object.pk %}"
style="display: inline" style="display: inline">
>
{% csrf_token %} {% csrf_token %}
<input class="btn btn-danger" type="submit" value="Delete" /> <input class="btn btn-danger" type="submit" value="Delete" />
</form> </form>
<a <a class="btn btn-primary"
class="btn btn-primary" href="{% url 'identifier_list' suffix_pk=object.pk %}">View Identifiers</a>
href="{% url 'identifier_list' suffix_pk=object.pk %}"
>View Identifiers</a
>
<a class="btn btn-link" href="{% url 'suffix_list' %}">Back to list</a> <a class="btn btn-link" href="{% url 'suffix_list' %}">Back to list</a>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,21 +1,39 @@
{% extends "base_generic.html" %} {% block title %} {% extends "base_generic.html" %}
{% if form.instance.pk %}Edit{% else %}Request{% endif %} Suffix{% endblock %} {% block title %}
{% load crispy_forms_tags %}{% block content %} {% if form.instance.pk %}
<div class="container mt-5"> Edit
<h1>{% if form.instance.pk %}Edit{% else %}Create{% endif %} Suffix</h1> {% else %}
<form method="post"> Request
{% if form.errors %}
<div class="alert alert-danger" role="alert">
{{ form.errors }}
</div>
{% endif %} {% endif %}
Suffix
{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
<div class="container mt-5">
<h1>
{% if form.instance.pk %}
Edit
{% else %}
Create
{% endif %}
Suffix
</h1>
<form method="post">
{% if form.errors %}<div class="alert alert-danger" role="alert">{{ form.errors }}</div>{% endif %}
{% csrf_token %} {{ form | crispy }} {% csrf_token %} {{ form | crispy }}
<p class="text-muted">Please make sure to include a full description of <p class="text-muted">
your intended use of the suffix in the "Description" field. Your request Please make sure to include a full description of your intended use of the
may be rejected if this information is not provided, or if the selected suffix in the "Description" field. Your request may be rejected if this
prefix is not appropriate for your intended use.</p> information is not provided, or if the selected prefix is not appropriate
for your intended use.
</p>
<p class="text-muted">
Note that the suffix will not be resolvable until it has been approved by
the administrator, and that using the suffix for other than the intended
purpose may result in the suffix being revoked.
</p>
<button type="submit" class="btn btn-primary">Save</button> <button type="submit" class="btn btn-primary">Save</button>
</form> </form>
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to list</a> <a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to list</a>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,16 +1,23 @@
{% extends "base_generic.html" %} {% block title %}Suffixes{% endblock %} {% extends "base_generic.html" %}
{% block title %}
Suffixes
{% endblock title %}
{% block content %} {% block content %}
<div class="container mt-5"> <div class="container mt-5">
<h1>Suffixes</h1> <h1>Suffixes</h1>
<ul class="list-group"> <ul class="list-group">
{% if object_list|length == 0 %}
<li class="list-group-item">
No suffixes.
<a href="{% url 'suffix_create' %}">Request a suffix now</a> to start issuing DOIs.
</li>
{% endif %}
{% for suffix in object_list %} {% for suffix in object_list %}
<li class="list-group-item"> <li class="list-group-item">
<a href="{% url 'suffix_detail' suffix.pk %}">{{ suffix.suffix.prefix }}.{{ suffix.suffix }} &dash; {{ suffix.name }}</a> <a href="{% url 'suffix_detail' suffix.pk %}">{{ suffix.suffix.prefix }}.{{ suffix.suffix }} &dash; {{ suffix.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<a class="btn btn-primary mt-3" href="{% url 'suffix_create' %}" <a class="btn btn-primary mt-3" href="{% url 'suffix_create' %}">Request new suffix</a>
>Create new suffix</a
>
</div> </div>
{% endblock %} {% endblock content %}