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:
parent
1ba8f68a0e
commit
7e328f5554
18 changed files with 439 additions and 336 deletions
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"*.html": "jinja-html"
|
||||
}
|
||||
}
|
|
@ -1,9 +1,8 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Email Sent{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}Email Sent{% endblock %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h2>Email Sent</h2>
|
||||
<p>
|
||||
A login link has been sent to your email address. Please check your inbox.
|
||||
</p>
|
||||
</div>
|
||||
<div class="container">
|
||||
<h2>Email Sent</h2>
|
||||
<p>A login link has been sent to your email address. Please check your inbox.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Email Login{% endblock %}
|
||||
{% block content %}{% load crispy_forms_tags %}
|
||||
<div class="container">
|
||||
<h2>Login</h2>
|
||||
<p class="text-muted">Please login to access FreeDOI. If you don't have an
|
||||
account yet, one will be created for you.</p>
|
||||
<form method="post">
|
||||
{% csrf_token %} {{ form | crispy }}
|
||||
<p class="text-muted">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>
|
||||
</form>
|
||||
</div>
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}Email Login{% endblock %}
|
||||
{% block content %}
|
||||
{% load crispy_forms_tags %}
|
||||
<div class="container">
|
||||
<h2>Login</h2>
|
||||
<p class="text-muted">
|
||||
Please login to access FreeDOI. If you don't have an
|
||||
account yet, one will be created for you.
|
||||
</p>
|
||||
<form method="post">
|
||||
{% csrf_token %} {{ form | crispy }}
|
||||
<p class="text-muted">
|
||||
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>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,93 +1,106 @@
|
|||
{% extends "base_generic.html" %}
|
||||
{% block title %}Welcome to FreeDOI{% endblock%} {% block content %}
|
||||
<div class="jumbotron text-center">
|
||||
<h1 class="display-4">Welcome to FreeDOI</h1>
|
||||
<p class="lead">
|
||||
FreeDOI is a system for managing and resolving Digital Object Identifiers
|
||||
(DOIs) for various fields such as open source software, literature, personal
|
||||
use, and more. Our system is designed to be flexible, user-friendly, and
|
||||
free to use.
|
||||
</p>
|
||||
<hr class="my-4" />
|
||||
<p>
|
||||
Our goal is to provide a free, flexible system for assigning and resolving
|
||||
identifiers for digital content, similar to the official DOI system.
|
||||
</p>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<strong>Important:</strong> FreeDOI is not affiliated with the official DOI
|
||||
system. DOIs created with FreeDOI are not registered with the official DOI
|
||||
system and cannot be resolved using https://doi.org ‐ the other way
|
||||
around is possible, however.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="learn-more" class="container mt-5">
|
||||
<h2>What is FreeDOI?</h2>
|
||||
<p>
|
||||
FreeDOI is an alternative DOI system that allows users to create and manage
|
||||
DOIs for various types of digital content. Our system uses a range of
|
||||
prefixes (20. to 29.) to categorize different fields, such as:
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>20.</strong> Science / Research / Education</li>
|
||||
<li><strong>21.</strong> Computers / IT</li>
|
||||
<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>
|
||||
<p>
|
||||
FreeDOI also supports resolving official DOI prefixes (10.) to access
|
||||
content from the official DOI system.
|
||||
</p>
|
||||
|
||||
<h2>How Does It Work?</h2>
|
||||
<p>
|
||||
FreeDOI provides a simple and intuitive interface for creating and managing
|
||||
DOIs. Here's how you can get started:
|
||||
</p>
|
||||
<ol>
|
||||
<li>
|
||||
<strong>Register:</strong> Create an account to start managing DOIs.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Create Suffixes:</strong> Define suffixes for your organization or
|
||||
project.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Assign DOIs:</strong> Create and manage DOIs for your digital
|
||||
content.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Resolve DOIs:</strong> Use our resolver to access the content
|
||||
associated with any DOI.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h2>Get Started</h2>
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
Welcome back, {{ user.email }}! Use the navigation links above to
|
||||
manage your suffixes, and identifiers.
|
||||
</p>
|
||||
<a class="btn btn-primary" href="{% url 'suffix_list' %}">Manage Suffixes</a>
|
||||
{% else %}
|
||||
<p>
|
||||
Ready to get started? Create an account or log in to begin managing your
|
||||
DOIs.
|
||||
</p>
|
||||
<a class="btn btn-primary" href="{% url 'login' %}">Login or Sign Up</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="container mt-5">
|
||||
<h2>Contact Us</h2>
|
||||
<p>
|
||||
If you have any questions or need assistance, feel free to reach out to our
|
||||
support team at
|
||||
<a href="mailto:support@freedoi.org">support@freedoi.org</a>.
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}Welcome to FreeDOI{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="jumbotron text-center">
|
||||
<h1 class="display-4">Welcome to FreeDOI</h1>
|
||||
<p class="lead">
|
||||
FreeDOI is a system for managing and resolving Digital Object Identifiers
|
||||
(DOIs) for various fields such as open source software, literature, personal
|
||||
use, and more. Our system is designed to be flexible, user-friendly, and
|
||||
free to use.
|
||||
</p>
|
||||
<hr class="my-4" />
|
||||
<p>
|
||||
Our goal is to provide a free, flexible system for assigning and resolving
|
||||
identifiers for digital content, similar to the official DOI system.
|
||||
</p>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<strong>Important:</strong> FreeDOI is not affiliated with the official DOI
|
||||
system. DOIs created with FreeDOI are not registered with the official DOI
|
||||
system and cannot be resolved using https://doi.org ‐ the other way
|
||||
around is possible, however.
|
||||
</div>
|
||||
</div>
|
||||
<div id="learn-more" class="container mt-5">
|
||||
<h2>What is FreeDOI?</h2>
|
||||
<p>
|
||||
FreeDOI is an alternative DOI system that allows users to create and manage
|
||||
DOIs for various types of digital content. Our system uses a range of
|
||||
prefixes (20. to 29.) to categorize different fields, such as:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>20.</strong> Science / Research / Education
|
||||
</li>
|
||||
<li>
|
||||
<strong>21.</strong> Computers / IT
|
||||
</li>
|
||||
<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>
|
||||
<p>
|
||||
FreeDOI also supports resolving official DOI prefixes (10.) to access
|
||||
content from the official DOI system.
|
||||
</p>
|
||||
<h2>How Does It Work?</h2>
|
||||
<p>
|
||||
FreeDOI provides a simple and intuitive interface for creating and managing
|
||||
DOIs. Here's how you can get started:
|
||||
</p>
|
||||
<ol>
|
||||
<li>
|
||||
<strong>Register:</strong> Create an account to start managing DOIs.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Request Suffixes:</strong> Get suffixes for your organization or
|
||||
project.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Assign DOIs:</strong> Create and manage DOIs for your digital
|
||||
content.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Resolve DOIs:</strong> Use our resolver to access the content
|
||||
associated with any DOI.
|
||||
</li>
|
||||
</ol>
|
||||
<h2>Get Started</h2>
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
Welcome back, {{ user.email }}! Use the navigation links above to
|
||||
manage your suffixes, and identifiers.
|
||||
</p>
|
||||
<a class="btn btn-primary" href="{% url 'suffix_list' %}">Manage Suffixes</a>
|
||||
{% else %}
|
||||
<p>
|
||||
Ready to get started? Create an account or log in to begin managing your
|
||||
DOIs.
|
||||
</p>
|
||||
<a class="btn btn-primary" href="{% url 'login' %}">Login or Sign Up</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="container mt-5">
|
||||
<h2>Contact Us</h2>
|
||||
<p>
|
||||
If you have any questions or need assistance, feel free to reach out to our
|
||||
support team at
|
||||
<a href="mailto:support@freedoi.org">support@freedoi.org</a>.
|
||||
</p>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Delete Identifier
|
||||
{% endblock %} {% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>Delete Identifier</h1>
|
||||
<p>Are you sure you want to delete "{{ object.identifier }}"?</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
<a
|
||||
class="btn btn-link mt-3"
|
||||
href="{% url 'identifier_list' suffix_pk=object.suffix.pk %}"
|
||||
>Back to identifiers</a
|
||||
>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}Delete Identifier{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>Delete Identifier</h1>
|
||||
<p>Are you sure you want to delete "{{ object.identifier }}"?</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
<a class="btn btn-link mt-3"
|
||||
href="{% url 'identifier_list' suffix_pk=object.suffix.pk %}">Back to identifiers</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Identifier Detail
|
||||
{% endblock %} {% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>{{ object.identifier }}</h1>
|
||||
<p><strong>Suffix:</strong> {{ object.suffix }}</p>
|
||||
<p><strong>Target URL:</strong> {{ object.target_url }}</p>
|
||||
<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 %}"
|
||||
style="display: inline"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
<a
|
||||
class="btn btn-link"
|
||||
href="{% url 'identifier_list' suffix_pk=object.suffix.pk %}"
|
||||
>Back to identifiers</a
|
||||
>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
Identifier Detail
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>{{ object.suffix.prefix.prefix }}.{{ object.suffix.suffix }}/{{ object.identifier }}</h1>
|
||||
<p>
|
||||
<strong>Prefix:</strong> {{ object.suffix.prefix.prefix }} ({{ object.suffix.prefix.name }})
|
||||
<p>
|
||||
<strong>Suffix:</strong> {{ object.suffix.suffix }} ({{ object.suffix.name }})
|
||||
</p>
|
||||
<p>
|
||||
<strong>Target URL:</strong> {{ object.target_url }}
|
||||
</p>
|
||||
<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 %}"
|
||||
style="display: inline">
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
<a class="btn btn-link"
|
||||
href="{% url 'identifier_list' suffix_pk=object.suffix.pk %}">Back to identifiers</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,21 +1,30 @@
|
|||
{% extends "base_generic.html" %} {% block title %}
|
||||
{% if form.instance.pk %}Edit{% else %}Create{% endif %} Identifier
|
||||
{% endblock %} {% load crispy_forms_tags %} {% 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>
|
||||
</form>
|
||||
<a
|
||||
class="btn btn-link mt-3"
|
||||
href="{% url 'identifier_list' suffix_pk=form.instance.suffix.pk %}"
|
||||
>Back to identifiers</a
|
||||
>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block title %}
|
||||
{% if form.instance.pk %}
|
||||
Edit
|
||||
{% else %}
|
||||
Create
|
||||
{% endif %}
|
||||
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>
|
||||
</form>
|
||||
<a class="btn btn-link mt-3"
|
||||
href="{% url 'identifier_list' suffix_pk=form.instance.suffix.pk %}">Back to identifiers</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Identifiers{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
Identifiers
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>Identifiers{% if suffix %} for {{ suffix.name }}{% endif %}</h1>
|
||||
<ul class="list-group">
|
||||
{% for identifier in object_list %}
|
||||
<li class="list-group-item">
|
||||
<a
|
||||
href="{% url 'identifier_detail' suffix_pk=identifier.suffix.pk pk=identifier.pk %}"
|
||||
>{{ identifier.identifier }}</a
|
||||
>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a
|
||||
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
|
||||
>
|
||||
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}"
|
||||
>Back to suffixes</a
|
||||
>
|
||||
</div>
|
||||
{% endblock %}
|
||||
<div class="container mt-5">
|
||||
<h1>
|
||||
Identifiers
|
||||
{% if suffix %}for {{ suffix.name }}{% endif %}
|
||||
</h1>
|
||||
<ul class="list-group">
|
||||
{% for identifier in object_list %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'identifier_detail' suffix_pk=identifier.suffix.pk pk=identifier.pk %}">{{ identifier.suffix.prefix.prefix }}.{{ identifier.suffix.suffix }}/{{ identifier.identifier }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a 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>
|
||||
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to suffixes</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
<div class="container mt-5">
|
||||
<h1>Pending Suffixes</h1>
|
||||
<ul class="list-group">
|
||||
{% if pending_suffixes|length == 0 %}
|
||||
<li class="list-group-item">No pending suffixes</li>
|
||||
{% endif %}
|
||||
{% for suffix in pending_suffixes %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'suffix_approval' suffix.pk %}">{{ suffix.prefix.prefix }}.{{ suffix.suffix }} ‐ {{ suffix.name }}</a>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Delete Prefix{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}Delete Prefix{% endblock title %}
|
||||
{% block content %}
|
||||
<h1>Delete Prefix</h1>
|
||||
<p>Are you sure you want to delete "{{ object.name }}"?</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
|
||||
{% endblock %}
|
||||
<h1>Delete Prefix</h1>
|
||||
<p>Are you sure you want to delete "{{ object.name }}"?</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -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 %}
|
||||
<h1>{{ object.name }}</h1>
|
||||
<p><strong>Prefix:</strong> {{ object.prefix }}</p>
|
||||
<p><strong>Type:</strong> {{ object.get_type_display }}</p>
|
||||
<p><strong>Remote Resolver:</strong> {{ object.remote_resolver }}</p>
|
||||
<a class="btn btn-secondary" href="{% url 'prefix_update' object.pk %}">Edit</a>
|
||||
<form
|
||||
method="post"
|
||||
action="{% url 'prefix_delete' object.pk %}"
|
||||
style="display: inline"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
|
||||
{% endblock %}
|
||||
<h1>{{ object.name }}</h1>
|
||||
<p>
|
||||
<strong>Prefix:</strong> {{ object.prefix }} ({{ object.prefix.name }})
|
||||
</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>
|
||||
<form method="post"
|
||||
action="{% url 'prefix_delete' object.pk %}"
|
||||
class="d-inline">
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,15 +1,26 @@
|
|||
{% extends "base_generic.html" %} {% block title %}
|
||||
{% if form.instance.pk %}Edit{% else %}Create{% endif %} Prefix{% endblock %}
|
||||
{% 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>
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
{% if form.instance.pk %}
|
||||
Edit
|
||||
{% else %}
|
||||
Create
|
||||
{% endif %}
|
||||
{% csrf_token %} {{ form | crispy }}
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
</form>
|
||||
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
|
||||
{% endblock %}
|
||||
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 }}
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
</form>
|
||||
<a class="btn btn-link" href="{% url 'prefix_list' %}">Back to list</a>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,16 +1,25 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Prefixes{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
Prefixes
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<h1>Prefixes</h1>
|
||||
<ul class="list-group">
|
||||
<h1>Prefixes</h1>
|
||||
<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 %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'prefix_detail' prefix.pk %}">{{ prefix.prefix }} ‐ {{ prefix.name }}</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'prefix_detail' prefix.pk %}">{{ prefix.prefix }} ‐ {{ prefix.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if user.is_superuser %}
|
||||
<a class="btn btn-primary mt-3" href="{% url 'prefix_create' %}"
|
||||
>Create new prefix</a
|
||||
>
|
||||
<a class="btn btn-primary mt-3" href="{% url 'prefix_create' %}">Create new prefix</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Approve Suffix{% endblock %}
|
||||
{% load crispy_forms_tags %}{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>Approve Suffix</h1>
|
||||
<form method="post">
|
||||
{% csrf_token %} {{ form | crispy }}
|
||||
<button type="submit" class="btn btn-primary">Approve</button>
|
||||
<a class="btn btn-link" href="{% url 'pending_suffixes' %}"
|
||||
>Back to pending suffixes</a
|
||||
>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
Approve Suffix
|
||||
{% endblock title %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>Approve Suffix</h1>
|
||||
<form method="post">
|
||||
{% csrf_token %} {{ form | crispy }}
|
||||
<button type="submit" class="btn btn-primary">Approve</button>
|
||||
<a class="btn btn-link" href="{% url 'pending_suffixes' %}">Back to pending suffixes</a>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Delete Suffix{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
Delete Suffix
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>Delete Suffix</h1>
|
||||
<p>Are you sure you want to delete "{{ object.name }}"?</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to list</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
<div class="container mt-5">
|
||||
<h1>Delete Suffix</h1>
|
||||
<p>Are you sure you want to delete "{{ object.name }}"?</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to list</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -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 %}
|
||||
<div class="container mt-5">
|
||||
<h1>{{ object.name }}</h1>
|
||||
<p><strong>Suffix:</strong> {{ object.suffix }}</p>
|
||||
<p><strong>Prefix:</strong> {{ object.prefix }}</p>
|
||||
<p><strong>Type:</strong> {{ object.get_type_display }}</p>
|
||||
{% if object.type == "remote" %}
|
||||
<p><strong>Remote Resolver:</strong> {{ object.remote_resolver }}</p>
|
||||
{% endif %}
|
||||
<p><strong>Approval:</strong> {% if object.approved %}Approved{% else %}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 %}"
|
||||
style="display: inline"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
<a
|
||||
class="btn btn-primary"
|
||||
href="{% url 'identifier_list' suffix_pk=object.pk %}"
|
||||
>View Identifiers</a
|
||||
>
|
||||
<a class="btn btn-link" href="{% url 'suffix_list' %}">Back to list</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
<div class="container mt-5">
|
||||
<h1>{{ object.name }}</h1>
|
||||
<p>
|
||||
<strong>Suffix:</strong> {{ object.suffix }}
|
||||
</p>
|
||||
<p>
|
||||
<strong>Prefix:</strong> {{ object.prefix }}
|
||||
</p>
|
||||
<p>
|
||||
<strong>Type:</strong> {{ object.get_type_display }}
|
||||
</p>
|
||||
{% if object.type == "remote" %}
|
||||
<p>
|
||||
<strong>Remote Resolver:</strong> {{ object.remote_resolver }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<strong>Approval:</strong>
|
||||
{% if object.approved %}
|
||||
Approved
|
||||
{% else %}
|
||||
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 %}"
|
||||
style="display: inline">
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
<a class="btn btn-primary"
|
||||
href="{% url 'identifier_list' suffix_pk=object.pk %}">View Identifiers</a>
|
||||
<a class="btn btn-link" href="{% url 'suffix_list' %}">Back to list</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,21 +1,39 @@
|
|||
{% extends "base_generic.html" %} {% block title %}
|
||||
{% if form.instance.pk %}Edit{% else %}Request{% endif %} Suffix{% endblock %}
|
||||
{% 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 }}
|
||||
<p class="text-muted">Please make sure to include a full description of
|
||||
your intended use of the suffix in the "Description" field. Your request
|
||||
may be rejected if this information is not provided, or if the selected
|
||||
prefix is not appropriate for your intended use.</p>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
</form>
|
||||
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to list</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
{% if form.instance.pk %}
|
||||
Edit
|
||||
{% else %}
|
||||
Request
|
||||
{% 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 }}
|
||||
<p class="text-muted">
|
||||
Please make sure to include a full description of your intended use of the
|
||||
suffix in the "Description" field. Your request may be rejected if this
|
||||
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>
|
||||
</form>
|
||||
<a class="btn btn-link mt-3" href="{% url 'suffix_list' %}">Back to list</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,16 +1,23 @@
|
|||
{% extends "base_generic.html" %} {% block title %}Suffixes{% endblock %}
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
Suffixes
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>Suffixes</h1>
|
||||
<ul class="list-group">
|
||||
{% for suffix in object_list %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'suffix_detail' suffix.pk %}">{{ suffix.suffix.prefix }}.{{ suffix.suffix }} ‐ {{ suffix.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a class="btn btn-primary mt-3" href="{% url 'suffix_create' %}"
|
||||
>Create new suffix</a
|
||||
>
|
||||
</div>
|
||||
{% endblock %}
|
||||
<div class="container mt-5">
|
||||
<h1>Suffixes</h1>
|
||||
<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 %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'suffix_detail' suffix.pk %}">{{ suffix.suffix.prefix }}.{{ suffix.suffix }} ‐ {{ suffix.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a class="btn btn-primary mt-3" href="{% url 'suffix_create' %}">Request new suffix</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Reference in a new issue