Révision affeff87
Ajouté par Mikaël Ates il y a plus de 9 ans
calebasse/dossiers/views.py | ||
---|---|---|
933 | 933 |
ctx['all'] = all |
934 | 934 |
self.template_name = 'dossiers/quotations_print.html' |
935 | 935 |
else: |
936 |
paginator = Paginator(ctx['object_list'].filter(), 50)
|
|
936 |
paginator = Paginator(ctx['object_list'].filter(), 25)
|
|
937 | 937 |
try: |
938 | 938 |
patient_records = paginator.page(page) |
939 | 939 |
except PageNotAnInteger: |
... | ... | |
1038 | 1038 |
service=self.service) |
1039 | 1039 |
patient_records = [] |
1040 | 1040 |
page = self.request.GET.get('page') |
1041 |
paginator = Paginator(ctx['object_list'].filter(), 50) |
|
1042 |
try: |
|
1043 |
paginate_patient_records = paginator.page(page) |
|
1044 |
except PageNotAnInteger: |
|
1045 |
paginate_patient_records = paginator.page(1) |
|
1046 |
except EmptyPage: |
|
1047 |
paginate_patient_records = paginator.page(paginator.num_pages) |
|
1041 |
|
|
1042 |
all = 'all' in self.request.GET |
|
1043 |
if all: |
|
1044 |
paginate_patient_records = ctx['object_list'] |
|
1045 |
ctx['all'] = all |
|
1046 |
self.template_name = 'dossiers/waiting_queue_print.html' |
|
1047 |
else: |
|
1048 |
paginator = Paginator(ctx['object_list'].filter(), 25) |
|
1049 |
try: |
|
1050 |
paginate_patient_records = paginator.page(page) |
|
1051 |
except PageNotAnInteger: |
|
1052 |
paginate_patient_records = paginator.page(1) |
|
1053 |
except EmptyPage: |
|
1054 |
paginate_patient_records = paginator.page(paginator.num_pages) |
|
1055 |
ctx['paginate_patient_records'] = paginate_patient_records |
|
1048 | 1056 |
|
1049 | 1057 |
all_patient_records = PatientRecord.objects.filter( |
1050 | 1058 |
service=self.service, |
... | ... | |
1052 | 1060 |
'last_state__date_selected', 'created') |
1053 | 1061 |
ctx['patient_records'] = self._get_search_result( |
1054 | 1062 |
paginate_patient_records, all_patient_records) |
1055 |
ctx['paginate_patient_records'] = paginate_patient_records |
|
1056 | 1063 |
ctx['len_patient_records'] = all_patient_records.count() |
1057 | 1064 |
|
1058 | 1065 |
query = self.request.GET.copy() |
Formats disponibles : Unified diff
dossiers: manage printing for the waiting queue and shorter paginated pages.
2c6641c8 printing is done differently. So it has been adapted to
the waiting queue page.
50 (mainly done for a faster page display).