-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.booking-index-card-subheading { | ||
font-size: 14px; | ||
} | ||
|
||
.booking-index-card-text { | ||
font-size: 14px; | ||
color: $light-gray; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
@import "card"; | ||
@import "banner"; | ||
@import "vehicle_index_card"; | ||
@import "booking_index_card"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
<div class="container"> | ||
<div class="container mt-5"> | ||
|
||
<h1>My bookings</h1> | ||
<ul> | ||
<% @my_bookings.each do |booking| %> | ||
<li><%= booking.vehicle.name %> </li> | ||
<li><%= booking.start_date %></li> | ||
<li><%= booking.number_of_nights %></li> | ||
<li><%= booking.vehicle.price_per_night %></li> | ||
<li><%= link_to "view", booking_path(booking) %></li> | ||
|
||
<div class="cards-wrapper w-50 p-3"> | ||
<% @my_bookings.each do |booking| %> | ||
<div class="vehicle-index-card mb-3 w-100"> | ||
<%= cl_image_tag booking.vehicle.photo, height: 300 %> | ||
<div class="vehicle-index-card-content d-flex flex-column p-3"> | ||
<p class="vehicle-index-card-title mb-2"><%= booking.vehicle.name %></p> | ||
<p class="vehicle-index-card-subheading"><%= booking.vehicle.berths %> berth <%= booking.vehicle.category %></p> | ||
<p class="vehicle-index-card-text flex-grow-1"><%= booking.vehicle.description[0..140] %></p> | ||
</div> | ||
</div> | ||
<% end %> | ||
</ul> | ||
</div> | ||
|
||
<!-- --> | ||
|
||
<h1>Bookings for my vehicles</h1> | ||
|
||
<ul> | ||
<% @their_bookings.each do |booking| %> | ||
<li><%= booking.vehicle.name %> </li> | ||
<li><%= booking.start_date %></li> | ||
<li><%= booking.number_of_nights %></li> | ||
<li><%= booking.vehicle.price_per_night %></li> | ||
<div class="cards-wrapper w-50 p-3"> | ||
<% @their_bookings.each do |booking| %> | ||
<div class="vehicle-index-card mb-3 w-100"> | ||
<%= cl_image_tag booking.vehicle.photo, height: 300 %> | ||
<div class="vehicle-index-card-content d-flex flex-column p-3"> | ||
<p class="vehicle-index-card-title mb-2"> <strong><%= booking.vehicle.name %></strong></p> | ||
<p class="booking-index-card-subheading">Lead renter's name: <%= booking.renter.first_name %> <%= booking.renter.last_name %></p> | ||
<p class="booking-index-card-text flex-grow-1">From the <%= booking.start_date %> for <%= booking.number_of_nights%> nights </p> | ||
<p class="booking-index-card-text flex-grow-1">Price Per Night: £<%= booking.vehicle.price_per_night %> </p> | ||
</div> | ||
</div> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> |
Binary file added
BIN
+1.98 MB
.../uploads/tmp/1558364056-13093-0003-0514/melissa-walker-horn-483815-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.