0001-backoffice-hide-legacy-excel-export-behind-a-site-op.patch
wcs/backoffice/management.py | ||
---|---|---|
986 | 986 |
qs, _('Export a Spreadsheet')) |
987 | 987 |
r += htmltext(' <li><a data-base-href="csv" href="csv%s">%s</a></li>') % ( |
988 | 988 |
qs, _('Export as CSV File')) |
989 |
if xlwt: |
|
989 |
if xlwt and get_publisher().has_site_option('legacy-excel-export'):
|
|
990 | 990 |
r += htmltext('<li><a data-base-href="xls" href="xls%s">%s</a></li>') % ( |
991 | 991 |
qs, _('Excel Export')) |
992 | 992 |
if self.formdef.geolocations: |
... | ... | |
1433 | 1433 | |
1434 | 1434 |
def xls(self): |
1435 | 1435 |
self.check_access() |
1436 |
if xlwt is None: |
|
1436 |
if xlwt is None or not get_publisher().has_site_option('legacy-excel-export'):
|
|
1437 | 1437 |
raise errors.TraversalError() |
1438 | 1438 | |
1439 | 1439 |
fields = self.get_fields_from_query() |
1440 |
- |