from persistent.list import PersistentList from zope.interface import implements from zope.component import queryUtility import Globals from OFS.Folder import Folder from interfaces import IUpdater, IUpdateScript import utils UPDATERID = 'naaya_updates' UPDATERTITLE = 'Update scripts for Naaya' NAAYAUPDATER_PRODUCT_PATH = Globals.package_home(globals()) LogEntry = namedtuple("LogEntry", ('update_id, datetime, user, portals')) class NaayaUpdater(Folder): """ NaayaUpdater class """ implements(IUpdater) meta_type = 'Naaya Updater' icon = 'misc_/naayaUpdater/updater.jpg' title = UPDATERTITLE #Should be changed to interface pmeta_types = ( 'Naaya Site', 'CHM Site',
'account_modified': EmailPageTemplateFile('emailpt/account_modified.zpt', globals()), } def manage_addNotificationTool(self, REQUEST=None): """ """ ob = NotificationTool(core_constants.ID_NOTIFICATIONTOOL, core_constants.TITLE_NOTIFICATIONTOOL) self._setObject(core_constants.ID_NOTIFICATIONTOOL, ob) if REQUEST is not None: return self.manage_main(self, REQUEST, update_menu=1) # TODO: remove `Subscription` after all sites have been updated Subscription = namedtuple('Subscription', 'user_id location notif_type lang') class NotificationTool(Folder): """ """ meta_type = core_constants.METATYPE_NOTIFICATIONTOOL icon = 'misc_/NaayaCore/NotificationTool.gif' meta_types = () all_meta_types = meta_types security = ClassSecurityInfo() # default configuration settings default_config = {
from StringIO import StringIO import re import PIL.Image import PIL.ImageDraw from Globals import InitializeClass from AccessControl import ClassSecurityInfo from naaya.core.backport import namedtuple CIRCLE_IMAGE_SIZE = 12 ImageSize = namedtuple('ImageSize', 'w h') class symbol_item: """ """ sortorder = 100 color = None @property def image_size(self): # temporary, until we're sure all symbol_item objects have the property return self._calculate_image_size() def __init__(self, id, title, description, parent, color, picture, sortorder): self.id = id self.title = title self.description = description
EmailPageTemplateFile('emailpt/account_modified.zpt', globals()), } def manage_addNotificationTool(self, REQUEST=None): """ """ ob = NotificationTool(core_constants.ID_NOTIFICATIONTOOL, core_constants.TITLE_NOTIFICATIONTOOL) self._setObject(core_constants.ID_NOTIFICATIONTOOL, ob) if REQUEST is not None: return self.manage_main(self, REQUEST, update_menu=1) # TODO: remove `Subscription` after all sites have been updated Subscription = namedtuple('Subscription', 'user_id location notif_type lang') class NotificationTool(Folder): """ """ meta_type = core_constants.METATYPE_NOTIFICATIONTOOL icon = 'misc_/NaayaCore/NotificationTool.gif' meta_types = () all_meta_types = meta_types security = ClassSecurityInfo() # default configuration settings default_config = {
from persistent.list import PersistentList from zope.interface import implements from zope.component import queryUtility import Globals from OFS.Folder import Folder from interfaces import IUpdater, IUpdateScript import utils UPDATERID = 'naaya_updates' UPDATERTITLE = 'Update scripts for Naaya' NAAYAUPDATER_PRODUCT_PATH = Globals.package_home(globals()) LogEntry = namedtuple("LogEntry", ('update_id, datetime, user, portals')) class NaayaUpdater(Folder): """ NaayaUpdater class """ implements(IUpdater) meta_type = 'Naaya Updater' icon = 'misc_/naayaUpdater/updater.jpg' title = UPDATERTITLE #Should be changed to interface pmeta_types = ('Naaya Site', 'CHM Site', 'EnviroWindows Site', 'SEMIDE Site',