Skip to content

Commit b675c06

Browse files
committed
Summary: Facelift IPR details and history pages, and fix a couple of IPR glitches
- Legacy-Id: 8920
1 parent 7462ade commit b675c06

7 files changed

Lines changed: 294 additions & 356 deletions

File tree

ietf/ipr/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class GenericDisclosureForm(forms.Form):
116116
patent_info = forms.CharField(max_length=255,widget=forms.Textarea, required=False, help_text="Patent, Serial, Publication, Registration, or Application/File number(s), Date(s) granted or applied for, Country, and any additional notes")
117117
has_patent_pending = forms.BooleanField(required=False)
118118
statement = forms.CharField(max_length=255,widget=forms.Textarea,required=False)
119-
updates = SearchableIprDisclosuresField(required=False, help_text="If this disclosure <strong>updates</strong> other disclosures identify here which ones. Leave this field blank if this disclosure does not update any prior disclosures. Note: Updates to IPR disclosures must only be made by authorized representatives of the original submitters. Updates will automatically be forwarded to the current Patent Holder's Contact and to the Submitter of the original IPR disclosure.")
119+
updates = SearchableIprDisclosuresField(required=False, help_text="If this disclosure <strong>updates</strong> other disclosures identify here which ones. Leave this field blank if this disclosure does not update any prior disclosures. <strong>Note</strong>: Updates to IPR disclosures must only be made by authorized representatives of the original submitters. Updates will automatically be forwarded to the current Patent Holder's Contact and to the Submitter of the original IPR disclosure.")
120120
same_as_ii_above = forms.BooleanField(label="Same as in section II above", required=False)
121121

122122
def __init__(self,*args,**kwargs):

ietf/ipr/views.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -393,14 +393,11 @@ def history(request, id):
393393
if not has_role(request.user, "Secretariat"):
394394
events = events.exclude(type='private_comment')
395395

396-
tabs = [('Disclosure','disclosure',urlreverse('ipr_show',kwargs={'id':id}),True),
397-
('History','history',urlreverse('ipr_history',kwargs={'id':id}),True)]
398-
399396
return render(request, "ipr/details_history.html", {
400397
'events':events,
401398
'ipr': ipr,
402-
'tabs':tabs,
403-
'selected':'history'
399+
'tabs': get_details_tabs(ipr, 'History'),
400+
'selected_tab_entry':'history'
404401
})
405402

406403
def iprs_for_drafts_txt(request):
@@ -677,6 +674,14 @@ def search(request):
677674
form = SearchForm(initial={'state':['all']})
678675
return render(request, "ipr/search.html", {"form":form })
679676

677+
def get_details_tabs(ipr, selected):
678+
return [
679+
t + (t[0].lower() == selected.lower(),)
680+
for t in [
681+
('Disclosure', urlreverse('ipr_show', kwargs={ 'id': ipr.pk })),
682+
('History', urlreverse('ipr_history', kwargs={ 'id': ipr.pk }))
683+
]]
684+
680685
def show(request, id):
681686
"""View of individual declaration"""
682687
ipr = get_object_or_404(IprDisclosureBase, id=id).get_child()
@@ -688,13 +693,11 @@ def show(request, id):
688693
elif ipr.state.slug != 'posted':
689694
raise Http404
690695

691-
tabs = [('Disclosure','disclosure',urlreverse('ipr_show',kwargs={'id':id}),True),
692-
('History','history',urlreverse('ipr_history',kwargs={'id':id}),True)]
693-
694696
return render(request, "ipr/details_view.html", {
695697
'ipr': ipr,
696-
'tabs':tabs,
697-
'selected':'disclosure',
698+
'tabs': get_details_tabs(ipr, 'Disclosure'),
699+
'updates_iprs': ipr.relatedipr_source_set.all(),
700+
'updated_by_iprs': ipr.relatedipr_target_set.filter(source__state="posted")
698701
})
699702

700703
def showlist(request):

ietf/templates/ipr/details_base.html

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

ietf/templates/ipr/details_edit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ <h2>{% cycle section %}. IETF document or other contribution to which this IPR d
152152

153153
<div class="form-group">
154154
<label class="col-md-2 control-label"></label>
155-
<div class="col-md-10"><a class="draft-add-row btn btn-default"><i class="glyphicon glyphicon-plus"></i> Add more</a></div>
155+
<div class="col-md-10"><a class="draft-add-row btn btn-default"><span class="glyphicon glyphicon-plus" aira-hidden="true"></span> Add more</a></div>
156156
</div>
157157

158158
{% bootstrap_field form.other_designations layout='horizontal' %}
Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,52 @@
1-
{% extends "ipr/details_base.html" %}
2-
{# Copyright The IETF Trust 2007, All Rights Reserved #}
3-
4-
{% load ietf_filters %}
5-
{% load ipr_filters %}
6-
7-
{% block pagehead %}
8-
<link rel="stylesheet" type="text/css" href="/css/ipr.css"></link>
9-
{% endblock %}
10-
11-
{% block tab_content %}
12-
13-
<h2>Disclosure history</h2>
14-
{% if user|has_role:"Area Director,Secretariat,IANA,RFC Editor" %}
15-
<div class="history-actions">
16-
<a class="button" href="{% url "ipr_add_comment" id=ipr.id %}">Add comment</a>
17-
<a class="button" href="{% url "ipr_add_email" id=ipr.id %}">Add email</a>
18-
</div>
19-
{% endif %}
20-
21-
22-
<table class="ietf-table history">
23-
<tr><th class="date-column">Date</th><th>Type</th><th>By</th><th>Text</th></tr>
24-
25-
{% for e in events %}
26-
<tr class="{% cycle oddrow,evenrow %}" id="history-{{ e.pk }}">
27-
<td class="date-column">{{ e.time|date:"Y-m-d" }}</td>
28-
<td>{{ e.type }}
29-
{% if e.response_due %}
30-
{% if e.response_past_due %}
31-
<img src="/images/warning.png" title="Response overdue"/>
1+
{% extends "ietf.html" %}
2+
3+
{% load ietf_filters ipr_filters %}
4+
5+
{% block title %}History for IPR - {{ ipr.title }}{% endblock %}
6+
7+
{% block content %}
8+
<h1>History for IPR disclosure<br><small>{{ ipr.title }}</small></h1>
9+
10+
{% include "ipr/details_tabs.html" %}
11+
12+
{% if user|has_role:"Area Director,Secretariat,IANA,RFC Editor" %}
13+
<p class="buttonlist">
14+
<a class="btn btn-default" href="{% url "ipr_add_comment" id=ipr.id %}" title="Add comment to history">Add comment</a>
15+
<a class="btn btn-default" href="{% url "ipr_add_email" id=ipr.id %}" title="Add email to history">Add email</a>
16+
</p>
17+
{% endif %}
18+
19+
<table class="table table-condensed table-striped history">
20+
<thead>
21+
<tr>
22+
<th>Date</th>
23+
<th>Type</th>
24+
<th>By</th>
25+
<th>Text</th>
26+
</tr>
27+
</thead>
28+
29+
<tbody>
30+
{% for e in events %}
31+
<tr id="history-{{ e.pk }}">
32+
<td class="text-nowrap">{{ e.time|date:"Y-m-d" }}</td>
33+
<td>{{ e.type }}
34+
{% if e.response_due and e.response_past_due %}
35+
<span class="glyphicon glyphicon-exclamation-sign" title="Response overdue"></span>
36+
{% endif %}
37+
</td>
38+
<td>{{ e.by }}</td>
39+
{% if e.message %}
40+
<td>{{ e.message|render_message_for_history|format_history_text:"100" }}
41+
{% if e.response_due %}
42+
<br>Response Due: {{ e.response_due|date:"Y-m-d" }}
43+
{% endif %}
44+
</td>
45+
{% else %}
46+
<td>{{ e.desc|format_history_text }}</td>
3247
{% endif %}
33-
{% endif %}
34-
</td>
35-
<td>{{ e.by }}</td>
36-
{% if e.message %}
37-
<td>{{ e.message|render_message_for_history|format_history_text:"100" }}
38-
{% if e.response_due %}
39-
<br>Response Due: {{ e.response_due|date:"Y-m-d" }}
40-
{% endif %}
41-
{% else %}
42-
<td>{{ e.desc|format_history_text }}
43-
{% endif %}
44-
</td>
45-
</tr>
46-
{% endfor %}
47-
</table>
48-
49-
{% endblock %} <!-- tab_content -->
48+
</tr>
49+
{% endfor %}
50+
</tbody>
51+
</table>
52+
{% endblock content %}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<ul class="nav nav-tabs" role="tablist">
2+
{% for name, link, selected in tabs %}
3+
<li {% if selected %}class="active"{% endif %}><a href="{{ link }}">{{ name }}</a></li>
4+
{% endfor %}
5+
</ul>

0 commit comments

Comments
 (0)