コード例 #1
0
    def init_with_context(self, context):
        self.children.append(
            modules.AppList(
                _('Quick Liks'),
                models=('monitoring.Project', 'monitoring.Organization',
                        'monitoring.Contact', 'monitoring.Profile',
                        'auth.User', 'auth.Group', 'auth.Permission',
                        'constance.Config', 'monitoring.ProjectContact'),
                column=0,
                order=0))

        self.children.append(
            modules.AppList(
                _('Catalogs'),
                models=('monitoring.Sex', 'monitoring.Country',
                        'monitoring.OrganizationType', 'monitoring.LWRRegion',
                        'monitoring.Product', 'monitoring.Education',
                        'monitoring.ContactType'),
                column=1,
                order=0))

        self.children.append(
            modules.AppList(_('Extras'),
                            models=('monitoring.Request',
                                    'monitoring.Template', 'monitoring.Source',
                                    'monitoring.Filter'),
                            column=2,
                            order=0))

        if context.request.user.is_superuser:
            self.children.append(
                modules.RecentActions(_('Recent Actions'),
                                      10,
                                      column=2,
                                      order=1))
コード例 #2
0
    def init_with_context(self, context):

        self.children.append(
            modules.AppList(_('Administration'),
                            models=('auth.*', ),
                            column=0,
                            order=0,
                            deletable=False,
                            draggable=False))

        self.children.append(
            modules.AppList(_('Aplicações'),
                            exclude=('auth.*', ),
                            column=0,
                            order=0,
                            deletable=False,
                            draggable=False))

        self.children.append(
            modules.RecentActions(
                _('Ações recentes'),
                10,
                deletable=False,
                draggable=False,
                collapsible=False,
                column=1,
                order=0,
            ))
コード例 #3
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.LinkList(
                _('Quick links'),
                layout='inline',
                children=[
                    [_('Return to site'), '/'],
                    [
                        _('Change password'),
                        reverse('%s:password_change' % site_name)
                    ],
                    [_('Log out'),
                     reverse('%s:logout' % site_name)],
                ],
                column=0,
                order=0))

        self.children.append(
            modules.RecentActions(_('Recent Actions'), 10, column=0, order=1))

        self.children.append(
            modules.AppList(_('Applications'),
                            exclude=('auth.*', ),
                            column=1,
                            order=0))

        self.children.append(
            modules.AppList(_('Administration'),
                            models=('auth.*', ),
                            column=2,
                            order=0))
コード例 #4
0
    def init_with_context(self, context):
        group = context.request.user.groups.first()

        if context.request.user.is_superuser:
            self.children.append(
                modules.AppList('REGISTRO PARA UN NUEVO ESTUDIANTE',
                                models=('school.Student',
                                        'school.PersonalFile', 'school.Family',
                                        'school.PaperCenter',
                                        'school.Matriculation'),
                                column=0,
                                order=0))
            self.children.append(
                modules.AppList('REGISTRO PARA UN ESTUDIANTE DE REINGRESO',
                                models='school.Matriculation',
                                column=0,
                                order=1))
            self.children.append(
                modules.AppList('USUARIOS Y ROLES',
                                models=('auth.*', ),
                                column=1,
                                order=3))

            self.children.append(
                modules.RecentActions('Acciones recientes',
                                      10,
                                      column=2,
                                      order=1))

        if context.request.user.is_superuser or group and group.name.lower(
        ) == 'secretaria'.lower():
            self.children.append(
                modules.AppList(
                    'CATALOGOS',
                    models=('school.Gender', 'school.Section', 'school.Grade',
                            'school.Course', 'school.Nationality',
                            'school.GradeSection', 'school.Profile',
                            'school.CourseGradeSection'),
                    column=2,
                    order=0))

        is_teacher = Profile.objects. \
            filter(user_id=context.request.user.id). \
            exists()
        if is_teacher:
            from django.urls import reverse
            user_id = context.request.user.id
            url = reverse('school:lista_de_asignaturas_por_seccion',
                          args=(user_id, ))

            self.available_children.append(modules.LinkList)
            self.children.append(
                modules.LinkList('Registros de Notas',
                                 children=[{
                                     'title': 'Asignaturas por Aula',
                                     'url': url,
                                     'external': False
                                 }],
                                 column=0,
                                 order=0))
コード例 #5
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _("Content"),
                exclude=(
                    "auth.*",
                    "django_celery_beat.*",
                ),
                column=1,
                order=0,
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(
                _("Administration"),
                models=(
                    "auth.*",
                    "django_celery_beat.*",
                ),
                column=2,
                order=0,
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(_("Recent Actions"), 10, column=0, order=1))

        self.children.append(
            dashboard_modules.TaskProcessing(_("Task Processing Status (WIP)"),
                                             column=0,
                                             order=0))

        self.children.append(
            modules.LinkList(
                _("Failmap resources"),
                children=[
                    {
                        "title": _("Gitlab Repository"),
                        "url": "https://gitlab.com/failmap/",
                        "external": True,
                    },
                    {
                        "title": _("Admin repository"),
                        "url": "https://gitlab.com/failmap/failmap",
                        "external": True,
                    },
                    {
                        "title": _("Failmap Website"),
                        "url": "https://faalkaart.nl",
                        "external": True,
                    },
                ],
                column=2,
                order=2,
            ), )
コード例 #6
0
ファイル: dashboard.py プロジェクト: hypnopompicindex/cms
 def init_with_context(self, context):
     self.children.append(
         modules.AppList(_('Applications'),
                         exclude=('auth.*', 'filebrowser.*',
                                  'globalsettings.*'),
                         column=0,
                         order=0)),
     self.children.append(
         modules.RecentActions(_('Recent Actions'), 20, column=1, order=0))
     self.children.append(
         modules.AppList(_('Authentication'),
                         exclude=('enticemode.*', 'globalsettings.*',
                                  'presentationmode.*', 'kidszone.*',
                                  'mainmenu.*', 'wowmode.*',
                                  'filebrowser.*'),
                         column=2,
                         order=0)),
     self.children.append(
         modules.LinkList(_('File Manager'),
                          children=[
                              {
                                  'title': _('File Manager'),
                                  'url': '/admin/filebrowser/browse/',
                                  'external': True,
                              },
                          ],
                          column=2,
                          order=1))
     self.children.append(
         modules.LinkList(
             _('Global Settings'),
             children=[
                 {
                     'title': 'Content Styling',
                     'url': '/globalsettings/contentstyling/2/change/',
                     'external': True,
                 },
                 {
                     'title': 'Video Wall',
                     'url': '/globalsettings/videowall/1/change/',
                     'external': True,
                 },
                 {
                     'title': 'Publish CMS',
                     'url': '/globalsettings/publish/1/change/',
                     'external': True,
                 },
             ],
             column=0,
             order=1))
コード例 #7
0
ファイル: dashboard.py プロジェクト: brianbola90/DjangoIRL
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)

        self.available_children.append(
            google_analytics.GoogleAnalyticsVisitorsTotals)
        self.available_children.append(
            google_analytics.GoogleAnalyticsVisitorsChart)
        self.available_children.append(
            google_analytics.GoogleAnalyticsPeriodVisitors)

        site_name = get_admin_site_name(context)
        # append a link list module for "quick links"
        self.children.append(
            modules.LinkList(
                _('Quick links'),
                layout='inline',
                draggable=False,
                deletable=False,
                collapsible=False,
                children=[
                    [_('Return to site'), '/'],
                    [
                        _('Change password'),
                        reverse('%s:password_change' % site_name)
                    ],
                    [_('Log out'),
                     reverse('%s:logout' % site_name)],
                ],
                column=0,
                order=0))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(_('Applications'),
                            exclude=('auth.*', ),
                            column=1,
                            order=0))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(_('Administration'),
                            models=('auth.*', ),
                            column=2,
                            order=0))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(_('Recent Actions'), 10, column=0, order=1))
コード例 #8
0
ファイル: dashboards.py プロジェクト: z306223558/wms-service
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)

        site_name = get_admin_site_name(context)
        # self.children.append(modules.LinkList(
        #     _('快捷操作'),
        #     layout='inline',
        #     draggable=False,
        #     deletable=False,
        #     collapsible=False,
        #     children=[
        #         [_('用户管理'), '/admin/user'],
        #     ],
        #     column=0,
        #     order=0
        # ))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(_('Applications'),
                            exclude=('auth.*', ),
                            column=1,
                            order=0))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(_('历史操作'), 10, column=0, order=1))

        # append another link list module for "support".
        self.children.append(RecentTickets(_('最新用户'), column=2, order=1))

        # append another link list module for "support".
        self.children.append(UserAddPeerDay(_('用户'), column=2, order=1))
コード例 #9
0
 def init_with_context(self, context):
     self.children.append(modules.AppList(
         _('Applications'),
         exclude=('auth.*',),
         column=0,
         order=0
     ))
コード例 #10
0
 def init_with_context(self, context):
     self.available_children.append(
         google_analytics.GoogleAnalyticsVisitorsTotals)
     self.available_children.append(
         google_analytics.GoogleAnalyticsVisitorsChart)
     self.available_children.append(
         google_analytics.GoogleAnalyticsPeriodVisitors)
     ###########################################################################################
     self.children.append(
         modules.RecentActions(_('Recent Actions'), 10, column=0, order=0))
     #############################################################################################
     self.children.append(
         modules.ModelList(_('Models'),
                           exclude=('auth.*', ),
                           column=0,
                           order=0))
     #############################################################################################
     self.children.append(
         modules.AppList(_('Applications'),
                         exclude=('auth.*', ),
                         column=0,
                         order=0))
     #############################################################################################
     self.available_children.append(modules.LinkList)
     self.children.append(
         modules.LinkList(
             _('Support'),
             children=[
                 {
                     'title': _('Django documentation'),
                     'url': 'http://docs.djangoproject.com/',
                     'external': True,
                 },
                 {
                     'title': _('Django "django-users" mailing list'),
                     'url': 'http://groups.google.com/group/django-users',
                     'external': True,
                 },
                 {
                     'title': _('Django irc channel'),
                     'url': 'irc://irc.freenode.net/django',
                     'external': True,
                 },
             ],
             column=0,
             order=0))
     #############################################################################################
     self.children.append(
         modules.Feed(_('Latest Django News'),
                      feed_url='http://www.djangoproject.com/rss/weblog/',
                      limit=5,
                      column=0,
                      order=0))
     import sys
     sys.stderr.write("hanbi ya nori ya ssaki khayli ba2alinahuj")
コード例 #11
0
 def init_with_context(self, context):
     self.available_children.append(modules.AppList)
     self.available_children.append(modules.ModelList)
     self.available_children.append(modules.RecentActions)
     self.children.append(modules.AppList(
         _('Apps'),
         column=0,
     ))
     self.children.append(modules.RecentActions(
         _('Recent Actions'),
         column=1,
     ))
コード例 #12
0
ファイル: dashboard.py プロジェクト: wyd2004/tsBackend
    def init_with_context(self, context):
        self.children.append(
            modules.RecentActions(_('Recent Actions'), 10, column=2, order=1))

        self.children.append(
            modules.AppList(
                _('podcast data'),
                models=[
                    'podcast.PodcastHost',
                    'podcast.PodcastAlbum',
                    'podcast.PodcastEpisode',
                    # 'podcast.PodcastEnclosure',
                ],
                column=0,
                order=2))

        self.children.append(
            modules.AppList(_('member data'),
                            models=[
                                'member.Member',
                                'member.PodcastAlbumSubscription',
                            ],
                            column=1,
                            order=0))
コード例 #13
0
ファイル: dashboard.py プロジェクト: marcosmamg/surveyapp
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.children.append(
            modules.LinkList(_('Fill Questionnaire'),
                             children=[
                                 {
                                     'title': _('Questionnaire'),
                                     'url': '/'
                                 },
                             ],
                             column=0,
                             order=0))

        self.children.append(
            modules.AppList(_('Survey Application'),
                            exclude=('auth.*', ),
                            column=0,
                            order=0))
コード例 #14
0
    def init_with_context(self, context):
        # append an app list module for "Casting"
        self.children.append(
            modules.ModelList(_('Casting'),
                              exclude=('auth.*', ),
                              models=('casting.*', ),
                              column=0,
                              order=1))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(_('Applications'),
                            models=('auth.*', ),
                            column=0,
                            order=0))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(_('Recent Actions'), 10, column=2, order=1))
コード例 #15
0
ファイル: dashboard.py プロジェクト: btseytlin/lambdaweb
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)

        self.children.append(
            modules.LinkList(
                _('Support'),
                children=[
                    {
                        'title': _('Django documentation'),
                        'url': 'http://docs.djangoproject.com/',
                        'external': True,
                    },
                    {
                        'title': _('Django "django-users" mailing list'),
                        'url': 'http://groups.google.com/group/django-users',
                        'external': True,
                    },
                    {
                        'title': _('Django irc channel'),
                        'url': 'irc://irc.freenode.net/django',
                        'external': True,
                    },
                ],
                column=0,
                order=0))
        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(_('Applications'),
                            exclude=('auth.*', ),
                            column=1,
                            order=0))
        # append a recent actions module
        self.children.append(
            modules.RecentActions(_('Recent Actions'), 10, column=0, order=1))

        self.children.append(
            modules.Feed(_('Latest Django News'),
                         feed_url='http://www.djangoproject.com/rss/weblog/',
                         limit=5,
                         column=1,
                         order=1))
コード例 #16
0
    def init_with_context(self, context):
        self.available_children.append(modules.RecentActions)
        self.children.append(
            modules.RecentActions(
                _("Recent Actions for %s" % context["app_label"].capitalize()),
                40,
                column=1,
                order=0,
                include_list=[context["app_label"] + ".*"],
            ))

        if context["app_label"] == "game":
            self.children.append(
                modules.LinkList(
                    _("Quick Actions"),
                    children=[
                        {
                            "title": _("Verify New Urls"),
                            "url": "/admin/game/urlsubmission/?"
                            "has_been_accepted__exact=0&has_been_rejected__exact=0&o=-6.2.3",
                            "external": False,
                        },
                        {
                            "title": _("Verify New Organizations"),
                            "url": "/admin/game/organizationsubmission/?"
                            "has_been_accepted__exact=0&has_been_rejected__exact=0&o=-5",
                            "external": False,
                        },
                    ],
                    column=0,
                    order=0,
                    layout="stacked",
                ))

        self.children.append(
            modules.AppList(_("Applications"),
                            models=("%s.*" % context["app_label"], ),
                            column=0,
                            order=1))
コード例 #17
0
 def init_with_context(self, context):
     self.available_children.append(modules.LinkList)
     self.children.append(
         modules.ModelList(
             _('Modelos'),
             exclude=('auth.*', ),
             column=1,
             order=0,
             layout='inline',
         ))
     self.children.append(
         modules.AppList(_('Aplicações'),
                         exclude=('auth.*', ),
                         column=0,
                         order=0))
     self.children.append(
         modules.RecentActions(_('Ações Recentes'),
                               limit=10,
                               column=0,
                               order=0))
     self.children.append(
         RequestCategories(_('Solicitações de categoria'),
                           column=1,
                           order=6))
コード例 #18
0
 def init_with_context(self, context):
     self.available_children.append(modules.LinkList)
     self.children.append(
         modules.LinkList(_('REST API'),
                          children=[
                              {
                                  'title': _('Documentación API'),
                                  'url':
                                  'https://aaps-data.appspot.com/docs/',
                                  'external': True,
                              },
                              {
                                  'title': _('Documentación Swagger'),
                                  'url':
                                  'https://aaps-data.appspot.com/swagger/',
                                  'external': True,
                              },
                          ],
                          column=1,
                          order=0))
     self.children.append(
         modules.AppList(_('Aplicaciones'), column=0, order=0))
     self.children.append(
         modules.RecentActions(_('Acciones Recientes'), column=2, order=0))
コード例 #19
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)

        self.available_children.append(google_analytics.GoogleAnalyticsVisitorsTotals)
        self.available_children.append(google_analytics.GoogleAnalyticsVisitorsChart)
        self.available_children.append(google_analytics.GoogleAnalyticsPeriodVisitors)

        site_name = get_admin_site_name(context)
        # append a link list module for "quick links"
        self.children.append(modules.LinkList(
            _('Quick links'),
            layout='inline',
            draggable=False,
            deletable=False,
            collapsible=False,
            children=[
                [_('Return to site'), '/'],
                [_('Change password'),
                 reverse('%s:password_change' % site_name)],
                [_('Log out'), reverse('%s:logout' % site_name)],
            ],
            column=2,
            order=0
        ))

        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('Applications'),
            exclude=('auth.*',),
            column=1,
            order=0
        ))

        # append an app list module for "Administration"
        self.children.append(modules.AppList(
            _('Administration'),
            models=('auth.*',),
            column=2,
            order=0
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            10,
            column=2,
            order=1
        ))

        # append a feed module
        self.children.append(modules.Feed(
            _('Latest Django News'),
            feed_url='http://www.djangoproject.com/rss/weblog/',
            limit=5,
            column=2,
            order=1
        ))

        # append another link list module for "support".
        self.children.append(modules.LinkList(
            _('Support'),
            children=[
                {
                    'title': _('Django documentation'),
                    'url': 'http://docs.djangoproject.com/',
                    'external': True,
                },
                {
                    'title': _('Django "django-users" mailing list'),
                    'url': 'http://groups.google.com/group/django-users',
                    'external': True,
                },
                {
                    'title': _('Django irc channel'),
                    'url': 'irc://irc.freenode.net/django',
                    'external': True,
                },
            ],
            column=2,
            order=1
        ))
コード例 #20
0
ファイル: dashboard.py プロジェクト: sreyaguha1/policykit
    def init_with_context(self, context):

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('Applications'),
                exclude=('auth.*', ),
                column=0,
                order=0,
                deletable=False,
                draggable=False,
            ))

        self.children.append(
            PolicyModule(
                policy_type="Constitution",
                title="Passed Constitution Policies",
                deletable=False,
                contrast=True,
                draggable=False,
                column=1,
                order=0,
            ))

        self.children.append(
            PolicyModule(
                policy_type="Platform",
                title="Passed Platform Policies",
                deletable=False,
                contrast=True,
                draggable=False,
                column=1,
                order=2,
            ))

        self.children.append(
            RolePermissionModule(
                deletable=False,
                contrast=True,
                draggable=False,
                column=2,
                order=0,
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                10,
                column=2,
                order=1,
                deletable=False,
                draggable=False,
            ))

        site_name = get_admin_site_name(context)
        # append a link list module for "quick links"
        self.children.append(
            modules.LinkList(
                _('Quick links'),
                layout='inline',
                draggable=False,
                deletable=False,
                collapsible=False,
                children=[
                    [_('Return to site'), '/'],
                    [
                        _('Change password'),
                        reverse('%s:password_change' % site_name)
                    ],
                    [_('Log out'),
                     reverse('%s:logout' % site_name)],
                ],
                column=2,
                order=2))
コード例 #21
0
ファイル: dashboard.py プロジェクト: wass6/custom_jet
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)

        site_name = get_admin_site_name(context)
        # append a link list module for "quick links"
        self.children.append(
            modules.LinkList(
                _("Quick links"),
                layout="inline",
                draggable=False,
                deletable=False,
                collapsible=False,
                children=[
                    [_("Return to site"), "/"],
                    [
                        _("Change password"),
                        reverse("%s:password_change" % site_name)
                    ],
                    [_("Log out"),
                     reverse("%s:logout" % site_name)],
                ],
                column=0,
                order=0,
            ))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(_("Applications"),
                            exclude=("auth.*", ),
                            column=1,
                            order=0))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(_("Administration"),
                            models=("auth.*", ),
                            column=2,
                            order=0))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(_("Recent Actions"), 10, column=0, order=1))

        # append a feed module
        self.children.append(
            modules.Feed(
                _("Latest Django News"),
                feed_url="http://www.djangoproject.com/rss/weblog/",
                limit=5,
                column=1,
                order=1,
            ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _("Support"),
                children=[
                    {
                        "title": _("Django documentation"),
                        "url": "http://docs.djangoproject.com/",
                        "external": True,
                    },
                    {
                        "title": _('Django "django-users" mailing list'),
                        "url": "http://groups.google.com/group/django-users",
                        "external": True,
                    },
                    {
                        "title": _("Django irc channel"),
                        "url": "irc://irc.freenode.net/django",
                        "external": True,
                    },
                ],
                column=2,
                order=1,
            ))
コード例 #22
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)

        site_name = get_admin_site_name(context)

        self.children.append(Stat())

        # append a link list module for "quick links"
        self.children.append(
            modules.LinkList(
                _('Quick links'),
                layout='inline',
                draggable=False,
                deletable=False,
                collapsible=False,
                children=[
                    [_('Return to site'), '/'],
                    [
                        _('Change password'),
                        reverse('%s:password_change' % site_name)
                    ],
                    [_('Log out'),
                     reverse('%s:logout' % site_name)],
                ],
                column=0,
                order=0))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(_('Applications'),
                            exclude=('auth.*', ),
                            column=1,
                            order=0))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(_('Administration'),
                            models=('auth.*', ),
                            column=2,
                            order=0))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(_('Recent Actions'), 10, column=0, order=1))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _('Support'),
                children=[
                    {
                        'title': _('HOW TO WORK'),
                        'url': reverse('data_audit'),
                        'external': True,
                    },
                    {
                        'title':
                        _('Pluribus One Technology'),
                        'url':
                        'https://gdpr.pluribus-one.it/{}/technology'.format(
                            context.get('request').LANGUAGE_CODE),
                        'external':
                        True,
                    },
                    {
                        'title':
                        _('Pluribus One Services'),
                        'url':
                        'https://gdpr.pluribus-one.it/{}/services'.format(
                            context.get('request').LANGUAGE_CODE),
                        'external':
                        True,
                    },
                ],
                column=2,
                order=1))
コード例 #23
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)

        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('Content'),
            exclude=('auth.*', 'django_celery_beat.*',),
            column=1,
            order=0
        ))

        # append an app list module for "Administration"
        self.children.append(modules.AppList(
            _('Administration'),
            models=('auth.*', 'django_celery_beat.*',),
            column=2,
            order=0
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            10,
            column=0,
            order=1
        ))

        self.children.append(dashboard_modules.RebuildRatings(
            _('Rebuild Ratings'),
            column=0,
            order=0
        ))

        self.children.append(dashboard_modules.TaskProcessing(
            _('Task Processing Status (WIP)'),
            column=0,
            order=0
        ))

        self.children.append(modules.LinkList(
            _('Failmap resources'),
            children=[
                {
                    'title': _('Gitlab Repository'),
                    'url': 'https://gitlab.com/failmap/',
                    'external': True,
                },
                {
                    'title': _('Admin repository'),
                    'url': 'https://gitlab.com/failmap/failmap',
                    'external': True,
                },
                {
                    'title': _('Failmap Website'),
                    'url': 'https://faalkaart.nl',
                    'external': True,
                },
            ],
            column=2,
            order=2
        ), )
コード例 #24
0
ファイル: Dashboard.py プロジェクト: ahmedalaatalaat/HC
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)

        site_name = get_admin_site_name(context)
        # append a link list module for "quick links"
        self.children.append(
            modules.LinkList(
                _('Quick links'),
                layout='inline',
                draggable=False,
                deletable=False,
                collapsible=False,
                children=[
                    [
                        _('Change password'),
                        reverse('%s:password_change' % site_name)
                    ],
                    ['English version', '/en/admin/'],
                    ['النسخة العربية', '/ar/admin/'],
                    [_('Log out'),
                     reverse('%s:logout' % site_name)],
                ],
                column=1,
                order=0))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(_('Administration'),
                            models=('admin.*', 'auth.*'),
                            column=1,
                            order=1))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('Applications'),
                exclude=(
                    'admin.*', 'auth.*', 'cpanel.StakeholdersPhones',
                    'cpanel.StakeholdersAddress',
                    'cpanel.PatientRelativesPhones',
                    'cpanel.NurseSpecialization',
                    'cpanel.SpecialistSpecialization',
                    'cpanel.PharmacistSpecialization',
                    'cpanel.MedicalInstitutionsPhone',
                    'cpanel.MedicalInstitutionsAddress',
                    'cpanel.LabsAnalysisAndRadiology',
                    'cpanel.InsuranceCompaniesPhone',
                    'cpanel.InsuranceCompaniesAddress', 'InsuranceTypes',
                    'cpanel.PhysicianHospitalWorkingTime',
                    'cpanel.PhysicianClinicWorkingTime',
                    'cpanel.PhysicianRating', 'cpanel.LabRating',
                    'cpanel.ClinicRating', 'cpanel.HospitalRating',
                    'cpanel.HospitalNurses', 'cpanel.ClinicNurses',
                    'cpanel.LabNurses', 'cpanel.LabSpecialists',
                    'cpanel.HospitalSpecialists', 'cpanel.ClinicSpecialists',
                    'cpanel.PharmacyPharmacists',
                    'cpanel.PhysicianSpecialization',
                    'cpanel.NurseSpecialization',
                    'cpanel.HospitalSpecialization',
                    'cpanel.LabsInsuranceDeals',
                    'cpanel.ClinicsInsuranceDeals',
                    'cpanel.HospitalInsuranceDeals',
                    'cpanel.PharmacyInsuranceDeals', 'cpanel.PatientInsurance',
                    'cpanel.ClinicSpecialization', 'cpanel.InsuranceTypes'),
                column=0,
                order=1))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(_('Recent Actions'), 10, column=2, order=0))
コード例 #25
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)

        # self.available_children.append(google_analytics.GoogleAnalyticsVisitorsTotals)
        # self.available_children.append(google_analytics.GoogleAnalyticsVisitorsChart)
        # self.available_children.append(google_analytics.GoogleAnalyticsPeriodVisitors)

        # 链接列表
        self.children.append(
            modules.LinkList(
                _('支持列表'),
                children=[
                    {
                        'title': _('Django documentation'),
                        'url': 'http://docs.djangoproject.com',
                        'external': True,
                    },
                    {
                        'title': _('Django "django-users" mailing list'),
                        'url': 'http://groups.google.com/group/django-users',
                        'external': True,
                    },
                    {
                        'title': _('Django irc channel'),
                        'url': 'irc://irc.freenode.net/django',
                        'external': True,
                    },
                    {
                        'title': _('Django irc channel2'),
                        'url': 'irc://irc.freenode.net/django',
                        'external': True,
                    },
                ],
                column=2,
                order=1,
                layout='stacked',
                draggable=False,
                deletable=False,
                collapsible=True,
            ))
        # 快速操作
        self.children.append(
            modules.LinkList(
                _('快速操作'),
                layout='inline',
                draggable=False,
                deletable=False,
                collapsible=False,
                children=[
                    [_('查看站点'), '/'],
                    [_('修改密码'),
                     reverse('%s:password_change' % site_name)],
                    [_('退出'), reverse('%s:logout' % site_name)],
                ],
                column=0,
                order=0))
        # 应用
        self.children.append(
            modules.AppList(_('应用'), exclude=('auth.*', ), column=1, order=0))
        # 用户
        self.children.append(
            modules.AppList(_('用户'), model=('auth.*', ), column=2, order=0))
        # 模块
        self.children.append(
            modules.ModelList(_('模型'), exclude=('auth.*', ), column=0,
                              order=0))
        # 最近管理操作
        self.children.append(
            modules.RecentActions(_('最近操作'), 10, column=0, order=1))
        # 展示订阅信息
        self.children.append(
            modules.Feed(_('django订阅信息'),
                         feed_url='http://www.djangoproject.com/rss/weblog',
                         limit=5,
                         column=1,
                         order=1))
コード例 #26
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)

        site_name = get_admin_site_name(context)
        # append a link list module for "quick links"

        try:
            self_page = ExecutantProfilePage.objects.get(owner=context['user'])
            children = [
                [_('Return to site'),
                 'cms/pages/%s/edit' % self_page],
                [_('Change page'),
                 'cms/pages/%s/edit' % self_page],
                [
                    _('Change password'),
                    reverse('%s:password_change' % site_name)
                ],
                [_('Log out'), reverse('%s:logout' % site_name)],
            ]
        except:
            children = [
                [_('Return to site'), '/'],
                [
                    _('Change password'),
                    reverse('%s:password_change' % site_name)
                ],
                [_('Change person page'),
                 '../crm/pagse/%s/edit' % 3],
                [_('Log out'), reverse('%s:logout' % site_name)],
            ]

        self.children.append(
            modules.LinkList(_('Quick links'),
                             layout='inline',
                             draggable=False,
                             deletable=False,
                             collapsible=False,
                             children=children,
                             column=0,
                             order=0))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(_('Applications'),
                            exclude=('auth.*', ),
                            column=1,
                            order=0))
        '''
        # append an app list module for "Administration"
        self.children.append(modules.AppList(
            _('Administration'),
            models=('auth.*',),
            column=2,
            order=0
        ))
        '''
        # append a recent actions module
        self.children.append(
            modules.RecentActions(_('Recent Actions'), 10, column=0, order=1))
        '''
        # append a feed module
        self.children.append(modules.Feed(
            _('Latest Django News'),
            feed_url='http://www.djangoproject.com/rss/weblog/',
            limit=5,
            column=1,
            order=1
        ))
        '''
        # append another link list module for "support".
        '''