root/app/controllers/artwork_controller.rb

Revision 10, 0.6 kB (checked in by falcon, 17 years ago)

Final styling tweaks, ordering, misc cleanup.

Line 
1class ArtworkController < ApplicationController
2#before_filter :login_required
3layout "main"
4                           
5  def index
6        populate_sidebar("Artwork")
7       
8        respond_to do |format|
9          format.html  # index.html.erb
10        end
11  end
12 
13  def show
14        populate_sidebar("Artwork")
15        @gallery = Gallery.find(params[:id])
16        @medias = GalleryMedia.find(:all, :conditions => ["gallery_id = ?", @gallery.id], :order => "created_at DESC").paginate(:page => params[:page], :per_page => 20)
17       
18        respond_to do |format|
19          format.html {
20                render :partial => "show_artwork", :layout => "main"
21          }
22        end
23  end
24 
25  end
Note: See TracBrowser for help on using the browser.