0001-backoffice-fix-attached-file-URLs-in-geojson-24953.patch
tests/test_api.py | ||
---|---|---|
1652 | 1652 |
assert field['html_value'] == "<font color="red">FOO BAR</font>" |
1653 | 1653 |
if field['label'] == 'foobar1': |
1654 | 1654 |
assert field['value'] == "test.txt" |
1655 |
assert field['html_value'] == '<div class="file-field"><a download="test.txt" href="http://example.net/backoffice/management/test/28/?f=1"><span>test.txt</span></a></div>' |
|
1655 |
assert field['html_value'] == '<div class="file-field"><a download="test.txt" href="http://example.net/backoffice/management/test/28/download?f=1"><span>test.txt</span></a></div>'
|
|
1656 | 1656 | |
1657 | 1657 |
# check with a filter |
1658 | 1658 |
resp = get_app(pub).get(sign_uri('/api/forms/test/geojson?filter=done', user=local_user)) |
wcs/backoffice/management.py | ||
---|---|---|
84 | 84 |
if field.type == 'map': |
85 | 85 |
continue |
86 | 86 |
html_value = formdata.get_field_view_value(field, max_length=60) |
87 |
html_value = html_value.replace('[download]', formdata_backoffice_url) |
|
87 |
html_value = html_value.replace('[download]', '%sdownload' % formdata_backoffice_url)
|
|
88 | 88 |
value = formdata.get_field_view_value(field) |
89 | 89 |
if not html_value and not value: |
90 | 90 |
continue |
wcs/qommon/static/css/dc2/admin.css | ||
---|---|---|
1678 | 1678 |
ul.user-formdatas small { |
1679 | 1679 |
display: block; |
1680 | 1680 |
} |
1681 | ||
1682 |
div.leaflet-popup-pane div.file-field img { |
|
1683 |
max-width: 100% !important; |
|
1684 |
max-height: 10vh; |
|
1685 |
} |
|
1681 |
- |