1234567891011121314151617181920212223242526 |
- -# This file is app/views/movies/index.html.haml
- %h1 All Movies
- = form_tag movies_path, :method => :get, :id => "ratings_form" do
- Include:
- - @all_ratings.each do |rating|
- = rating
- = check_box_tag "ratings[#{rating}]", 1, @ratings_array.include?(rating), :id => "ratings_#{rating}"
- = submit_tag 'Refresh', :id => "ratings_submit"
- %table#movies
- %thead
- %tr
- %th{:class => @title_header}= link_to("Movie Title", {controller: "movies", sort: "title"}, {:id => "title_header"})
- %th Rating
- %th{:class => @release_date_header}= link_to("Release Date", {controller: "movies", sort: "release_date"}, {:id => "release_date_header"})
- %th More Info
- %tbody
- - @movies.each do |movie|
- %tr
- %td= movie.title
- %td= movie.rating
- %td= movie.release_date
- %td= link_to "More about #{movie.title}", movie_path(movie)
- = link_to 'Add new movie', new_movie_path
|