|
|
|
<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>
|
|
|
|
<%= link_to "Write Review", new_movie_review_path(@movie), class: "review" %>
|
|
|
|
<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>
|