2010-08-31 21:53:30 +00:00
|
|
|
module Locomotive
|
|
|
|
module Liquid
|
|
|
|
module Tags
|
|
|
|
module Editable
|
|
|
|
class File < Base
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
2010-09-02 23:03:20 +00:00
|
|
|
def render_element(context, element)
|
2010-08-31 21:53:30 +00:00
|
|
|
element.source? ? element.source.url : element.default_content
|
|
|
|
end
|
|
|
|
|
|
|
|
def document_type
|
|
|
|
EditableFile
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
::Liquid::Template.register_tag('editable_file', File)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|