You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
983 B
36 lines
983 B
<section class="movie-details">
|
|
<div class="image">
|
|
<%= image_tag @movie.image_file_name %>
|
|
</div>
|
|
<div class="details">
|
|
<h1><%= @movie.title %></h1>
|
|
<h2>
|
|
<%= year_of(@movie) %> • <%= @movie.rating %>
|
|
</h2>
|
|
<div class="reviews">
|
|
<%= link_to pluralize(@movie.reviews.size, "review"), movie_reviews_path(@movie) %>
|
|
</div>
|
|
<p>
|
|
<%= @movie.description %>
|
|
</p>
|
|
<table>
|
|
<tr>
|
|
<th>Director:</th>
|
|
<td><%= @movie.director %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Duration:</th>
|
|
<td><%= @movie.duration %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Total Gross:</th>
|
|
<td><%= total_gross(@movie) %></td>
|
|
</tr>
|
|
</table>
|
|
<section class="admin">
|
|
<%= link_to "Edit", edit_movie_path(@movie), class: "button" %>
|
|
<%= link_to "Delete", movie_path(@movie), class: "button", data: { turbo_method: :delete, turbo_confirm: "Are you sure?" } %>
|
|
</section>
|
|
</div>
|
|
</section>
|