Simplified docs_in_iesg_process. Added a test for it.
- Legacy-Id: 15074
This commit is contained in:
parent
da25919f08
commit
57f548ecbd
|
@ -212,6 +212,15 @@ class SearchTests(TestCase):
|
|||
r = self.client.get(urlreverse('ietf.doc.views_search.drafts_in_last_call'))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
self.assertTrue(draft.title in unicontent(r))
|
||||
|
||||
def test_in_iesg_process(self):
|
||||
doc_in_process = DocumentFactory(type_id='draft')
|
||||
doc_in_process.set_state(State.objects.get(type='draft-iesg', slug='lc'))
|
||||
doc_not_in_process = DocumentFactory(type_id='draft')
|
||||
r = self.client.get(urlreverse('ietf.doc.views_search.drafts_in_iesg_process'))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
self.assertTrue(doc_in_process.title in unicontent(r))
|
||||
self.assertFalse(doc_not_in_process.title in unicontent(r))
|
||||
|
||||
def test_indexes(self):
|
||||
draft = make_test_data()
|
||||
|
|
|
@ -51,7 +51,7 @@ urlpatterns = [
|
|||
url(r'^ad2/(?P<name>[\w.-]+)/$(?u)', RedirectView.as_view(url='/doc/ad/%(name)s/', permanent=True)),
|
||||
url(r'^rfc-status-changes/?$', views_status_change.rfc_status_changes),
|
||||
url(r'^start-rfc-status-change/(?:%(name)s/)?$' % settings.URL_REGEXPS, views_status_change.start_rfc_status_change),
|
||||
url(r'^iesg/(?P<last_call_only>[A-Za-z0-9.-]+/)?$', views_search.drafts_in_iesg_process),
|
||||
url(r'^iesg/?$', views_search.drafts_in_iesg_process),
|
||||
url(r'^email-aliases/?$', views_doc.email_aliases),
|
||||
url(r'^downref/?$', views_downref.downref_registry),
|
||||
url(r'^downref/add/?$', views_downref.downref_registry_add),
|
||||
|
|
|
@ -426,13 +426,9 @@ def drafts_in_last_call(request):
|
|||
'form':form, 'docs':results, 'meta':meta, 'pages':pages
|
||||
})
|
||||
|
||||
def drafts_in_iesg_process(request, last_call_only=None):
|
||||
if last_call_only:
|
||||
states = State.objects.filter(type="draft-iesg", slug__in=("lc", "writeupw", "goaheadw"))
|
||||
title = "Documents in Last Call"
|
||||
else:
|
||||
states = State.objects.filter(type="draft-iesg").exclude(slug__in=('pub', 'dead', 'watching', 'rfcqueue'))
|
||||
title = "Documents in IESG process"
|
||||
def drafts_in_iesg_process(request):
|
||||
states = State.objects.filter(type="draft-iesg").exclude(slug__in=('pub', 'dead', 'watching', 'rfcqueue'))
|
||||
title = "Documents in IESG process"
|
||||
|
||||
grouped_docs = []
|
||||
|
||||
|
@ -451,7 +447,6 @@ def drafts_in_iesg_process(request, last_call_only=None):
|
|||
return render(request, 'doc/drafts_in_iesg_process.html', {
|
||||
"grouped_docs": grouped_docs,
|
||||
"title": title,
|
||||
"last_call_only": last_call_only,
|
||||
})
|
||||
|
||||
def index_all_drafts(request):
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
{% load textfilters %}
|
||||
|
||||
{% block pagehead %}
|
||||
{% if last_call_only %}
|
||||
<link rel="alternate" type="application/atom+xml" href="/feed/last-call/">
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue