Restrict all found IPRs to status 1 and 3. Only show links to, and display details of, IPRs with status 1.
- Legacy-Id: 720
This commit is contained in:
parent
261b8d2620
commit
24c320f763
|
@ -13,7 +13,7 @@ class LatestIprDisclosures(Feed):
|
|||
feed_url = "/feeds/ipr/"
|
||||
|
||||
def items(self):
|
||||
return IprDetail.objects.order_by('-submitted_date')[:5]
|
||||
return IprDetail.objects.filter(status__in=[1,3]).order_by('-submitted_date')[:5]
|
||||
|
||||
def item_link(self, item):
|
||||
return "/ipr/ipr-%s" % item.ipr_id
|
||||
|
|
|
@ -8,6 +8,7 @@ import django.newforms as forms
|
|||
from datetime import datetime
|
||||
from django.shortcuts import render_to_response as render
|
||||
from django.template import RequestContext
|
||||
from django.http import Http404
|
||||
from ietf.utils import log
|
||||
from ietf.utils.mail import send_mail
|
||||
from ietf.ipr.view_sections import section_table
|
||||
|
@ -337,6 +338,8 @@ def update(request, ipr_id=None):
|
|||
submitter = form.clean_data
|
||||
|
||||
ipr = models.IprDetail.objects.get(ipr_id=ipr_id)
|
||||
if not ipr.status in [1,3]:
|
||||
raise Http404
|
||||
type = "specific"
|
||||
if ipr.generic:
|
||||
type = "generic"
|
||||
|
|
|
@ -13,7 +13,7 @@ urlpatterns = patterns('',
|
|||
(r'^search/$', search.search),
|
||||
)
|
||||
|
||||
queryset = models.IprDetail.objects.all()
|
||||
queryset = models.IprDetail.objects.filter(status__in=[1,3])
|
||||
archive = {'queryset':queryset, 'date_field': 'submitted_date', 'allow_empty':True }
|
||||
|
||||
urlpatterns += patterns('django.views.generic.date_based',
|
||||
|
|
|
@ -4,6 +4,7 @@ import django.utils.html
|
|||
from django.shortcuts import render_to_response as render
|
||||
from django.template import RequestContext
|
||||
from django.utils.html import escape
|
||||
from django.http import Http404
|
||||
from ietf.idtracker.models import IETFWG
|
||||
from ietf.ipr.models import IprDetail, SELECT_CHOICES, LICENSE_CHOICES
|
||||
from ietf.ipr.view_sections import section_table
|
||||
|
@ -47,6 +48,8 @@ def show(request, ipr_id=None):
|
|||
"""Show a specific IPR disclosure"""
|
||||
assert ipr_id != None
|
||||
ipr = IprDetail.objects.get(ipr_id=ipr_id)
|
||||
if not ipr.status == 1:
|
||||
raise Http404
|
||||
section_list = get_section_list(ipr)
|
||||
contacts = ipr.contact.all()
|
||||
for contact in contacts:
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<font size="3">
|
||||
<br>
|
||||
This IPR disclosure updates IPR disclosure ID #{{ item.updated.ipr_id }},
|
||||
{% ifequal item.status_to_be 1 %}
|
||||
{% ifequal item.status 1 %}
|
||||
"<a href="{% url ietf.ipr.views.show item.updated.ipr_id %}">{{ item.updated.title }}</a>".
|
||||
{% else %}
|
||||
"{{ item.updated.title }}", which was removed at the request of the submitter.
|
||||
|
|
Loading…
Reference in a new issue