Skip to content

Commit

Permalink
Added lines index placeholder text
Browse files Browse the repository at this point in the history
This makes it clear if a Caravan has no lines
  • Loading branch information
vkoves committed Oct 10, 2018
1 parent 2929bf0 commit bfff163
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/views/favorites/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="page-container">
<h1>Favorite Stops</h1>
<% 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.
<em>You have no favorite stops! Go to <%= link_to "All Lines", lines_path %> or search for stops to favorite them.</em>
<% end %>
</div>

Expand Down
8 changes: 6 additions & 2 deletions app/views/lines/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
<h1>All Lines</h1>
<%= 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 %>
<em>There are no lines in this Caravan!</em>
<% end %>
</div>

Expand Down
6 changes: 3 additions & 3 deletions app/views/pages/history.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div class="page-container">
<h1>Reported Issues</h1>
<% if current_user %>
<% if current_user %>
<% if current_user.issues.any? %>
<div>You have <%= pluralize(current_user.issues.length, 'issue') %>:</div>
<%= render 'issues/show_list', issues: current_user.issues %>
<% else %>
<strong>You have not reported any issues yet!</strong>
<em>You have not reported any issues yet!</em>
<% end %>
<% else %>
<% else %>
<div>Login to see your reported issues.</div>
<% end %>
</div>

0 comments on commit bfff163

Please sign in to comment.