Skip to content

Commit

Permalink
Add header and breadcrumbs to signed consent view
Browse files Browse the repository at this point in the history
  • Loading branch information
cassidysymons committed Sep 12, 2023
1 parent 799a6ce commit f760139
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
8 changes: 7 additions & 1 deletion microsetta_interface/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2086,14 +2086,20 @@ def get_consent_view(*, account_id=None, source_id=None, consent_type=None):
False
)

if consent_type == "biospecimen":
consent_type_display = "Biospecimen"
else:
consent_type_display = "Survey"

return _render_with_defaults(
'signed_consent.jinja2',
account_id=account_id,
source_id=source_id,
source_age=source_output['consent']['age_range'],
source_name=source_output['source_name'],
consent=consent_output,
tl=consent_assets
tl=consent_assets,
consent_type_display=consent_type_display
)


Expand Down
4 changes: 2 additions & 2 deletions microsetta_interface/templates/consents.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<h2>{{ _('Survey') }}</h2>
</div>
<div class="consent-col col-end">
<a href="/accounts/{{ account_id }}/sources/{{ source_id }}/consents/data/view" class="consent-link" target="_blank">
<a href="/accounts/{{ account_id }}/sources/{{ source_id }}/consents/data/view" class="consent-link">
<img src="/static/img/pdf.svg" height="20" width="20" class="me-1"/> {{ _('View') }}
</a>
</div>
Expand All @@ -62,7 +62,7 @@
<h2>{{ _('Biospecimen') }}</h2>
</div>
<div class="consent-col col-end">
<a href="/accounts/{{ account_id }}/sources/{{ source_id }}/consents/biospecimen/view" class="consent-link" target="_blank">
<a href="/accounts/{{ account_id }}/sources/{{ source_id }}/consents/biospecimen/view" class="consent-link">
<img src="/static/img/pdf.svg" height="20" width="20" class="me-1"/> {{ _('View') }}
</a>
</div>
Expand Down
11 changes: 8 additions & 3 deletions microsetta_interface/templates/signed_consent.jinja2
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{% extends "sitebase.jinja2" %}
{% set page_title = _("Consent") %}
{% set show_breadcrumbs = False %}
{% set hide_header = True %}
{% set hide_footer = True %}
{% set show_breadcrumbs = True %}
{% block head %}
{% endblock %}

{% block breadcrumb %}
<li class="breadcrumb-item"><a href="/accounts/{{account_id}}">{{ _('Dashboard') }}</a></li>
<li class="breadcrumb-item"><a href="/accounts/{{account_id}}/sources/{{source_id}}">{{ _('My Profile') }}</a></li>
<li class="breadcrumb-item"><a href="/accounts/{{account_id}}/sources/{{source_id}}/consents">{{ _('Consent Documents') }}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ consent_type_display }}</li>
{% endblock %}

{% block content%}


<div class="container default-container">


Expand Down

0 comments on commit f760139

Please sign in to comment.