# Path: nive_cms/i18n.py

# 
# Path: nive_cms/extensions/path.py
# class AlternateAppPath(object):
#     """
#     Extension for nive applications to support alternative root names
#     """
#     # system functions -----------------------------------------------------------------
# 
#     def __getitem__(self, name):
#         """
#         Traversal lookup based on object.pool_filename and object.id. Trailing extensions
#         are ignored.
#         """
#         name = name.split(u".")
#         if len(name)>2:
#             name = (u".").join(name[:-1])
#         else:
#             name = name[0]
# 
#         o = self.root(name)
#         if o and o.configuration.urlTraversal:
#             return o
#         default = self.root(name="")
#         if default.path == name:
#             # copy configuration and pass to factory
#             conf = default.configuration.copy()
#             conf.id = name
#             return self.GetRoot(conf)
# 
#         raise KeyError, name


import copy
from nive_cms.i18n import _
from nive.definitions import implements, IWebsite
from nive.definitions import AppConf, FieldConf, GroupConf
from nive.security import ALL_PERMISSIONS, Allow, Everyone, Deny
from nive.components.objects.base import ApplicationBase
from nive_cms.extensions.path import AlternateAppPath

    app.modules.append("nive_cms_design_bs3.view")

To include a customized copy of the design use ::

    design = ViewModuleConf("nive_cms_design_bs3.view")
    # design customizations here
    design.static = "mywebsite:static" 
    # add to website
    app.modules.append(design)

This will replace the static directory of the design with your own directory. However, now you will
have to add the required css, images and javascript used by the templates to the new folder.
(For a start just copy the contents of ``nive_cms_design_bs3:static``.)
"""



#@nive_module
configuration = AppConf(
    id = "website",
    title = u"Nive cms",
    context = "nive_cms.app.WebsitePublisher",
    workflowEnabled = True,
    columns=[u"footer"],
    translations="nive_cms:locale/"
)

configuration.meta.append(FieldConf(id="pool_groups", datatype="checkbox", size=250, default="",
                                    name=_(u"Permission"), 

# Path: nive_cms/i18n.py

# 
# Path: nive_cms/extensions/path.py
# class AlternateAppPath(object):
#     """
#     Extension for nive applications to support alternative root names
#     """
#     # system functions -----------------------------------------------------------------
# 
#     def __getitem__(self, name):
#         """
#         Traversal lookup based on object.pool_filename and object.id. Trailing extensions
#         are ignored.
#         """
#         name = name.split(u".")
#         if len(name)>2:
#             name = (u".").join(name[:-1])
#         else:
#             name = name[0]
# 
#         o = self.root(name)
#         if o and o.configuration.urlTraversal:
#             return o
#         default = self.root(name="")
#         if default.path == name:
#             # copy configuration and pass to factory
#             conf = default.configuration.copy()
#             conf.id = name
#             return self.GetRoot(conf)
# 
#         raise KeyError, name


# Path: nive_cms/app.py
import copy
from nive_cms.i18n import _
from nive.definitions import implements, IWebsite
from nive.definitions import AppConf, FieldConf, GroupConf
from nive.security import ALL_PERMISSIONS, Allow, Everyone, Deny
from nive.components.objects.base import ApplicationBase
from nive_cms.extensions.path import AlternateAppPath


    app.modules.append("nive_cms_design_bs3.view")

To include a customized copy of the design use ::

    design = ViewModuleConf("nive_cms_design_bs3.view")
    # design customizations here
    design.static = "mywebsite:static" 
    # add to website
    app.modules.append(design)

This will replace the static directory of the design with your own directory. However, now you will
have to add the required css, images and javascript used by the templates to the new folder.
(For a start just copy the contents of ``nive_cms_design_bs3:static``.)
"""



#@nive_module
configuration = AppConf(
    id = "website",
    title = u"Nive cms",
    context = "nive_cms.app.WebsitePublisher",
    workflowEnabled = True,
    columns=[u"footer"],
    translations="nive_cms:locale/"
)

configuration.meta.append(FieldConf(id="pool_groups", datatype="checkbox", size=250, default="",
                                    name=_(u"Permission"), 

                                    description=_(u"Only displayed to users in the selected group")))