Skip to content

Commit

Permalink
Improved questions no_results_found message
Browse files Browse the repository at this point in the history
  • Loading branch information
TildaDares committed Apr 23, 2021
1 parent 2c0a624 commit 1b421cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
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', tag: params[:id]) %></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 @@ -402,6 +402,7 @@ en:
unfollow: "Click to unfollow"
follow: "Follow"
no_results: "No results found; try searching for '%{search}'"
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."
no_recent_posts: "There are no recent posts"
advanced_search: "Or try an <a href='%{url}'>advanced search</a>"
by: "by"
Expand Down

0 comments on commit 1b421cb

Please sign in to comment.