# Path: nive_cms/i18n.py

# 
# Path: nive_cms/baseobjects.py
# class PageElementBase(ObjCopy, PageElement, ObjectBase):
#     """
#     *Page element* 
#     
#     - stored in database
#     - does not store subobjects
#     - stored in element containers 
#     - cut, copy and paste support
#     
#     Interfaces: ``INonContainer, IObject, IPageElement``
#     """
#     implements(IPageElement)


from nive_cms.i18n import _
from nive.definitions import StagPageElement, ObjectConf, FieldConf
from nive_cms.baseobjects import PageElementBase
-----
With the link element you can add internal or external links into the web page.

Internal links can be referenced as page id (the number) and are resolved automatically.
"""



class link(PageElementBase):
    pass


# text type definition ------------------------------------------------------------------
#@nive_module
configuration = ObjectConf(
    id = "link",
    name = _(u"Link"),
    dbparam = "links",
    context = "nive_cms.link.link",
    template = "link.pt",
    selectTag = StagPageElement,
    icon = "nive_cms.cmsview:static/images/types/link.png",
    description = _(u"With the link element you can add internal or external links into the web page.")
)

targets = [{"id": u"", "name": _(u"Same window")}, {"id": u"blank_", "name": _(u"New window")} ]

configuration.data = [
    FieldConf(id="linkurl", datatype="url", size=255, default=u"", name=_(u"Link url"), description=_(u"External links must start with http:// or similar. Internal links can be referenced as page id (the number) and are resolved automatically.")),
    FieldConf(id="target",  datatype="list",size=15,  default=u"", listItems=targets, name=_(u"Target window"), description=u""),

# Path: nive_cms/i18n.py

# 
# Path: nive_cms/baseobjects.py
# class PageElementBase(ObjCopy, PageElement, ObjectBase):
#     """
#     *Page element* 
#     
#     - stored in database
#     - does not store subobjects
#     - stored in element containers 
#     - cut, copy and paste support
#     
#     Interfaces: ``INonContainer, IObject, IPageElement``
#     """
#     implements(IPageElement)


# Path: nive_cms/link.py
from nive_cms.i18n import _
from nive.definitions import StagPageElement, ObjectConf, FieldConf
from nive_cms.baseobjects import PageElementBase

-----
With the link element you can add internal or external links into the web page.

Internal links can be referenced as page id (the number) and are resolved automatically.
"""



class link(PageElementBase):
    pass


# text type definition ------------------------------------------------------------------
#@nive_module
configuration = ObjectConf(
    id = "link",
    name = _(u"Link"),
    dbparam = "links",
    context = "nive_cms.link.link",
    template = "link.pt",
    selectTag = StagPageElement,
    icon = "nive_cms.cmsview:static/images/types/link.png",
    description = _(u"With the link element you can add internal or external links into the web page.")
)

targets = [{"id": u"", "name": _(u"Same window")}, {"id": u"blank_", "name": _(u"New window")} ]

configuration.data = [
    FieldConf(id="linkurl", datatype="url", size=255, default=u"", name=_(u"Link url"), description=_(u"External links must start with http:// or similar. Internal links can be referenced as page id (the number) and are resolved automatically.")),
    FieldConf(id="target",  datatype="list",size=15,  default=u"", listItems=targets, name=_(u"Target window"), description=u""),

    FieldConf(id="style",   datatype="list",size=20,  default=u"", listItems=(),  name=_(u"Link style"), description=u""),