src/pyams_security/zmi/plugin/social.py
changeset 76 f63c594fe40c
parent 75 aeb3456af183
child 117 bab0e0098c8e
equal deleted inserted replaced
75:aeb3456af183 76:f63c594fe40c
   143 # Social users folder search views
   143 # Social users folder search views
   144 #
   144 #
   145 
   145 
   146 @pagelet_config(name='search.html', context=ISocialUsersFolderPlugin, layer=IPyAMSLayer,
   146 @pagelet_config(name='search.html', context=ISocialUsersFolderPlugin, layer=IPyAMSLayer,
   147                 permission=VIEW_SYSTEM_PERMISSION)
   147                 permission=VIEW_SYSTEM_PERMISSION)
   148 class SocialUsersFolderSearchView(AdminView, SearchView):
   148 class SocialUsersFolderSearchView(SearchView):
   149     """Social users folder search view"""
   149     """Social users folder search view"""
   150     
   150     
   151     def __init__(self, context, request):
   151     def __init__(self, context, request):
   152         super(SocialUsersFolderSearchView, self).__init__(context, request)
   152         super(SocialUsersFolderSearchView, self).__init__(context, request)
   153 
   153 
   154 
   154 
   155 @adapter_config(context=(ISocialUsersFolderPlugin, IAdminLayer, SocialUsersFolderSearchView), provides=IPageHeader)
   155 @adapter_config(context=(ISocialUsersFolderPlugin, IPyAMSLayer, SocialUsersFolderSearchView), provides=IPageHeader)
   156 class SocialUsersFolderSearchViewHeaderAdapter(DefaultPageHeaderAdapter):
   156 class SocialUsersFolderSearchViewHeaderAdapter(DefaultPageHeaderAdapter):
   157     """Social users folder search view header adapter"""
   157     """Social users folder search view header adapter"""
   158 
   158 
   159     back_url = '#security-manager.html'
   159     back_url = '#security-manager.html'
       
   160     back_target = '#content'
   160     icon_class = 'fa fa-fw fa-share-alt'
   161     icon_class = 'fa fa-fw fa-share-alt'
       
   162     title = _("Security manager")
   161 
   163 
   162     @property
   164     @property
   163     def title(self):
   165     def subtitle(self):
   164         return self.context.title
   166         return self.context.title
   165 
       
   166     subtitle = _("Search users")
       
   167 
   167 
   168 
   168 
   169 @view_config(name='search-results.html', context=ISocialUsersFolderPlugin, request_type=IPyAMSLayer,
   169 @view_config(name='search-results.html', context=ISocialUsersFolderPlugin, request_type=IPyAMSLayer,
   170              permission=VIEW_SYSTEM_PERMISSION)
   170              permission=VIEW_SYSTEM_PERMISSION)
   171 class SocialUsersFolderSearchResultsView(AdminView, SearchResultsView):
   171 class SocialUsersFolderSearchResultsView(AdminView, SearchResultsView):