This commit is contained in:
did 2011-07-28 16:42:16 +02:00
parent 92ec012472
commit a9b6c234e7
3 changed files with 20 additions and 4 deletions

View File

@ -14,4 +14,8 @@
%li
%strong= field.label
 - 
%i= @content.send(field._name)
%i
- if field.file?
= link_to File.basename(@content.send(field._name).url), @content.send(field._name).url
- else
= @content.send(field._alias)

View File

@ -19,6 +19,16 @@ module CustomFields
end
end
module Category
class Item
def to_liquid
{ 'id' => self._id, 'name' => self.name }
end
end
end
end
end

View File

@ -28,15 +28,15 @@ module Locomotive
def each(&block)
self.collection.each(&block)
end
def size
self.collection.size
end
def empty?
self.collection.empty?
end
def any?
self.collection.any?
end
@ -47,6 +47,7 @@ module Locomotive
def before_method(meth)
klass = @content_type.contents.klass # delegate to the proxy class
if (meth.to_s =~ /^group_by_.+$/) == 0
klass.send(meth, :ordered_contents)
else
@ -73,6 +74,7 @@ module Locomotive
@collection ||= @content_type.ordered_contents(@context['with_scope'])
end
end
end
end
end