Пример #1
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))
Пример #2
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(
        #     _('快捷操作'),
        #     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))
Пример #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)
        # 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,
            )
        )
Пример #4
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=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))
Пример #5
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.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=1
        ))

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

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            10,
            column=0,
            order=1
        ))
Пример #6
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"
        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
        ))
Пример #7
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
        ))
Пример #8
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"
        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,
            ))
Пример #9
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))
Пример #10
0
 def init_with_context(self, context):
     site_name = get_admin_site_name(context)
Пример #11
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=0,
                order=0,
            )
        )

        self.children.append(StatisticsModule())
        self.children.append(GetItineraryModule())

        # 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 Sabre News"),
                feed_url="http://apps.shareholder.com/rss/rss.aspx?channels=10466&companyid=AMDA-2OXSEI&sh_auth=982801804%2E0%2E0%2E42317%2E046b3599c53e98ac941498424013e00c",
                limit=5,
                column=1,
                order=1,
            )
        )

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _("Other Applications"),
                children=[
                    {"title": _("Argo IT TMS"), "url": "http://www2.argoit.com.br/solucoes/tms", "external": True},
                    {"title": _("Sabre Developer Studio"), "url": "https://developer.sabre.com/", "external": True},
                    {"title": _("VoyEnBus"), "url": "http://www.voyenbus.com/", "external": True},
                ],
                column=2,
                order=1,
            )
        )
Пример #12
0
    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))
Пример #13
0
    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))
Пример #14
0
    def init_with_context(self, context):
        request = context.get('request', {'user': None})
        user = request.user

        # available
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.Feed)
        self.available_children.append(modules.RecentActions)
        self.available_children.append(modules.AppList)

        site_name = get_admin_site_name(context)

        # col 0
        self.children.append(modules.LinkList(
            "Applications",
            draggable=False,
            deletable=False,
            collapsible=False,
            children=[
                {
                    'title': "Resumes",
                    'url': '/admin/cv/resume/',
                },
            ],
            column=0,
            order=0
        ))
        self.children.append(modules.ModelList(
            "Users",
            models=('auth.User', 'auth.Group'),
            column=0,
            order=1
        ))

        # col 1
        self.children.append(modules.RecentActions(
            "Recent actions",
            10,
            column=1,
            order=0,
        ))

        # col 2
        self.children.append(modules.LinkList(
            'Quick links',
            layout='inline',
            draggable=False,
            deletable=False,
            collapsible=False,
            children=[
                ['Return to site', '/'],
                ['Change password', '/admin/password_change/'],
                ['Logout', '/admin/logout/'],
            ],
            column=2,
            order=0,
        ))

        self.children.append(modules.LinkList(
            "Documentation APIs",
            draggable=False,
            deletable=False,
            collapsible=False,
            children=[
                {
                    'title': "APIs",
                    'url': '/api/',
                },
                {
                    'title': "Swagger",
                    'url': '/api/swagger/',
                },
                {
                    'title': "Redoc",
                    'url': '/api/redoc/',
                },
            ],
            column=2,
            order=1,
        ))

        self.children.append(modules.LinkList(
            'Developer website',
            draggable=False,
            deletable=False,
            collapsible=False,
            children=[
                {
                    'title': 'Nask.io',
                    'url': 'http://nask.io/',
                    'external': True,
                },
            ],
            column=2,
            order=2
        ))
Пример #15
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".
        '''