'panels.publish > 0'
end
- def self.list_order
- 'panel_pictures.updated_at desc'
- end
-
- def self.list_opt
- {:panel => {:author => {}}, :picture => {:artist => {}, :license => {}} }
- end
-
- def self.list_json_opt
- {:include => {:panel => {:include => {:author => {}}}, :picture => {:include => {:artist => {}, :license => {}}} }}
- end
-
def self.show_opt
{:include => {:panel => {:author => {}}, :picture => {:artist => {}, :license => {}}}}
end
{:include => {:panel => {:include => {:author => {}}}, :picture => {:include => {:artist => {}, :license => {}}} }}
end
- def store operators
- if self.new_record?
- self.panel.panel_pictures.build(self.attributes)
- else
- self.panel.panel_pictures.each do |panel_picture|
- next unless panel_picture == self
- attr = self.attributes
- attr.delete 'id'
- panel_picture.attributes = attr
- break
- end
- end
- self.panel.store({}, operators)
- end
-
- def remove operators
- self.panel.remove_element(self, operators)
- end
-
def scenario
if caption.blank?
''