Skip to content

Commit 6c3a401

Browse files
committed
Tweaked the IPR Details page to show the possible a), b), and c) choices under section 'V' when licensing declaration to be provided later has been chosen.
- Legacy-Id: 12793
1 parent db1cc15 commit 6c3a401

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

ietf/ipr/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
iprs_from_docs, related_docs)
3333
from ietf.message.models import Message
3434
from ietf.message.utils import infer_message
35+
from ietf.name.models import IprLicenseTypeName
3536
from ietf.person.models import Person
3637
from ietf.secr.utils.document import get_rfc_num, is_draft
3738
from ietf.utils.draft_search import normalize_draftname
@@ -703,6 +704,7 @@ def get_details_tabs(ipr, selected):
703704
('History', urlreverse('ipr_history', kwargs={ 'id': ipr.pk }))
704705
]]
705706

707+
@debug.trace
706708
def show(request, id):
707709
"""View of individual declaration"""
708710
ipr = get_object_or_404(IprDisclosureBase, id=id).get_child()
@@ -717,6 +719,7 @@ def show(request, id):
717719
return render(request, "ipr/details_view.html", {
718720
'ipr': ipr,
719721
'tabs': get_details_tabs(ipr, 'Disclosure'),
722+
'choices_abc': [ i.desc for i in IprLicenseTypeName.objects.filter(slug__in=['no-license', 'royalty-free', 'reasonable', ]) ],
720723
'updates_iprs': ipr.relatedipr_source_set.all(),
721724
'updated_by_iprs': ipr.relatedipr_target_set.filter(source__state="posted")
722725
})

ietf/templates/ipr/details_view.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,19 @@ <h2>{% cycle section %}. Licensing Declaration</h2>
200200
specification, is as follows(select one licensing declaration option only):
201201
</p>
202202

203+
{% if ipr.licensing.slug == "provided-later" %}
204+
<div>
205+
Possible licencing choices a), b), and c) when Licencing Declaration to be Provided Later:
206+
<ul style="list-style: none">
207+
{% for desc in choices_abc %}
208+
<li>{{ desc}}</li>
209+
{% endfor %}
210+
</ul>
211+
</p>
212+
{% endif %}
203213
<dl class="dl-horizontal">
204214
<dt>Licensing</dt>
205-
<dd>{% if ipr.licensing.slug == "later" %}{{ ipr.licensing.desc|slice:"2:"|slice:":43" }}{% else %}{{ ipr.licensing.desc|slice:"2:" }}{% endif %}</dd>
215+
<dd>{% if ipr.licensing.slug == "provided-later" %}{{ ipr.licensing.desc|slice:"2:"|slice:":117" }}){% else %}{{ ipr.licensing.desc|slice:"2:" }}{% endif %}</dd>
206216

207217
<dt>Licensing information, comments, notes, or URL for further information</dt>
208218
<dd>{{ ipr.licensing_comments|default:"(No information submitted)"|linebreaks }}</dd>

0 commit comments

Comments
 (0)