mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Add a separate page for linking to documentation
It’s going to get too cluttered to have these links on the API index page.
This commit is contained in:
@@ -16,6 +16,15 @@ def api_integration(service_id):
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/api/documentation")
|
||||
@login_required
|
||||
@user_has_permissions('manage_api_keys')
|
||||
def api_documentation(service_id):
|
||||
return render_template(
|
||||
'views/api/documentation.html'
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/api/keys")
|
||||
@login_required
|
||||
@user_has_permissions('manage_api_keys')
|
||||
|
||||
35
app/templates/views/api/documentation.html
Normal file
35
app/templates/views/api/documentation.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/table.html" import list_table, field, hidden_field_heading %}
|
||||
{% from "components/api-key.html" import api_key %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
{% block page_title %}
|
||||
API integration – GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
Documentation
|
||||
</h1>
|
||||
|
||||
<ul class="list list-bullet">
|
||||
{% for name, url in [
|
||||
('Java client', 'https://github.com/alphagov/notifications-java-client'),
|
||||
('Node JS client', 'https://github.com/alphagov/notifications-node-client'),
|
||||
('PHP client', 'https://github.com/alphagov/notifications-php-client'),
|
||||
('Python client', 'https://github.com/alphagov/notifications-python-client'),
|
||||
('Ruby client', 'https://github.com/alphagov/notifications-ruby-client')
|
||||
] %}
|
||||
<li>
|
||||
<a href="{{ url }}">{{ name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{{ page_footer(
|
||||
secondary_link=url_for('.api_integration', service_id=current_service.id),
|
||||
secondary_link_text='Back to API integration'
|
||||
) }}
|
||||
|
||||
{% endblock %}
|
||||
@@ -13,20 +13,6 @@
|
||||
</h1>
|
||||
|
||||
<a href="{{ url_for('.api_keys', service_id=current_service.id) }}">API keys</a>
|
||||
|
||||
<h2 class="heading-medium">API clients</h2>
|
||||
<ul class="list list-bullet">
|
||||
{% for name, url in [
|
||||
('Java', 'https://github.com/alphagov/notifications-java-client'),
|
||||
('Node JS', 'https://github.com/alphagov/notifications-node-client'),
|
||||
('PHP', 'https://github.com/alphagov/notifications-php-client'),
|
||||
('Python', 'https://quis.github.io/govuk_documentation_prototype/'),
|
||||
('Ruby', 'https://github.com/alphagov/notifications-ruby-client')
|
||||
] %}
|
||||
<li>
|
||||
<a href="{{ url }}">{{ name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('.api_documentation', service_id=current_service.id) }}">Documentation</a>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user