Ejemplo n.º 1
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)

        self.children.append(modules.LinkList(
            'About Creators of this Website',
            children=[
                {
                    'title': 'Kianoosh Abbasi',
                    'url': 'http://ce.sharif.edu/~kabbasi',
                    'external': True,
                },
                {
                    'title': 'Arya Kowsary',
                    'url': 'http://ce.sharif.edu/~akowsary',
                    'external': True,
                },
                {
                    'title': 'Amirreza Mozayani',
                    'url': 'http://ce.sharif.edu/~amozayani',
                    'external': True,
                },
            ],
            column=0,
            order=0
        ))
        self.children.append(modules.LinkList(
            'Useful Links',
            children=[
                {
                    'title': 'Tank Trouble',
                    'url': 'http://www.tanktrouble.com/',
                    'external': True,
                },
                {
                    'title': 'SSC Website',
                    'url': 'http://ssc.ce.sharif.edu/',
                    'external': True,
                },
                {
                    'title': 'Webelopers Website',
                    'url': 'http://webelopers.ce.sharif.edu',
                    'external': True,
                },
                {
                    'title': 'Codeforces',
                    'url': 'http://codeforces.com',
                    'external': True,
                },
            ],
            column=1,
            order=0
        ))
Ejemplo n.º 2
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(TagPopularityChart)
        self.available_children.append(TagsOverTimeChart)

        self.children.append(modules.LinkList(
            _('Resources'),
            children=[
                {
                    'title': _('Source code'),
                    'url': 'https://github.com/jessamynsmith/django_jet_example',
                    'external': True,
                },
            ],
            column=0,
            order=0
        ))
        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=1
        ))

        self.children.append(TagsOverTimeChart(
            _('Tags By Hour'),
            column=0,
            order=2
        ))

        self.children.append(TagPopularityChart(
            _('Tag Popularity'),
            column=1,
            order=0
        ))
Ejemplo n.º 3
0
 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))
Ejemplo n.º 4
0
    def init_with_context(self, context):
        menuList = Menu.objects.filter(
            Q(store__type=STORE_TYPE_B2B_AND_NORMAL) |
            Q(store__type=STORE_TYPE_B2B),
            status=OC_OPEN,
            store__status=OC_OPEN,
        )

        childrenBlock = []

        for menu in menuList:
            childrenBlock += {
                'title': "{store} - {menu}".format(
                    store=menu.store.name,
                    menu=menu.name,
                    current_stock=menu.current_stock,
                ),
                'url': '{host_url}/admin/eatple_app/store/{store_index}/change'.format(
                    host_url=HOST_URL,
                    store_index=menu.store.id
                ),
                'external': True,
            },

        self.available_children.append(modules.LinkList)
        self.children.append(modules.LinkList(
            _('B2B Menu List'),
            children=childrenBlock,
            column=0,
            order=0
        ))
Ejemplo n.º 5
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))
Ejemplo n.º 6
0
    def init_with_context(self, context):
        self.children.append(CountModule('统计', column=0, order=0))

        self.children.append(
            modules.LinkList('快捷操作',
                             children=[
                                 {
                                     'title': '博客首页',
                                     'url': '/',
                                     'external': True,
                                 },
                                 {
                                     'title': '创建文章',
                                     'url': reverse('admin:app_article_add'),
                                     'external': True,
                                 },
                                 {
                                     'title': 'DeerU - 开源博客框架',
                                     'url':
                                     'https://github.com/gojuukaze/DeerU',
                                     'external': True,
                                 },
                             ],
                             column=0,
                             order=1))

        self.children.append(CommentModule('待审核评论', column=0, order=2))

        self.children.append(
            modules.RecentActions('操作记录', 10, column=1, order=1))
Ejemplo n.º 7
0
 def init_with_context(self, context):
     self.available_children.append(modules.LinkList)
     self.available_children.append(RecentTickets)
     self.children.append(RecentTickets())
     self.children.append(
         modules.LinkList(
             _('Support'),
             children=[
                 {
                     'title': _('Django ddd 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))
Ejemplo n.º 8
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))
Ejemplo n.º 9
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,
            ), )
Ejemplo n.º 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")
Ejemplo n.º 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))

        # 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))
Ejemplo n.º 12
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.children.append(
            modules.LinkList(_('Links'),
                             children=[{
                                 'title': _('SVN'),
                                 'url':
                                 'https://labeip.epitech.eu/svn/2021/split/',
                                 'external': True,
                             }],
                             column=0,
                             order=0))

        self.available_children.append(Calendar)
        self.available_children.append(Documentation)
        self.available_children.append(RequestsEndpoints)
        self.available_children.append(RequestsMethods)
Ejemplo n.º 13
0
    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))
Ejemplo n.º 14
0
    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))
Ejemplo n.º 15
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))
Ejemplo n.º 16
0
 def init_with_context(self, context):
     self.available_children.append(modules.LinkList)
     self.available_children.append(modules.ModelList)
     self.available_children.append(modules.RecentActions)
     self.available_children.append(dashboard_modules.BestReviewers)
     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(_('HackUPC URLs'),
                          children=[
                              {
                                  'title': _('HackUPC Landing'),
                                  'url': 'https://hackupc.com/',
                                  'external': True,
                              },
                              {
                                  'title': _('Sendgrid'),
                                  'url': 'https://sendgrid.com',
                                  'external': True,
                              },
                              {
                                  'title': _('HackUPC Live'),
                                  'url': 'https://hackupc.com/live',
                                  'external': True,
                              },
                          ],
                          column=2,
                          order=0))
     self.children.append(modules.ModelList(_('Models'), column=1, order=0))
     self.children.append(
         dashboard_modules.BestReviewers(_('Reviewer Leaderboard'),
                                         column=0,
                                         order=0))
Ejemplo n.º 17
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))
Ejemplo n.º 18
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.available_children.append(modules.RecentActions)
        self.available_children.append(modules.Feed)
        self.available_children.append(modules.AppList)
        self.available_children.append(dashboard_modules.SmartAddUrl)

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

        self.children.append(
            dashboard_modules.SmartAddUrl(_('Smart Add Url\'s'),
                                          column=1,
                                          order=1))

        self.children.append(
            modules.LinkList(_('Failmap resources'),
                             children=[
                                 {
                                     'title': _('Github Repository'),
                                     'url': 'https://github.com/failmap/',
                                     'external': True,
                                 },
                                 {
                                     'title': _('Admin repository'),
                                     'url': 'https://github.com/failmap/admin',
                                     'external': True,
                                 },
                                 {
                                     'title': _('Failmap Website'),
                                     'url': 'https://faalkaart.nl',
                                     'external': True,
                                 },
                             ],
                             column=1,
                             order=2), )
Ejemplo n.º 19
0
 def init_with_context(self, context):
     self.available_children.append(modules.LinkList)
     self.children.append(modules.LinkList(
         _('Support'),
         children=[
             {
                 'title': _('Chargoon'),
                 'url': 'http://www.chargoon.com/',
                 'external': True,
             },
             {
                 'title': _('test'),
                 'url': '',
                 'external': True,
             },
             {
                 'title': _('nip'),
                 'url': 'http://127.0.0.1:8000/admin/nip/shiftassignmentpivoted_by_id/',
                 'external': False,
             },
         ],
         column=0,
         order=0
     ))
Ejemplo n.º 20
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".
        '''
Ejemplo n.º 21
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
        ))
Ejemplo n.º 22
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
        ))
Ejemplo n.º 23
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))
Ejemplo n.º 24
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,
            ))
Ejemplo n.º 25
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))
Ejemplo n.º 26
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))
Ejemplo n.º 27
0
 def add_export_dashboard(self):
     self.children.append(
         modules.LinkList(_('其它匯出'),
                          children=[
                              {
                                  'title': _('總廠商列表'),
                                  'url': '/admin/company/company/export/',
                                  'external': False,
                              },
                          ],
                          column=2,
                          order=0))
     self.children.append(
         modules.LinkList(_('校徵匯出'),
                          children=[
                              {
                                  'title': _('匯出全部資料'),
                                  'url': '/admin/recruit/export_all/',
                                  'external': False,
                              },
                              {
                                  'title': _('匯出說明會資訊'),
                                  'url':
                                  '/admin/recruit/export_seminar_info/',
                                  'external': False,
                              },
                              {
                                  'title': _('匯出就博會資訊'),
                                  'url':
                                  '/admin/recruit/export_jobfair_info/',
                                  'external': False,
                              },
                              {
                                  'title': _('廠商Logo和簡介(廣告用)'),
                                  'url': '/admin/recruit/export_ad/',
                                  'external': False,
                              },
                              {
                                  'title': _('廠商滿意度問卷'),
                                  'url':
                                  '/admin/recruit/companysurvey/export/',
                                  'external': False,
                              },
                          ],
                          column=2,
                          order=1))
     self.children.append(
         modules.LinkList(_('校徵集點'),
                          children=[
                              {
                                  'title': _('校徵說明會集點'),
                                  'url': '/admin/recruit/collect_points/',
                                  'external': False,
                              },
                              {
                                  'title': _('學生證註冊'),
                                  'url': '/admin/recruit/reg_card/',
                                  'external': False,
                              },
                              {
                                  'title': _('兌換獎品'),
                                  'url': '/admin/recruit/exchange_prize',
                                  'external': False,
                              },
                          ],
                          column=2,
                          order=1))
     self.children.append(
         modules.LinkList(_('研替匯出'),
                          children=[
                              {
                                  'title': _('匯出全部資料'),
                                  'url': '/admin/rdss/export_all/',
                                  'external': False,
                              },
                              {
                                  'title': _('廠商Logo和簡介(廣告用)'),
                                  'url': '/admin/rdss/export_ad/',
                                  'external': False,
                              },
                              {
                                  'title': _('廠商滿意度問卷'),
                                  'url':
                                  '/admin/rdss/companysurvey/export/',
                                  'external': False,
                              },
                          ],
                          column=2,
                          order=1))
     self.children.append(
         modules.LinkList(_('研替集點'),
                          children=[
                              {
                                  'title': _('研替說明會集點'),
                                  'url': '/admin/rdss/collect_points/',
                                  'external': False,
                              },
                              {
                                  'title': _('學生證註冊'),
                                  'url': '/admin/rdss/reg_card/',
                                  'external': False,
                              },
                              {
                                  'title': _('兌獎'),
                                  'url': '/admin/rdss/redeem/',
                                  'external': False,
                              },
                              {
                                  'title': _('讀卡程式及驅動'),
                                  'url':
                                  '/static/data/apps/card_reader.zip',
                                  'external': False,
                              },
                          ],
                          column=2,
                          order=1))
Ejemplo n.º 28
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))
Ejemplo n.º 29
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
        ), )
Ejemplo n.º 30
0
    def init_with_context(self, context):
        self.available_children.append(modules.LinkList)
        self.children.append(
            modules.LinkList(_('Дополнительно'),
                             children=[
                                 {
                                     'title':
                                     _('Документация по использованию сайта'),
                                     'url':
                                     '/admin-detail/documentations/',
                                     'external':
                                     True,
                                 },
                                 {
                                     'title': _('Примерная статистика'),
                                     'url': '/admin-detail/statistics/',
                                     'external': True,
                                 },
                             ],
                             column=0,
                             order=0))

        self.children.append(
            modules.ModelList(
                _('Настройки'),
                models=(
                    'site_some_settings.SiteSettings',
                    'others.AboutUs',
                    'others.CollBack',
                    'others.Documentation',
                    'others.Faq',
                    'others.HomePageText',
                    'others.MainSlider',
                    'others.Partners',

                    # 'service.*'
                ),
                column=0,
                order=0))
        self.children.append(
            modules.ModelList(
                _('Коментарии и отзывы'),
                models=(
                    'others.MainComments',
                    'service.ServiceComments',
                    'service.KindWorksComments',
                    'portfolio.PortfolioComments',

                    # 'service.*'
                ),
                column=0,
                order=0))
        self.children.append(
            modules.ModelList(_('Раздел работ и услуг'),
                              models=(
                                  'service.Images',
                                  'service.KindWorks',
                                  'service.Service',
                              ),
                              column=1,
                              order=0))
        self.children.append(
            modules.ModelList(
                _('Раздел портфолио'),
                models=(
                    'portfolio.Images',
                    'portfolio.Topic',
                    'portfolio.Portfolio',

                    # 'service.*'
                ),
                column=1,
                order=0))
        self.children.append(
            modules.ModelList(_('Заказы'),
                              models=(
                                  'others.CollBackClient',
                                  'others.Order',
                              ),
                              column=2,
                              order=0))