Compare commits

..

3 Commits

Author SHA1 Message Date
Frédéric Péters 0f494dc500 misc: complete and translate alt attribute of selected position marker (#88610)
gitea/wcs/pipeline/head This commit looks good Details
2024-03-25 11:59:01 +01:00
Frédéric Péters 8f7a0901fb misc: complete and allow translation of leaflet title attribute (#88610) 2024-03-25 11:58:43 +01:00
Frédéric Péters 4d5b309986 misc: use custom id in breadcrumb (#88557)
gitea/wcs/pipeline/head This commit looks good Details
2024-03-23 12:15:31 +01:00
4 changed files with 4 additions and 2 deletions

View File

@ -398,6 +398,7 @@ def test_backoffice_card_item_link_id_template(pub):
resp = resp.form.submit('submit')
assert resp.location.endswith('/backoffice/data/foo/blah/')
resp = resp.follow()
assert resp.pyquery('.breadcrumbs a')[-1].attrib['href'] == '/backoffice/data/foo/blah/'
resp = app.get('/backoffice/data/foo/')
assert [x.attrib['href'] for x in resp.pyquery('table a')] == ['blah/', 'test/']

View File

@ -1030,7 +1030,7 @@ class FormStatusPage(Directory, FormTemplateMixin):
return Directory._q_lookup(self, component)
def _q_traverse(self, path):
get_response().breadcrumb.append((str(self.filled.id) + '/', self.filled.get_display_id()))
get_response().breadcrumb.append((self.filled.identifier + '/', self.filled.get_display_id()))
return super()._q_traverse(path)
def wfedit(self, action_id):

View File

@ -206,7 +206,7 @@ $(window).on('wcs:maps-init', function() {
$map_widget.on('set-geolocation', function(e, coords, options) {
if (map.marker === null) {
map.marker = L.marker([0, 0]);
map.marker = L.marker([0, 0], {alt: WCS_I18N.map_position_marker_alt});
map.marker.addTo(map);
}
map.marker.setLatLng(coords);

View File

@ -74,6 +74,7 @@ def i18n_js(request):
'geoloc_permission_denied': _('Geolocation: permission denied'),
'geoloc_position_unavailable': _('Geolocation: position unavailable'),
'geoloc_timeout': _('Geolocation: timeout'),
'map_position_marker_alt': _('Marker of selected position'),
'map_search_error': _('An error occured while fetching results'),
'map_search_hint': _('Search address'),
'map_search_searching': _('Searching...'),