Skip to content

Commit

Permalink
Revert "Feature/no data msg2 (#347)" (#352)
Browse files Browse the repository at this point in the history
This reverts commit 887fcd7.
  • Loading branch information
aih authored May 10, 2021
1 parent 887fcd7 commit 910809b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
3 changes: 1 addition & 2 deletions server_py/flatgov/bills/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ def get_context_data(self, **kwargs):
context['es_similarity'] = self.object.es_similarity
context['cosponsors_for_bills'] = self.get_cosponsors_for_same_bills()
context['propublica_api_key'] = settings.PROPUBLICA_CONGRESS_API_KEY
context['no_data_message_start'] = "No relevant"
context['no_data_message_end'] = "are available"
context['no_data_message'] = "No data available for this table"
return context

def get_related_statements(self, **kwargs):
Expand Down
25 changes: 15 additions & 10 deletions server_py/flatgov/templates/bills/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ <h4>Bills Related to {{ bill.type_abbrev }} {{ bill.number }}</h4>
<th scope="col">Detail</th>
<th scope="col">Reason</th>
<th scope="col">Titles</th>
<th scope="col">Score</th>
<th scope="col">Sections matched</th>
<th scope="col">Best match section</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -250,9 +253,9 @@ <h4>Bills Related to {{ bill.type_abbrev }} {{ bill.number }}</h4>
{% else %}
<td><span title="{{ bill.title }}">{{ bill.title|truncatechars:40 }}</span></td>
{% endif %}
<!--td>{% if bill.score %}{{ bill.score|floatformat:2 }}{% endif %}</td>
<td>{% if bill.score %}{{ bill.score|floatformat:2 }}{% endif %}</td>
<td>{{ bill.number_of_sections }}</td>
<td>{% if bill.max_item.section_num %}<span>{{ bill.max_item.section_num }}</span> {% endif %}<span title="{{ bill.max_item.section_header }}">{{ bill.max_item.section_header|truncatechars:40 }}</span></td-->
<td>{% if bill.max_item.section_num %}<span>{{ bill.max_item.section_num }}</span> {% endif %}<span title="{{ bill.max_item.section_header }}">{{ bill.max_item.section_header|truncatechars:40 }}</span></td>
</tr>
{% endfor %}
</tbody>
Expand Down Expand Up @@ -336,19 +339,19 @@ <h4>Understand the Context</h4>
<ul class="nav nav-tabs mt-2" id="tablistReports" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="crs-report-tab" data-toggle="tab" href="#crs-report" role="tab" aria-controls="house"
aria-selected="true">CRS Reports</a>
aria-selected="true">CRS Report</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="statement-admin-tab" data-toggle="tab" href="#statement-admin" role="tab" aria-controls="statement-admin"
aria-selected="false">Statements of Administration Policy</a>
aria-selected="false">Statement of Administration</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="press-statements-tab" data-toggle="tab" href="#press-statements" role="tab"
aria-controls="press-statements" aria-selected="false">Press Statements</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="cbo-score-tab" data-toggle="tab" href="#cbo-score" role="tab"
aria-controls="cbo-score" aria-selected="false">CBO Scores</a>
aria-controls="cbo-score" aria-selected="false">CBO Score</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="relevant-committee-tab" data-toggle="tab" href="#relevant-committee" role="tab"
Expand Down Expand Up @@ -401,7 +404,7 @@ <h6 class="pt-3">
{% if not crs_reports %}
<tr>
<td valign="top" colspan="5" class="empty_table">
{{ no_data_message_start }} reports {{ no_data_message_end }}
{{ no_data_message }}
</td>
</tr>
{% endif %}
Expand All @@ -417,6 +420,7 @@ <h6 class="pt-3">
<thead>
<tr>
<th scope="col">Bill Number</th>
<th scope="col">Bill Id</th>
<th scope="col">Bill</th>
<th scope="col">Congress</th>
<th scope="col">Date Issued</th>
Expand All @@ -428,6 +432,7 @@ <h6 class="pt-3">

<tr>
<td>{{ statement.bill_number }}</td>
<td>{{ statement.bill_id }}</td>
<td style="width: 300px;">{{ statement.bill_title|truncatechars:120 }}</td>
<td>{{ statement.congress }}</td>
<td>{{ statement.date_issued }}</td>
Expand All @@ -440,7 +445,7 @@ <h6 class="pt-3">
{% if not statements %}
<tr>
<td valign="top" colspan="5" class="empty_table">
{{ no_data_message_start }} statements {{ no_data_message_end }}
{{ no_data_message }}
</td>
</tr>
{% endif %}
Expand Down Expand Up @@ -523,7 +528,7 @@ <h6 class="pt-3">
{% if not cbo_reports %}
<tr>
<td valign="top" colspan="5" class="empty_table">
{{ no_data_message_start }} CBO scores {{ no_data_message_end }}
{{ no_data_message }}
</td>
</tr>
{% endif %}
Expand All @@ -532,7 +537,7 @@ <h6 class="pt-3">
</div>
<div class="tab-pane fade" id="relevant-committee" role="tabpanel" aria-labelledby="relevant-committee-tab">
<h6 class="pt-3">
View committee documents that relate to this legislation {{ bill.type_abbrev }} {{ bill.meta.number }} in the {{ bill.meta.congress|numstring_to_ordinal }} Congress
View all the Committee Documents {{ bill.type_abbrev }} {{ bill.meta.number }} in the {{ bill.meta.congress|numstring_to_ordinal }} Congress
</h6>

<table class="table mt-3" id='committee-documents-table'>
Expand Down Expand Up @@ -566,7 +571,7 @@ <h6 class="pt-3">
{% if not committees %}
<tr>
<td valign="top" colspan="5" class="empty_table">
{{ no_data_message_start }} committee documents {{ no_data_message_end }}
{{ no_data_message }}
</td>
</tr>
{% endif %}
Expand Down

0 comments on commit 910809b

Please sign in to comment.