From 6c3a4015c562375ebe05b0cf4fb1f60e1a4d7c28 Mon Sep 17 00:00:00 2001
From: Henrik Levkowetz
Date: Wed, 8 Feb 2017 18:04:34 +0000
Subject: [PATCH] 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
---
ietf/ipr/views.py | 3 +++
ietf/templates/ipr/details_view.html | 12 +++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/ietf/ipr/views.py b/ietf/ipr/views.py
index 3ec7a0a3d..cf59220de 100644
--- a/ietf/ipr/views.py
+++ b/ietf/ipr/views.py
@@ -32,6 +32,7 @@ from ietf.ipr.utils import (get_genitive, get_ipr_summary,
iprs_from_docs, related_docs)
from ietf.message.models import Message
from ietf.message.utils import infer_message
+from ietf.name.models import IprLicenseTypeName
from ietf.person.models import Person
from ietf.secr.utils.document import get_rfc_num, is_draft
from ietf.utils.draft_search import normalize_draftname
@@ -703,6 +704,7 @@ def get_details_tabs(ipr, selected):
('History', urlreverse('ipr_history', kwargs={ 'id': ipr.pk }))
]]
+@debug.trace
def show(request, id):
"""View of individual declaration"""
ipr = get_object_or_404(IprDisclosureBase, id=id).get_child()
@@ -717,6 +719,7 @@ def show(request, id):
return render(request, "ipr/details_view.html", {
'ipr': ipr,
'tabs': get_details_tabs(ipr, 'Disclosure'),
+ 'choices_abc': [ i.desc for i in IprLicenseTypeName.objects.filter(slug__in=['no-license', 'royalty-free', 'reasonable', ]) ],
'updates_iprs': ipr.relatedipr_source_set.all(),
'updated_by_iprs': ipr.relatedipr_target_set.filter(source__state="posted")
})
diff --git a/ietf/templates/ipr/details_view.html b/ietf/templates/ipr/details_view.html
index bbac6ef63..3dca63f7f 100644
--- a/ietf/templates/ipr/details_view.html
+++ b/ietf/templates/ipr/details_view.html
@@ -200,9 +200,19 @@
specification, is as follows(select one licensing declaration option only):
+ {% if ipr.licensing.slug == "provided-later" %}
+
+ Possible licencing choices a), b), and c) when Licencing Declaration to be Provided Later:
+
+ {% for desc in choices_abc %}
+ - {{ desc}}
+ {% endfor %}
+
+
+ {% endif %}
- Licensing
- - {% if ipr.licensing.slug == "later" %}{{ ipr.licensing.desc|slice:"2:"|slice:":43" }}{% else %}{{ ipr.licensing.desc|slice:"2:" }}{% endif %}
+ - {% if ipr.licensing.slug == "provided-later" %}{{ ipr.licensing.desc|slice:"2:"|slice:":117" }}){% else %}{{ ipr.licensing.desc|slice:"2:" }}{% endif %}
- Licensing information, comments, notes, or URL for further information
- {{ ipr.licensing_comments|default:"(No information submitted)"|linebreaks }}