Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix try fec.gov btn on legal no-results page #3716

Merged
merged 6 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions fec/fec/static/js/legal/SearchResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,15 @@ function SearchResults(props) {
return (
<div className="message message--no-icon">
<h2 className="message__title">No results</h2>
<p>
Sorry, we didn&rsquo;t find any documents matching {props.query}.
</p>
<p>Sorry, we didn&rsquo;t find any documents matching your search.</p>
<div className="message--alert__bottom">
<p>Think this was a mistake?</p>
<ul className="list--buttons">
{props.query && (
{props.q && (
<li>
<a
className="button button--standard"
href="http://search04.fec.gov/vivisimo/cgi-bin/query-meta?v%3Asources=Administrative_Fine%2CAdvisory_Opinion%2CAlternative_Dispute_Resolution%2CAudit_Reports%2CMatters_Under_Review%2CMatters_Under_Review_Archived%2CRulemaster%2CCandidate_Summary%2CCommittee_Summary%2Cfec.gov&query={{ query }}&x=0&y=0&v%3aproject=fec_search_02_prj&v%3aframe=form&form=advanced-fec&"
href={'/search/?query=' + props.q}
>
Try FEC.gov
</a>
Expand Down Expand Up @@ -165,8 +163,8 @@ function SearchResults(props) {

SearchResults.propTypes = {
advisory_opinion: PropTypes.array,
loading: PropTypes.string,
query: PropTypes.string
loading: PropTypes.bool,
query: PropTypes.object
};

module.exports = SearchResults;
4 changes: 1 addition & 3 deletions fec/fec/static/js/legal/filters/TooltipHelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class TooltipHelp extends React.Component {
<span className="u-visually-hidden">Learn more</span>
</button>
<div
className={`tooltip tooltip--${
this.props.verticalPosition
} tooltip--${this.props.horizontalPosition}`}
className={`tooltip tooltip--${this.props.verticalPosition} tooltip--${this.props.horizontalPosition}`}
>
<p className="tooltip__content tooltip__content">
{this.props.message}
Expand Down
2 changes: 1 addition & 1 deletion fec/legal/templates/layouts/legal-doc-search-results.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<p>Think this was a mistake?</p>
<ul class="list--buttons">
{% if query %}
<li><a class="button button--standard" href="http://search04.fec.gov/vivisimo/cgi-bin/query-meta?v%3Asources=Administrative_Fine%2CAdvisory_Opinion%2CAlternative_Dispute_Resolution%2CAudit_Reports%2CMatters_Under_Review%2CMatters_Under_Review_Archived%2CRulemaster%2CCandidate_Summary%2CCommittee_Summary%2Cfec.gov&query={{ query }}&x=0&y=0&v%3aproject=fec_search_02_prj&v%3aframe=form&form=advanced-fec&">Try FEC.gov</a></li>
<li><a class="button button--standard" href="/search/?query={{ query }}">Try FEC.gov</a></li>
{% endif %}
<li><a class="button button--standard" href="mailto:{{ WEBMANAGER_EMAIL }}">Email our team</a></li>
<li><a class="button button--standard" href="https://github.com/fecgov/fec/issues">File an issue</a></li>
Expand Down
2 changes: 1 addition & 1 deletion fec/legal/templates/macros/legal.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<p>Think this was a mistake?</p>
<ul class="list--buttons">
{% if query %}
<li><a class="button button--standard" href="http://search04.fec.gov/vivisimo/cgi-bin/query-meta?v%3Asources={{ '%2C'.join(fec_resources or []) }}&query={{ query }}&x=0&y=0&v%3aproject=fec_search_02_prj&v%3aframe=form&form=advanced-fec&">Try FEC.gov</a></li>
<li><a class="button button--standard" href="/search/?query={{ query }}">Try FEC.gov</a></li>
{% endif %}
<li><a class="button button--standard" href="mailto:{{ WEBMANAGER_EMAIL }}">Email our team</a></li>
<li><a class="button button--standard" href="https://github.com/fecgov/fec/issues">File an issue</a></li>
Expand Down