Ejemplo n.º 1
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children += [
            items.MenuItem('Home', reverse('admin:index')),
            items.MenuItem(_('Dashboard'), reverse('%s:index' % site_name)),
            items.Bookmarks(),
            items.AppList(_('Applications'), exclude=('django.contrib.*', )),
            items.AppList(_('Administration'), models=('django.contrib.*', )),
            items.MenuItem(
                'Excel Reports',
                children=[
                    #items.MenuItem('demographic report', reverse('reports:demographic')),
                    items.MenuItem('demographic report',
                                   reverse('reports:demographic')),
                    items.MenuItem('challenges report',
                                   reverse('reports:challenges_activity')),
                    items.MenuItem('comments by popularity',
                                   reverse('reports:comments_popular')),
                    items.MenuItem('player activity report',
                                   reverse('reports:activity_report')),
                    #items.MenuItem('comments by activity 2', reverse('reports:comments_by_activity2')),
                    #items.MenuItem('comments by activity 2 (multi only)', reverse('reports:comments_by_activity2_multi')),
                ]),
        ]
Ejemplo n.º 2
0
    def __init__(self, **kwargs):
        Menu.__init__(self, **kwargs)
        self.children += [
            items.MenuItem(_('Dashboard'), reverse('admin:index')),
            items.Bookmarks(),

        ]
Ejemplo n.º 3
0
	def init_with_context(self, context):
		site_name = get_admin_site_name(context)

		self.children += [
			items.MenuItem(u'Панель управления', reverse('%s:index' % site_name)),
			
			items.AppList(
				u'Приложения',
				exclude=(
					'django.contrib.*',
				)
			),
			
			items.MenuItem(u'Администрирование',
				children=[
					items.MenuItem(u'Группы', '/admin/auth/group/', enabled=context['request'].user.has_perm("auth.change_group")),
					items.MenuItem(u'Пользователи', '/admin/auth/user/', enabled=context['request'].user.has_perm("auth.change_user")),
					items.MenuItem(u'Сайты', '/admin/sites/site/', enabled=context['request'].user.has_perm("sites.change_site")),
					items.MenuItem(u'Настройки', '/admin/configuration/configmodel/', enabled=context['request'].user.has_perm("configuration.change_configmodel")),
					
				],
			),
			
			items.Bookmarks(),

			items.MenuItem(u'Система заявок', 'http://web-aspect.ru/helpdesk/'),
		]
Ejemplo n.º 4
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks("Filtros"),
         items.MenuItem(
             _('Users'),
             children=(
                 items.MenuItem(_('All'), "/admin/bikeanjo/profile/"),
                 items.MenuItem(
                     _('Bike Anjos'),
                     "/admin/bikeanjo/profile/?is_bikeanjo__exact=1"),
                 items.MenuItem(
                     _('Solicitantes'),
                     "/admin/bikeanjo/profile/?is_bikeanjo__exact=0"),
             )),
         items.MenuItem(_('Requests'),
                        children=(items.MenuItem(
                            _('All'), "/admin/bikeanjo/request/"), )),
         items.AppList(
             _('Applications'),
             exclude=('django.contrib.*', ),
         ),
         items.AppList(
             _('Administration'),
             models=('django.contrib.*', ),
         ),
     ]
Ejemplo n.º 5
0
    def init_with_context(self, context):
        request = context['request']

        configuracoes_children = []
        if context.get('request').user.has_perm('auth.view_filebrowser'):
            configuracoes_children.append(
                items.MenuItem(title=_(u'Visualizador de Arquivos'),
                               url=reverse('filebrowser:fb_browse')))

        financeiro_children = []
        if request.user.has_perm('auth.view_caixa'):
            financeiro_children.append(
                items.MenuItem(u'Caixa', reverse('financeiro_caixa')))

        self.children += [
            items.MenuItem(' ', reverse('admin:index')),
            items.Bookmarks(_('Favoritos')),
            CustomAppList(
                u'CMS',
                exclude=(
                    'raizcidadanista.cms.models.EmailAgendado',
                    'raizcidadanista.cms.models.Recurso',
                    'raizcidadanista.cms.models.Theme',
                ),
                models=(
                    'raizcidadanista.cms.models.Section',
                    'raizcidadanista.cms.models.Article',
                    'raizcidadanista.cms.models.ArticleComment',
                    'raizcidadanista.cms.models.Menu',
                ),
            ),
            CustomAppList(u'Configurações',
                          models=(
                              'raizcidadanista.cms.models.Recurso',
                              'raizcidadanista.cms.models.Theme',
                              'raizcidadanista.cms.models.URLNotFound',
                          ),
                          children=configuracoes_children),
            CustomAppList(
                u'Cadastro',
                models=('cadastro.models.*', ),
                exclude=('cadastro.models.ListaCadastro', ),
            ),
            CustomAppList(
                u'Fórum',
                models=('forum.models.*', ),
            ),
            CustomAppList(u'Financeiro',
                          models=('financeiro.models.*', ),
                          children=financeiro_children),
            CustomAppList(
                u'Adminstração',
                models=(
                    'django.contrib.*',
                    'utils.models.*',
                    'raizcidadanista.cms.models.EmailAgendado',
                ),
                exclude=('django.contrib.sites.models.*', ),
            ),
        ]
Ejemplo n.º 6
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_("Dashboard"), reverse("admin:index")),
         items.Bookmarks(),
         items.AppList(_("Applications")),
     ]
Ejemplo n.º 7
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('Administration'),
                       models=(
                           'django.contrib.*',
                           'filer.*',
                       )),
         items.ModelList(
             _('Asset Manager'),
             (
                 'asset_manager.models.Asset',
                 'asset_manager.models.Exchange',
                 'asset_manager.models.Office',
                 'asset_manager.models.Location',
                 'asset_manager.models.Manufacturer',
                 'asset_manager.models.Supplier',
                 'asset_manager.models.Type',
             ),
         ),
         items.ModelList(
             _('License Manager'),
             (
                 'license_manager.models.License',
                 'license_manager.models.LicenseAssignment',
                 'license_manager.models.LicenseSummary',
                 'license_manager.models.Platform',
                 'license_manager.models.SoftwareFamily',
                 'license_manager.models.Software',
                 'license_manager.models.Supplier',
             ),
         ),
     ]
Ejemplo n.º 8
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children += [
            items.MenuItem(_('Dashboard'), reverse('%s:index' % site_name)),
            items.AppList(_('Applications'), exclude=('django.contrib.*', )),
            items.MenuItem(
                _('Administration'),
                children=[
                    items.MenuItem(_('Groups'),
                                   '/admin/auth/group/',
                                   enabled=context['request'].user.has_perm(
                                       "auth.change_group")),
                    items.MenuItem(_('Users'),
                                   '/admin/auth/user/',
                                   enabled=context['request'].user.has_perm(
                                       "auth.change_user")),
                    items.MenuItem(_('Sites'),
                                   '/admin/sites/site/',
                                   enabled=context['request'].user.has_perm(
                                       "sites.change_site")),
                ],
            ),
            items.Bookmarks(),
            items.MenuItem(_('Google analytics'),
                           'http://www.google.com/intl/ru/analytics/'),
            items.MenuItem(_('Helpdesk'), 'http://web-aspect.ru/helpdesk/'),
        ]
Ejemplo n.º 9
0
 def get_children(self):
     children = [
         items.AppList(title=_('Applications'), ),
         # items.AppList(
         #     title=_('Applications'),
         #     exclude=('django.contrib.*',),
         #     exclude_list=('django.contrib.*'),
         # ),
         # items.AppList(
         #     title=_('Administration'),
         #     models=('django.contrib.*',)
         # ),
         items.MenuItem(title=_('Dashboard'), url=reverse('admin:index')),
         items.MenuItem(title='Multi level menu item',
                        children=[
                            items.MenuItem(title='Child 1', url='/foo/'),
                            items.MenuItem(title='Child 2', url='/bar/'),
                        ]),
         HistoryMenuItem(),
         items.Bookmarks(),
         # items.Bookmarks(
         #     'My bookmarks'
         # ),
         items.ModelList(
             'Authentication',
             # ['django.contrib.auth.*',]
             [
                 'sw_shop.sw_catalog.*',
             ],
         )
     ]
     return children
Ejemplo n.º 10
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(u' ', '/'),
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(
             _('Content'),
             models=itemlist_content,
         ),
         items.AppList(
             _('Structure'),
             models=itemlist_structure,
         ),
         items.AppList(
             _('Second Life'),
             models=itemlist_sl,
         ),
         items.AppList(
             _('System'),
             models=itemlist_system,
         ),
         items.AppList(
             _('Miscellaneous'),
             exclude=itemlist_misc_exclude,
         ),
     ]
Ejemplo n.º 11
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(_('Favoritos')),
         items.AppList(_('Applications'),
                       exclude=(
                           'django.contrib.*',
                           'report.models.*',
                           'account.models.*',
                           'emailconfirmation.models.*',
                           'profiles.models.*',
                           'posts.models.*',
                           'elos.models.*',
                           'tagging.models.*',
                       )),
         items.AppList(_('Administration'),
                       models=(
                           'django.contrib.*',
                           'report.models.*',
                           'account.models.*',
                           'emailconfirmation.models.*',
                           'profiles.models.*',
                           'posts.models.*',
                           'elos.models.*',
                           'tagging.models.*',
                       )),
     ]
Ejemplo n.º 12
0
    def init_with_context(self, context):
        # Link to home and bookmarks
        self.children.append(
            items.MenuItem(u'Dashboard', reverse(u'admin:index')))
        self.children.append(items.Bookmarks())

        # Links submenu
        self.children.append(
            items.MenuItem(
                u'Administration',
                children=[self._create_link(**l) for l in ADMIN_LINKS]))

        # Models submenu
        self.children.append(
            items.MenuItem(u'Models',
                           children=[
                               self._create_model_group(**g)
                               for g in ADMIN_MODEL_GROUPS
                           ]))
        self.children[-1].children.append(
            items.AppList(u'Other Models', exclude=self._used_models()))

        # Pages
        self.children.append(
            items.MenuItem(u'Pages',
                           children=[
                               self._create_link(n, u'admin:pages_index', [l])
                               for l, n in settings.LANGUAGES
                           ]))
Ejemplo n.º 13
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(_('Bookmarks')),
         items.AppList(_('Applications'), exclude=('django.contrib.*', )),
         items.AppList(_('Administration'), models=('django.contrib.*', ))
     ]
Ejemplo n.º 14
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children += [
            items.MenuItem(_('Dashboard'), reverse('%s:index' % site_name)),
            items.Bookmarks(),
            items.AppList(_('Applications'), exclude=('django.contrib.*', )),
            items.AppList(_('Administration'), models=('django.contrib.*', ))
        ]
Ejemplo n.º 15
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(u'Favoritos'),
         CustomAppList(
             u'Adminstração',
             models=('django.contrib.*', ),
         ),
     ]
Ejemplo n.º 16
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('Applications'), exclude=('django.contrib.*', )),
         items.AppList(_('Administration'), models=('django.contrib.*', )),
         items.ModelList('Test app menu',
                         ['test_app.models.Bar', 'django.contrib.auth.*'])
     ]
Ejemplo n.º 17
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children.append(items.MenuItem(
         title=u'Main',
         url=reverse('admin:index')
     ))
     self.children.append(items.MenuItem(
         title=u'Web-Site',
         url='/'
     ))
     self.children.append(items.Bookmarks(title=u'Bookmarks'))
Ejemplo n.º 18
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('Applications'), exclude=('django.contrib.*', )),
         items.AppList(_('Administration'), models=('django.contrib.*', )),
         items.MenuItem(
             'Current Activity',
             children=[
                 items.MenuItem('Logged-in users',
                                '/current_activity/active_users/'),
                 items.MenuItem('Total translation attempts',
                                '/current_activity/complete_user_history/'),
                 items.MenuItem('Current translations',
                                '/current_activity/current_translations/'),
                 items.MenuItem('Translations with maximum hops',
                                '/current_activity/translations_max_hops/'),
                 items.MenuItem('Translations with minimum hops',
                                '/current_activity/translations_min_hops/'),
                 items.MenuItem('Total sentences translated',
                                '/current_activity/total_translations/'),
                 items.MenuItem('Average translation rate',
                                '/current_activity/avg_translation_rate/'),
                 items.MenuItem('Average convergence rate',
                                '/current_activity/avg_convergence_rate/'),
                 #items.MenuItem('Microtask similarity score', '/current_activity/microtask_similarity_score/')
             ]),
         items.MenuItem(
             'Background Tasks',
             children=[
                 items.MenuItem('Populate task',
                                '/background_task/populate_task/'),
                 #                    items.MenuItem('Populate Microtask', '/background_task/populate_microtask/'),
                 #                    items.MenuItem('Unassign Microtask', '/background_task/unassign_microtask/'),
                 items.MenuItem('Upload Priviledge',
                                '/background_task/upload_priviledge/'),
                 items.MenuItem(
                     'Update Weekly Leaderboard',
                     '/background_task/update_weekly_leaderboard/'),
                 items.MenuItem(
                     'Update Overall Leaderboard',
                     '/background_task/update_overall_leaderboard/'),
                 items.MenuItem(
                     'Update Statistics Counter',
                     '/background_task/update_statistics_counter/'),
                 items.MenuItem('Document Stability',
                                '/background_task/document_stability/'),
                 #                    items.MenuItem('Reputation Score', '/background_task/reputation_score/'),
                 items.MenuItem('Assign Rank',
                                '/background_task/assign_rank/')
             ]),
     ]
Ejemplo n.º 19
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('School'),
                       models=('lunches.*', 'newsletteers.*', 'staff.*',
                               'zinnia.*')),
         items.AppList(_('Administration'),
                       models=('profiles.*', 'django.contrib.*', 'robots.*',
                               'redirects.*'))
     ]
Ejemplo n.º 20
0
    def __init__(self, **kwargs):
        Menu.__init__(self, **kwargs)
        self.children.append(items.Bookmarks(title='Bookmarks'))

        self.children.append(items.AppList(
            title='Applications',
            exclude_list=('django.contrib',)
        ))
        self.children.append(items.AppList(
            title='Administration',
            include_list=('django.contrib',)
        ))
Ejemplo n.º 21
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('CDR-Stats' + ' V' + cdr_stats.__version__),
                        reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('Applications'), exclude=('django.contrib.*', )),
         items.AppList(_('Administration'), models=('django.contrib.*', )),
         items.MenuItem(_('API Explorer'),
                        reverse('admin:index') + '../api-explorer/'),
         items.MenuItem(_('Customer Panel'),
                        reverse('admin:index') + '../'),
     ]
Ejemplo n.º 22
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Home'), reverse('home')),
         items.MenuItem(_('Data'),
                        reverse('geonode.maps.views.search_page')),
         items.MenuItem(_('Maps'), reverse('geonode.maps.views.maps')),
         items.MenuItem(_('Tools'), reverse('cigno.tools.views.index')),
         items.MenuItem(_('Admin'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('Applications'), exclude=('django.contrib.*', )),
         items.AppList(_('Administration'), models=('django.contrib.*', ))
     ]
Ejemplo n.º 23
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         CustomAppList(_('Applications'),
                       exclude=(
                           'django.core.*',
                           'rest_framework.authtoken.*',
                           'nodeconductor.core.*',
                       )),
         items.ModelList(_('User management'),
                         models=('nodeconductor.core.*', )),
     ]
Ejemplo n.º 24
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Admin'), reverse('admin:index')),
         items.Bookmarks(),
         items.ModelList(
             _('Content'),
             models=(
                 'cms.models.pagemodel.*',
                 'media_tree.*',
             ),
         ),
         items.ModelList(_('Users'), models=('django.contrib.auth.*', ))
     ]
Ejemplo n.º 25
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('Applications'  ),exclude=('django.contrib.*',)),
         items.AppList(_('Administration'),models =('django.contrib.*',)),
         items.MenuItem(_('Api'), children = [
             items.MenuItem(_('Documentation'  ), '/tastytools/doc/'  ),
         ]),
         items.MenuItem(_('Raports'), children = [
             items.MenuItem(_('Produits'  ), '/admin/products/report/'  ),
             items.MenuItem(_('Composants'), '/admin/components/report/'),
         ])]
Ejemplo n.º 26
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(
             _('Newfies-Dialer' + ' V' + newfies_dialer.__version__),
             reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('Applications'), exclude=('django.contrib.*', )),
         items.AppList(_('Administration'), models=('django.contrib.*', )),
         items.MenuItem(_('API Explorer'),
                        reverse('admin:index') + '../rest-api/'),
         items.MenuItem(_('Customer Panel'),
                        reverse('admin:index') + '../'),
     ]
Ejemplo n.º 27
0
 def __init__(self, **kwargs):
     MenuBase.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('TODOS'), exclude=('django.contrib.*', )),
         items.ModelList(title=_('Autenticación'),
                         models=[
                             'rest_framework.authtoken.*',
                             'oauth2_provider.*',
                             'auths.models.*',
                             'apps.credentials.models.PlatformApp',
                         ]),
     ]
Ejemplo n.º 28
0
    def __init__(self, **kwargs):
        Menu.__init__(self, **kwargs)
        self.children.append(items.Bookmarks(title='Bookmarks'))

        self.children.append(
            items.AppList(title='Master Data',
                          include_list=(
                              'employee.models.Employee',
                              'employee.models.Unit',
                              'employee.models.Designation',
                              'employee.models.Status',
                          )))
        self.children.append(
            items.AppList(title='Transactions',
                          include_list=('employee.models.SalaryDetail', )))
Ejemplo n.º 29
0
 def __init__(self, **kwargs):
     super(DefaultMenu, self).__init__(**kwargs)
     self.children.append(items.MenuItem(
         title=_('Dashboard'),
         url=reverse('admin:index')
     ))
     self.children.append(items.Bookmarks())
     self.children.append(items.AppList(
         title=_('Applications'),
         exclude_list=('django.contrib',)
     ))
     self.children.append(items.AppList(
         title=_('Administration'),
         include_list=('django.contrib',)
     ))
Ejemplo n.º 30
0
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('ALL'), ),
         items.AppList(_('Accounts'),
                       models=(
                           'the_voice.users.*',
                           'the_voice.performances.*',
                           'the_voice.accounts.*',
                           'allauth.*',
                           'rest_framework.*',
                       )),
         items.AppList(_('Administration'), models=('django.contrib.*', ))
     ]