Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
elixir
daisy
Commits
94a3a551
Commit
94a3a551
authored
Sep 20, 2021
by
Jacek Lebioda
Browse files
feat: issue page
parent
668cf45e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
0 deletions
+67
-0
web/templates/issues.html
web/templates/issues.html
+51
-0
web/urls.py
web/urls.py
+2
-0
web/views/issues.py
web/views/issues.py
+14
-0
No files found.
web/templates/issues.html
0 → 100644
View file @
94a3a551
{% 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
web/urls.py
View file @
94a3a551
...
...
@@ -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
...
...
web/views/issues.py
0 → 100644
View file @
94a3a551
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
}
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment