Commit graph

6372 commits

Author SHA1 Message Date
Tom Hughes
384ac46102 Convert id column for oauth_nonces to bigint 2020-12-14 14:48:59 +00:00
Tom Hughes
88ba316abe Merge remote-tracking branch 'upstream/pull/2999' 2020-12-09 14:51:04 +00:00
Andy Allan
651217e1bc Add missing html suffix to translation key
The new key was added to the translations config file in a previous commit.
2020-12-08 13:50:22 +00:00
Frédéric Rodrigo
bab39572a1 Add CyclOSM layer 2020-12-06 21:29:36 +01:00
Tom Hughes
92712591c9 Merge remote-tracking branch 'upstream/pull/2993' into master 2020-12-06 18:44:33 +00:00
Andy Allan
78dd142df4 Avoid using raw in html mailer views
Use the _html suffix to mark that we expect the translations to contain links.

Unfortunately, we can't use the _html keys for the plain text emails, since the input options (e.g. username, url) will be html-escaped,
before it is passed to the view. So we need to use non-html-suffix keys for the plaintext views, in most cases. Only when the translation
options (e.g. url) are guaranteed to not contain any escapable characters can the same translation key be shared.
2020-12-02 15:13:09 +00:00
Andy Allan
48b85a7fee
Merge pull request #2969 from tuckerrc/diary-updated-date
Add last updated date to diary entry page
2020-12-02 11:30:22 +00:00
Sarah Hoffmann
a7b95e2a63 Improve guessing of labels for Nominatim results
This adapts to two changes in place handling by Nominatim:

* Place links that are computed by Nominatim are now found in
  extratags['linked_places']. Keep the check for extratags['place']
  as this may contain an explicitly mapped place label.
* Use address rank for guessing the admin level. This gets normalised
  by Nominatim with respect to country-specific use of admin_level.

Also adds additional labels for admin levels, so that we now have
complete coverage for all levels that are in use in OSM.
2020-12-01 22:52:40 +01:00
Tucker Chapman
c274d22fd6 Update translate string and only show if different from creation time 2020-11-26 22:04:54 -05:00
Andy Allan
cc1d9592df Avoid calling raw in plain text email templates
Rails doesn't escape text in text/plain outputs, since before Rails 4.

See https://github.com/rails/rails/pull/8235
2020-11-25 18:28:35 +00:00
Andy Allan
342e25dd5a Remove duplicate translation strings, and use short form translation lookups 2020-11-25 18:28:35 +00:00
Andy Allan
8f157ab2b1 Rename subject translation key, for consistency 2020-11-25 18:28:35 +00:00
Andy Allan
030591e318 Use rails t helper to allow relative translation keys in email subjects
This makes it easier to rename methods and translation keys.
2020-11-25 18:28:35 +00:00
Andy Allan
b83c0acbd1 Fix trace tag interpolation, and add a test 2020-11-25 11:34:35 +00:00
Andy Allan
f635b98b8c Refactor trace notifications to reduce lego translations
Fixes #2268.

Unfortunately there's still a lego translation when both halves of the sentence are joined together, but this at least reduces the number of combinations to translate.
2020-11-18 18:14:55 +00:00
Tucker Chapman
f4239f8fc5 Add last updated date to diary entry page 2020-11-17 20:33:27 -05:00
Tom Hughes
4e78f3ae5b Fix erblint warning 2020-11-17 09:23:22 +00:00
Tom Hughes
2ecfd61ee9 Fix new rubocop warnings 2020-11-17 08:17:34 +00:00
mxdanger
aad1c1b933 Add updated authentication logos 2020-11-13 20:02:00 -08:00
Tom Hughes
99e537859a Fix HTML escaping issues with user role icons 2020-11-13 15:13:37 +00:00
Tom Hughes
bfffe7ed96 Prefer string interpolation to concatenation 2020-11-13 11:32:28 +00:00
Tom Hughes
45d4242f9d Improve readability 2020-11-13 10:51:01 +00:00
Tom Hughes
4347d9d3b0 Merge remote-tracking branch 'upstream/pull/2921' into master 2020-11-13 10:49:35 +00:00
Tom Hughes
582402ba8f Prefer keyword arguments when method has optional boolean arguments 2020-11-13 10:22:55 +00:00
Andy Allan
78b9d92207 Prefer keyword arguments when method has optional boolean arguments 2020-11-12 11:24:44 +00:00
Andy Allan
e6d7da3a62 Preload traces for the selected points
It doesn't make a huge difference, since rails caches all the results
of the queries generated by point.trace lookups, but at least it cuts
down on the logs.
2020-11-11 17:52:33 +00:00
Andy Allan
a15a3744da Use point.trace instead of an additional gpx_file variable
Every point knows which trace it's associated with, so there's no
need to search for it separately
2020-11-11 17:51:52 +00:00
Andy Allan
a65cb84288 Remove unused code 2020-11-11 16:43:58 +00:00
Andy Allan
c8e1b3c662 Prefer string interpolation to concatenation in erb files 2020-11-11 14:44:42 +00:00
Andy Allan
01b72f7adf Fix missing html layout for user_mailer emails
This was caused by renaming the mailer without renaming the layout. Added a test to cover this in future.

Fixes #2903
2020-11-11 11:19:20 +00:00
Tom Hughes
20ce10a9ef Allow redirects to authentication services from the settings page
Chrome and Safari require redirects to match the form-action rule
as well as the original submission address.
2020-10-29 21:29:35 +00:00
Andy Allan
52c688f55a Prefer string interpolation to concatenation 2020-10-28 17:15:14 +01:00
Andy Allan
847536c80d Avoid some uses of html_safe
We can use `html_safe` on non-interpolated strings, since that's trusted content.
2020-10-28 14:45:20 +01:00
Quincy Morgan
b1694ce39e Update to iD v2.19.0 2020-10-27 17:46:24 -04:00
Tom Hughes
8a42bc2eff Merge remote-tracking branch 'upstream/pull/2890' 2020-10-21 20:53:15 +01:00
Tom Hughes
2f03522c42 Fix close handler for welcome message 2020-10-21 20:51:10 +01:00
Tom Hughes
e9ad6d852c Merge remote-tracking branch 'upstream/pull/2901' 2020-10-21 20:51:03 +01:00
Andy Allan
c233bec67b Use flexbox to position the close icon on the sidebars
This ensures that the text and the close icon don't overlap, regardless
of the length of the title. The title div grows to use all available
space, while ensuring the text breaks if necessary to prevent it from
pushing the close icon offscreen.
2020-10-21 17:11:28 +02:00
Andy Allan
2559226be3 Avoid various uses of html_safe
We can avoid using `html_safe` in various circumstances, through alternative approaches like i18n keys ending in `_html` or using `safe_join` to avoid converting via unsafe string types.

The `_html` keys approach only work for ActionView helper version of `t`, not the base `I18n.t` method.
2020-10-21 15:43:14 +02:00
Hidde Wieringa
cde4ac61a2
Also fix private road 2020-10-17 17:00:40 +02:00
Hidde Wieringa
2fe408d5f9
Update icon for destination access in map key 2020-10-17 16:56:42 +02:00
Andy Allan
2c1033f62d Rename Notifier to UserMailer
It's a convention in rails to name your mailers with a Mailer suffix, and is also common to name the class after the recipient (e.g. User, Admin). So UserMailer seems a reasonable choice.
2020-10-14 15:04:58 +02:00
Tom Hughes
3b56c005eb Merge remote-tracking branch 'upstream/pull/2838' 2020-09-30 11:57:18 +01:00
Tom Hughes
ddac660f3b Merge remote-tracking branch 'upstream/pull/2839' 2020-09-30 11:54:30 +01:00
Tom Hughes
7db541d697 Invalidate existing sessions when changing email or password
As we don't have any way to actually find the active sessions for
an account we instead store a fingerprint in the session, and refuse
to use any session with a different fingerprint.
2020-09-29 14:34:08 +01:00
Tom Hughes
c694c78c9a Delete any outstanding tokens when a user changes their email
This ensures that any tokens previously sent to the old email address
can no longer be used if somebody were able to access that address.
2020-09-29 13:47:40 +01:00
mmd-osm
37a7996d94 API User details: format tweaks
- _show_ to return single user only
- remove nesting for languages
2020-09-18 21:50:38 +02:00
Andy Allan
a988ad6f51 Style changeset descriptions with italics on browse pages
Alternative to #580

This reworks changeset descriptions to use italics instead of header
elements, in order to make them more like quotes.

Care has been taken to make sure that there is still a header element
as the first element of the common details partial, in order to make
the history pages look right (where the partial appears multiple times).
2020-09-16 18:51:20 +02:00
Tom Hughes
6078e642ba Fix erblint warnings 2020-09-16 16:59:10 +01:00
Andy Allan
b4b59df75e Show linked features as collapsable detail panels on feature browse pages
Fixes #2823

The panels are collapsed by default, when there is a long list of features, but
open on short lists to save on clicks. 10 items is arbitrary but seemed reasonable.
2020-09-16 15:28:03 +02:00