File tree 4 files changed +31
-25
lines changed
templates/scanpipe/modals
4 files changed +31
-25
lines changed Original file line number Diff line number Diff line change 33
33
{{ archive_form.remove_output.label }}
34
34
</ label >
35
35
</ div >
36
- < hr >
37
- < div class ="field ">
38
- < label class ="checkbox " for ="{{ archive_form.select_across.id_for_label }} ">
39
- < input type ="checkbox " name ="{{ archive_form.select_across.name }} " id ="{{ archive_form.select_across.id_for_label }} ">
40
- Include all {{ paginator.count|intcomma }} projects
41
- </ label >
42
- < p class ="help "> {{ outputs_download_form.select_across.help_text }}</ p >
43
- </ div >
36
+ {% if page_obj.paginator.num_pages > 1 %}
37
+ < hr >
38
+ < div class ="field ">
39
+ < label class ="checkbox " for ="{{ archive_form.select_across.id_for_label }} ">
40
+ < input type ="checkbox " name ="{{ archive_form.select_across.name }} " id ="{{ archive_form.select_across.id_for_label }} ">
41
+ Include all {{ paginator.count|intcomma }} projects
42
+ </ label >
43
+ < p class ="help "> {{ outputs_download_form.select_across.help_text }}</ p >
44
+ </ div >
45
+ {% endif %}
44
46
</ section >
45
47
< input type ="hidden " name ="{{ archive_form.url_query.name }} " value ="{{ request.GET.urlencode }} ">
46
48
< input type ="hidden " name ="action " value ="archive ">
Original file line number Diff line number Diff line change 14
14
{{ outputs_download_form.output_format }}
15
15
</ div >
16
16
</ div >
17
- < hr >
18
- < div class ="field ">
19
- < label class ="checkbox " for ="{{ outputs_download_form.select_across.id_for_label }} ">
20
- < input type ="checkbox " name ="{{ outputs_download_form.select_across.name }} " id ="{{ outputs_download_form.select_across.id_for_label }} ">
21
- Include all {{ paginator.count|intcomma }} projects
22
- </ label >
23
- < p class ="help "> {{ outputs_download_form.select_across.help_text }}</ p >
24
- </ div >
17
+ {% if page_obj.paginator.num_pages > 1 %}
18
+ < hr >
19
+ < div class ="field ">
20
+ < label class ="checkbox " for ="{{ outputs_download_form.select_across.id_for_label }} ">
21
+ < input type ="checkbox " name ="{{ outputs_download_form.select_across.name }} " id ="{{ outputs_download_form.select_across.id_for_label }} ">
22
+ Include all {{ paginator.count|intcomma }} projects
23
+ </ label >
24
+ < p class ="help "> {{ outputs_download_form.select_across.help_text }}</ p >
25
+ </ div >
26
+ {% endif %}
25
27
</ section >
26
28
< input type ="hidden " name ="{{ outputs_download_form.url_query.name }} " value ="{{ request.GET.urlencode }} ">
27
29
< input type ="hidden " name ="action " value ="download ">
Original file line number Diff line number Diff line change 14
14
{{ report_form.model_name }}
15
15
</ div >
16
16
</ div >
17
- < hr >
18
- < div class ="field ">
19
- < label class ="checkbox " for ="{{ report_form.select_across.id_for_label }} ">
20
- < input type ="checkbox " name ="{{ report_form.select_across.name }} " id ="{{ report_form.select_across.id_for_label }} ">
21
- Include all {{ paginator.count|intcomma }} projects
22
- </ label >
23
- < p class ="help "> {{ report_form.select_across.help_text }}</ p >
24
- </ div >
17
+ {% if page_obj.paginator.num_pages > 1 %}
18
+ < hr >
19
+ < div class ="field ">
20
+ < label class ="checkbox " for ="{{ report_form.select_across.id_for_label }} ">
21
+ < input type ="checkbox " name ="{{ report_form.select_across.name }} " id ="{{ report_form.select_across.id_for_label }} ">
22
+ Include all {{ paginator.count|intcomma }} projects
23
+ </ label >
24
+ < p class ="help "> {{ report_form.select_across.help_text }}</ p >
25
+ </ div >
26
+ {% endif %}
25
27
</ section >
26
28
< input type ="hidden " name ="{{ report_form.url_query.name }} " value ="{{ request.GET.urlencode }} ">
27
29
< input type ="hidden " name ="action " value ="report ">
Original file line number Diff line number Diff line change @@ -556,6 +556,7 @@ class ProjectListView(
556
556
):
557
557
model = Project
558
558
filterset_class = ProjectFilterSet
559
+ paginate_by = settings .SCANCODEIO_PAGINATE_BY .get ("project" , 20 )
559
560
template_name = "scanpipe/project_list.html"
560
561
prefetch_related = [
561
562
"labels" ,
@@ -572,7 +573,6 @@ class ProjectListView(
572
573
),
573
574
),
574
575
]
575
- paginate_by = settings .SCANCODEIO_PAGINATE_BY .get ("project" , 20 )
576
576
table_columns = [
577
577
"name" ,
578
578
{
You can’t perform that action at this time.
0 commit comments