コード例 #1
0
 def register_roles(self):
     reg = self.dict()
     # menue roles
     reg['menues']['roles'] = [
         {
             'name': _(u'Musicfan'),
             'active': MusicfanResource,
             'url': self.request.resource_path(
                 MusicfanResource(self.request), ''
             )
         },
         {
             'name': _(u'Musician'),
             'active': MusicianResource,
             'url': self.request.resource_path(
                 MusicianResource(self.request), ''
             )
         }
     ]
     return reg
コード例 #2
0
 def __registry__(self):
     reg = self.dict()
     # css
     reg['static']['css'] = [
         self.request.static_path(
             'collecting_society_portal_imp:static/css/backend.css'
         )
     ]
     # logo
     reg['static']['logo'] = self.request.static_path(
         'collecting_society_portal_imp:static/img/musicfan/logo.png'
     )
     # menue main
     reg['menues']['main'] = [
         {
             'name': _(u'Dashboard'),
             'icon': self.request.static_path(
                 'collecting_society_portal_imp:'
                 'static/img/icon.png'
             ),
             'url': self.request.resource_path(
                 MusicfanResource(self.request), 'dashboard'
             )
         },
         {
             'name': _(u'Clients'),
             'icon': self.request.static_path(
                 'collecting_society_portal_imp:'
                 'static/img/icon.png'
             ),
             'url': self.request.resource_path(
                 ClientResource(self.request), 'list'
             )
         },
         {
             'name': _(u'Music Utilization'),
             'icon': self.request.static_path(
                 'collecting_society_portal_imp:'
                 'static/img/icon.png'
             ),
             'url': self.request.resource_path(
                 UtilisationIMPMusicfanResource(self.request), 'list'
             )
         },
         {
             'name': _(u'My Account'),
             'icon': self.request.static_path(
                 'collecting_society_portal_imp:'
                 'static/img/icon.png'
             ),
             'url': None
         },
         {
             'name': _(u'News'),
             'icon': self.request.static_path(
                 'collecting_society_portal_imp:'
                 'static/img/icon.png'
             ),
             'url': None
         },
         {
             'name': _(u'Contact'),
             'icon': self.request.static_path(
                 'collecting_society_portal_imp:'
                 'static/img/icon.png'
             ),
             'url': None
         },
         {
             'name': _(u'Settings'),
             'icon': self.request.static_path(
                 'collecting_society_portal_imp:'
                 'static/img/icon.png'
             ),
             'url': None
         }
     ]
     # widgets content-right
     reg['widgets']['content-right'] = [
         news_widget,
         # pocket_widget,
         plugins_widget,
         todo_musician_widget
     ]
     return reg