Skip to content

Commit

Permalink
Merge 8334034 into 6b13522
Browse files Browse the repository at this point in the history
  • Loading branch information
vkoves committed Oct 17, 2018
2 parents 6b13522 + 8334034 commit e9ccc4f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 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 class="placeholder">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 class="placeholder">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 class="placeholder">You have not reported any issues yet!</em>
<% end %>
<% else %>
<% else %>
<div>Login to see your reported issues.</div>
<% end %>
</div>
5 changes: 2 additions & 3 deletions app/views/pages/view_issues.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
<%= render "stops/show_with_issues", stop: stop %>
<% end %>
<% else %>
<h3>There seem to be no nearby stops!</h3>
<em class="placeholder">There seem to be no nearby stops!</em>
<% end %>
<% else %>
<h3>We can't show you nearby stops without location services allowed!</h3>
<% end %>
</div>

<% if current_user %>

<h2>
<%= image_tag "star.svg", width: "30px", class: "star" %>
Favorite Stops
Expand All @@ -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.
<em class="placeholder">You have no favorite stops! Go to <%= link_to "All Lines", lines_path %> or search for stops to favorite them.</em>
<% end %>
</div>
<% end %>
Expand Down

0 comments on commit e9ccc4f

Please sign in to comment.