Skip to content
Snippets Groups Projects
Verified Commit 07f0ceab authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Bootstrap request dashboard to display request

parent 05b086ea
No related branches found
Tags v0.3.2
No related merge requests found
......@@ -11,4 +11,9 @@ from swh.web.add_forge_now import views
urlpatterns = [
url(r"^add/$", views.create_request, name="forge-add"),
url(r"^moderation/$", views.moderation_dashboard, name="moderation-forge-add"),
url(
r"^request/(?P<request_id>.+)/$",
views.request_dashboard,
name="request-dashboard-forge-add",
),
]
......@@ -126,3 +126,21 @@ def moderation_dashboard(request):
"""
existing = AddForgeRequest.objects.all()
return render(request, "add_forge_now/moderation.html", {"existing": existing},)
def request_dashboard(request, request_id):
"""Moderation dashboard to allow listing current requests.
Args:
request: actual user query
request_id: The add forge now request url (for now?)
Return:
Template response to moderate the request
"""
existing = AddForgeRequest.objects.get(forge_url=request_id)
return render(
request, "add_forge_now/request-dashboard.html", {"existing": existing},
)
{% extends "../layout.html" %}
{% comment %}
Copyright (C) 2022 The Software Heritage developers
See the AUTHORS file at the top-level directory of this distribution
License: GNU Affero General Public License version 3, or any later version
See top-level LICENSE file for more information
{% endcomment %}
{% load render_bundle from webpack_loader %}
{% load static %}
{% block header %}
{% render_bundle 'add_forge' %}
{% endblock %}
{% block title %}{{ heading }} &ndash; Software Heritage archive{% endblock %}
{% block navbar-content %}
<h4>Add forge now request dashboard</h4>
{% endblock %}
{% block content %}
{{ existing.forge_url }}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment