class OriginalPictureLicenseGroupsController < ApplicationController
- layout 'test' if Pettanr::TestLayout
- before_filter :authenticate_user!, :only => [:new, :create]
+ before_filter :authenticate_user, :only => [:new, :create]
before_filter :authenticate_artist, :only => [:new, :create]
- # GET /original_picture_license_groups/new
- # GET /original_picture_license_groups/new.js
def new
- @original_picture = OriginalPicture.show params[:original_picture_id], @artist
+ @original_picture = OriginalPicture.show params[:original_picture_id], @operators
@original_picture_license_group = OriginalPictureLicenseGroup.new()
@original_picture_license_group.supply_default @original_picture.id
respond_to do |format|
- format.html # new.html.erb
+ format.html
format.js
end
end
- # POST /original_picture_license_groups
- # POST /original_picture_license_groups.js
def create
- @original_picture = OriginalPicture.show params[:original_picture_id], @artist
+ @original_picture = OriginalPicture.show params[:original_picture_id], @operators
@original_picture_license_group = OriginalPictureLicenseGroup.new params[:original_picture_license_group]
- @license_group = LicenseGroup.show @original_picture_license_group.license_group_id
- @ctl = @license_group.classname.tableize
-
+ @license_group = LicenseGroup.show @original_picture_license_group.license_group_id, @operators
+ @ctl = @license_group.template_path_name
+ @attr = @license_group.template_module.new_attribute {}
+ @attr.supply_default @operators
+
respond_to do |format|
if @original_picture_license_group.valid?
format.html { render :template => "#{@ctl}/attributes/new" }