def check_record(self, obj, is_header): if is_header: return '跟进记录' record_url = name2url(self.site.namespace, self.get_url_name('record'), pk=obj.pk) return mark_safe("<a href='%s'>跟进记录</a>" % record_url)
def display_score(self, obj=None, is_header=None, *args, **kwargs): if is_header: return '积分管理' if self.current_user.depart_id == 4: return f'{obj.score}' record_url = name2url(self.site.namespace, "academy_scorerecord_list", student_id=obj.pk) return mark_safe('<a target="_blank" href="%s">%s</a>' % (record_url, obj.score))
def get_homeworkscore(self, obj, is_header, *args, **kwargs): if is_header: return '成绩' homework_score_url = name2url(self.site.namespace, self.get_url_name('homeworkscore'), classes_id=kwargs.get('classes_id'), homework_id=obj.pk) return mark_safe("<a target='_blank' href='%s'>成绩</a>" % homework_score_url)
def inner(self, obj=None, is_header=None, *args, **kwargs): if is_header: return title return mark_safe("<a href='%s'>%s</a>" % (name2url( self.site.namespace, self.get_url_name('reset_pwd'), pk=obj.pk), title))
def pay_record(self, obj=None, is_header=None, *args, **kwargs): if is_header: return '缴费' record_url = name2url(self.site.namespace,'academy_paymentrecord_list', customer_id=obj.pk) return mark_safe('<a target="_blank" href="%s">缴费</a>' % record_url)
def contact(self, obj, is_header): if is_header: return '跟进' contact_url = name2url(self.site.namespace, "academy_consultrecord_list", customer_id=obj.pk) return mark_safe("<a target='_blank' href='%s'>跟进</a>" % contact_url)
def display_homework(self, obj, is_header, *args, **kwargs): if is_header: return '班级作业' new_url = name2url(self.site.namespace, 'academy_homework_list', classes_id=obj.pk) return mark_safe("<a target='_blank' href='%s'>班级作业</a>" % new_url)
def display_course_record(self, obj, is_header, *args, **kwargs): if is_header: return '上课记录' class_course_record_url = name2url(self.site.namespace, 'academy_courserecord_list', classes_id=obj.pk) return mark_safe("<a target='_blank' href='%s'>上课记录</a>" % (class_course_record_url))
def display_myclasses(self, obj, is_header, *args, **kwargs): if is_header: return '我的课程' myclasses_url = name2url(self.site.namespace, self.get_myclasses_url_name, student_id=obj.pk) return mark_safe('<a href="%s">我的课程</a>' % (myclasses_url))