Project

General

Profile

« Previous | Next » 

Revision 2c6641c8

Added by Serghei Mihai over 10 years ago

dossiers: print all quotations

font-awesome styles added for icons effects

Closes #5012

View differences:

calebasse/dossiers/views.py
909 909
                service=self.service)
910 910
        patient_records = []
911 911
        page = self.request.GET.get('page')
912
        paginator = Paginator(ctx['object_list'].filter(), 50)
913
        try:
914
            paginate_patient_records = paginator.page(page)
915
        except PageNotAnInteger:
916
            paginate_patient_records = paginator.page(1)
917
        except EmptyPage:
918
            paginate_patient_records = paginator.page(paginator.num_pages)
919

  
920
        ctx['patient_records'] = self._get_search_result(paginate_patient_records)
921
        ctx['paginate_patient_records'] = paginate_patient_records
912
        all = 'all' in self.request.GET
913
        if all:
914
            patient_records = ctx['object_list']
915
            ctx['all'] = all
916
            self.template_name = 'dossiers/quotations_print.html'
917
        else:
918
            paginator = Paginator(ctx['object_list'].filter(), 50)
919
            try:
920
                patient_records = paginator.page(page)
921
            except PageNotAnInteger:
922
                patient_records = paginator.page(1)
923
            except EmptyPage:
924
                patient_records = paginator.page(paginator.num_pages)
925
            ctx['paginate_patient_records'] = patient_records
926

  
927
        ctx['patient_records'] = self._get_search_result(patient_records)
922 928

  
923 929
        query = self.request.GET.copy()
924 930
        if 'page' in query:

Also available in: Unified diff