Move partials into separate directory
parent
2b347bb7e6
commit
d02afd94d4
|
@ -42,12 +42,8 @@ module Librarix
|
|||
Tmdb::Movie.find(params['search'])
|
||||
end
|
||||
|
||||
if request.xhr?
|
||||
slim :list, layout: false, locals: {movies: movies}
|
||||
else
|
||||
slim :search, locals: {movies: movies}
|
||||
end
|
||||
end
|
||||
|
||||
post '/add' do
|
||||
id = params[:id].to_i
|
||||
|
|
|
@ -24,7 +24,7 @@ form method="get" action="/" id="filter"
|
|||
- filter.movies.each do |group, movies|
|
||||
- unless group == :all
|
||||
h1 = group
|
||||
== slim :list, locals: {movies: movies}
|
||||
== slim :'partials/list', locals: {movies: movies}
|
||||
- if filter.maybe_search?
|
||||
p
|
||||
| Search for
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
.movie data-id="#{movie.id}"
|
||||
== slim :"movie/#{template}", locals: {movie: movie}
|
|
@ -1,4 +1,4 @@
|
|||
ul.movies class="#{template}"
|
||||
- movies.each do |movie|
|
||||
li
|
||||
== slim :movie, locals: {movie: movie}
|
||||
== slim :'partials/movie', locals: {movie: movie}
|
|
@ -0,0 +1,2 @@
|
|||
.movie data-id="#{movie.id}"
|
||||
== slim :"partials/movie/#{template}", locals: {movie: movie}
|
|
@ -7,4 +7,4 @@ form method="get" action="/search" id="search"
|
|||
input type="submit" value="Search"
|
||||
|
||||
div
|
||||
== slim :list, locals: {movies: movies}
|
||||
== slim :'partials/list', locals: {movies: movies}
|
||||
|
|
Loading…
Reference in New Issue