Commit 94a3a551 authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

feat: issue page

parent 668cf45e
{% extends 'layout.html' %}
{% load staticfiles %}
{% block content %}
{% if issues|length > 0 %}
<div class="row mt-4">
<div class="jumbotron col">
<h1 class="display-4">Current issues</h1>
</div>
</div>
<div class="row mt-4">
<div class="card col">
<div class="card-body">
<div id="form-container" class="card-text">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Code</th>
<th scope="col">Description</th>
<th scope="col">Object</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
{% for issue in issues %}<tr>
<th scope="row">{{ forloop.counter }}</th>
<td>{{ issue.code }}</td>
<td><strong>{{ issue.description }}</strong></td>
<td><a href="{{ issue.url }}">{{ issue.object_title }}</a></td>
<td><a class="btn btn-secondary btn-outline" href="{{ issue.url }}">Fix</a></td>
</tr>{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% else %}
<div class="row mt-4">
<div class="jumbotron col">
<h1 class="display-4">No issues found!</h1>
</div>
</div>
{% endif %}
{% endblock content %}
\ No newline at end of file
......@@ -20,6 +20,7 @@ from web.views.datasets import DatasetCreateView, DatasetDetailView, DatasetEdit
dataset_list, publish_dataset, unpublish_dataset
from web.views.export import cohorts_export, contacts_export, contracts_export, \
datasets_export, partners_export, projects_export
from web.views.issues import issues
from web.views.partner import PartnerCreateView, PartnerDelete, PartnerDetailView, \
PartnerEditView, partner_search_view, \
publish_partner, unpublish_partner
......@@ -37,6 +38,7 @@ web_urls = [
# Single pages
path('', dashboard, name='dashboard'),
path('about', about, name='about'),
path('issues', issues, name='issues'),
path('profile', profile.ProfileEditView.as_view(), name='profile'),
# API urls
......
from django.shortcuts import render
from core.reporting import ReportParametersCollector
def issues(request):
report_params = ReportParametersCollector.generate_for_user(request.user)
return render(
request,
'issues.html',
{
'issues': report_params.issues
}
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment