# Path: nive_cms/i18n.py

# 
# Path: nive_cms/baseobjects.py
# class PageElementFileBase(ObjCopy, PageElement, ObjectBase):
#     """
#     *Page element with file download support*
#     
#     - stored in database
#     - does not store subobjects
#     - stored in element containers 
#     - cut, copy and paste support
#     - contained files can be downloaded
# 
#     Interfaces: ``INonContainer, IObject, IPageElement, IFile``
#     """
#     implements(IPageElement, IFile)
# 
# Path: nive_cms/extensions/images.py
# class ImageProcessor(object):
#     def GetImgSize(self, image):
#     def Process(self, images=None, profiles=None):
#     def _CheckCondition(self, profile):
#     def _Convert(self, profile):
#     def Init(self):
#     def ProcessImages(self, **kw):


from nive_cms.i18n import _
from nive.definitions import StagPageElement, ObjectConf, FieldConf, Conf
from nive_cms.baseobjects import PageElementFileBase
from nive_cms.extensions.images import PILloaded


class image(PageElementFileBase):
    """
    """
    # bw 0.9.11
    def Span(self):
        # css class span for the css selection
        if self.data.cssClass=="teaserl":
            return u"span4"
        elif self.data.cssClass=="teasers":
            return u"span2"
        return u"span3"    


# image type definition ------------------------------------------------------------------
#@nive_module
configuration = ObjectConf(
    id = "image",
    name = _(u"Image"),
    dbparam = "images",
    context = "nive_cms.image.image",
    template = "image.pt",
    selectTag = StagPageElement,
    extensions = [],
    icon = "nive_cms.cmsview:static/images/types/image.png",
    description = _(u"The image element inserts images into the web page.")
)

configuration.data = [

# Path: nive_cms/i18n.py

# 
# Path: nive_cms/baseobjects.py
# class PageElementFileBase(ObjCopy, PageElement, ObjectBase):
#     """
#     *Page element with file download support*
#     
#     - stored in database
#     - does not store subobjects
#     - stored in element containers 
#     - cut, copy and paste support
#     - contained files can be downloaded
# 
#     Interfaces: ``INonContainer, IObject, IPageElement, IFile``
#     """
#     implements(IPageElement, IFile)
# 
# Path: nive_cms/extensions/images.py
# class ImageProcessor(object):
#     def GetImgSize(self, image):
#     def Process(self, images=None, profiles=None):
#     def _CheckCondition(self, profile):
#     def _Convert(self, profile):
#     def Init(self):
#     def ProcessImages(self, **kw):


# Path: nive_cms/image.py
from nive_cms.i18n import _
from nive.definitions import StagPageElement, ObjectConf, FieldConf, Conf
from nive_cms.baseobjects import PageElementFileBase
from nive_cms.extensions.images import PILloaded



class image(PageElementFileBase):
    """
    """
    # bw 0.9.11
    def Span(self):
        # css class span for the css selection
        if self.data.cssClass=="teaserl":
            return u"span4"
        elif self.data.cssClass=="teasers":
            return u"span2"
        return u"span3"    


# image type definition ------------------------------------------------------------------
#@nive_module
configuration = ObjectConf(
    id = "image",
    name = _(u"Image"),
    dbparam = "images",
    context = "nive_cms.image.image",
    template = "image.pt",
    selectTag = StagPageElement,
    extensions = [],
    icon = "nive_cms.cmsview:static/images/types/image.png",
    description = _(u"The image element inserts images into the web page.")
)

configuration.data = [

    FieldConf(id="image",     datatype="file", size=0,     default=u"", name=_(u"Imagefile")),