Skip to content

Commit 84a80e9

Browse files
committed
Fixed bad logic for the display of previous related IPR informatio in the IPR details template.
- Legacy-Id: 16291
1 parent ac73bd6 commit 84a80e9

1 file changed

Lines changed: 30 additions & 10 deletions

File tree

ietf/templates/ipr/details_view.html

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,13 @@ <h2>{% cycle 'I' 'II' 'III' 'IV' 'V' 'VI' 'VII' 'VIII' as section %}.
124124
Patent Holder/Applicant ("Patent Holder")</h2>
125125

126126
<table class="table-condensed col-md-12">
127-
{% if prev and prev.state.slug == "posted" %}
127+
{% if prev %}
128+
{% if prev.state.slug == "posted" %}
128129
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
129130
{% else %}
130131
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
131132
{% endif %}
133+
{% endif %}
132134
<tr>
133135
{% if prev %}<td class="col-md-5 ipr-prev">{{ prev.holder_legal_name }}</td>{% endif %}
134136
<th class="col-md-2 ipr-label">Holder legal name</th>
@@ -140,11 +142,13 @@ <h2>{% cycle 'I' 'II' 'III' 'IV' 'V' 'VI' 'VII' 'VIII' as section %}.
140142
<h2>{% cycle section %}. Patent Holder's Contact for Licence Application</h2>
141143

142144
<table class="table-condensed col-md-12">
143-
{% if prev and prev.state.slug == "posted" %}
145+
{% if prev %}
146+
{% if prev.state.slug == "posted" %}
144147
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
145148
{% else %}
146149
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
147150
{% endif %}
151+
{% endif %}
148152

149153
<tr>
150154
{% if prev %}<td class="col-md-5 ipr-prev">{{ prev.holder_contact_name }}</td>{% endif %}
@@ -171,11 +175,13 @@ <h2>{% cycle section %}. Patent Holder's Contact for Licence Application</h2>
171175
<h2>{% cycle section %}. Contact Information for the IETF Participant Whose Personal Belief Triggered this Disclosure</h2>
172176

173177
<table class="table-condensed col-md-12">
174-
{% if prev and prev.state.slug == "posted" %}
178+
{% if prev %}
179+
{% if prev.state.slug == "posted" %}
175180
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
176181
{% else %}
177182
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
178183
{% endif %}
184+
{% endif %}
179185
<tr>
180186
{% if prev %}<td class="col-md-5 ipr-prev">{{ prev.ietfer_name }}</td>{% endif %}
181187
<th class="col-md-2 ipr-label">Name</th>
@@ -201,11 +207,13 @@ <h2>{% cycle section %}. Contact Information for the IETF Participant Whose Pers
201207
<h2>{% cycle section %}. IETF Document or Other Contribution to Which this IPR Disclosure Relates</h2>
202208

203209
<table class="table-condensed col-md-12">
204-
{% if prev and prev.state.slug == "posted" %}
210+
{% if prev %}
211+
{% if prev.state.slug == "posted" %}
205212
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
206213
{% else %}
207214
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
208215
{% endif %}
216+
{% endif %}
209217
<tr>
210218

211219
{% if prev %}
@@ -261,11 +269,13 @@ <h2>{% cycle section %}. Disclosure of Patent Information <small>i.e., patents o
261269
<p>A. For granted patents or published pending patent applications, please provide the following information:</p>
262270

263271
<table class="table-condensed col-md-12">
264-
{% if prev and prev.state.slug == "posted" %}
272+
{% if prev %}
273+
{% if prev.state.slug == "posted" %}
265274
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
266275
{% else %}
267276
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
268277
{% endif %}
278+
{% endif %}
269279
<tr>
270280
{% if prev %}<td class="col-md-5 ipr-prev">{{ prev.patent_info|linebreaks }}</td>{% endif %}
271281
<th class="col-md-2 ipr-label">Patent, Serial, Publication, Registration, or Application/File number(s)</th>
@@ -276,11 +286,13 @@ <h2>{% cycle section %}. Disclosure of Patent Information <small>i.e., patents o
276286
<p>B. Does this disclosure relate to an unpublished pending patent application?:</p>
277287

278288
<table class="table-condensed col-md-12">
279-
{% if prev and prev.state.slug == "posted" %}
289+
{% if prev %}
290+
{% if prev.state.slug == "posted" %}
280291
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
281292
{% else %}
282293
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
283294
{% endif %}
295+
{% endif %}
284296
<tr>
285297
{% if prev %}<td class="col-md-5 ipr-prev">{{ prev.has_patent_pending|yesno:"Yes,No" }}</td>{% endif %}
286298
<th class="col-md-2 ipr-label">Has patent pending</th>
@@ -313,11 +325,13 @@ <h2>{% cycle section %}. Licensing Declaration</h2>
313325
{% endif %}
314326

315327
<table class="table-condensed col-md-12">
316-
{% if prev and prev.state.slug == "posted" %}
328+
{% if prev %}
329+
{% if prev.state.slug == "posted" %}
317330
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
318331
{% else %}
319332
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
320333
{% endif %}
334+
{% endif %}
321335
<tr>
322336
{% if prev %}<td class="col-md-5 ipr-prev">{% if prev.licensing.slug == "provided-later" %}{{ prev.licensing.desc|slice:"2:"|slice:":117" }}){% else %}{{ prev.licensing.desc|slice:"2:" }}{% endif %}</td>{% endif %}
323337
<th class="col-md-2 ipr-label">Licensing</th>
@@ -338,11 +352,13 @@ <h2>{% cycle section %}. Licensing Declaration</h2>
338352
<h2>{% cycle section %}. Statement</h2>
339353

340354
<table class="table-condensed col-md-12">
341-
{% if prev and prev.state.slug == "posted" %}
355+
{% if prev %}
356+
{% if prev.state.slug == "posted" %}
342357
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
343358
{% else %}
344359
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
345360
{% endif %}
361+
{% endif %}
346362
<tr>
347363
{% if prev %}<td class="col-md-5 ipr-prev">{{ prev.statement|linebreaks }}</td>{% endif %}
348364
<th class="col-md-2 ipr-label">Statement</th>
@@ -354,11 +370,13 @@ <h2>{% cycle section %}. Statement</h2>
354370
<h2>{% cycle section %}. Contact Information of Submitter of this Form</h2>
355371

356372
<table class="table-condensed col-md-12">
357-
{% if prev and prev.state.slug == "posted" %}
373+
{% if prev %}
374+
{% if prev.state.slug == "posted" %}
358375
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
359376
{% else %}
360377
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
361378
{% endif %}
379+
{% endif %}
362380
<tr>
363381
{% if prev %}<td class="col-md-5 ipr-prev">{{ prev.submitter_name }}</td>{% endif %}
364382
<th class="col-md-2 ipr-label">Submitter name</th>
@@ -376,11 +394,13 @@ <h2>{% cycle section %}. Contact Information of Submitter of this Form</h2>
376394
<h2>{% cycle section %}. Other Notes</h2>
377395

378396
<table class="table-condensed col-md-12">
379-
{% if prev and prev.state.slug == "posted" %}
397+
{% if prev %}
398+
{% if prev.state.slug == "posted" %}
380399
<tr><th class="ipr-prev">Previous (<a href="{% url "ietf.ipr.views.show" id=prev.id %}">#{{prev.id}}</a>)</th><th></th><th>This (#{{ipr.id}})</th></tr>
381400
{% else %}
382401
<tr><th class="ipr-prev">Previous (#{{prev.id}}, {{prev.state}})</th><th></th><th>This (#{{ipr.id}})</th></tr>
383402
{% endif %}
403+
{% endif %}
384404
<tr>
385405
{% if prev %}<td class="col-md-5 ipr-prev">{{ prev.notes|linebreaks }}</td>{% endif %}
386406
<th class="col-md-2 ipr-label">Additional notes</th>

0 commit comments

Comments
 (0)