Skip to content

Commit

Permalink
Merge pull request freelawproject#3849 from freelawproject/3843-clean…
Browse files Browse the repository at this point in the history
…-up-advance-search-help-page

3843 Clean up Advanced Search help page
  • Loading branch information
mlissner authored Mar 1, 2024
2 parents b62611d + 85a7f05 commit 73fb7ff
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cl/search/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def __init__(self, *args, **kwargs):
else:
initial = False
new_field = forms.BooleanField(
label=status[1],
label=status[status_index],
required=False,
initial=initial,
widget=forms.CheckboxInput(attrs=attrs),
Expand Down
2 changes: 1 addition & 1 deletion cl/simple_pages/templates/help/advanced_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h2>Fielded Queries: <code>fieldname:term</code></h2>

<p>Different search interfaces support different fields according to the following two tables:
</p>
{% include "includes/available_fields.html" %}
{% include "includes/available_fields_tabs.html" %}

<h2>Related opinions <code>related:&lt;id&gt;</code></h2>
<p>
Expand Down
1 change: 0 additions & 1 deletion cl/simple_pages/templates/includes/available_fields.html

This file was deleted.

20 changes: 18 additions & 2 deletions cl/simple_pages/templates/includes/available_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,19 @@
{
"field":"attorney",
"description":"The name of the attorneys in a PACER case. Can have multiple values.<sup>*</sup>",
"opinions":true,
"opinions":false,
"parentheticals":false,
"recap_archive":true,
"oral_arguments":false
},
{
"field":"attorney",
"description":"The attorneys that argued the case.",
"opinions":true,
"parentheticals":false,
"recap_archive":false,
"oral_arguments":false
},
{
"field":"firm_id",
"description":"The ID of a firm in a PACER case. Can have multiple values.",
Expand Down Expand Up @@ -169,9 +177,17 @@
},
{
"field":"dateFiled",
"description":"The date that a case or opinion was filed in the court.",
"description":"The date the decision was issued by the court.",
"opinions":true,
"parentheticals":true,
"recap_archive":false,
"oral_arguments":false
},
{
"field":"dateFiled",
"description":"The date the case was initiated.",
"opinions":false,
"parentheticals":false,
"recap_archive":true,
"oral_arguments":false
},
Expand Down
23 changes: 21 additions & 2 deletions cl/simple_pages/templates/includes/available_fields_tabs.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load extras %}
{% load waffle_tags %}
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#list-fields-opinions" aria-controls="list-fields-opinions" role="tab" data-toggle="tab">Opinions</a></li>
<li role="presentation"><a href="#list-fields-parentheticals" aria-controls="list-fields-parentheticals" role="tab" data-toggle="tab">Parentheticals</a></li>
Expand All @@ -22,8 +23,26 @@
{% for item in data %}
<tr>
{% if item|get:type %}
<td><code>{{ item.field }}</code></td>
<td>{{ item.description|safe }}</td>
{% flag "o-es-active" %}
<td><code>{{ item.field }}</code></td>
<td>{{ item.description|safe }}</td>
{% else %}
{% if item.field == "status" %}
<td><code>status_exact</code></td>
<td>The precedential status of a case. Valid entries for this field are <code>"Precedential"</code>, <code>"Non-Precedential"</code>, <code>"Errata"</code>, <code>"Separate Opinion"</code>, <code>"In-chambers"</code>, <code>"Relating-to orders"</code>, <code>"Unknown Status"</code>.</td>
{% elif item.field == "type" %}
<td><code>type</code></td>
<td>The Opinion type. Valid entries for this field are <code>010combined</code>, <code>015unamimous</code>, <code>020lead</code>, <code>025plurality</code>, <code>030concurrence</code>, <code>035concurrenceinpart</code>, <code>040dissent</code>, <code>050addendum</code>, <code>060remittitur</code>, <code>070rehearing</code>, <code>080onthemerits</code>, <code>090onmotiontostrike</code>.</td>
{% elif item.field == "panel_names" %}
{% elif item.field == "procedural_history" %}
{% elif item.field == "posture" %}
{% elif item.field == "syllabus" %}
{% elif item.field == "source" %}
{% else %}
<td><code>{{ item.field }}</code></td>
<td>{{ item.description|safe }}</td>
{% endif %}
{% endflag %}
{% endif %}
</tr>
{% endfor %}
Expand Down

0 comments on commit 73fb7ff

Please sign in to comment.