Revision 4, 0.6 kB
(checked in by falcon, 17 years ago)
|
75% complete. ajax support for engineering and galleries. galleries add/edit. artwork and engineering layouts.
|
Line | |
---|
1 | class ArtworkController < ApplicationController |
---|
2 | #before_filter :login_required |
---|
3 | layout "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(:all, :conditions => ["id = ?", params[:id]])[0] |
---|
16 | |
---|
17 | respond_to do |format| |
---|
18 | format.html { |
---|
19 | render :partial => "show_artwork", :layout => "main" |
---|
20 | } |
---|
21 | end |
---|
22 | end |
---|
23 | |
---|
24 | def init |
---|
25 | Artwork.create() |
---|
26 | |
---|
27 | respond_to do |format| |
---|
28 | format.html { redirect_to :action => "index" } |
---|
29 | end |
---|
30 | end |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | end |
---|