Add single movie page
parent
d02afd94d4
commit
7246e18377
|
@ -0,0 +1,25 @@
|
||||||
|
- content_for :title do
|
||||||
|
= movie.title
|
||||||
|
|
||||||
|
.movie data-id="#{movie.id}"
|
||||||
|
.poster
|
||||||
|
- if movie.poster_path
|
||||||
|
img src="#{poster_url(movie.poster_path, 'w154')}"
|
||||||
|
.informations
|
||||||
|
h2
|
||||||
|
a href="#{url("/movie/#{movie.id}")}" #{movie.original_title}
|
||||||
|
p = movie.release_date
|
||||||
|
p = movie.overview
|
||||||
|
.actions
|
||||||
|
- if movie.added?
|
||||||
|
- unless movie.viewed?
|
||||||
|
form method="post" action="/view"
|
||||||
|
input type="hidden" name="id" value="#{movie.id}"
|
||||||
|
button type="submit" data-action="view-movie" View
|
||||||
|
form method="post" action="/remove"
|
||||||
|
input type="hidden" name="id" value="#{movie.id}"
|
||||||
|
button type="submit" data-action="remove-movie" Remove
|
||||||
|
- else
|
||||||
|
form method="post" action="/add"
|
||||||
|
input type="hidden" name="id" value="#{movie.id}"
|
||||||
|
button type="submit" data-action="add-movie" Add
|
|
@ -3,7 +3,7 @@
|
||||||
img src="#{poster_url(movie.poster_path, 'w92')}"
|
img src="#{poster_url(movie.poster_path, 'w92')}"
|
||||||
.informations
|
.informations
|
||||||
h2
|
h2
|
||||||
a href="https://www.themoviedb.org/movie/#{movie.id}" #{movie.original_title}
|
a href="#{url("/movie/#{movie.id}")}" #{movie.original_title}
|
||||||
.actions
|
.actions
|
||||||
- if movie.added?
|
- if movie.added?
|
||||||
- unless movie.viewed?
|
- unless movie.viewed?
|
||||||
|
|
|
@ -3,9 +3,12 @@
|
||||||
img src="#{poster_url(movie.poster_path, 'w154')}"
|
img src="#{poster_url(movie.poster_path, 'w154')}"
|
||||||
.informations
|
.informations
|
||||||
h2
|
h2
|
||||||
a href="https://www.themoviedb.org/movie/#{movie.id}" #{movie.original_title}
|
a href="#{url("/movie/#{movie.id}")}" #{movie.original_title}
|
||||||
p = movie.release_date
|
p = movie.release_date
|
||||||
p = movie.overview
|
p = movie.overview
|
||||||
|
ul.genres
|
||||||
|
- movie.genres.each do |genre|
|
||||||
|
li = genre['name']
|
||||||
.actions
|
.actions
|
||||||
- if movie.added?
|
- if movie.added?
|
||||||
- unless movie.viewed?
|
- unless movie.viewed?
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
img src="#{poster_url(movie.poster_path, 'w154')}"
|
img src="#{poster_url(movie.poster_path, 'w154')}"
|
||||||
.informations
|
.informations
|
||||||
h2
|
h2
|
||||||
a href="https://www.themoviedb.org/movie/#{movie.id}" #{movie.original_title}
|
a href="#{url("/movie/#{movie.id}")}" #{movie.original_title}
|
||||||
|
|
Loading…
Reference in New Issue