diff --git a/ietf/ipr/views.py b/ietf/ipr/views.py
index 4354262d4..fe464f8d5 100644
--- a/ietf/ipr/views.py
+++ b/ietf/ipr/views.py
@@ -245,23 +245,27 @@ def add_email(request, id):
return render(request, 'ipr/add_email.html',dict(ipr=ipr,form=form))
@role_required('Secretariat',)
-def admin(request,state):
+def admin(request, state):
"""Administrative disclosure listing. For non-posted disclosures"""
- if state == 'removed':
- states = ('removed','rejected')
- else:
- states = [state]
+ states = IprDisclosureStateName.objects.filter(slug__in=[state, "rejected"] if state == "removed" else [state])
+ if not states:
+ raise Http404
+
iprs = IprDisclosureBase.objects.filter(state__in=states).order_by('-time')
-
- tabs = [('Pending','pending',urlreverse('ipr_admin',kwargs={'state':'pending'}),True),
- ('Removed','removed',urlreverse('ipr_admin',kwargs={'state':'removed'}),True),
- ('Parked','parked',urlreverse('ipr_admin',kwargs={'state':'parked'}),True)]
-
- template = 'ipr/admin_' + state + '.html'
- return render(request, template, {
+
+ tabs = [
+ t + (t[0].lower() == state.lower(),)
+ for t in [
+ ('Pending', urlreverse('ipr_admin', kwargs={'state':'pending'})),
+ ('Removed', urlreverse('ipr_admin', kwargs={'state':'removed'})),
+ ('Parked', urlreverse('ipr_admin', kwargs={'state':'parked'})),
+ ]]
+
+ return render(request, 'ipr/admin_list.html', {
'iprs': iprs,
'tabs': tabs,
- 'selected': state
+ 'states': states,
+ 'administrative_list': state,
})
@role_required('Secretariat',)
diff --git a/ietf/templates/ipr/admin_base.html b/ietf/templates/ipr/admin_base.html
deleted file mode 100644
index b6455a6f7..000000000
--- a/ietf/templates/ipr/admin_base.html
+++ /dev/null
@@ -1,30 +0,0 @@
-{% extends "base.html" %}
-{# Copyright The IETF Trust 2007, All Rights Reserved #}
-
-{% block title %}IPR Admin{% endblock %}
-
-{% block pagehead %}
-
-{% endblock %}
-
-{% block content %}
-
-{% load ietf_filters %}
-
-
IPR Admin Page
-Back to IPR Disclosure Page
-
-
-
- {% for name, t, url, active, tooltip in tabs %}
- {{ name }}
- {% endfor %}
-
-
-
-{% block tab_content %}
-
-{% endblock %}
-
-
-{% endblock %}
diff --git a/ietf/templates/ipr/admin_item.html b/ietf/templates/ipr/admin_item.html
deleted file mode 100644
index 7516bdca4..000000000
--- a/ietf/templates/ipr/admin_item.html
+++ /dev/null
@@ -1,33 +0,0 @@
-{% load ietf_filters %}
-{# Copyright The IETF Trust 2007, All Rights Reserved #}
-
- {{ ipr.time|date:"Y-m-d" }}
- {{ ipr.id }}
-
- {{ ipr.title }}
-
- {% for item in ipr.relatedipr_source_set.all %}
- {% if item.target.state_id == 'posted' %}
- Updates ID #{{ item.target.id }} .
- {% endif %}
- {% endfor %}
- {% for item in ipr.relatedipr_target_set.all %}
- {% comment %}{% if item.processed == 1 and item.ipr.status != 2 %}{% endcomment %}
- {% if item.source.state_id == "posted" %}
- Updated by ID #{{ item.source.id }} .
- {% endif %}
- {% endfor %}
-
- {% if selected == 'pending' %}
- {{ ipr.get_latest_event_msgout.time|date:"Y-m-d" }}
-
- {% if ipr.get_latest_event_msgout.response_due %}
- {{ ipr.get_latest_event_msgout.response_due|date:"Y-m-d" }}
- {% if ipr.get_latest_event_msgout.response_past_due %}
-
- {% endif %}
- {% endif %}
-
- {% endif %}
-
-
diff --git a/ietf/templates/ipr/admin_list.html b/ietf/templates/ipr/admin_list.html
new file mode 100644
index 000000000..0df342540
--- /dev/null
+++ b/ietf/templates/ipr/admin_list.html
@@ -0,0 +1,22 @@
+{% extends "ietf.html" %}
+
+{% load ietf_filters %}
+
+{% block title %}IPR Admin - {% for s in states %}{{ s.name }}{% if not forloop.last %}/{% endif %}{% endfor %} Disclosures{% endblock %}
+
+{% block content %}
+ IPR Admin - {% for s in states %}{{ s.name }}{% if not forloop.last %}/{% endif %}{% endfor %} Disclosures
+
+
+ Back to IPR Disclosure Page
+
+
+
+ {% for name, link, selected in tabs %}
+ {{ name }}
+ {% endfor %}
+
+
+ {% include "ipr/ipr_table.html" %}
+
+{% endblock %}
diff --git a/ietf/templates/ipr/admin_parked.html b/ietf/templates/ipr/admin_parked.html
deleted file mode 100644
index b0b70f58d..000000000
--- a/ietf/templates/ipr/admin_parked.html
+++ /dev/null
@@ -1,16 +0,0 @@
-{% extends "ipr/admin_base.html" %}
-{# Copyright The IETF Trust 2007, All Rights Reserved #}
-
-{% load ietf_filters %}
-
-{% block tab_content %}
-
-Parked Disclosures
-
- Submitted ID # Title of IPR Disclosure
- {% for ipr in iprs %}
- {% include "ipr/admin_item.html" %}
- {% endfor %}
-
-
-{% endblock %}
\ No newline at end of file
diff --git a/ietf/templates/ipr/admin_pending.html b/ietf/templates/ipr/admin_pending.html
deleted file mode 100644
index 5a038cb3d..000000000
--- a/ietf/templates/ipr/admin_pending.html
+++ /dev/null
@@ -1,16 +0,0 @@
-{% extends "ipr/admin_base.html" %}
-{# Copyright The IETF Trust 2007, All Rights Reserved #}
-
-{% load ietf_filters %}
-
-{% block tab_content %}
-
-Pending Disclosures
-
- Submitted ID # Title of IPR Disclosure Query Response Due
- {% for ipr in iprs %}
- {% include "ipr/admin_item.html" %}
- {% endfor %}
-
-
-{% endblock %}
diff --git a/ietf/templates/ipr/admin_removed.html b/ietf/templates/ipr/admin_removed.html
deleted file mode 100644
index f3d746d3e..000000000
--- a/ietf/templates/ipr/admin_removed.html
+++ /dev/null
@@ -1,16 +0,0 @@
-{% extends "ipr/admin_base.html" %}
-{# Copyright The IETF Trust 2007, All Rights Reserved #}
-
-{% load ietf_filters %}
-
-{% block tab_content %}
-
-Removed / Rejected Disclosures
-
- Submitted ID # Title of IPR Disclosure
- {% for ipr in iprs %}
- {% include "ipr/admin_item.html" %}
- {% endfor %}
-
-
-{% endblock %}
\ No newline at end of file
diff --git a/ietf/templates/ipr/details_edit.html b/ietf/templates/ipr/details_edit.html
index 7fc0ab6b4..31a39a7e3 100644
--- a/ietf/templates/ipr/details_edit.html
+++ b/ietf/templates/ipr/details_edit.html
@@ -7,7 +7,6 @@
{% block pagehead %}
- {# #}
{% endblock %}
{% block content %}
diff --git a/ietf/templates/ipr/ipr_table.html b/ietf/templates/ipr/ipr_table.html
new file mode 100644
index 000000000..861b1f4fe
--- /dev/null
+++ b/ietf/templates/ipr/ipr_table.html
@@ -0,0 +1,56 @@
+{% load ietf_filters %}
+
+
+
+ Date
+ ID
+ Title
+ {% if administrative_list == 'pending' %}
+ Query
+ Response Due
+ {% endif %}
+
+
+
+ {% for ipr in iprs %}
+
+ {{ ipr.time|date:"Y-m-d" }}
+ {{ ipr.id }}
+
+ {% if ipr.state_id == 'posted' or administrative_list %}
+
+ {% else %}
+ {{ ipr.title }}
+ This IPR disclosure was removed at the request of the submitter.
+ {% endif %}
+
+ {% for item in ipr.relatedipr_source_set.all %}
+ {% if item.target.state_id == 'posted' %}
+
+ {% endif %}
+ {% endfor %}
+
+ {% for item in ipr.relatedipr_target_set.all %}
+ {% if item.source.state_id == "posted" %}
+
+
+ {% if administrative_list == 'pending' %}
+ {% with ipr.get_latest_event_msgout as latest_msgout %}
+ {% if latest_msgout %}{{ latest_msgout.time|date:"Y-m-d" }}{% endif %}
+
+ {% if latest_msgout and latest_msgout.response_due %}
+ {{ latest_msgout.response_due|date:"Y-m-d" }}
+ {% if latest_msgout.response_past_due %}
+
+ {% endif %}
+ {% endif %}
+
+ {% endwith %}
+ {% endif %}
+
+ {% endfor %}
+
+
diff --git a/ietf/templates/ipr/list.html b/ietf/templates/ipr/list.html
index 1128dd464..7bb079af3 100644
--- a/ietf/templates/ipr/list.html
+++ b/ietf/templates/ipr/list.html
@@ -6,83 +6,53 @@
{% block bodyAttrs %}data-spy="scroll" data-target="#affix"{% endblock %}
-{% block pagehead %}
-
-{% endblock %}
-
{% block content %}
+
+
-
-
+
Intellectual property rights disclosures
-
Intellectual property rights disclosures
-
-
+
- This page provides a mechanism for filing disclosures about intellectual property rights (IPR) and for finding out what IPR disclosures have been filed. The IETF intellectual property rights rules are defined in RFC 3979, "Intellectual Property Rights in IETF Technology."
+ This page provides a mechanism for filing disclosures about intellectual property rights (IPR) and for finding out what IPR disclosures have been filed. The IETF intellectual property rights rules are defined in RFC 3979, "Intellectual Property Rights in IETF Technology."
- The IETF takes no position regarding the validity or scope of any
- intellectual property rights or other rights that might be claimed to
- pertain to the implementation or use of the technology described in any IETF documents or the extent to
- which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights.
+ The IETF takes no position regarding the validity or scope of any
+ intellectual property rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in any IETF documents or the extent to
+ which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights.
-
+
-
+
Submit an IPR disclosure
Search IPR disclosures
{% if user|has_role:"Secretariat" %}
- Administrative View
+ Administrative View
{% endif %}
-
+
-
Generic IPR disclosures
-
-
- Date ID Title
-
-
- {% for ipr in generic_disclosures %}
- {% include "ipr/list_item.html" %}
- {% endfor %}
-
-
+
Generic IPR disclosures
-
Specific IPR disclosures
-
-
- Date ID Title
-
-
- {% for ipr in specific_disclosures %}
- {% include "ipr/list_item.html" %}
- {% endfor %}
-
-
+ {% include "ipr/ipr_table.html" with iprs=generic_disclosures %}
-
Specific third-party IPR disclosures
-
-
- Date ID Title
-
-
- {% for ipr in thirdpty_disclosures %}
- {% include "ipr/list_item.html" %}
- {% endfor %}
-
-
+
Specific IPR disclosures
-
-
-
+ {% include "ipr/ipr_table.html" with iprs=specific_disclosures %}
+
+
Specific third-party IPR disclosures
+
+ {% include "ipr/ipr_table.html" with iprs=thirdpty_disclosures %}
+
+
+
+
+
{% endblock %}
-
-
diff --git a/ietf/templates/ipr/list_item.html b/ietf/templates/ipr/list_item.html
deleted file mode 100644
index be5bcd3b1..000000000
--- a/ietf/templates/ipr/list_item.html
+++ /dev/null
@@ -1,24 +0,0 @@
-{% load ietf_filters %}
-
- {{ ipr.time|date:"Y-m-d" }}
- {{ ipr.id }}
-
- {% if ipr.state_id == 'posted' %}
- {{ ipr.title }}
- {% else %}
- {{ ipr.title }}
- This IPR disclosure was removed at the request of the submitter.
- {% endif %}
-
- {% for item in ipr.relatedipr_source_set.all %}
- {% if item.target.state_id == 'posted' %}
- Updates ID #{{ item.target.id }} .
- {% endif %}
- {% endfor %}
- {% for item in ipr.relatedipr_target_set.all %}
- {% if item.source.state_id == "posted" %}
- Updated by ID #{{ item.source.id }} .
- {% endif %}
- {% endfor %}
-
-
diff --git a/ietf/templates/ipr/search.html b/ietf/templates/ipr/search.html
index 8b43433ed..c74574cbd 100644
--- a/ietf/templates/ipr/search.html
+++ b/ietf/templates/ipr/search.html
@@ -1,9 +1,5 @@
{% extends "ietf.html" %}
-{% block pagehead %}
-
-{% endblock %}
-
{% block title %}IPR search{% endblock %}
{% block content %}
diff --git a/ietf/templates/ipr/search_doc_result.html b/ietf/templates/ipr/search_doc_result.html
index a6706734a..e1fdfabac 100644
--- a/ietf/templates/ipr/search_doc_result.html
+++ b/ietf/templates/ipr/search_doc_result.html
@@ -19,7 +19,7 @@
{% for ipr in iprs %}
{{ ipr.time|date:"Y-m-d" }}
- {{ ipr.id }}
+ {{ ipr.id }}
{{ ipr.title }}
{% endfor %}
@@ -50,7 +50,7 @@
{% if ipr.disclosure.state_id in states %}
{{ ipr.disclosure.time|date:"Y-m-d" }}
- {{ ipr.disclosure.id }}
+ {{ ipr.disclosure.id }}
{{ ipr.disclosure.title }}
{% endif %}
diff --git a/ietf/templates/ipr/search_doctitle_result.html b/ietf/templates/ipr/search_doctitle_result.html
index 6310cd777..753536955 100644
--- a/ietf/templates/ipr/search_doctitle_result.html
+++ b/ietf/templates/ipr/search_doctitle_result.html
@@ -24,7 +24,7 @@
{% for ipr in alias.document.ipr %}
{{ ipr.disclosure.time|date:"Y-m-d" }}
- {{ ipr.disclosure.id }}
+ {{ ipr.disclosure.id }}
{% for item in ipr.disclosure.updated_by.all %}
{% if item.source.state_id == "posted" %}
diff --git a/ietf/templates/ipr/search_form.html b/ietf/templates/ipr/search_form.html
index ab03e59ac..a40b0c80f 100644
--- a/ietf/templates/ipr/search_form.html
+++ b/ietf/templates/ipr/search_form.html
@@ -2,7 +2,7 @@
IPR Search
-