Skip to content

Commit

Permalink
updated flash message display
Browse files Browse the repository at this point in the history
  • Loading branch information
GBouffard committed Aug 13, 2015
1 parent d50b59f commit 5e2070b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
6 changes: 5 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
</div>
<% end %>
</header>
<%= notice %>
<% if !notice.nil? %>
<div class="notice">
<%= notice %>
</div>
<% end %>
<%= yield %>
</body>
</html>
6 changes: 3 additions & 3 deletions app/views/restaurants/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
<%= link_to "Review #{restaurant.name}", new_restaurant_review_path(restaurant), class: 'owner_buttons' %>
<%end%>
<div class='main_box' id='reviews_box' >
<h3>Reviews for <%= restaurant.name %></h3>
<h2>Reviews for <%= restaurant.name %>:</h2>
<% if restaurant.reviews.any? %>
<ul>
<% restaurant.reviews.each do |review| %>
<% if review.endorsements.count > 1 %>
<% if restaurant.reviews.count > 1 && review != restaurant.reviews.first %>
<div class='black-line'></div>
<% end %>
<li>
<%= review.thoughts %>, <strong><%= review.rating %></strong>/5
<%= link_to "Endorse Review", review_endorsements_path(review), class: 'endorsements-link' %>
<span class="endorsements_count"> <%= review.endorsements.count %> </span> <%= 'endorsement'.pluralize(review.endorsements.count) %>
<%= link_to "Endorse Review", review_endorsements_path(review), class: 'endorsements-link' %>
<% if can? :destroy, review %>
<%= link_to "Delete #{restaurant.name} review", review_path(review), method: :delete, class: 'owner_buttons' %>
<%end%>
Expand Down
2 changes: 1 addition & 1 deletion coverage/.resultset.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"RSpec": {
"coverage": {
},
"timestamp": 1439480830
"timestamp": 1439484415
}
}
20 changes: 20 additions & 0 deletions public/css/yelp.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ h1 {
margin-left: 1%;
}

h2 {
font-weight:bold;
font-style: italic;
text-decoration: underline;
padding-bottom: 15px;
}

.restaurant_name {
color: black;
font-size:15px;
Expand Down Expand Up @@ -198,3 +205,16 @@ div.black-line {
top: 15px;
left: 45%;
}

.notice {
background-color: #777777;
text-align: center;
padding:5px 10px;
margin-top: 1%;
margin-left: 35%;
margin-right: 35%;
border: 2px solid black;
border-radius:10px;
box-shadow: 0 0 3px rgba(0,0,0,0.4);
color: white;
}

0 comments on commit 5e2070b

Please sign in to comment.