src/pyams_zmi/site.py
changeset 7 41b551f84e90
parent 2 bc1d70f9a9e2
child 9 c03bd115684e
equal deleted inserted replaced
6:fa8fd073b191 7:41b551f84e90
    25 from pyams_zmi.layer import IAdminLayer
    25 from pyams_zmi.layer import IAdminLayer
    26 
    26 
    27 # import packages
    27 # import packages
    28 from pyams_form.form import AJAXEditForm
    28 from pyams_form.form import AJAXEditForm
    29 from pyams_pagelet.pagelet import pagelet_config
    29 from pyams_pagelet.pagelet import pagelet_config
       
    30 from pyams_skin.page import DefaultPageHeaderAdapter
    30 from pyams_skin.viewlet.menu import MenuItem
    31 from pyams_skin.viewlet.menu import MenuItem
    31 from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
    32 from pyams_utils.adapter import adapter_config
    32 from pyams_viewlet.manager import viewletmanager_config
    33 from pyams_viewlet.manager import viewletmanager_config
    33 from pyams_viewlet.viewlet import viewlet_config
    34 from pyams_viewlet.viewlet import viewlet_config
    34 from pyams_zmi.form import AdminEditForm
    35 from pyams_zmi.form import AdminEditForm
    35 from pyramid.decorator import reify
    36 from pyramid.decorator import reify
    36 from pyramid.view import view_config
    37 from pyramid.view import view_config
    90         else:
    91         else:
    91             return AJAXEditForm.get_ajax_output(self, changes)
    92             return AJAXEditForm.get_ajax_output(self, changes)
    92 
    93 
    93 
    94 
    94 @adapter_config(context=(Interface, IPyAMSLayer, PropertiesEditForm), provides=IPageHeader)
    95 @adapter_config(context=(Interface, IPyAMSLayer, PropertiesEditForm), provides=IPageHeader)
    95 class PropertiesEditFormHeaderAdapter(ContextRequestViewAdapter):
    96 class PropertiesEditFormHeaderAdapter(DefaultPageHeaderAdapter):
    96     """Utilities header adapter"""
    97     """Utilities header adapter"""
    97 
    98 
       
    99     @property
       
   100     def title(self):
       
   101         config = IConfiguration(self.context)
       
   102         return config.title
       
   103 
    98     icon_class = 'fa fa-fw fa-twitch'
   104     icon_class = 'fa fa-fw fa-twitch'
    99     title = _("Site management")
       
   100     subtitle = _("Site properties")