diff --git a/app/views/favorites/index.html.erb b/app/views/favorites/index.html.erb index 60672261..a8f2ecda 100644 --- a/app/views/favorites/index.html.erb +++ b/app/views/favorites/index.html.erb @@ -1,11 +1,11 @@

Favorite Stops

- <% unless current_user.favorites.empty? %> + <% if current_user.favorites.any? %> <% current_user.favorites.each do |stop| %> <%= render "stops/show_with_issues", stop: stop %> <% end %> <% else %> - You have no favorite stops! Go to <%= link_to "All Lines", lines_path %> or search for stops to favorite them. + You have no favorite stops! Go to <%= link_to "All Lines", lines_path %> or search for stops to favorite them. <% end %>
diff --git a/app/views/lines/index.html.erb b/app/views/lines/index.html.erb index 56231315..cab9e031 100644 --- a/app/views/lines/index.html.erb +++ b/app/views/lines/index.html.erb @@ -3,8 +3,12 @@

All Lines

<%= stylesheet_link_tag "application" %> - <% @lines.each do |line| %> - <%= render "lines/show", line: line %> + <% if @lines.any? %> + <% @lines.each do |line| %> + <%= render "lines/show", line: line %> + <% end %> + <% else %> + There are no lines in this Caravan! <% end %> diff --git a/app/views/pages/history.html.erb b/app/views/pages/history.html.erb index 98477e3d..0bfe9bfb 100644 --- a/app/views/pages/history.html.erb +++ b/app/views/pages/history.html.erb @@ -1,13 +1,13 @@

Reported Issues

- <% if current_user %> + <% if current_user %> <% if current_user.issues.any? %>
You have <%= pluralize(current_user.issues.length, 'issue') %>:
<%= render 'issues/show_list', issues: current_user.issues %> <% else %> - You have not reported any issues yet! + You have not reported any issues yet! <% end %> - <% else %> + <% else %>
Login to see your reported issues.
<% end %>
diff --git a/app/views/pages/view_issues.html.erb b/app/views/pages/view_issues.html.erb index f0d6ac85..e492ec11 100644 --- a/app/views/pages/view_issues.html.erb +++ b/app/views/pages/view_issues.html.erb @@ -13,7 +13,7 @@ <%= render "stops/show_with_issues", stop: stop %> <% end %> <% else %> -

There seem to be no nearby stops!

+ There seem to be no nearby stops! <% end %> <% else %>

We can't show you nearby stops without location services allowed!

@@ -21,7 +21,6 @@ <% if current_user %> -

<%= image_tag "star.svg", width: "30px", class: "star" %> Favorite Stops @@ -31,7 +30,7 @@ <%= render "stops/show_with_issues", stop: stop %> <% end %> <% if current_user.favorites.empty? %> - You have no favorite stops! Go to <%= link_to "All Lines", lines_path %> or search for stops to favorite them. + You have no favorite stops! Go to <%= link_to "All Lines", lines_path %> or search for stops to favorite them. <% end %> <% end %>