def add_role_menuitem_object(self, active=False):
     self.add_headeritem_object(
         devilry_crmenu.BreadcrumbMenuItem(label=ugettext_lazy('Account'),
                                           url=reverse_cradmin_url(
                                               instanceid='devilry_account',
                                               appname='account'),
                                           active=active))
 def add_role_menuitem_object(self, active=False):
     return self.add_headeritem_object(
         devilry_crmenu.BreadcrumbMenuItem(
             label=pgettext_lazy('breadcrumb', 'Administrator'),
             url=reverse_cradmin_url(instanceid='devilry_admin',
                                     appname='overview',
                                     roleid=None,
                                     viewname=crapp.INDEXVIEW_NAME),
             active=active))
 def add_subject_breadcrumb_item(self, subject, active=False):
     return self.add_headeritem_object(devilry_crmenu.BreadcrumbMenuItem(
         label=subject.short_name,
         url=reverse_cradmin_url(
             instanceid='devilry_admin_subject_for_periodadmin',
             appname='overview',
             roleid=subject.id,
             viewname=crapp.INDEXVIEW_NAME
         ),
         active=active
     ))
Пример #4
0
 def add_group_breadcrumb_item(self, group, active=False):
     self.add_headeritem_object(devilry_crmenu.BreadcrumbMenuItem(
         label=defaultfilters.truncatechars(self.get_group_label(group), 25),
         url=reverse_cradmin_url(
             instanceid='devilry_group_student',
             appname='feedbackfeed',
             roleid=group.id,
             viewname=crapp.INDEXVIEW_NAME,
         ),
         active=active
     ))
Пример #5
0
 def add_singleperiods_breadcrumb_item(self, period, active=False):
     self.add_headeritem_object(devilry_crmenu.BreadcrumbMenuItem(
         label=period.get_path(),
         url=reverse_cradmin_url(
             instanceid='devilry_student_period',
             appname='overview',
             roleid=period.id,
             viewname=crapp.INDEXVIEW_NAME,
         ),
         active=active
     ))
Пример #6
0
 def add_allperiods_breadcrumb_item(self, active=False):
     self.add_headeritem_object(devilry_crmenu.BreadcrumbMenuItem(
         label=pgettext_lazy('student', 'Your courses'),
         url=reverse_cradmin_url(
             instanceid='devilry_student',
             appname='allperiods',
             roleid=None,
             viewname=crapp.INDEXVIEW_NAME,
         ),
         active=active
     ))
Пример #7
0
 def add_role_menuitem_object(self, active=False):
     self.add_headeritem_object(devilry_crmenu.BreadcrumbMenuItem(
         label=pgettext_lazy('breadcrumb',
                             'Student'),
         url=reverse_cradmin_url(
             instanceid='devilry_student',
             appname='dashboard',
             roleid=None,
             viewname=crapp.INDEXVIEW_NAME
         ),
         active=active
     ))
 def add_period_breadcrumb_item(self, period, active=False):
     if self.cradmin_instance.get_devilryrole_for_requestuser(
     ) == 'periodadmin':
         label = period.get_path()
     else:
         label = period.short_name
     return self.add_headeritem_object(
         devilry_crmenu.BreadcrumbMenuItem(
             label=label,
             url=reverse_cradmin_url(instanceid='devilry_admin_periodadmin',
                                     appname='overview',
                                     roleid=period.id,
                                     viewname=crapp.INDEXVIEW_NAME),
             active=active))