Commit graph

403 commits

Author SHA1 Message Date
Tom Hughes
2fcee9625d Merge remote-tracking branch 'upstream/pull/4349' 2023-11-15 22:30:41 +00:00
Andy Allan
100a7f8979 Use friendly_date for note disappear description
There's no need to reimplement this in its own helper.
2023-11-15 19:36:35 +00:00
Andy Allan
d8400320a7 Use time instead of abbr element for changesets_helper 2023-11-15 19:19:57 +00:00
Andy Allan
d739943b36 Avoid wrapping time tags in abbr for note_helper 2023-11-15 19:18:01 +00:00
Andy Allan
24a562f885 Use html 'time' element for friendly date helpers
This provides more structure than just a simple span.
2023-11-15 17:53:38 +00:00
Tom Hughes
c94de1e1a3 Improve name selection with the query tool
Pass the full expanded list of preferred languages to the client
and use that when looking for the best name for an object.

Fixes #4310
2023-11-14 17:45:50 +00:00
Anton Khorev
562e7e7d32 Remove some tag table custom css 2023-11-14 17:17:18 +00:00
Anton Khorev
62ba143c3c Remove some search/directions custom css 2023-10-20 16:58:59 +03:00
Tom Hughes
a6b5f2f56d Adjust code for rails internal changes 2023-10-18 18:26:14 +01:00
Anton Khorev
0fae5627a5 Remove <picture>s around <img srcset=...> 2023-10-03 03:06:12 +03:00
Andy Allan
0a046673d6
Merge pull request #4201 from AntonKhorev/issues-limit-settings
Move max value of issues counter to settings
2023-09-27 15:47:44 +01:00
Tom Hughes
29c51d7915 Allow banners to have a start date as well as an end date 2023-09-19 09:33:03 +01:00
Anton Khorev
09225bc02d Use i18n at_least_pattern in issues count helper 2023-09-01 08:19:22 +03:00
Anton Khorev
963b8f43f1 Change issue count logic from (n-1)+ to n+ 2023-09-01 08:05:01 +03:00
Anton Khorev
fff98f2afb Move max value of issues counter to settings 2023-09-01 07:14:45 +03:00
Andy Allan
1253bdcdc5 Use bootstrap badges to implement count-number badges
This leaves bootstrap to take care of most aspects, while retaining
the current colours and font weights.
2023-08-30 18:11:56 +01:00
Tom Hughes
6982903ae7 Fix predicate method names in the user model 2023-08-15 18:53:14 +01:00
Anton Khorev
033c032ed6 Add home location condition to user model 2023-08-11 21:44:15 +03:00
Anton Khorev
113c32f65e Remove custom css for OpenID logo 2023-08-10 19:43:54 +03:00
Tom Hughes
0254f7ee09 Fix confirmation prompt when granting or revoking roles 2023-07-01 15:21:02 +01:00
Tom Hughes
466de96a91 Fix new rubocop warnings 2023-06-27 18:13:33 +01:00
Andy Allan
fad3aedbbb Rework note events to avoid raw html in translations 2023-04-02 10:22:30 +01:00
Andy Allan
4ac0c9c1e8 Rework browse pages to avoid raw html in translations 2023-03-29 18:52:45 +01:00
Andy Allan
47362f432a
Merge pull request #3691 from AntonKhorev/wikipedia-secondary-links
Link prefixed wikipedia tags
2023-02-08 17:30:25 +00:00
Tom Hughes
52591c5561 Merge remote-tracking branch 'upstream/pull/3911' 2023-02-01 19:10:22 +00:00
Andy Allan
c226d8e85e Avoid converting conditional restriction tags into emails
Fixes #3884
2023-02-01 18:57:16 +00:00
Andy Allan
9748ce301c Move browse#note to notes#show
This allows a more resourceful routing approach.
2023-02-01 17:13:41 +00:00
Tom Hughes
52078b5d76 Escape each portion of a semicolon seprated value individually
Fixes #3872
2023-01-04 15:41:54 +00:00
Kyle Hensel
e774e1619c
fix formatting 2023-01-02 12:50:37 +13:00
Kyle Hensel
305acfe516
fix formatting of tag values with semicolon-separated URLs 2022-12-31 17:30:03 +13:00
Andy Allan
067b0de439
Merge pull request #3676 from harry-wood/notes-disappear-time
Display how long until a note will disappear
2022-11-23 15:44:26 +00:00
Andy Allan
97b7bac956 Use the mail_to method to construct a mailto link for browse tag values
This is easier than building a mailto link ourselves. Also implement
the missing title tag and write a test for it.
2022-11-17 12:53:33 +00:00
Harry Wood
d8e51614cb Display how long until a note will disappear
Modify the message displayed at the bottom of the notes sidepanel. For already resolved notes we don't want to say "please resolve it". Fixes https://github.com/openstreetmap/openstreetmap-website/issues/3663

Instead explain that it will disappear from the map (so reporting is probably not necessary) and display how long to go until that happens. Tackling https://github.com/openstreetmap/openstreetmap-website/issues/3071
2022-09-14 23:59:25 +01:00
Anton Khorev
9aa24a0715 Link prefixed wikipedia tags 2022-09-15 01:00:19 +03:00
mxdanger
a6b655862e Bootstrap 5: Change rounded-lg to rounded-3 2022-07-22 13:17:36 -07:00
Tom Hughes
cfb4a70129 Fix Lint/DuplicateBranch rubocop warnings 2022-03-08 19:05:37 +00:00
Tom Hughes
b5f06e06c1 Fix rubocop Rails/TimeZone warnings 2022-03-01 22:55:10 +00:00
Andy Allan
52cd62bf13 Replace CSS-driven borders with bootstrap borders
This makes future refactoring easier, since the elements will
retain their borders even if the hierarchy changes.

Also round some maps and the legale section since I think those now
look nicer.
2021-11-24 12:24:16 +00:00
Tom Hughes
64457dbbd0 Handle exceptions rendering flash messages 2021-11-23 16:55:06 +00:00
Tom Hughes
e3966479a6 Fix new rubocop warnings 2021-11-16 08:48:35 +00:00
Andy Allan
9f61d6c1cf Specify avatar dimensions in html tags
This prevents reflow when the images are loaded by the browser.

ActiveStorage variants are resized lazily when the image is requested,
so we only know the dimensions if the image was already loaded. This
means that there will be one reflow just after a new avatar is first
viewed.
2021-10-13 14:05:02 +01:00
Tom Hughes
8a9dbc94c8 Update rubocop todo and fix new warnings 2021-09-14 20:40:36 +01:00
Andy Allan
dd9eca9346 Switch to html5-compatible fragment encoding for wikipedia URLs
Fixes #3269

In the HTML4 days, fragments weren't allowed to have `%` signs, so
mediawiki generated fragments with `%` replaced with a `.`

In HTML5, fragments can have % encoded characters, and so in 2017
wikipedia switched over to this for their automatically generated
fragments, while keeping the "dot" versions available as a fallback.

However, we have been automatically converting all fragments,
including manually specified anchors that do not have "dot"-encoded
versions available. So we can now simplify everything by just using
the HTML5 percent-encoded fragments.
2021-07-28 16:01:48 +01:00
Tom Hughes
cd9a72e669 Merge remote-tracking branch 'upstream/pull/3263' 2021-07-21 12:16:08 +01:00
Andy Allan
37b03e47c6 Fix various code comments
These were found as part of #3233
2021-07-21 11:24:23 +01:00
Tom Hughes
b4a1e41968 Switch web site to use OAuth 2 2021-06-27 19:00:36 +01:00
Andy Allan
24f6aeda6a Use hash-based flash objects to render complex flash messages
Since flash objects can only be String, Hash or Array (notably excluding SafeBuffers), then this approach is necessary to render complex html in a safe manner.

Each local can be treated as an (unsafe) string, and therefore escaped normally when rendered into the template. The template (and translation strings) can
contain html since they are no longer stored in the flash as a plain string.

Fixes #3215
2021-06-23 20:10:55 +01:00
Andy Allan
71be435886 Fix case when user block durations are slightly negative
The output from ActiveSupport::Duration is wildly unhelpful in those cases

Fixes #3210
2021-06-09 15:16:35 +01:00
Andy Allan
5ce14cfa4d Ensure that short duration blockss are shown as '0 hours'
Passing `:count => nil` means that i18n.t will return the hash of translations, so use a default value of 0 when checking for hours to prevent this.

Refs #3210
2021-06-09 14:17:56 +01:00
Tom Hughes
baa32464cd Drop last vestiges of ruby 2.5 support 2021-06-08 20:33:25 +01:00