Name changes for IprDetail model fields.
- Legacy-Id: 477
This commit is contained in:
parent
92968fa04e
commit
6829830b59
|
@ -23,12 +23,17 @@ SELECT_CHOICES = (
|
|||
("1", 'YES'),
|
||||
("2", 'NO'),
|
||||
)
|
||||
|
||||
STATUS_CHOICES = (
|
||||
( 0, "Waiting for approval" ),
|
||||
( 1, "Approved and Posted" ),
|
||||
( 2, "Rejected by Administrator" ),
|
||||
( 3, "Removed by Request" ),
|
||||
)
|
||||
# not clear why this has both an ID and selecttype
|
||||
# Also not clear why a table for "YES" and "NO".
|
||||
class IprSelecttype(models.Model):
|
||||
type_id = models.AutoField(primary_key=True)
|
||||
selecttype = models.IntegerField(unique=True)
|
||||
is_pending = models.IntegerField(unique=True, db_column="selecttype")
|
||||
type_display = models.CharField(blank=True, maxlength=15)
|
||||
def __str__(self):
|
||||
return self.type_display
|
||||
|
@ -50,14 +55,14 @@ class IprLicensing(models.Model):
|
|||
|
||||
class IprDetail(models.Model):
|
||||
ipr_id = models.AutoField(primary_key=True)
|
||||
document_title = models.CharField(blank=True, maxlength=255)
|
||||
title = models.CharField(blank=True, db_column="document_title", maxlength=255)
|
||||
|
||||
# Legacy information fieldset
|
||||
old_ipr_url = models.CharField(blank=True, maxlength=255)
|
||||
additional_old_title1 = models.CharField(blank=True, maxlength=255)
|
||||
additional_old_url1 = models.CharField(blank=True, maxlength=255)
|
||||
additional_old_title2 = models.CharField(blank=True, maxlength=255)
|
||||
additional_old_url2 = models.CharField(blank=True, maxlength=255)
|
||||
legacy_url_0 = models.CharField(blank=True, db_column="old_ipr_url", maxlength=255)
|
||||
legacy_url_1 = models.CharField(blank=True, db_column="additional_old_url1", maxlength=255)
|
||||
legacy_title_1 = models.CharField(blank=True, db_column="additional_old_title1", maxlength=255)
|
||||
legacy_url_2 = models.CharField(blank=True, db_column="additional_old_url2", maxlength=255)
|
||||
legacy_title_2 = models.CharField(blank=True, db_column="additional_old_title2", maxlength=255)
|
||||
|
||||
# Patent holder fieldset
|
||||
legal_name = models.CharField("Legal Name", db_column="p_h_legal_name", maxlength=255)
|
||||
|
@ -72,15 +77,15 @@ class IprDetail(models.Model):
|
|||
rfc_number = models.IntegerField(null=True, editable=False, blank=True) # always NULL
|
||||
id_document_tag = models.IntegerField(null=True, editable=False, blank=True) # always NULL
|
||||
other_designations = models.CharField(blank=True, maxlength=255)
|
||||
discloser_identify = models.TextField("Specific document sections covered", blank=True, maxlength=255, db_column='disclouser_identify')
|
||||
document_sections = models.TextField("Specific document sections covered", blank=True, maxlength=255, db_column='disclouser_identify')
|
||||
|
||||
# Patent Information fieldset
|
||||
p_applications = models.TextField("Patent Applications", maxlength=255)
|
||||
patents = models.TextField("Patent Applications", db_column="p_applications", maxlength=255)
|
||||
date_applied = models.CharField(maxlength=255)
|
||||
country = models.CharField(maxlength=100)
|
||||
p_notes = models.TextField("Additional notes", blank=True)
|
||||
selecttype = models.IntegerField("Unpublished Pending Patent Application", blank=True, choices=SELECT_CHOICES)
|
||||
selectowned = models.IntegerField("Applies to all IPR owned by Submitter", blank=True, choices=SELECT_CHOICES)
|
||||
notes = models.TextField("Additional notes", db_column="p_notes", blank=True)
|
||||
is_pending = models.IntegerField("Unpublished Pending Patent Application", blank=True, choices=SELECT_CHOICES, db_column="selecttype")
|
||||
applies_to_all = models.IntegerField("Applies to all IPR owned by Submitter", blank=True, choices=SELECT_CHOICES, db_column="selectowned")
|
||||
|
||||
# Licensing Declaration fieldset
|
||||
#licensing_option = models.ForeignKey(IprLicensing, db_column='licensing_option')
|
||||
|
@ -101,37 +106,12 @@ class IprDetail(models.Model):
|
|||
generic = models.BooleanField()
|
||||
comply = models.BooleanField()
|
||||
|
||||
status = models.IntegerField(null=True, blank=True)
|
||||
status = models.IntegerField(null=True, blank=True, choices=STATUS_CHOICES)
|
||||
submitted_date = models.DateField(blank=True)
|
||||
update_notified_date = models.DateField(null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.document_title
|
||||
def selecttypetext(self):
|
||||
if self.selecttype == "1":
|
||||
return "YES"
|
||||
else:
|
||||
return "NO"
|
||||
def selectownedtext(self):
|
||||
if self.selectowned == "1":
|
||||
return "YES"
|
||||
else:
|
||||
return "NO"
|
||||
# def get_patent_holder_contact(self):
|
||||
# try:
|
||||
# return self.contact.filter(contact_type=1)[0]
|
||||
# except:
|
||||
# return None
|
||||
# def get_ietf_contact(self):
|
||||
# try:
|
||||
# return self.contact.filter(contact_type=2)[0]
|
||||
# except:
|
||||
# return None
|
||||
# def get_submitter(self):
|
||||
# try:
|
||||
# return self.contact.filter(contact_type=3)[0]
|
||||
# except:
|
||||
# return None
|
||||
def get_absolute_url(self):
|
||||
return "/ipr/ipr-%s" % self.ipr_id
|
||||
class Meta:
|
||||
|
|
|
@ -17,7 +17,7 @@ from django.http import HttpResponseRedirect
|
|||
def ipr_detail_form_callback(field, **kwargs):
|
||||
if field.name == "licensing_option":
|
||||
return forms.IntegerField(widget=forms.RadioSelect(choices=models.LICENSE_CHOICES), required=True)
|
||||
if field.name in ["selecttype", "selectowned"]:
|
||||
if field.name in ["is_pending", "applies_to_all"]:
|
||||
return forms.IntegerField(widget=forms.RadioSelect(choices=((1, "YES"), (2, "NO"))), required=False)
|
||||
if field.name in ["rfc_number", "id_document_tag"]:
|
||||
log(field.name)
|
||||
|
|
|
@ -60,17 +60,17 @@ def show(request, ipr_id=None):
|
|||
raise KeyError("Unexpected contact_type (%s) in ipr_contacts for ipr_id=%s" % (contact.contact_type, ipr.ipr_id))
|
||||
# do escaping and line-breaking here instead of in the template,
|
||||
# so that we can use the template for the form display, too.
|
||||
ipr.p_notes = linebreaks(escape(ipr.p_notes))
|
||||
ipr.discloser_identify = linebreaks(escape(ipr.discloser_identify))
|
||||
ipr.notes = linebreaks(escape(ipr.notes))
|
||||
ipr.document_sections = linebreaks(escape(ipr.document_sections))
|
||||
ipr.comments = linebreaks(escape(ipr.comments))
|
||||
ipr.other_notes = linebreaks(escape(ipr.other_notes))
|
||||
|
||||
if ipr.licensing_option:
|
||||
ipr.licensing_option = dict(LICENSE_CHOICES)[ipr.licensing_option]
|
||||
if ipr.selecttype:
|
||||
ipr.selecttype = dict(SELECT_CHOICES)[ipr.selecttype]
|
||||
if ipr.selectowned:
|
||||
ipr.selectowned = dict(SELECT_CHOICES)[ipr.selectowned]
|
||||
if ipr.is_pending:
|
||||
ipr.is_pending = dict(SELECT_CHOICES)[ipr.is_pending]
|
||||
if ipr.applies_to_all:
|
||||
ipr.applies_to_all = dict(SELECT_CHOICES)[ipr.applies_to_all]
|
||||
return render("ipr/details.html", {"ipr": ipr, "section_list": section_list})
|
||||
|
||||
def update(request, ipr_id=None):
|
||||
|
@ -224,7 +224,7 @@ def form(request):
|
|||
# ---- Helper functions ------------------------------------------------------
|
||||
|
||||
def get_section_list(ipr):
|
||||
if ipr.old_ipr_url:
|
||||
if ipr.legacy_url_0:
|
||||
return section_table["legacy"]
|
||||
elif ipr.generic:
|
||||
#assert not ipr.third_party
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
Sections {% block legacy_sections %}I, II, and IV{% endblock %} of "The Patent Disclosure and Licensing Declaration Template
|
||||
for {{ section_list.disclosure_type }} IPR Disclosures" have been completed for this IPR disclosure.
|
||||
Additional information may be available in the original submission.<br>
|
||||
See the <a href="{{ ipr.old_ipr_url }}">content of the original IPR disclosure</a>.<br>
|
||||
See the <a href="{{ ipr.legacy_url_0 }}">content of the original IPR disclosure</a>.<br>
|
||||
</font>
|
||||
{% endif %}
|
||||
{% if section_list.new_intro %}
|
||||
|
@ -41,12 +41,12 @@
|
|||
information are displayed.</font><br>
|
||||
{% endif %}
|
||||
{% if section_list.new_intro or section_list.legacy_intro %}
|
||||
{% if ipr.additional_old_title1 %}
|
||||
<font size="3"><a href="{{ ipr.additional_old_url1 }}">{{ ipr.additional_old_title1 }}</a></font><br>
|
||||
{% if ipr.legacy_title_1 %}
|
||||
<font size="3"><a href="{{ ipr.legacy_url_1 }}">{{ ipr.legacy_title_1 }}</a></font><br>
|
||||
{% endif %}
|
||||
|
||||
{% if ipr.additional_old_title2 %}
|
||||
<font size="3"><a href="{{ ipr.additional_old_url2 }}">{{ ipr.additional_old_title2 }}</a></font><br>
|
||||
{% if ipr.legacy_title_2 %}
|
||||
<font size="3"><a href="{{ ipr.legacy_url_2 }}">{{ ipr.legacy_title_2 }}</a></font><br>
|
||||
{% endif %}
|
||||
|
||||
{% for item in ipr.updates.all %}
|
||||
|
@ -286,7 +286,7 @@
|
|||
applications required to be disclosed by Section 6 of RFC 3979)
|
||||
</th>
|
||||
</tr>
|
||||
{% if ipr.p_applications or ipr.p_notes %}
|
||||
{% if ipr.patents or ipr.notes %}
|
||||
<tbody class="{% cycle row_parity %}">
|
||||
<tr>
|
||||
<td colspan="2"><i>
|
||||
|
@ -294,18 +294,18 @@
|
|||
please provide the following information:</i></td>
|
||||
</tr>
|
||||
<tr><td class="fixwidth">Patent, Serial, Publication, Registration,
|
||||
or Application/File number(s): </td><td><b>{{ ipr.p_applications }}</b></td></tr>
|
||||
or Application/File number(s): </td><td><b>{{ ipr.patents }}</b></td></tr>
|
||||
</tbody>
|
||||
<tr class="{% cycle row_parity %}"><td>Date(s) granted or applied for: </td><td><b>{{ ipr.date_applied }}</b></td></tr>
|
||||
<tr class="{% cycle row_parity %}"><td>Country: </td><td><b>{{ ipr.country }}</b></td></tr>
|
||||
<tr class="{% cycle row_parity %}"><td>Additional Notes: </td><td><b>{{ ipr.p_notes }}</b></td></tr>
|
||||
<tr class="{% cycle row_parity %}"><td>Additional Notes: </td><td><b>{{ ipr.notes }}</b></td></tr>
|
||||
<tr class="{% cycle row_parity %}">
|
||||
<td colspan="2">
|
||||
<i>
|
||||
B. Does this disclosure relate to an unpublished pending patent
|
||||
application?:
|
||||
</i>
|
||||
<b>{{ ipr.selecttype }}</b>
|
||||
<b>{{ ipr.is_pending }}</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tbody class="{% cycle row_parity %}">
|
||||
|
@ -315,7 +315,7 @@
|
|||
<i>C. Does this disclosure apply to all IPR owned by
|
||||
the submitter?:
|
||||
</i>
|
||||
<b>{{ ipr.selectowned }}</b>
|
||||
<b>{{ ipr.applies_to_all }}</b>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
|
@ -329,8 +329,8 @@
|
|||
covered:</i>
|
||||
</td>
|
||||
</tr>
|
||||
{% if ipr.discloser_identify %}
|
||||
<tr class="{% cycle row_parity %}"><td class="fixwidth"></td><td><b>{{ ipr.discloser_identify }}</b></td></tr>
|
||||
{% if ipr.document_sections %}
|
||||
<tr class="{% cycle row_parity %}"><td class="fixwidth"></td><td><b>{{ ipr.document_sections }}</b></td></tr>
|
||||
{% else %}
|
||||
<tr class="{% cycle row_parity %}"><td class="fixwidth"></td><td></span><i>No information submitted</i></td></tr>
|
||||
{% endif %}
|
||||
|
|
|
@ -22,23 +22,23 @@
|
|||
</td>
|
||||
</tr>
|
||||
{% ifequal ipr.status 1 %}
|
||||
{% if ipr.additional_old_title1 %}
|
||||
{% if ipr.legacy_title_1 %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<b>*</b>
|
||||
<a href="{{ ipr.additional_old_url1 }}">{{ ipr.additional_old_title1 }}</a>
|
||||
<a href="{{ ipr.legacy_url_1 }}">{{ ipr.legacy_title_1 }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if ipr.additional_old_title2 %}
|
||||
{% if ipr.legacy_title_2 %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<b>*</b>
|
||||
<a href="{{ ipr.additional_old_url2 }}">{{ ipr.additional_old_title2 }}</a>
|
||||
<a href="{{ ipr.legacy_url_2 }}">{{ ipr.legacy_title_2 }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue