backoffice: minor change to export commands labels (#8229)

This commit is contained in:
Frédéric Péters 2015-09-10 17:21:50 +02:00
parent d2260dfa88
commit c9753cbf34
2 changed files with 5 additions and 5 deletions

View File

@ -268,14 +268,14 @@ def test_backoffice_csv(pub):
create_environment(pub)
app = login(get_app(pub))
resp = app.get('/backoffice/management/form-title/')
resp = resp.click('CSV Export')
resp = resp.click('Export as CSV File')
assert resp.headers['content-type'].startswith('text/')
assert len(resp.body.splitlines()) == 18 # 17 + header line
resp = app.get('/backoffice/management/form-title/')
resp.forms[0]['filter'] = 'all'
resp = resp.forms[0].submit()
resp = resp.click('CSV Export')
resp = resp.click('Export as CSV File')
assert len(resp.body.splitlines()) == 51
def test_backoffice_ods(pub):
@ -283,7 +283,7 @@ def test_backoffice_ods(pub):
create_environment(pub)
app = login(get_app(pub))
resp = app.get('/backoffice/management/form-title/')
resp = resp.click('Open Document Format Export')
resp = resp.click('Export a Spreadsheet')
assert resp.headers['content-type'] == 'application/vnd.oasis.opendocument.spreadsheet'
assert 'filename=form-title.ods' in resp.headers['content-disposition']
assert resp.body[:2] == 'PK' # ods has a zip container

View File

@ -372,9 +372,9 @@ class FormPage(Directory):
r += htmltext('<ul id="sidebar-actions">')
#' <li><a href="list%s">%s</a></li>' % (qs, _('List of results'))
r += htmltext(' <li><a data-base-href="ods" href="ods%s">%s</a></li>') % (
qs, _('Open Document Format Export'))
qs, _('Export a Spreadsheet'))
r += htmltext(' <li><a data-base-href="csv" href="csv%s">%s</a></li>') % (
qs, _('CSV Export'))
qs, _('Export as CSV File'))
if xlwt:
r += htmltext('<li><a data-base-href="xls" href="xls%s">%s</a></li>') % (
qs, _('Excel Export'))