From 65f15c77bf8a49e72d2a6d16f83df71c635397c5 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Tue, 22 May 2007 22:29:28 +0000 Subject: [PATCH] Reverting to revision [151] -- committed way too much by mistake - Legacy-Id: 153 Note: SVN reference [151] has been migrated to Git commit fca8b30b51934d8da32aba355f57d4006107cec5 --- ietf/ipr/models.py | 16 ++++----- ietf/ipr/view_new.py | 17 ++-------- ietf/ipr/view_sections.py | 9 ++--- ietf/ipr/views.py | 12 +++---- ietf/templates/ipr/details.html | 3 -- ietf/templates/meeting/agenda.html | 54 +++++++++++++++--------------- 6 files changed, 45 insertions(+), 66 deletions(-) diff --git a/ietf/ipr/models.py b/ietf/ipr/models.py index 77700bc90..27faf15d4 100644 --- a/ietf/ipr/models.py +++ b/ietf/ipr/models.py @@ -79,11 +79,11 @@ class IprDetail(models.Model): # Patent Information fieldset p_applications = models.TextField("Patent Applications", maxlength=255) - date_applied = models.CharField(maxlength=255) + date_applied = models.DateField(maxlength=255) country = models.CharField(maxlength=100) p_notes = models.TextField("Additional notes", blank=True) - selecttype = models.IntegerField("Unpublished Pending Patent Application", choices=SELECT_CHOICES) - selectowned = models.IntegerField("Applies to all IPR owned by Submitter", choices=SELECT_CHOICES) + selecttype = models.IntegerField("Unpublished Pending Patent Application", null=True, choices=SELECT_CHOICES) + selectowned = models.IntegerField("Applies to all IPR owned by Submitter", null=True, blank=True, choices=SELECT_CHOICES) # Licensing Declaration fieldset #licensing_option = models.ForeignKey(IprLicensing, db_column='licensing_option') @@ -94,18 +94,16 @@ class IprDetail(models.Model): comments = models.TextField("Licensing Comments", blank=True) lic_checkbox = models.BooleanField("All terms and conditions has been disclosed") + third_party = models.BooleanField(editable=False) # Other notes fieldset other_notes = models.TextField(blank=True) # 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) - submitted_date = models.DateField(blank=True) + comply = models.BooleanField(editable=False) + generic = models.BooleanField(editable=False) + submitted_date = models.DateField(null=True, blank=True) update_notified_date = models.DateField(null=True, blank=True) def __str__(self): diff --git a/ietf/ipr/view_new.py b/ietf/ipr/view_new.py index 901cfb689..9e9ba806e 100644 --- a/ietf/ipr/view_new.py +++ b/ietf/ipr/view_new.py @@ -7,7 +7,6 @@ from django.shortcuts import render_to_response as render from ietf.utils import log from ietf.ipr.view_sections import section_table from ietf.idtracker.models import Rfc, InternetDraft -from django.http import HttpResponseRedirect # ---------------------------------------------------------------- # Callback methods for special field cases. @@ -21,8 +20,6 @@ def ipr_detail_form_callback(field, **kwargs): if field.name in ["rfc_number", "id_document_tag"]: log(field.name) return forms.CharFieldField(required=False) - if field.name in ["date_applied"]: - return forms.DateField() return field.formfield(**kwargs) def ipr_contact_form_callback(field, **kwargs): @@ -157,15 +154,7 @@ def new(request, type): raise forms.ValidationError("Unknown Internet-Draft: %s - please correct this." % filename) 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)) - 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) + pass if request.method == 'POST': data = request.POST.copy() @@ -181,8 +170,8 @@ def new(request, type): if form.ietf_contact_is_submitter: form.ietf_contact_is_submitter_checked = "checked" if form.is_valid(): - instance = form.save() - return HttpResponseRedirect("/ipr/ipr-%s" % instance.ipr_id) + #instance = form.save() + #return HttpResponseRedirect("/ipr/ipr-%s" % instance.ipr_id) #return HttpResponseRedirect("/ipr/") pass diff --git a/ietf/ipr/view_sections.py b/ietf/ipr/view_sections.py index a7fa691c0..e5d2168d5 100644 --- a/ietf/ipr/view_sections.py +++ b/ietf/ipr/view_sections.py @@ -1,8 +1,7 @@ section_table = { "index": { "index": True }, - "specific": { "index": False, "title": True, - "specific": 1, "generic": 0, "third_party": 0, + "specific": { "index": False, "title": True, "specific": True, "legacy_intro": False, "new_intro": True, "form_intro": False, "holder": True, "holder_contact": True, "ietf_contact": True, "ietf_doc": True, "patent_info": True, "licensing": True, @@ -10,8 +9,7 @@ section_table = { "disclosure_type": "Specific", "form_legend": False, "per_rfc_disclosure": True, "also_specific": False, }, - "generic": { "index": False, "title": True, - "specific": 0, "generic": 1, "third_party": 0, + "generic": { "index": False, "title": True, "generic": True, "legacy_intro": False, "new_intro": True, "form_intro": False, "holder": True, "holder_contact": True, "ietf_contact": False, "ietf_doc": False, "patent_info": True, "licensing": True, @@ -19,8 +17,7 @@ section_table = { "disclosure_type": "Generic", "form_legend": False, "per_rfc_disclosure": False, "also_specific": True, }, - "third-party": {"index": False, "title": True, - "specific": 0, "generic": 0, "third_party": 1, + "third-party": {"index": False, "title": True, "third_party": True, "legacy_intro": False, "new_intro": True, "form_intro": False, "holder": True, "holder_contact": False, "ietf_contact": True, "ietf_doc": True, "patent_info": True, "licensing": False, diff --git a/ietf/ipr/views.py b/ietf/ipr/views.py index 739119e02..5284c729a 100644 --- a/ietf/ipr/views.py +++ b/ietf/ipr/views.py @@ -5,7 +5,6 @@ from django.shortcuts import render_to_response as render from django.utils.html import escape from ietf.ipr.view_new import new from ietf.ipr.view_sections import section_table -from ietf.utils import log def linebreaks(value): if value: @@ -63,10 +62,9 @@ def show(request, ipr_id=None): ipr.comments = linebreaks(escape(ipr.comments)) ipr.other_notes = linebreaks(escape(ipr.other_notes)) - if ipr.licensing_option: - ipr.licensing_option = dict(models.LICENSE_CHOICES)[ipr.licensing_option] - if ipr.selecttype: - ipr.selecttype = dict(models.SELECT_CHOICES)[ipr.selecttype] + ipr.licensing_option = dict(models.LICENSE_CHOICES)[ipr.licensing_option] + ipr.selecttype = dict(models.SELECT_CHOICES)[ipr.selecttype] + if ipr.selectowned: ipr.selectowned = dict(models.SELECT_CHOICES)[ipr.selectowned] return render("ipr/details.html", {"ipr": ipr, "section_list": section_list}) @@ -84,9 +82,9 @@ def get_section_list(ipr): if ipr.old_ipr_url: return section_table["legacy"] elif ipr.generic: - #assert not ipr.third_party + assert not ipr.third_party return section_table["generic"] elif ipr.third_party: - return section_table["third-party"] + return section_table["third_party"] else: return section_table["specific"] diff --git a/ietf/templates/ipr/details.html b/ietf/templates/ipr/details.html index b56385833..f3d843f1b 100644 --- a/ietf/templates/ipr/details.html +++ b/ietf/templates/ipr/details.html @@ -475,9 +475,6 @@ {% endif %} {% if section_list.form_submit %} - - -
diff --git a/ietf/templates/meeting/agenda.html b/ietf/templates/meeting/agenda.html index ce40a44d4..b6503a3ac 100644 --- a/ietf/templates/meeting/agenda.html +++ b/ietf/templates/meeting/agenda.html @@ -22,32 +22,32 @@ Updated As of : {% now "F j, Y" %}

{% regroup object_list by day_id as days %} {% for day in days %} - Day: {{ day.list.1.meeting_date|date:"l, F j, Y" }}
- {{ day.list.1.reg_info }} - {{ meetingvenue_info.reg_area_name }}
- {{ day.list.1.morning_br_info }} - {{ meetingvenue_info.break_area_name }}
-
- {% for item in day.list %} - {% ifequal item.session_name_id 3 %} - {{ day.list.1.lunch_br_info }} Break
- {% endifequal %} - {% ifequal item.session_name_id 4 %} - {{ day.list.1.an_br1_info }}
- {% endifequal %} - {% ifequal item.session_name_id 5 %} - {{ day.list.1.an_br2_info }}
- {% endifequal %} - {{ item.time_desc }} {{ item.session_name }}
- - {% for session in item.sessions|dictsort:"area" %} - {% ifequal session.acronym "plenaryw" %} - - {% else %} - - {% endifequal %} - {% endfor %} -
{{ op_ad_plenary_agenda|linebreaksbr }}
{{ session.sched_room_id1.room_name }}{{ session.area|upper }}{{ session.acronym }}{{ session.acronym_name }}
-
- {% endfor %} -
+Day: {{ day.list.1.meeting_date|date:"l, F j, Y" }}
+{{ day.list.1.reg_info }} - {{ meetingvenue_info.reg_area_name }}
+{{ day.list.1.morning_br_info }} - {{ meetingvenue_info.break_area_name }}
+
+{% for item in day.list %} +{% ifequal item.session_name_id 3 %} +{{ day.list.1.lunch_br_info }} Break
+{% endifequal %} +{% ifequal item.session_name_id 4 %} +{{ day.list.1.an_br1_info }}
+{% endifequal %} +{% ifequal item.session_name_id 5 %} +{{ day.list.1.an_br2_info }}
+{% endifequal %} +{{ item.time_desc }} {{ item.session_name }}
+ +{% for session in item.sessions|dictsort:"area" %} +{% ifequal session.acronym "plenaryw" %} + +{% else %} + +{% endifequal %} +{% endfor %} +
{{ op_ad_plenary_agenda|linebreaksbr }}
{{ session.sched_room_id1.room_name }}{{ session.area|upper }}{{ session.acronym }}{{ session.acronym_name }}
+
+{% endfor %} +
{% endfor %} {% endblock %}