Skip to content

Commit 7e736e0

Browse files
committed
Summary: Port remaining IPR list pages obviating the need for ipr.css, fix some layout issues
- Legacy-Id: 8926
1 parent d3b56c2 commit 7e736e0

18 files changed

Lines changed: 140 additions & 230 deletions

ietf/ipr/views.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -245,23 +245,27 @@ def add_email(request, id):
245245
return render(request, 'ipr/add_email.html',dict(ipr=ipr,form=form))
246246

247247
@role_required('Secretariat',)
248-
def admin(request,state):
248+
def admin(request, state):
249249
"""Administrative disclosure listing. For non-posted disclosures"""
250-
if state == 'removed':
251-
states = ('removed','rejected')
252-
else:
253-
states = [state]
250+
states = IprDisclosureStateName.objects.filter(slug__in=[state, "rejected"] if state == "removed" else [state])
251+
if not states:
252+
raise Http404
253+
254254
iprs = IprDisclosureBase.objects.filter(state__in=states).order_by('-time')
255-
256-
tabs = [('Pending','pending',urlreverse('ipr_admin',kwargs={'state':'pending'}),True),
257-
('Removed','removed',urlreverse('ipr_admin',kwargs={'state':'removed'}),True),
258-
('Parked','parked',urlreverse('ipr_admin',kwargs={'state':'parked'}),True)]
259-
260-
template = 'ipr/admin_' + state + '.html'
261-
return render(request, template, {
255+
256+
tabs = [
257+
t + (t[0].lower() == state.lower(),)
258+
for t in [
259+
('Pending', urlreverse('ipr_admin', kwargs={'state':'pending'})),
260+
('Removed', urlreverse('ipr_admin', kwargs={'state':'removed'})),
261+
('Parked', urlreverse('ipr_admin', kwargs={'state':'parked'})),
262+
]]
263+
264+
return render(request, 'ipr/admin_list.html', {
262265
'iprs': iprs,
263266
'tabs': tabs,
264-
'selected': state
267+
'states': states,
268+
'administrative_list': state,
265269
})
266270

267271
@role_required('Secretariat',)

ietf/templates/ipr/admin_base.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

ietf/templates/ipr/admin_item.html

Lines changed: 0 additions & 33 deletions
This file was deleted.

ietf/templates/ipr/admin_list.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% extends "ietf.html" %}
2+
3+
{% load ietf_filters %}
4+
5+
{% block title %}IPR Admin - {% for s in states %}{{ s.name }}{% if not forloop.last %}/{% endif %}{% endfor %} Disclosures{% endblock %}
6+
7+
{% block content %}
8+
<h1>IPR Admin - {% for s in states %}{{ s.name }}{% if not forloop.last %}/{% endif %}{% endfor %} Disclosures</h1>
9+
10+
<p class="buttonlist">
11+
<a class="btn btn-default" href="{% url "ietf.ipr.views.showlist" %}">Back to IPR Disclosure Page</a>
12+
</p>
13+
14+
<ul class="nav nav-tabs" role="tablist">
15+
{% for name, link, selected in tabs %}
16+
<li {% if selected %}class="active"{% endif %}><a href="{{ link }}">{{ name }}</a></li>
17+
{% endfor %}
18+
</ul>
19+
20+
{% include "ipr/ipr_table.html" %}
21+
22+
{% endblock %}

ietf/templates/ipr/admin_parked.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

ietf/templates/ipr/admin_pending.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

ietf/templates/ipr/admin_removed.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

ietf/templates/ipr/details_edit.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
{% block pagehead %}
88
<link rel="stylesheet" href="/facelift/css/lib/select2.css">
99
<link rel="stylesheet" href="/facelift/css/lib/select2-bootstrap.css">
10-
{# <link rel="stylesheet" type="text/css" href="/css/ipr.css"></link> #}
1110
{% endblock %}
1211

1312
{% block content %}

ietf/templates/ipr/ipr_table.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{% load ietf_filters %}
2+
<table class="table table-condensed table-striped">
3+
<thead>
4+
<tr>
5+
<th class="date-column">Date</th>
6+
<th class="id-column">ID</th>
7+
<th class="title-column">Title</th>
8+
{% if administrative_list == 'pending' %}
9+
<th>Query</th>
10+
<th>Response Due</th>
11+
{% endif %}
12+
</tr>
13+
</thead>
14+
<tbody>
15+
{% for ipr in iprs %}
16+
<tr>
17+
<td class="date-column text-nowrap">{{ ipr.time|date:"Y-m-d" }}</td>
18+
<td class="id-column nowrap">{{ ipr.id }}</td>
19+
<td class="title-column">
20+
{% if ipr.state_id == 'posted' or administrative_list %}
21+
<div><a href="{% url "ietf.ipr.views.show" ipr.id %}">{{ ipr.title }}</a></div>
22+
{% else %}
23+
<div>{{ ipr.title }}</div>
24+
<div><i>This IPR disclosure was removed at the request of the submitter.</i></div>
25+
{% endif %}
26+
27+
{% for item in ipr.relatedipr_source_set.all %}
28+
{% if item.target.state_id == 'posted' %}
29+
<div>Updates ID <a href="{% url "ietf.ipr.views.show" item.target.id %}">#{{ item.target.id }}</a>.</div>
30+
{% endif %}
31+
{% endfor %}
32+
33+
{% for item in ipr.relatedipr_target_set.all %}
34+
{% if item.source.state_id == "posted" %}
35+
<div>Updated by ID <a href="{% url "ietf.ipr.views.show" item.source.id %}">#{{ item.source.id }}</a>.<div>
36+
{% endif %}
37+
{% endfor %}
38+
</td>
39+
40+
{% if administrative_list == 'pending' %}
41+
{% with ipr.get_latest_event_msgout as latest_msgout %}
42+
<td class="column-four">{% if latest_msgout %}{{ latest_msgout.time|date:"Y-m-d" }}{% endif %}</td>
43+
<td class="text-nowrap">
44+
{% if latest_msgout and latest_msgout.response_due %}
45+
{{ latest_msgout.response_due|date:"Y-m-d" }}
46+
{% if latest_msgout.response_past_due %}
47+
<span class="glyphicon glyphicon-exclamation-sign" title="Response overdue"></span>
48+
{% endif %}
49+
{% endif %}
50+
</td>
51+
{% endwith %}
52+
{% endif %}
53+
</tr>
54+
{% endfor %}
55+
</tbody>
56+
</table>

ietf/templates/ipr/list.html

Lines changed: 35 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -6,83 +6,53 @@
66

77
{% block bodyAttrs %}data-spy="scroll" data-target="#affix"{% endblock %}
88

9-
{% block pagehead %}
10-
<link rel="stylesheet" type="text/css" href="/css/ipr.css"></link>
11-
{% endblock %}
12-
139
{% block content %}
10+
<div class="row">
11+
<div class="col-sm-10">
1412

15-
<div class="row">
16-
<div class="col-sm-10">
17-
18-
<h1>Intellectual property rights disclosures</h1>
13+
<h1>Intellectual property rights disclosures</h1>
1914

20-
<div class="alert alert-info">
15+
<div class="alert alert-info">
2116
<p>
22-
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, <a href="http://www.ietf.org/rfc/rfc3979.txt">"Intellectual Property Rights in IETF Technology."</a>
17+
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, <a href="http://www.ietf.org/rfc/rfc3979.txt">"Intellectual Property Rights in IETF Technology."</a>
2318
</p>
2419

2520
<p>
26-
The IETF takes no position regarding the validity or scope of any
27-
intellectual property rights or other rights that might be claimed to
28-
pertain to the implementation or use of the technology described in any IETF documents or the extent to
29-
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.
21+
The IETF takes no position regarding the validity or scope of any
22+
intellectual property rights or other rights that might be claimed to
23+
pertain to the implementation or use of the technology described in any IETF documents or the extent to
24+
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.
3025
</p>
31-
</div>
26+
</div>
3227

33-
<p class="buttonlist">
28+
<p class="buttonlist">
3429
<a class="btn btn-default" href="{% url "ietf.ipr.views.about" %}">Submit an IPR disclosure</a>
3530
<a class="btn btn-default" href="{% url "ietf.ipr.views.search" %}">Search IPR disclosures</a>
3631
{% if user|has_role:"Secretariat" %}
37-
<a class="btn btn-default" href="{% url "ipr_admin_main" %}">Administrative View</a>
32+
<a class="btn btn-default" href="{% url "ipr_admin_main" %}">Administrative View</a>
3833
{% endif %}
39-
</p>
40-
41-
<h2 id="generic">Generic IPR disclosures</h2>
42-
<table class="table table-condensed table-striped">
43-
<thead>
44-
<tr><th class="date-column">Date</th><th class="id-column">ID</th><th class="title-column">Title</th></tr>
45-
</thead>
46-
<tbody>
47-
{% for ipr in generic_disclosures %}
48-
{% include "ipr/list_item.html" %}
49-
{% endfor %}
50-
</tbody>
51-
</table>
52-
53-
<h2 id="specific">Specific IPR disclosures</h2>
54-
<table class="table table-condensed table-striped">
55-
<thead>
56-
<tr><th class="date-column">Date</th><th class="id-column">ID</th><th class="title-column">Title</th></tr>
57-
</thead>
58-
<tbody>
59-
{% for ipr in specific_disclosures %}
60-
{% include "ipr/list_item.html" %}
61-
{% endfor %}
62-
</tbody>
63-
</table>
64-
65-
<h2 id="notify">Specific third-party IPR disclosures</h2>
66-
<table class="table table-condensed table-striped">
67-
<thead>
68-
<tr><th class="date-column">Date</th><th class="id-column">ID</th><th class="title-column">Title</th></tr>
69-
</thead>
70-
<tbody>
71-
{% for ipr in thirdpty_disclosures %}
72-
{% include "ipr/list_item.html" %}
73-
{% endfor %}
74-
</tbody>
75-
</table>
76-
77-
</div>
78-
<div class="col-sm-2 hidden-print bs-docs-sidebar" id="affix">
79-
<ul class="nav nav-pills nav-stacked small" data-spy="affix">
80-
<li><a href="#generic">Generic IPR disclosures</a></li>
81-
<li><a href="#specific">Specific IPR disclosures</a></li>
82-
<li><a href="#notify">Specific third-party IPR disclosures</a></li>
83-
</ul>
84-
</div>
85-
</div>
86-
{% endblock %}
34+
</p>
35+
36+
<h2 id="generic">Generic IPR disclosures</h2>
37+
38+
{% include "ipr/ipr_table.html" with iprs=generic_disclosures %}
8739

40+
<h2 id="specific">Specific IPR disclosures</h2>
8841

42+
{% include "ipr/ipr_table.html" with iprs=specific_disclosures %}
43+
44+
<h2 id="notify">Specific third-party IPR disclosures</h2>
45+
46+
{% include "ipr/ipr_table.html" with iprs=thirdpty_disclosures %}
47+
48+
</div>
49+
50+
<div class="col-sm-2 hidden-print bs-docs-sidebar" id="affix">
51+
<ul class="nav nav-pills nav-stacked small" data-spy="affix">
52+
<li><a href="#generic">Generic IPR disclosures</a></li>
53+
<li><a href="#specific">Specific IPR disclosures</a></li>
54+
<li><a href="#notify">Specific third-party IPR disclosures</a></li>
55+
</ul>
56+
</div>
57+
</div>
58+
{% endblock %}

0 commit comments

Comments
 (0)