1 class OriginalPictureLicenseGroupsController < ApplicationController
2 layout 'test' if MagicNumber['test_layout']
3 before_filter :authenticate_user!, :only => [:new, :create]
4 before_filter :authenticate_artist, :only => [:new, :create]
6 # GET /original_picture_license_groups/new
7 # GET /original_picture_license_groups/new.js
9 @original_picture = OriginalPicture.show params[:original_picture_id], @artist
10 @original_picture_license_group = OriginalPictureLicenseGroup.new()
11 @original_picture_license_group.supply_default @original_picture.id
13 respond_to do |format|
14 format.html # new.html.erb
19 # POST /original_picture_license_groups
20 # POST /original_picture_license_groups.js
22 @original_picture = OriginalPicture.show params[:original_picture_id], @artist
23 @original_picture_license_group = OriginalPictureLicenseGroup.new params[:original_picture_license_group]
24 @license_group = LicenseGroup.show @original_picture_license_group.license_group_id
25 @ctl = @license_group.classname.tableize
27 respond_to do |format|
28 if @original_picture_license_group.valid?
29 format.html { render :template => "#{@ctl}/attributes/new" }
30 format.js { render :template => "#{@ctl}/attributes/new" }
32 format.html { render action: "new" }
33 format.js { render action: "new" }