Template formatting changes, to more easily see what's going on. And sorting on area within the timeslot.
- Legacy-Id: 152
This commit is contained in:
parent
fca8b30b51
commit
d981d5a617
|
@ -79,11 +79,11 @@ class IprDetail(models.Model):
|
||||||
|
|
||||||
# Patent Information fieldset
|
# Patent Information fieldset
|
||||||
p_applications = models.TextField("Patent Applications", maxlength=255)
|
p_applications = models.TextField("Patent Applications", maxlength=255)
|
||||||
date_applied = models.DateField(maxlength=255)
|
date_applied = models.CharField(maxlength=255)
|
||||||
country = models.CharField(maxlength=100)
|
country = models.CharField(maxlength=100)
|
||||||
p_notes = models.TextField("Additional notes", blank=True)
|
p_notes = models.TextField("Additional notes", blank=True)
|
||||||
selecttype = models.IntegerField("Unpublished Pending Patent Application", null=True, choices=SELECT_CHOICES)
|
selecttype = models.IntegerField("Unpublished Pending Patent Application", choices=SELECT_CHOICES)
|
||||||
selectowned = models.IntegerField("Applies to all IPR owned by Submitter", null=True, blank=True, choices=SELECT_CHOICES)
|
selectowned = models.IntegerField("Applies to all IPR owned by Submitter", choices=SELECT_CHOICES)
|
||||||
|
|
||||||
# Licensing Declaration fieldset
|
# Licensing Declaration fieldset
|
||||||
#licensing_option = models.ForeignKey(IprLicensing, db_column='licensing_option')
|
#licensing_option = models.ForeignKey(IprLicensing, db_column='licensing_option')
|
||||||
|
@ -94,16 +94,18 @@ class IprDetail(models.Model):
|
||||||
comments = models.TextField("Licensing Comments", blank=True)
|
comments = models.TextField("Licensing Comments", blank=True)
|
||||||
lic_checkbox = models.BooleanField("All terms and conditions has been disclosed")
|
lic_checkbox = models.BooleanField("All terms and conditions has been disclosed")
|
||||||
|
|
||||||
third_party = models.BooleanField(editable=False)
|
|
||||||
|
|
||||||
# Other notes fieldset
|
# Other notes fieldset
|
||||||
other_notes = models.TextField(blank=True)
|
other_notes = models.TextField(blank=True)
|
||||||
|
|
||||||
# Generated fields, not part of the submission form
|
# Generated fields, not part of the submission form
|
||||||
|
# Hidden fields
|
||||||
|
third_party = models.BooleanField()
|
||||||
|
generic = models.BooleanField()
|
||||||
|
comply = models.BooleanField()
|
||||||
|
|
||||||
status = models.IntegerField(null=True, blank=True)
|
status = models.IntegerField(null=True, blank=True)
|
||||||
comply = models.BooleanField(editable=False)
|
submitted_date = models.DateField(blank=True)
|
||||||
generic = models.BooleanField(editable=False)
|
|
||||||
submitted_date = models.DateField(null=True, blank=True)
|
|
||||||
update_notified_date = models.DateField(null=True, blank=True)
|
update_notified_date = models.DateField(null=True, blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
|
@ -7,6 +7,7 @@ from django.shortcuts import render_to_response as render
|
||||||
from ietf.utils import log
|
from ietf.utils import log
|
||||||
from ietf.ipr.view_sections import section_table
|
from ietf.ipr.view_sections import section_table
|
||||||
from ietf.idtracker.models import Rfc, InternetDraft
|
from ietf.idtracker.models import Rfc, InternetDraft
|
||||||
|
from django.http import HttpResponseRedirect
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
# Callback methods for special field cases.
|
# Callback methods for special field cases.
|
||||||
|
@ -20,6 +21,8 @@ def ipr_detail_form_callback(field, **kwargs):
|
||||||
if field.name in ["rfc_number", "id_document_tag"]:
|
if field.name in ["rfc_number", "id_document_tag"]:
|
||||||
log(field.name)
|
log(field.name)
|
||||||
return forms.CharFieldField(required=False)
|
return forms.CharFieldField(required=False)
|
||||||
|
if field.name in ["date_applied"]:
|
||||||
|
return forms.DateField()
|
||||||
return field.formfield(**kwargs)
|
return field.formfield(**kwargs)
|
||||||
|
|
||||||
def ipr_contact_form_callback(field, **kwargs):
|
def ipr_contact_form_callback(field, **kwargs):
|
||||||
|
@ -154,7 +157,15 @@ def new(request, type):
|
||||||
raise forms.ValidationError("Unknown Internet-Draft: %s - please correct this." % filename)
|
raise forms.ValidationError("Unknown Internet-Draft: %s - please correct this." % filename)
|
||||||
if rev and id.revision != rev:
|
if rev and id.revision != rev:
|
||||||
raise forms.ValidationError("Unexpected revision '%s' for draft %s - the current revision is %s. Please check this." % (rev, filename, id.revision))
|
raise forms.ValidationError("Unexpected revision '%s' for draft %s - the current revision is %s. Please check this." % (rev, filename, id.revision))
|
||||||
pass
|
def clean_document_title(self):
|
||||||
|
log("clean_data: %s" % self.data)
|
||||||
|
if type == "general":
|
||||||
|
return """%(p_h_legal_name)s's license statement""" % self.data
|
||||||
|
if type == "specific":
|
||||||
|
return """%(p_h_legal_name)s's Statement about IPR related to ...""" % self.data
|
||||||
|
if type == "third-party":
|
||||||
|
return """%(submitter)s's Statement about IPR related to ... belonging to %(p_h_legal_name)s""" % self.data
|
||||||
|
raise KeyError("Unexpected IPR disclosure type '%s'" % type)
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
data = request.POST.copy()
|
data = request.POST.copy()
|
||||||
|
@ -170,8 +181,8 @@ def new(request, type):
|
||||||
if form.ietf_contact_is_submitter:
|
if form.ietf_contact_is_submitter:
|
||||||
form.ietf_contact_is_submitter_checked = "checked"
|
form.ietf_contact_is_submitter_checked = "checked"
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
#instance = form.save()
|
instance = form.save()
|
||||||
#return HttpResponseRedirect("/ipr/ipr-%s" % instance.ipr_id)
|
return HttpResponseRedirect("/ipr/ipr-%s" % instance.ipr_id)
|
||||||
#return HttpResponseRedirect("/ipr/")
|
#return HttpResponseRedirect("/ipr/")
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
|
||||||
section_table = {
|
section_table = {
|
||||||
"index": { "index": True },
|
"index": { "index": True },
|
||||||
"specific": { "index": False, "title": True, "specific": True,
|
"specific": { "index": False, "title": True,
|
||||||
|
"specific": 1, "generic": 0, "third_party": 0,
|
||||||
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
||||||
"holder": True, "holder_contact": True, "ietf_contact": True,
|
"holder": True, "holder_contact": True, "ietf_contact": True,
|
||||||
"ietf_doc": True, "patent_info": True, "licensing": True,
|
"ietf_doc": True, "patent_info": True, "licensing": True,
|
||||||
|
@ -9,7 +10,8 @@ section_table = {
|
||||||
"disclosure_type": "Specific", "form_legend": False,
|
"disclosure_type": "Specific", "form_legend": False,
|
||||||
"per_rfc_disclosure": True, "also_specific": False,
|
"per_rfc_disclosure": True, "also_specific": False,
|
||||||
},
|
},
|
||||||
"generic": { "index": False, "title": True, "generic": True,
|
"generic": { "index": False, "title": True,
|
||||||
|
"specific": 0, "generic": 1, "third_party": 0,
|
||||||
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
||||||
"holder": True, "holder_contact": True, "ietf_contact": False,
|
"holder": True, "holder_contact": True, "ietf_contact": False,
|
||||||
"ietf_doc": False, "patent_info": True, "licensing": True,
|
"ietf_doc": False, "patent_info": True, "licensing": True,
|
||||||
|
@ -17,7 +19,8 @@ section_table = {
|
||||||
"disclosure_type": "Generic", "form_legend": False,
|
"disclosure_type": "Generic", "form_legend": False,
|
||||||
"per_rfc_disclosure": False, "also_specific": True,
|
"per_rfc_disclosure": False, "also_specific": True,
|
||||||
},
|
},
|
||||||
"third-party": {"index": False, "title": True, "third_party": True,
|
"third-party": {"index": False, "title": True,
|
||||||
|
"specific": 0, "generic": 0, "third_party": 1,
|
||||||
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
||||||
"holder": True, "holder_contact": False, "ietf_contact": True,
|
"holder": True, "holder_contact": False, "ietf_contact": True,
|
||||||
"ietf_doc": True, "patent_info": True, "licensing": False,
|
"ietf_doc": True, "patent_info": True, "licensing": False,
|
||||||
|
|
|
@ -5,6 +5,7 @@ from django.shortcuts import render_to_response as render
|
||||||
from django.utils.html import escape
|
from django.utils.html import escape
|
||||||
from ietf.ipr.view_new import new
|
from ietf.ipr.view_new import new
|
||||||
from ietf.ipr.view_sections import section_table
|
from ietf.ipr.view_sections import section_table
|
||||||
|
from ietf.utils import log
|
||||||
|
|
||||||
def linebreaks(value):
|
def linebreaks(value):
|
||||||
if value:
|
if value:
|
||||||
|
@ -62,9 +63,10 @@ def show(request, ipr_id=None):
|
||||||
ipr.comments = linebreaks(escape(ipr.comments))
|
ipr.comments = linebreaks(escape(ipr.comments))
|
||||||
ipr.other_notes = linebreaks(escape(ipr.other_notes))
|
ipr.other_notes = linebreaks(escape(ipr.other_notes))
|
||||||
|
|
||||||
ipr.licensing_option = dict(models.LICENSE_CHOICES)[ipr.licensing_option]
|
if ipr.licensing_option:
|
||||||
ipr.selecttype = dict(models.SELECT_CHOICES)[ipr.selecttype]
|
ipr.licensing_option = dict(models.LICENSE_CHOICES)[ipr.licensing_option]
|
||||||
|
if ipr.selecttype:
|
||||||
|
ipr.selecttype = dict(models.SELECT_CHOICES)[ipr.selecttype]
|
||||||
if ipr.selectowned:
|
if ipr.selectowned:
|
||||||
ipr.selectowned = dict(models.SELECT_CHOICES)[ipr.selectowned]
|
ipr.selectowned = dict(models.SELECT_CHOICES)[ipr.selectowned]
|
||||||
return render("ipr/details.html", {"ipr": ipr, "section_list": section_list})
|
return render("ipr/details.html", {"ipr": ipr, "section_list": section_list})
|
||||||
|
@ -82,9 +84,9 @@ def get_section_list(ipr):
|
||||||
if ipr.old_ipr_url:
|
if ipr.old_ipr_url:
|
||||||
return section_table["legacy"]
|
return section_table["legacy"]
|
||||||
elif ipr.generic:
|
elif ipr.generic:
|
||||||
assert not ipr.third_party
|
#assert not ipr.third_party
|
||||||
return section_table["generic"]
|
return section_table["generic"]
|
||||||
elif ipr.third_party:
|
elif ipr.third_party:
|
||||||
return section_table["third_party"]
|
return section_table["third-party"]
|
||||||
else:
|
else:
|
||||||
return section_table["specific"]
|
return section_table["specific"]
|
||||||
|
|
|
@ -475,6 +475,9 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if section_list.form_submit %}
|
{% if section_list.form_submit %}
|
||||||
|
<input type="hidden" name="third_party" value="{{ section_list.third_party }}">
|
||||||
|
<input type="hidden" name="generic" value="{{ section_list.generic }}">
|
||||||
|
<input type="hidden" name="comply" value="1">
|
||||||
<center><input type="submit" name="submit" value="Submit"></center>
|
<center><input type="submit" name="submit" value="Submit"></center>
|
||||||
</form>
|
</form>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
|
@ -22,32 +22,32 @@ Updated As of : {% now "F j, Y" %}<br />
|
||||||
<br>
|
<br>
|
||||||
{% regroup object_list by day_id as days %}
|
{% regroup object_list by day_id as days %}
|
||||||
{% for day in days %}
|
{% for day in days %}
|
||||||
<b>Day: {{ day.list.1.meeting_date|date:"l, F j, Y" }} </b><br>
|
<b>Day: {{ day.list.1.meeting_date|date:"l, F j, Y" }} </b><br>
|
||||||
{{ day.list.1.reg_info }} - {{ meetingvenue_info.reg_area_name }} <br>
|
{{ day.list.1.reg_info }} - {{ meetingvenue_info.reg_area_name }} <br>
|
||||||
{{ day.list.1.morning_br_info }} - {{ meetingvenue_info.break_area_name }} <br>
|
{{ day.list.1.morning_br_info }} - {{ meetingvenue_info.break_area_name }} <br>
|
||||||
<br>
|
<br>
|
||||||
{% for item in day.list %}
|
{% for item in day.list %}
|
||||||
{% ifequal item.session_name_id 3 %}
|
{% ifequal item.session_name_id 3 %}
|
||||||
{{ day.list.1.lunch_br_info }} Break<br>
|
{{ day.list.1.lunch_br_info }} Break<br>
|
||||||
{% endifequal %}
|
{% endifequal %}
|
||||||
{% ifequal item.session_name_id 4 %}
|
{% ifequal item.session_name_id 4 %}
|
||||||
{{ day.list.1.an_br1_info }}<br>
|
{{ day.list.1.an_br1_info }}<br>
|
||||||
{% endifequal %}
|
{% endifequal %}
|
||||||
{% ifequal item.session_name_id 5 %}
|
{% ifequal item.session_name_id 5 %}
|
||||||
{{ day.list.1.an_br2_info }}<br>
|
{{ day.list.1.an_br2_info }}<br>
|
||||||
{% endifequal %}
|
{% endifequal %}
|
||||||
<b>{{ item.time_desc }} {{ item.session_name }} </b><br>
|
<b>{{ item.time_desc }} {{ item.session_name }} </b><br>
|
||||||
<table border="0" cellspacing="0" cellpadding="0" width="800">
|
<table border="0" cellspacing="0" cellpadding="0" width="800">
|
||||||
{% for session in item.sessions|dictsort:"area" %}
|
{% for session in item.sessions|dictsort:"area" %}
|
||||||
{% ifequal session.acronym "plenaryw" %}
|
{% ifequal session.acronym "plenaryw" %}
|
||||||
<tr><td>{{ op_ad_plenary_agenda|linebreaksbr }}</td></tr>
|
<tr><td>{{ op_ad_plenary_agenda|linebreaksbr }}</td></tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr><td width="200">{{ session.sched_room_id1.room_name }}</td><td width="50">{{ session.area|upper }}</td><td width="100">{{ session.acronym }}</td><td>{{ session.acronym_name }}</td></tr>
|
<tr><td width="200">{{ session.sched_room_id1.room_name }}</td><td width="50">{{ session.area|upper }}</td><td width="100">{{ session.acronym }}</td><td>{{ session.acronym_name }}</td></tr>
|
||||||
{% endifequal %}
|
{% endifequal %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<br>
|
<br>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue