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

Improved questions no_results_found message #9555

Merged
merged 1 commit into from
Apr 24, 2021
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
15 changes: 9 additions & 6 deletions app/views/tag/show/_tab_content.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
<% if @node_type == "questions" %>
<div class="tab-pane active" id="questions">
<div id="questions-tab">

<div class="tab-content">
<div id="asked-content">
<%= render partial: "questions/new_question" %>
<% if @questions.nil? || @questions.length == 0 %>
<p><%= raw translation('tag.show.no_questions_results_found') %></p>
<p>Or try searching: <a href="/search/<%= params[:id] %>"><%= params[:id] %></a></p>
<% else %>
<div class="tab-content">
<div id="asked-content">
<%= render partial: "questions/new_question" %>
</div>
</div>
</div>

<% end %>
</div>
</div>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ en:
wiki_pages: "Wiki pages"
maps: "Maps"
no_results_found: "No results found; try searching for '<b>%{tag}</b>'"
no_questions_results_found: "Hi! No Questions have this tag <span>&#x1F937</span>, try checking the <b>Research Notes</b> or <b>Wikis</b> tabs on this page."
try_advanced_search: "Or try an <a href='%{url1}'>advanced search</a>"
people: "People"
no_map_results_found: "Sorry, no map is tagged with <i>%{tag}</i>"
Expand Down