예제 #1
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(_('Site Administration'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.ModelList(
                                  _('User Management'),
                                  column=1,
                                  collapsible=True,
                                  models=('django.contrib.auth.*', ),
                              ),
                              modules.ModelList(
                                  _('Site Management'),
                                  column=1,
                                  css_classes=('collapse closed', ),
                                  models=(
                                      'django.contrib.sites.*',
                                      'django.contrib.flatpages.*',
                                  ),
                              )
                          ]))

        self.children.append(
            modules.Group(_('Offer Administration'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.ModelList(
                                  _('Offer Details'),
                                  column=1,
                                  collapsible=True,
                                  models=('offers.models.Provider',
                                          'offers.models.Offer',
                                          'offers.models.Plan',
                                          'offers.models.Comment'),
                              ),
                              modules.ModelList(
                                  _('Locations'),
                                  column=1,
                                  css_classes=('collapse closed', ),
                                  models=(
                                      'offers.models.Location',
                                      'offers.models.Datacenter',
                                  ),
                              )
                          ]))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=2,
            ))
예제 #2
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(
                _('Group: Administration & Applications'),
                column=1,
                collapsible=True,
                children=[
                    modules.AppList(
                        _('Applications'),
                        column=1,
                        css_classes=('collapse closed', ),
                        #exclude=('django.contrib.*',),
                        models=(
                            'agencies.*',
                            'people.*',
                        ),
                    ),
                    modules.AppList(
                        _('Administration'),
                        column=1,
                        #collapsible=False,
                        models=('django.contrib.*', ),
                    ),
                ]))
        """
예제 #3
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(modules.Group(
            title= 'Administration',
            column=1,
            collapsible=True,
            children=[
                modules.ModelList(
                    title='Users',
                    models=('django.contrib.*',)
                )
            ]
        ))

        self.children.append(modules.LinkList(
            'Media',
            column=2,
            children=[
                {
                    'title': _('FileBrowser'),
                    'url': '/admin/filebrowser/browse/',
                    'external': False,
                },
            ]
        ))

        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            limit=5,
            collapsible=True,
            column=3,
        ))
예제 #4
0
    def init_with_context(self, context):
        self.children.append(
            modules.Group(
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(_("Users"),
                                      models=[
                                          "django.contrib.auth.models.User",
                                      ]),
                    modules.ModelList(
                        _("Registration"),
                        models=[
                            "refugeedata.models.RegistrationCardBatch",
                            "refugeedata.models.RegistrationNumber",
                            "refugeedata.models.Person",
                        ]),
                    modules.ModelList(_("Distribution"),
                                      models=[
                                          "refugeedata.models.Distribution",
                                          "refugeedata.models.Template",
                                      ]),
                ]))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _('Support'),
                column=2,
                children=[
                    {
                        'title': _('Refugeedata Website'),
                        'url': 'http://joelcross.co.uk/refugeedata/',
                        'external': True,
                    },
                    {
                        'title': _('Bug/Issue Tracker'),
                        'url': 'https://github.com/ukch/refugeedata/issues',
                        'external': True,
                    },
                ]))

        # TODO replace this with an actual news feed
        # append a feed module
        """self.children.append(modules.Feed(
            _('Latest News'),
            column=2,
            feed_url="https://github.com/ukch/refugeedata/commits/stable.atom",
            limit=5
        ))"""

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=2,
            ))
예제 #5
0
    def init_with_context(self, context):
       # site_name = get_admin_site_name(context)
        
        # append a group for "Administration" & "Applications"
        self.children.append(modules.Group(
            _('Sistema de Educacion'),
            column=1,
            collapsible=True,
            children = [
                modules.AppList(
                    _('Administracion de Usuarios'),
                    column=1,
                    collapsible=False,
                    models=('django.contrib.*',),
                )
            ]
        ))
        
        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('Sistemas de Educacion'),
            collapsible=True,
            column=1,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*','educar.models.Tipo_Material','educar.models.Material_Educativo','educar.models.Parametros_evaluacion',),
        ))
                # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('Gestion de Material Educativo'),
            collapsible=True,
            column=2,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*','educar.models.Clase','educar.models.Profesor','educar.models.Estudiante','educar.models.Parametros_evaluacion','educar.models.Evaluacion',),
        ))

        self.children.append(modules.AppList(
            _('Gestion de Calificacion de Estudiantes'),
            collapsible=True,
            column=2,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*','educar.models.Clase','educar.models.Profesor','educar.models.Estudiante','educar.models.Tipo_Material','educar.models.Examen','educar.models.Material_Educativo',),
        ))
          # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('Reportes de Notas'),
            collapsible=True,
            column=1,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*','educar.models.Clase','educar.models.Profesor','educar.models.Estudiante','educar.models.Tipo_Material','educar.models.Material_Educativo','educar.models.Parametros_evaluacion',),

        ))
       
        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            limit=5,
            collapsible=True,
            column=3,
        ))
예제 #6
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(modules.Group(
            _('Услуги'),
            column=1,
            collapsible=True,
            children=[
                modules.AppList(
                    _('Разработка'),
                    column=1,
                    collapsible=False,
                    models=('landing.models.*','card.models.*','catalog.models.*','online_store.models.*'),
                ),
                modules.AppList(
                    _('Продвижение'),
                    column=1,
                    collapsible=False,
                    models=('seo.models.*','smm.models.*','context.models.*'),
                )
            ]
        ))

        self.children.append(modules.Group(
            _('Администрирование'),
            column=2,
            collapsible=True,
            children = [
                modules.AppList(
                    _('Администрация'),
                    column=2,
                    collapsible=False,
                    models=('django.contrib.*',),
                ),
                modules.AppList(
                    _('Главная'),
                    column=2,
                    collapsible=False,
                    models=('main.models.*',),
                )
            ]
        ))
예제 #7
0
    def init_with_context(self, context):
        # Put database models in  column
        self.children.append(modules.ModelList(
            title='Database Management',
            column=2,
            exclude=('django.contrib.*','opensubmit.models.grading.*'),
        ))

        # Put course action boxes in column
        try:
            courses = context.request.user.profile.tutor_courses().all()
        except:
            courses = []

        for course in courses:
            # Prepare course-related links
            links=[]
            links.append(['Check all submissions',course.grading_url(), False])
            ass_url="%s?course__id__exact=%u"%(
                                reverse('teacher:opensubmit_assignment_changelist'),
                                course.pk
                            )
            links.append(['Check assignments',ass_url, False])
            links.append(['Show current grading table',reverse('gradingtable', args=[course.pk]), False])
            links.append(['eMail to students',reverse('mail2all', args=[course.pk]), False])
            links.append(['Edit course',reverse('teacher:opensubmit_course_change', args=[course.pk]), False])
            links.append(['Download course archive',reverse('coursearchive', args=[course.pk]), False])

            # Add course group box to dashboard
            self.children.append(modules.Group(
                title=course.title,
                column=1,
                children=[
                    modules.LinkList(title="Actions",children=(links)),
                    modules.DashboardModule(title="Info",pre_content=
                        '<table style="border: 0px; margin-left: 17px">'+
                        '<tr><td>Course URL for students       :</td><td>%s/?course=%u</td></tr>' % (settings.MAIN_URL, course.pk) +
                        "<tr><td>Open assignments              :</td><td>%u</td></tr>" % course.open_assignments().count() +
                        "<tr><td>Submissions to be graded      :</td><td>%u</td></tr>" % course.gradable_submissions().count() +
                        "<tr><td>Grading finished, not notified:</td><td>%u</td></tr>" % course.graded_submissions().count() +
                        "<tr><td>Registered students           :</td><td>%u</td></tr>" % course.participants.count() +
                        "<tr><td>Authoring students            :</td><td>%u</td></tr>" % course.authors().count() +
                        "</table>"
                    )
                ]
            ))

        # Put recent actions in third column
        self.children.append(modules.RecentActions(
            title='Recent teacher activities',
            column=3,
        ))
예제 #8
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(
                _("Group: Administration & Applications"),
                column=1,
                collapsible=True,
                children=[
                    modules.AppList(
                        _("Administration"),
                        column=1,
                        collapsible=False,
                        models=("django.contrib.*", ),
                    ),
                ],
            ))
        self.children.append(
            modules.Group(
                _("Group: Administration & Applications"),
                column=2,
                collapsible=True,
                children=[
                    modules.AppList(
                        _("Applications"),
                        column=1,
                        css_classes=("collapse closed", ),
                        exclude=("django.contrib.*", ),
                    ),
                ],
            ))
        self.children.append(
            modules.RecentActions(
                title='Recent actions',
                column=3,
                limit=5,
            ))
예제 #9
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.Group(_('Group: Administration & Applications'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.AppList(
                                  _('Administration'),
                                  column=1,
                                  collapsible=False,
                                  models=('django.contrib.*', ),
                              ),
                          ]))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('AppList: Applications'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))
        self.children.append(
            modules.ModelList(
                _('ModelList: Administration'),
                column=1,
                collapsible=False,
                models=('django.contrib.*', ),
            ))
        self.children.append(
            modules.LinkList(_('Support'),
                             column=2,
                             children=[
                                 {
                                     'title': _('github'),
                                     'url':
                                     'https://gitee.com/weihaoxuan/Aclsm/',
                                     'external': True,
                                 },
                             ]))
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
예제 #10
0
    def init_with_context(self, context):
        # site_name = get_admin_site_name(context)
        # request = context['request']

        # append a model list module for "Applications"
        self.children.append(
            modules.ModelList(
                _('Blog'),
                column=1,
                collapsible=True,
                models=('apps.blog.*', 'apps.comments.*', 'apps.*'),
                exclude=('apps.profiles.*', ),
            ))

        # append a group for "Administration"
        self.children.append(
            modules.Group(
                _('Administration'),
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(
                        _('Authentication and Authorization'),
                        column=1,
                        collapsible=False,
                        models=('apps.profiles.*', 'django.contrib.auth.*',
                                'rest_framework.authtoken.*'),
                    ),
                    modules.AppList(
                        _('Dictionaries'),
                        collapsible=False,
                        column=1,
                        css_classes=('collapse closed', ),
                        exclude=(
                            'apps.*',
                            'django.contrib.*',
                            'rest_framework.*',
                        ),
                    )
                ],
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent actions'),
                limit=10,
                collapsible=False,
                column=2,
            ))
예제 #11
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.Group(
                title=u'Администрирование',
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(title=u'Пользователи и группы',
                                      models=('diplom.user.models.DiplomUser',
                                              'django.contrib.*')),
                    modules.ModelList(title=u'Сайт',
                                      models=('diplom.video.models.*', )),
                ]))
예제 #12
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('AppList: Applications'),
            collapsible=True,
            column=1,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*', 'allauth.*', 'people.*'),
        ))


        # append a group for "Administration" & "Applications"
        self.children.append(modules.Group(
            _('Group: Administration & Applications'),
            column=1,
            collapsible=True,
            children = [
                modules.AppList(
                    _('Administration'),
                    column=1,
                    collapsible=False,
                    models=('django.contrib.*', 'people.*', 'allauth.*'),
                ),
            ]
        ))

        # append another link list module for "support".
        self.children.append(modules.LinkList(
            _('Media Management'),
            column=2,
            children=[
                {
                    'title': _('FileBrowser'),
                    'url': '/admin/filebrowser/browse/',
                    'external': False,
                },
            ]
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            limit=5,
            collapsible=False,
            column=3,
        ))
예제 #13
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('ModelList: Hopespace'),
                column=1,
                collapsible=False,
                models=('hopespace.*', ),
            ))

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(_('Group: Administration'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.AppList(
                                  _('Django admin apps'),
                                  column=1,
                                  collapsible=False,
                                  models=('django.contrib.*', ),
                              ),
                              modules.AppList(
                                  _('Third party admin apps'),
                                  column=1,
                                  css_classes=('collapse closed', ),
                                  exclude=('django.contrib.*', 'hopespace.*'),
                              )
                          ]))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=2,
            ))
예제 #14
0
 def __init__(self, **kwargs):
         Dashboard.__init__(self, **kwargs)
         self.children.append(modules.Group(
             title= _('Admin central'),
             column=1,
             collapsible=True,
             children=[
                 modules.AppList(
                     title=_('Administration'),
                     collapsible=False,
                     models=('django.contrib.*',)
                 ),
                 modules.AppList(
                     title=_('Applications'),
                     collapsible=False,
                     exclude=('django.contrib.*',)
                 )
             ]
         ))
         
         self.children.append(modules.AppList(
             title=_('Admin'),
             column=1,
             collapsible=True,
             models=('django.contrib.*',)
         ))
         
         self.children.append(modules.AppList(
             title=_('Apps'),
             column=1,
             collapsible=True,
             exclude=('django.contrib.*',)
         ))
         
         self.children.append(modules.RecentActions(
             title=_('Recent Actions'),
             column=3,
             collapsible=False,
             limit=5,
         ))
예제 #15
0
 def init_with_context(self, context):
     site_name = get_admin_site_name(context)
     self.children.append(
         modules.ModelList(_('Administration'),
                           column=1,
                           collapsible=False,
                           models=('account.models.SchoolUser',
                                   'django.contrib.*')))
     self.children.append(
         modules.Group(
             _('General'),
             column=1,
             collapsible=False,
             children=(
                 modules.ModelList(title='',
                                   models=('school.models.SchoolForm',
                                           'school.models.SchoolSubject',
                                           'school.models.Classroom')),
                 modules.ModelList(title='',
                                   models=('news.models.Article', )),
             )))
     self.children.append(
         modules.ModelList(_('Schedules'),
                           column=1,
                           collapsible=False,
                           models=('school.models.DailySchedule',
                                   'school.models.SchoolYear',
                                   'timetable.models.TimetableYear')))
     self.children.append(
         modules.ModelList(_('Diary'),
                           column=1,
                           collapsible=False,
                           models=('diary.models.DiaryRecord', )))
     self.children.append(
         modules.ModelList(_('Notebook'),
                           column=1,
                           collapsible=False,
                           models=('notebook.models.NotebookRecord', )))
예제 #16
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(_('Group: Administration & Applications'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.AppList(
                                  _('Administration'),
                                  column=1,
                                  collapsible=False,
                                  models=('django.contrib.*', ),
                              ),
                              modules.AppList(
                                  _('Applications'),
                                  column=1,
                                  css_classes=('collapse closed', ),
                                  exclude=('django.contrib.*', ),
                              )
                          ]))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('AppList: Applications'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('ModelList: Administration'),
                column=1,
                collapsible=False,
                models=('django.contrib.*', ),
            ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Media Management'),
                             column=2,
                             children=[
                                 {
                                     'title': _('FileBrowser'),
                                     'url': '/admin/filebrowser/browse/',
                                     'external': False,
                                 },
                             ]))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _('Support'),
                column=2,
                children=[
                    {
                        'title': _('Django Documentation'),
                        'url': 'http://docs.djangoproject.com/',
                        'external': True,
                    },
                    {
                        'title': _('Grappelli Documentation'),
                        'url': 'http://packages.python.org/django-grappelli/',
                        'external': True,
                    },
                    {
                        'title': _('Grappelli Google-Code'),
                        'url': 'http://code.google.com/p/django-grappelli/',
                        'external': True,
                    },
                ]))

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

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
예제 #17
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.Group(
                _('koalixcrm Version' + KOALIXCRM_VERSION),
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(
                        _('Sales Documents and Contracts'),
                        column=1,
                        css_classes=('collapse closed', ),
                        models=(
                            'koalixcrm.crm.documents.contract.Contract',
                            'koalixcrm.crm.documents.quote.Quote',
                            'koalixcrm.crm.documents.purchaseconfirmation.PurchaseConfirmation',
                            'koalixcrm.crm.documents.deliverynote.DeliveryNote',
                            'koalixcrm.crm.documents.invoice.Invoice',
                            'koalixcrm.crm.documents.paymentreminder.PaymentReminder',
                        ),
                    ),
                    modules.ModelList(
                        _('Scheduler'),
                        column=1,
                        css_classes=('collapse closed', ),
                        models=(
                            'koalixcrm.crm.contact.contact.CallForContact',
                            'koalixcrm.crm.contact.contact.VisitForContact',
                        ),
                    ),
                    modules.ModelList(
                        _('Products'),
                        column=1,
                        css_classes=('collapse closed', ),
                        models=('koalixcrm.crm.product.product.Product', ),
                    ),
                    modules.ModelList(
                        _('Contacts'),
                        column=1,
                        css_classes=('collapse closed', ),
                        models=(
                            'koalixcrm.crm.contact.customer.Customer',
                            'koalixcrm.crm.contact.supplier.Supplier',
                            'koalixcrm.crm.contact.person.Person',
                        ),
                    ),
                    modules.ModelList(
                        _('Accounting'),
                        column=1,
                        css_classes=('collapse closed', ),
                        models=('koalixcrm.accounting.*', ),
                    ),
                    modules.ModelList(
                        _('Projects'),
                        column=1,
                        css_classes=('collapse closed', ),
                        models=(
                            'koalixcrm.crm.reporting.*',
                            'koalixcrm.crm.documents.purchaseorder.PurchaseOrder',
                        ),
                    ),
                    modules.LinkList(
                        _('Report Work And Expenses'),
                        column=1,
                        children=[{
                            'title': _('Time Tracking'),
                            'url': '/koalixcrm/crm/reporting/time_tracking/',
                            'external': False
                        }])
                ]))

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(
                _('Group: Administration & Applications'),
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(
                        _('Administration'),
                        column=1,
                        collapsible=False,
                        models=('django.contrib.*', ),
                    ),
                    modules.ModelList(
                        _('koalixcrm Settings'),
                        column=1,
                        css_classes=('collapse closed', ),
                        models=
                        ('koalixcrm.crm.contact.customerbillingcycle.CustomerBillingCycle',
                         'koalixcrm.crm.contact.customergroup.CustomerGroup',
                         'koalixcrm.crm.product.tax.Tax',
                         'koalixcrm.crm.product.unit.Unit',
                         'koalixcrm.crm.product.currency.Currency',
                         'koalixcrm.djangoUserExtension.*'),
                    ),
                ]))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Media Management'),
                             column=2,
                             children=[
                                 {
                                     'title': _('FileBrowser'),
                                     'url': '/admin/filebrowser/browse/',
                                     'external': False,
                                 },
                             ]))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _('Support'),
                column=2,
                children=[
                    {
                        'title': _('koalixcrm on github'),
                        'url': 'https://github.com/scaphilo/koalixcrm/',
                        'external': True,
                    },
                    {
                        'title': _('Django Documentation'),
                        'url': 'http://docs.djangoproject.com/',
                        'external': True,
                    },
                    {
                        'title': _('Grappelli Documentation'),
                        'url': 'http://packages.python.org/django-grappelli/',
                        'external': True,
                    },
                    {
                        'title': _('Grappelli Google-Code'),
                        'url': 'http://code.google.com/p/django-grappelli/',
                        'external': True,
                    },
                ]))

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

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
예제 #18
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(modules.LinkList(
           title=_('Quick Links'),
           layout='inline',
           column=1,
           collapsible=True,
           css_classes=('collapse closed',),
           children=(
           {
                    'title': _('Return to site'),
                    'url': '/',
                },
                {
                    'title': _('Change password'),
                    'url': reverse('admin:password_change'),
                },
                {
                    'title': _('Log out'),
                    'url': reverse('admin:logout')
                },
           )

       ))

        # append a group for "Administration"
        self.children.append(modules.Group(
            _('Administration'),
            column=1,
            collapsible=True,
            children = [
                modules.AppList(
                    _('Administration'),
                    column=1,
                    collapsible=False,
                    models=('django.contrib.*','registration','accounts'),
                ),
            ]
        ))

        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            title="OpenEats2 Applications",
            collapsible=True,
            column=1,
            models=('recipe*',),
        ))

        # append an app list module for "Administration"
        self.children.append(modules.AppList(
            _('Third Party Applications'),
            column=1,
            collapsible=True,
            exclude=('django.contrib.*','openeats.*','recipe*',)
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            limit=5,
            collapsible=False,
            column=2,
        ))

        # append another link list module for "support".
        self.children.append(modules.LinkList(
            _('Support'),
            column=2,
            children=[
                                    {
                    'title': _('OpenEats Forum'),
                    'url': 'http://oe2.openeats.org/forum/',
                    'external': True,
                },
                {
                    '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,
                },
            ]
        ))

        # append a feed module
        self.children.append(modules.Feed(
            _('Latest OpenEats2 News'),
            column=2,
            feed_url='http://oe2.openeats.org/blog/feed/latest',
            limit=5
        ))
예제 #19
0
# -*- coding: utf-8 -*-
"""
Courrier pre-packaged grappelli dashboard modules
"""

from django.conf import settings
from django.utils.translation import ugettext_lazy as _

from grappelli.dashboard import modules

courier_module_children = []

courier_email_confs = modules.ModelList(
    _('Courier configurations'),
    column=1,
    collapsible=True,
    #   css_classes=('collapse closed',),
    models=(
        'courier.models.EmailTemplate',
        'courier.models.EmailNotification',
    ),
)

courier_module_children.append(courier_email_confs)

courier_module = modules.Group(_('Courier'),
                               column=1,
                               collapsible=True,
                               children=courier_module_children)
예제 #20
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.Group(
                _('Group: Applications'),
                column=1,
                collapsible=True,
                children=[
                    modules.AppList(
                        _('Templates'),
                        column=1,
                        collapsible=False,
                        models=(
                            'apps.core.models.Event',
                            'apps.core.models.Test',
                            'apps.report.models.Report',
                            'apps.core.models.GroupTemplate',
                            'apps.core.models.DistroTemplate',
                            'apps.core.models.JobTemplate',
                            'apps.core.models.RecipeTemplate',
                            'apps.core.models.TaskTemplate',
                            'apps.core.models.TaskRoleEnum',
                        ),
                    ),
                    modules.AppList(
                        _('Backend'),
                        column=1,
                        collapsible=False,
                        models=('apps.taskomatic.models.TaskPeriod', ),
                    ),
                    modules.AppList(
                        _('Hisotry'),
                        column=1,
                        collapsible=False,
                        models=(
                            'apps.waiver.models.Comment',
                            'apps.core.models.TestHistory',
                            'apps.core.models.CheckProgress',
                            'apps.taskomatic.models.Task',
                            'apps.taskomatic.models.TaskPeriodSchedule',
                        ),
                    ),
                    modules.AppList(
                        _('Results'),
                        column=1,
                        collapsible=False,
                        models=(
                            'apps.core.models.Job',
                            'apps.core.models.Recipe',
                            'apps.core.models.Task',
                            'apps.core.models.Distro',
                            'apps.core.models.Arch',
                            'apps.core.models.Git',
                            'apps.core.models.Author',
                            'apps.core.models.GroupOwner',
                            'apps.core.models.System',
                            'apps.core.models.TestHistory',
                        ),
                    ),
                    modules.AppList(_('Performence'),
                                    column=1,
                                    collapsible=False,
                                    models=('apps.api.models.Performance', ))
                ]))

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('Administration'),
                column=1,
                collapsible=False,
                models=('django.contrib.*', ),
            ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _('Support'),
                column=2,
                children=[
                    {
                        'title': _('Django Documentation'),
                        'url': 'https://docs.djangoproject.com/en/1.7/',
                        'external': True,
                    },
                    {
                        'title': _('Green Tea Documentation'),
                        'url': 'http://green-tea.readthedocs.io/en/latest/',
                        'external': True,
                    },
                ]))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=10,
                collapsible=False,
                column=3,
            ))
예제 #21
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('Metadata Configuration & Registration'),
                column=1,
                collapsible=False,
                models=('geosk.mdtools.*', 'geosk.skregistration.*'),
            ))

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(_('Administration & Applications'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.AppList(
                                  _('Administration'),
                                  column=1,
                                  collapsible=False,
                                  models=('django.contrib.*', ),
                              ),
                              modules.AppList(
                                  _('Applications'),
                                  column=1,
                                  css_classes=('collapse closed', ),
                                  exclude=('django.contrib.*', ),
                              )
                          ]))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('AppList: Applications'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))

        self.children.append(
            modules.LinkList(_('GET-IT Registration'),
                             column=2,
                             children=[
                                 {
                                     'title':
                                     _('Register or check registration'),
                                     'url':
                                     reverse('skregistration_registration'),
                                     'external': False,
                                 },
                             ]))

        self.children.append(
            modules.LinkList(
                _('Translations'),
                column=2,
                children=[
                    {
                        'title':
                        _('Update translations'),
                        'url':
                        reverse('rosetta-old-home-redirect'),
                        'external':
                        False,
                        'description':
                        _('Update the translations for your languages'),
                    },
                    {
                        'title': _('Rosetta Documentation'),
                        'url': 'https://github.com/mbi/django-rosetta',
                        'external': True,
                    },
                ]))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=2,
            ))

        self.children.append(
            modules.LinkList(_('GET-IT Front end'),
                             column=3,
                             children=[
                                 {
                                     'title': _('Home'),
                                     'url': reverse('home'),
                                     'external': False,
                                 },
                                 {
                                     'title': _('Layers'),
                                     'url': reverse('layer_browse'),
                                     'external': False,
                                 },
                                 {
                                     'title': _('Maps'),
                                     'url': reverse('layer_browse'),
                                     'external': False,
                                 },
                                 {
                                     'title': _('Documents'),
                                     'url': reverse('maps_browse'),
                                     'external': False,
                                 },
                                 {
                                     'title': _('People'),
                                     'url': reverse('profile_browse'),
                                     'external': False,
                                 },
                                 {
                                     'title': _('Search'),
                                     'url': reverse('search'),
                                     'external': False,
                                 },
                                 {
                                     'title': _('Services'),
                                     'url': reverse('about_services'),
                                     'external': False,
                                 },
                                 {
                                     'title': _('Sos'),
                                     'url': reverse('osk_browse'),
                                     'external': False,
                                 },
                             ]))
예제 #22
0
파일: dashboard.py 프로젝트: houcy/cyphon
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(modules.ModelList(
            _('Shaping Data'),
            column=1,
            collapsible=True,
            css_classes=('grp-collapse grp-closed',),
            models=(
                'bottler.bottles.models.BottleField',
                'bottler.bottles.models.Bottle',
                'bottler.labels.models.LabelField',
                'bottler.labels.models.Label',
                'bottler.containers.models.Container',
            ),
        ))

        self.children.append(modules.ModelList(
            _('Filtering Data'),
            column=1,
            collapsible=True,
            css_classes=('grp-collapse grp-closed',),
            models=(
                'target.followees.models.Followee',
                'target.locations.models.Location',
                'target.searchterms.models.SearchTerm',
                'aggregator.filters.models.Filter',
            ),
        ))

        self.children.append(modules.Group(
            _('Sifting Data'),
            column=1,
            collapsible=True,
            css_classes=('grp-collapse grp-closed',),
            children=[
                modules.ModelList(
                    _('Logs'),
                    column=1,
                    css_classes=('grp-collapse grp-closed',),
                    models=(
                        'sifter.logsifter.logsieves.models.LogRule',
                        'sifter.logsifter.logsieves.models.LogSieve',
                        'sifter.logsifter.logmungers.models.LogMunger',
                        'sifter.logsifter.logchutes.models.LogChute',
                    ),
                ),
                modules.ModelList(
                    _('Email'),
                    css_classes=('grp-collapse grp-closed',),
                    models=(
                        'sifter.mailsifter.mailsieves.models.MailRule',
                        'sifter.mailsifter.mailsieves.models.MailSieve',
                        'sifter.mailsifter.mailmungers.models.MailMunger',
                        'sifter.mailsifter.mailchutes.models.MailChute',
                    ),
                ),
                modules.ModelList(
                    _('JSON Data'),
                    column=1,
                    css_classes=('grp-collapse grp-closed',),
                    models=(
                        'sifter.datasifter.datasieves.models.DataRule',
                        'sifter.datasifter.datasieves.models.DataSieve',
                        'sifter.datasifter.datamungers.models.DataMunger',
                        'sifter.datasifter.datachutes.models.DataChute',
                    ),
                ),
            ]
        ))

        self.children.append(modules.Group(
            _('Condensing Data'),
            column=1,
            collapsible=True,
            css_classes=('grp-collapse grp-closed',),
            children=[
                modules.ModelList(
                    _('Logs'),
                    css_classes=('grp-collapse grp-closed',),
                    models=(
                        'sifter.logsifter.logcondensers.models.LogParser',
                        'sifter.logsifter.logcondensers.models.LogCondenser',
                    ),
                ),
                modules.ModelList(
                    _('Email'),
                    css_classes=('grp-collapse grp-closed',),
                    models=(
                        'sifter.mailsifter.mailcondensers.models.MailParser',
                        'sifter.mailsifter.mailcondensers.models.MailCondenser',
                    ),
                ),
                modules.ModelList(
                    _('JSON Data'),
                    css_classes=('grp-collapse grp-closed',),
                    models=(
                        'sifter.datasifter.datacondensers.models.DataParser',
                        'sifter.datasifter.datacondensers.models.DataCondenser',
                    ),
                ),
            ]
        ))

        self.children.append(modules.ModelList(
            _('Enhancing Data'),
            column=1,
            collapsible=True,
            css_classes=('grp-collapse grp-closed',),
            models=(
                'inspections.models.InspectionStep',
                'inspections.models.Inspection',
                'lab.procedures.models.Procedure',
            ),
        ))

        self.children.append(modules.ModelList(
            _('Storing Data'),
            column=1,
            css_classes=('grp-collapse grp-closed',),
            models=(
                'warehouses.models.Warehouse',
                'warehouses.models.Collection',
            ),
        ))

        self.children.append(modules.ModelList(
            _('Distilling Data'),
            column=1,
            css_classes=('grp-collapse grp-closed',),
            models=(
                'categories.models.Category',
                'distilleries.models.Distillery',
            ),
        ))

        self.children.append(modules.ModelList(
            _('Investigating Data'),
            column=1,
            css_classes=('grp-collapse grp-closed',),
            models=(
                'contexts.models.Context',
            ),
        ))

        self.children.append(modules.ModelList(
            _('Configuring Alerts'),
            column=1,
            css_classes=('grp-collapse grp-closed',),
            models=(
                'monitors.models.Monitor',
                'watchdogs.models.Watchdog',
                'watchdogs.models.Muzzle',
            ),
        ))

        self.children.append(modules.ModelList(
            _('Manage Alerts'),
            column=2,
            collapsible=False,
            models=(
                'alerts.models.Alert',
            ),
        ))

        self.children.append(modules.ModelList(
            _('Manage Mail'),
            column=2,
            collapsible=False,
            models=(
                'django_mailbox.models.Mailbox',
                'django_mailbox.models.Message',
                'django_mailbox.models.MessageAttachment',
            ),
        ))

        self.children.append(modules.ModelList(
            _('People and Permissions'),
            column=2,
            collapsible=False,
            models=(
                'appusers.models.AppUser',
                'django.contrib.auth.models.Group',
            ),
        ))

        self.children.append(modules.ModelList(
            _('Records'),
            column=2,
            collapsible=False,
            models=(
                'responder.dispatches.models.Dispatch',
                'aggregator.invoices.models.Invoice',
                'ambassador.stamps.models.Stamp',
                'aggregator.streams.models.Stream',
            ),
        ))

        self.children.append(modules.Group(
            _('App Configurations'),
            column=2,
            collapsible=True,
            css_classes=('grp-collapse grp-closed',),
            children=[
                modules.ModelList(
                    _('Passports & Visas'),
                    css_classes=('grp-collapse grp-open',),
                    models=(
                        'ambassador.passports.models.Passport',
                        'ambassador.visas.models.Visa',
                    ),
                ),
                modules.ModelList(
                    _('Alert Response'),
                    css_classes=('grp-collapse grp-open',),
                    models=(
                        'responder.actions.models.Action',
                        'responder.couriers.models.Courier',
                        'responder.destinations.models.Destination',
                    ),
                ),
                modules.ModelList(
                    _('Data Collection'),
                    css_classes=('grp-collapse grp-open',),
                    models=(
                        'aggregator.pipes.models.Pipe',
                        'aggregator.plumbers.models.Plumber',
                        'aggregator.reservoirs.models.Reservoir',
                    ),
                ),
                modules.ModelList(
                    _('Data Enhancement'),
                    css_classes=('grp-collapse grp-open',),
                    models=(
                        'lab.procedures.models.Protocol',
                    ),
                ),
                modules.ModelList(
                    _('Push Notifications'),
                    css_classes=('grp-collapse grp-open',),
                    models=(
                        'constance.*',
                    ),
                ),
            ]
        ))

        # self.children.append(modules.AppList(
        #     _('App Configurations'),
        #     collapsible=True,
        #     column=2,
        #     css_classes=('grp-collapse grp-closed',),
        #     exclude=(
        #         'django.contrib.*',
        #         'alerts.*',
        #         'appusers.*',
        #         'django_mailbox.models.Message*'
        #     ),
        # ))

        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            column=3,
            collapsible=False,
            limit=3,
        ))

        self.children.append(modules.LinkList(
            _('Support'),
            column=3,
            children=[
                {
                    'title': _('Cyphon Documentation'),
                    'url': 'https://cyphon.readthedocs.io/',
                    'external': True,
                },
            ]
        ))

        self.children.append(modules.Feed(
            _('Latest Cyphon News'),
            feed_url='https://www.cyphon.io/blog?format=rss&utm_source=admin',
            column=3,
            limit=3,
        ))
예제 #23
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.Group(
                _('Administration'),
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(
                        _('Authentication and Authorization'),
                        column=1,
                        collapsible=False,
                        models=('django.contrib.auth.*', ),
                    ),
                    modules.ModelList(
                        _('Redirects'),
                        column=1,
                        collapsible=False,
                        # css_classes=('collapse closed',),
                        models=('django.contrib.redirects.models.*', ),
                    ),
                    modules.ModelList(
                        _('Sites'),
                        column=1,
                        collapsible=False,
                        # css_classes=('collapse closed',),
                        models=('django.contrib.sites.models.*', ),
                    )
                ]))

        #Home Page part
        self.children.append(
            modules.Group(
                _('Home Page'),
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(
                        _('Home'),
                        column=1,
                        collapsible=False,
                        models=('home.models.*', ),
                    ),
                    modules.ModelList(
                        _('Bloglets'),
                        column=1,
                        collapsible=False,
                        # css_classes=('collapse closed',),
                        models=('bloglets.models.*', ),
                    ),
                    modules.ModelList(
                        _('quickpages'),
                        column=1,
                        collapsible=False,
                        # css_classes=('collapse closed',),
                        models=('quickpages.*', ),
                    )
                ]))

        #Orders and Customers part
        self.children.append(
            modules.Group(
                _('Orders and Customers'),
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(
                        _('Customers'),
                        column=1,
                        collapsible=False,
                        models=('customers.models.*', ),
                    ),
                    modules.ModelList(
                        _('Orders'),
                        column=1,
                        collapsible=False,
                        # css_classes=('collapse closed',),
                        models=('orders.models.*', ),
                    ),
                ]))

        #Categories and products
        self.children.append(
            modules.Group(_('Categories and products'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.ModelList(
                                  _('Products'),
                                  column=1,
                                  collapsible=False,
                                  models=('products.models.*', ),
                              ),
                          ]))

        #Other Applications part
        self.children.append(
            modules.Group(
                _('Other Application'),
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(
                        _('CA tax'),
                        column=1,
                        collapsible=False,
                        models=('catax.models.*', ),
                    ),
                    modules.ModelList(
                        _('Quotes'),
                        column=1,
                        collapsible=False,
                        models=('quotes.models.*', ),
                    ),
                    modules.ModelList(
                        _('SQL Web Shell'),
                        column=1,
                        collapsible=False,
                        models=('sqls.models.*', ),
                    ),
                    modules.ModelList(
                        _('Python Web Shell'),
                        column=1,
                        collapsible=False,
                        models=('webshell.models.*', ),
                    ),
                    modules.ModelList(
                        _('Email Extras (GPG)'),
                        column=1,
                        collapsible=False,
                        models=('email_extras.models.*', ),
                    ),
                    #modules.ModelList(
                    #    _('social_auth'),
                    #    column=1,
                    #    collapsible=False,
                    #    models=('social_auth.*',),
                    #),
                    modules.ModelList(
                        _('Social Auth'),
                        column=1,
                        collapsible=False,
                        models=('social.apps.django_app.default.*', ),
                    ),
                    modules.ModelList(
                        _('Taggit'),
                        column=1,
                        collapsible=False,
                        models=('taggit.models.*', ),
                    ),

                    #Obdjects models moved to Quickpages and its showing as quick snippets
                    # modules.ModelList(
                    #     _('Obdjects'),
                    #     column=1,
                    #     collapsible=False,
                    #     models=('obdjects.models.*',),
                    # ),
                ]))

        # Media / File Management - Grappelli's Filebrowser.
        self.children.append(
            modules.LinkList(_('Media Management'),
                             column=2,
                             children=[
                                 {
                                     'title': _('FileBrowser'),
                                     'url': '/admin/filebrowser/browse/',
                                     'external': False,
                                 },
                             ]))

        # Django IDE
        self.children.append(
            modules.LinkList(_('Django IDE'),
                             column=2,
                             children=[
                                 {
                                     'title': _('DjangoIDE'),
                                     'url': '/djide/',
                                     'external': False,
                                 },
                             ]))

        # append a link list module for Imports / CSV Imports
        self.children.append(
            modules.LinkList(_('Imports'),
                             column=2,
                             children=[
                                 {
                                     'title': _('CSVImport'),
                                     'url': '/admin/csvimport/',
                                     'external': False,
                                 },
                             ]))

        # Utils
        self.children.append(
            modules.LinkList(_('Utils'),
                             column=2,
                             children=[
                                 {
                                     'title': _('URLs'),
                                     'url': '/utils/urls/',
                                     'external': False,
                                 },
                                 {
                                     'title': _('Clear Cache'),
                                     'url': '/utils/clearcache/',
                                     'external': False,
                                 },
                                 {
                                     'title': _('Collect static files'),
                                     'url': '/utils/collect_static/',
                                     'external': False,
                                 },
                             ]))

        # Orders module utils
        self.children.append(
            modules.LinkList(_('Orders Utils'),
                             column=2,
                             children=[
                                 {
                                     'title': _('Your current session'),
                                     'url': '/session/',
                                     'external': False,
                                 },
                                 {
                                     'title': _('Legacy order admin grid'),
                                     'url': '/admin_order_grid/',
                                     'external': False,
                                 },
                             ]))

        # append another link list module for "support".
        # self.children.append(modules.LinkList(
        #     _('Support'),
        #     column=2,
        #     children=[
        #         {
        #             'title': _('Django Documentation'),
        #             'url': 'http://docs.djangoproject.com/',
        #             'external': True,
        #         },
        #         {
        #             'title': _('Grappelli Documentation'),
        #             'url': 'http://packages.python.org/django-grappelli/',
        #             'external': True,
        #         },
        #         {
        #             'title': _('Grappelli Google-Code'),
        #             'url': 'http://code.google.com/p/django-grappelli/',
        #             'external': True,
        #         },
        #     ]
        # ))

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

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=20,
                collapsible=False,
                column=3,
            ))
예제 #24
0
    def __init__(self, **kwargs):
        Dashboard.__init__(self, **kwargs)

        self.children.append(
            modules.Group(
                column=1,
                title='CWSP',
                children=[
                    modules.ModelList(models=(
                        'ecwsp.work_study.models.StudentWorker',
                        'ecwsp.work_study.models.StudentInteraction',
                        'ecwsp.work_study.models.Attendance',
                        'ecwsp.work_study.models.PickupLocation',
                        'ecwsp.work_study.models.CraContact',
                        'ecwsp.work_study.models.Personality',
                        'ecwsp.work_study.models.Handout33',
                        'ecwsp.work_study.models.PresetComment',
                        'ecwsp.work_study.models.AttendanceFee',
                        'ecwsp.work_study.models.AttendanceReason',
                    ), ),
                    modules.ModelList(
                        title="Company Data",
                        models=(
                            'ecwsp.work_study.models.Company',
                            'ecwsp.work_study.models.WorkTeam',
                            'ecwsp.work_study.models.WorkTeamUser',
                            'ecwsp.work_study.models.TimeSheet',
                            'ecwsp.work_study.models.TimeSheetPerformanceChoice',
                            'ecwsp.work_study.models.Contact',
                            'ecwsp.work_study.models.CompanyContract',
                            'ecwsp.work_study.models.CompanyHistory',
                            'ecwsp.work_study.models.ClientVisit',
                            'ecwsp.work_study.models.PaymentOption',
                            'ecwsp.work_study.models.StudentDesiredSkill',
                            'ecwsp.work_study.models.StudentFunctionalResponsibility',
                            'ecwsp.work_study.models.CompContract',
                            'ecwsp.work_study.models.MessageToSupervisor',
                        ),
                    ),
                ]))

        self.children.append(
            modules.ModelList(
                title=_('School Information'),
                column=1,
                models=(
                    'ecwsp.sis.models.SchoolYear',
                    'ecwsp.sis.models.Student',
                    'ecwsp.sis.models.EmergencyContact',
                    'ecwsp.sis.models.Cohort',
                    'ecwsp.sis.models.PerCourseCohort',
                    'ecwsp.sis.models.ReasonLeft',
                    'ecwsp.sis.models.Faculty',
                    'ecwsp.sis.models.MessageToStudent',
                    'ecwsp.sis.models.FamilyAccessUser',
                ),
            ))

        self.children.append(
            modules.ModelList(
                title=('Volunteer Tracking'),
                column=1,
                models=('ecwsp.volunteer_track.*', ),
            ))

        self.children.append(
            modules.ModelList(
                title=_('Attendance'),
                column=1,
                models=(
                    'ecwsp.sis.models.StudentAttendance',
                    'ecwsp.sis.models.AttendanceStatus',
                    'ecwsp.sis.models.ASPAttendance',
                ),
            ))

        self.children.append(
            modules.ModelList(
                title='Discipline',
                column=1,
                models=(
                    'ecwsp.discipline.models.StudentDiscipline',
                    'ecwsp.discipline.models.DisciplineAction',
                    'ecwsp.discipline.models.PresetComment',
                ),
            ))

        self.children.append(
            modules.ModelList(
                title='Attendance',
                column=1,
                models=('ecwsp.attendance.*', ),
            ))

        self.children.append(
            modules.ModelList(
                title='Courses and Grades',
                column=1,
                models=('ecwsp.schedule.*', 'ecwsp.grades.*',
                        'ecwsp.benchmark_grade.*', 'ecwsp.benchmarks.*'),
            ))

        self.children.append(
            modules.ModelList(
                title='Standard Tests',
                column=1,
                models=('ecwsp.standard_test.*', ),
            ))

        self.children.append(
            modules.ModelList(
                title='Admissions',
                column=1,
                models=('ecwsp.admissions.*', ),
            ))

        self.children.append(
            modules.ModelList(
                title='Counseling',
                column=1,
                models=('ecwsp.counseling.*', ),
            ))

        self.children.append(
            modules.ModelList(
                title='Alumni',
                column=1,
                models=('ecwsp.alumni.*', ),
            ))

        self.children.append(
            modules.ModelList(
                title='OpenMetricRecognition',
                column=1,
                models=('ecwsp.omr.*', ),
            ))

        self.children.append(
            modules.AppList(title='Administration',
                            column=2,
                            models=(
                                'django.contrib.*',
                                'ecwsp.administration.*',
                                'ecwsp.engrade_sync.*',
                                'ldap_groups.*',
                                'google_auth.*',
                            )))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(title='Recent Actions', column=2, limit=5))

        self.children.append(
            modules.LinkList(
                column=2,
                children=(
                    {
                        'title': 'django-sis Wiki and Manual',
                        'url': 'https://sword.readthedocs.org',
                        'external': True,
                    },
                    {
                        'title': 'Student Worker Relation Database Community',
                        'url': 'http://github.com/burke-software/django-sis',
                        'external': True,
                    },
                    {
                        'title': 'Burke Software',
                        'url': 'http://burkesoftware.com',
                        'external': True,
                    },
                )))
예제 #25
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"

        self.children.append(modules.Group(
            title='Контент',
            column=1,
            collapsible=True,
            children=[
                modules.ModelList(
                    title='Лоты',
                    column=1,
                    collapsible=False,
                    models=(
                        'crm.models.lots.OldBuildingLot',
                        'crm.models.lots.NewBuildingLot',
                    ),
                ),
                modules.ModelList(
                    title='Прочее',
                    column=1,
                    collapsible=False,
                    models=(
                        'crm.models.developers.Developer',
                        'crm.models.complexes.Complex',
                        'crm.models.complexes.Corp',
                    ),
                )
            ]
        ))

        self.children.append(modules.Group(
            title='Административная панель',
            column=2,
            collapsible=True,
            children = [
                modules.AppList(
                    '',
                    column=1,
                    collapsible=False,
                    models=('django.contrib.*', 'crm.models.users.UserProfile'),
                ),
                modules.ModelList(
                    title='Базовые настройки',
                    column=1,
                    collapsible=False,
                    models=(
                        'crm.models.base.Region',
                        'crm.models.base.ConstructionTech',
                        'crm.models.base.PremisesType',
                        'crm.models.base.ObjectClass',
                        'crm.models.complexes.Floor',
                        'crm.models.lots.Plan',
                    ),
                )
            ]
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent actions'),
            limit=5,
            collapsible=False,
            column=3,
        ))
예제 #26
0
파일: dashboard.py 프로젝트: Sandy4321/hrm
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(_('Group: Administration & Applications'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.AppList(
                                  _('Administration'),
                                  column=1,
                                  collapsible=False,
                                  models=('django.contrib.*', ),
                              ),
                          ]))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('Human Resource Manager'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))

        self.children.append(
            modules.LinkList(layout='inline',
                             column=2,
                             children=(
                                 {
                                     'title': 'ABI Website',
                                     'url': 'http://www.abisingapore.com',
                                     'external': True,
                                     'description': 'ABI Singapore',
                                 },
                                 {
                                     'title': 'ABI Facebook',
                                     'url': 'http://www.abisingapore.com',
                                     'external': True,
                                     'description': 'ABI Singapore',
                                 },
                                 {
                                     'title': 'ABI Twitter',
                                     'url': 'http://www.abisingapore.com',
                                     'external': True,
                                     'description': 'ABI Singapore',
                                 },
                                 {
                                     'title': 'ABI LinkedIn',
                                     'url': 'http://www.abisingapore.com',
                                     'external': True,
                                     'description': 'ABI Singapore',
                                 },
                             )))

        # append an app list module for "Administration"

        # append another link list module for "support".

        # append another link list module for "support".

        # append a feed module

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=10,
                collapsible=False,
                column=2,
            ))
예제 #27
0
    def init_with_context(self, context):
        general = []
        if context.request.user.has_perm('opensubmit.change_course'):
            general.append([
                'Manage courses',
                reverse('teacher:opensubmit_course_changelist'), False
            ])
        if context.request.user.has_perm('opensubmit.change_gradingscheme'):
            general.append([
                'Manage grading schemes',
                reverse('teacher:opensubmit_gradingscheme_changelist'), False
            ])
        if context.request.user.has_perm('opensubmit.change_studyprogram'):
            general.append([
                'Manage study programs',
                reverse('teacher:opensubmit_studyprogram_changelist'), False
            ])
        if context.request.user.has_perm('opensubmit.change_user'):
            general.append(
                ['Manage users',
                 reverse('admin:auth_user_changelist'), False])
        if context.request.user.has_perm('opensubmit.change_user'):
            general.append([
                'Manage user groups',
                reverse('admin:auth_group_changelist'), False
            ])
        if context.request.user.has_perm('opensubmit.change_permission'):
            general.append([
                'Manage permissions',
                reverse('admin:auth_permission_changelist'), False
            ])
        if context.request.user.has_perm('opensubmit.change_testmachine'):
            general.append([
                'Manage test machines',
                reverse('teacher:opensubmit_testmachine_changelist'), False
            ])
        self.children.append(
            modules.Group(
                title="System",
                column=1,
                children=[
                    modules.LinkList(title="Actions", children=(general)),
                    modules.DashboardModule(
                        title="Info",
                        pre_content='<table style="border:0">' +
                        '<tr><td>OpenSubmit release</td><td><a href="https://github.com/troeger/opensubmit/releases/tag/v{0}">v{0}</a></td></tr>'
                        .format(settings.VERSION) +
                        '<tr><td>Administrator</td><td><a href="mailto:%s">%s</a></td></tr>'
                        % (settings.ADMINS[0][1], settings.ADMINS[0][0]) +
                        '<tr><td>Registered users</td><td>%u</td></tr>' %
                        (User.objects.count()) +
                        '<tr><td>Submitted solutions</td><td>%u</td></tr>' %
                        (Submission.objects.count()) +
                        '<tr><td>Test machines</td><td>%u enabled, %u disabled</td></tr>'
                        % (TestMachine.objects.filter(enabled=True).count(),
                           TestMachine.objects.filter(enabled=False).count()) +
                        "</table>")
                ]))

        # Put course action boxes in column
        try:
            courses = context.request.user.profile.tutor_courses().all()
        except:
            courses = []

        column = 2
        for course in courses:
            # Prepare course-related links
            links = []
            links.append(['Manage submissions', course.grading_url(), False])
            ass_url = "%s?course__id__exact=%u" % (
                reverse('teacher:opensubmit_assignment_changelist'), course.pk)
            if context.request.user.has_perm('opensubmit.change_assignment'):
                links.append(['Manage assignments', ass_url, False])
            links.append([
                'Show grading table',
                reverse('gradingtable', args=[course.pk]), False
            ])
            links.append([
                'Create eMail for students',
                reverse('mailcourse', args=[course.pk]), False
            ])
            if context.request.user.has_perm('opensubmit.change_course'):
                links.append([
                    'Edit course details',
                    reverse('teacher:opensubmit_course_change',
                            args=[course.pk]), False
                ])
            links.append([
                'Download course archive',
                reverse('coursearchive', args=[course.pk]), False
            ])

            # Add course group box to dashboard
            self.children.append(
                modules.Group(
                    title="Course '{0}'".format(course.title),
                    column=column,
                    children=[
                        modules.LinkList(title="Actions", children=(links)),
                        modules.DashboardModule(
                            title="Info",
                            pre_content='<table>' +
                            '<tr><td>Course URL for students</td><td>%s/?course=%u</td></tr>'
                            % (settings.MAIN_URL, course.pk) +
                            '<tr><td>Course owner</td><td><a href="mailto:%s">%s</a></td></tr>'
                            %
                            (course.owner.email, course.owner.get_full_name())
                            + "<tr><td>Open assignments</td><td>%u</td></tr>" %
                            course.open_assignments().count() +
                            "<tr><td>Submissions to be graded</td><td>%u</td></tr>"
                            % course.gradable_submissions().count() +
                            "<tr><td>Grading finished, not notified</td><td>%u</td></tr>"
                            % course.graded_submissions().count() +
                            "<tr><td>Registered students</td><td>%u</td></tr>"
                            % course.participants.count() +
                            "<tr><td>Authoring students</td><td>%u</td></tr>" %
                            course.authors().count() + "</table>")
                    ]))
            column += 1
예제 #28
0
파일: dashboard.py 프로젝트: ukaoma/nnmware
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Applications"
        self.children.append(
            modules.Group(
                _('nnmware system boot:'),
                collapsible=True,
                column=1,
                children=[
                    modules.AppList(
                        _('Core'),
                        column=1,
                        css_classes=('grp-collapse', ),
                        models=('nnmware.core.*', ),
                    ),
                    modules.AppList(
                        _('Money :: Addresses :: Video'),
                        column=1,
                        css_classes=('grp-collapse grp-closed', ),
                        models=(
                            'nnmware.apps.money.*',
                            'nnmware.apps.address.*',
                            'nnmware.apps.video.*',
                        ),
                    ),
                    modules.AppList(
                        _('Shop'),
                        column=1,
                        css_classes=('grp-collapse grp-closed', ),
                        models=('nnmware.apps.shop.*', ),
                    ),
                    modules.AppList(
                        _('Booking'),
                        column=1,
                        css_classes=('grp-collapse grp-closed', ),
                        models=('nnmware.apps.booking.*', ),
                    ),
                    modules.AppList(
                        _('Dossier'),
                        column=1,
                        css_classes=('grp-collapse grp-closed', ),
                        models=('nnmware.apps.dossier.*', ),
                    ),
                    modules.AppList(
                        _('Business'),
                        column=1,
                        css_classes=('grp-collapse grp-closed', ),
                        models=('nnmware.apps.business.*', ),
                    ),
                    modules.AppList(
                        _('Administration Module'),
                        column=1,
                        css_classes=('grp-collapse grp-closed', ),
                        models=(
                            'django.contrib.auth.*',
                            'nnmware.demo.*',
                            'django.contrib.sites.models.Site',
                            'django.contrib.flatpages.models.FlatPage',
                            'nnmware.apps.social.models.UserSocialAuth',
                        ),
                    )
                ]))
        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=10,
                column=2,
            ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('nnmware.example'),
                             column=3,
                             children=[
                                 {
                                     'title': _('Main Page'),
                                     'url': '/',
                                     'external': False,
                                 },
                                 {
                                     'title': _('Admin page'),
                                     'url': '/admin/',
                                     'external': False,
                                 },
                             ]))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Engine Support'),
                             column=3,
                             children=[
                                 {
                                     'title': _('*****@*****.**'),
                                     'url': 'mailto:[email protected]',
                                     'external': True,
                                 },
                             ]))
예제 #29
0
 def init_with_context(self, context):
     site_name = "NEO Exchange"  # get_admin_site_name(context)
     
     # append a group for "Administration" & "Applications"
     self.children.append(
         modules.Group(_('Group: Administration & Applications'),
                       column=1,
                       collapsible=True,
                       children=[modules.AppList(_('Administration'),
                                                 column=1,
                                                 collapsible=False,
                                                 models=('django.contrib.*',),
                                                 ),
                                 modules.AppList(_('Applications'),
                                                 column=1,
                                                 css_classes=('collapse closed',),
                                                 exclude=('django.contrib.*',),
                                                 )
                                 ]
                       )
     )
     
     # append an app list module for "Applications"
     self.children.append(modules.AppList(_('AppList: Applications'),
                                          collapsible=True,
                                          column=1,
                                          css_classes=('collapse closed',),
                                          exclude=('django.contrib.*',),
                                          )
                          )
     
     # append an app list module for "Administration"
     self.children.append(modules.ModelList(_('ModelList: Administration'),
                                            column=1,
                                            collapsible=False,
                                            models=('django.contrib.*',),
                                            )
                          )
     
     # append another link list module for "support".
     self.children.append(modules.LinkList(_('Related'),
                                           column=2,
                                           children=[
                                               {'title': _('LCO main site'),
                                                'url': 'http://lco.global/',
                                                'external': True,
                                                },
                                               {'title': _('Observing Portal'),
                                                'url': 'http://lco.global/observe/',
                                                'external': True,
                                                },
                                           ]
                                           )
                          )
     
     # append a recent actions module
     self.children.append(modules.RecentActions(_('Recent Actions'),
                                                limit=5,
                                                collapsible=False,
                                                column=2,
                                                )
                          )
예제 #30
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(
                _('Group: Administration & Applications'),
                column=1,
                collapsible=True,
                children=[
                    modules.AppList(
                        _('Administration'),
                        column=1,
                        collapsible=False,
                        models=('django.contrib.*', ),
                    ),
                    modules.AppList(
                        _('Applications'),
                        column=1,
                        css_classes=('collapse closed', ),
                        exclude=('django.contrib.*', ),
                    ),
                    # modules.ModelList(
                    #     title='About',
                    #     column=1,
                    #     models=('about.models.submitModel','about.models.contactModel',)
                    # ),
                ]))

        # # append an app list module for "Applications"
        # self.children.append(modules.AppList(
        #     _('AppList: Applications'),
        #     collapsible=True,
        #     column=1,
        #     css_classes=('collapse closed',),
        #     exclude=('django.contrib.*',),
        # ))

        # append an app list module for "Administration"
        # self.children.append(modules.ModelList(
        #     _('ModelList: Administration'),
        #     column=1,
        #     collapsible=False,
        #     models=('django.contrib.*',),
        # ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Media Management'),
                             column=2,
                             children=[
                                 {
                                     'title': _('FileBrowser'),
                                     'url': '/admin/filebrowser/browse/',
                                     'external': False,
                                     'description': 'File Management in Admin'
                                 },
                             ]))

        # append links to dump and load all data
        self.children.append(
            modules.LinkList(_('Database Management'),
                             column=2,
                             children=[
                                 {
                                     'title': _('Dump Data (For Developer)'),
                                     'url': '/admin/dump/',
                                     'external': False,
                                     'description':
                                     'dump all data in the database'
                                 },
                                 {
                                     'title': _('Load Data (For Developer)'),
                                     'url': '/admin/load/',
                                     'external': False,
                                     'description': 'load data into database'
                                 },
                             ]))

        #append links
        self.children.append(
            modules.LinkList(
                _('Links'),
                column=2,
                children=[
                    {
                        'title': _('YODYP Main'),
                        'url': '/',
                        'external': False,
                    },
                    {
                        'title': _('Django Documentation'),
                        'url': 'http://docs.djangoproject.com/',
                        'external': True,
                    },
                    {
                        'title': _('Grappelli Documentation'),
                        'url': 'http://packages.python.org/django-grappelli/',
                        'external': True,
                    },
                ]))

        # append another link list module for "support".
        # self.children.append(modules.LinkList(
        #     _('Support'),
        #     column=2,
        #     children=[
        #         {
        #             'title': _('Django Documentation'),
        #             'url': 'http://docs.djangoproject.com/',
        #             'external': True,
        #         },
        #         {
        #             'title': _('Grappelli Documentation'),
        #             'url': 'http://packages.python.org/django-grappelli/',
        #             'external': True,
        #         },
        #         {
        #             'title': _('Grappelli Google-Code'),
        #             'url': 'http://code.google.com/p/django-grappelli/',
        #             'external': True,
        #         },
        #     ]
        # ))

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

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=6,
                collapsible=False,
                column=2,
            ))