Commit graph

2682 commits

Author SHA1 Message Date
Andy Allan
e8e4aa53d4 Refactor login form to use bootstrap
Care has been taken to preserve exact tabindexes, field values etc.
2021-01-13 19:20:06 +00:00
Andy Allan
78bf2993e4 Refactor richtext fields to use a custom bootstrap_form input.
This allows us to use form_group_builder and get all the label and
help text handling in line with other bootstrap_form inputs.
2021-01-13 14:05:39 +00:00
Andy Allan
ed07e17ca2 Align the richtext help text height with the height of the textarea.
This works by setting the card to the same height as its containing flexbox. For perfect alignment, we need to make sure the extra margin at the bottom of the text-area stops applying when they are shown side by side.
2021-01-13 10:12:15 +00:00
Tom Hughes
0654be27f9 Fix new rubocop warnings 2021-01-11 19:17:31 +00:00
Andy Allan
85bf0af488 Merge branch 'pull/3035' 2021-01-06 15:41:42 +00:00
Andy Allan
76146baf60 Remove spacing tweaks and legacy pagination spacing CSS
No need to fight against something that we no longer use.
2021-01-06 15:40:53 +00:00
Andy Allan
9568c7fee8 Merge branch 'pull/3024' 2021-01-06 15:25:37 +00:00
Andy Allan
b5188cae08 Remove link_to_if since it's in a clause with the same condition 2021-01-06 15:24:50 +00:00
Tom Hughes
0ff89c31e4 Remove both Potlatch versions
Fixes #2622
2021-01-05 21:18:45 +00:00
Tobias Jordans
18ec273038 Traces: Migrate pagination to bootstrap
Same feature, different style.
- Change pagination to use bootstrap default styles
- … but with empty span-tags instead of non-active a-tags
- refactor partial to not use @-variables but get the variables via
the render-call, simplify render-call-syntax
- remove the additional `if @traces.size > 1` inside the pagination
partial since that caused the pagination to disappear on the last page.
The partial will be visible with inactive links.
- Add bootstrap spacer-classes to overwrite commons-css so removing. Eg.
commons also has a pagination class same as bootstrap.
2021-01-03 20:55:50 +01:00
Tobias
36a41a8cc5
Diary entries #index: Simplify bootstrap pagination
- We can use a span instead of a disabled link as well
- Update to use double quotes everywhere
2021-01-02 22:24:46 +01:00
Tobias
f36b6375e9
Add noindex meta tag to diary index pages
Google (and other search engines) should follow all links on this page, but only index the actual diary_entry#show and not the #index. This meta tag tells google to do just that (https://developers.google.com/search/docs/advanced/crawling/block-indexing?hl=en).

Part of https://github.com/openstreetmap/openstreetmap-website/issues/2851
2021-01-02 20:22:26 +01:00
Tobias Jordans
abc83298cd Diary entries #index: Migrate to bootstrap pagination
Use https://getbootstrap.com/docs/4.5/components/pagination/ for the pagination.

I tried using link_to_if but this does not work well in this case since multiple changes need to happen for the disabled state.
2020-12-30 14:20:13 +01:00
Tobias Jordans
b470e01f84 Break long URLs where richtext is used.
For example on the blog post show page.

This uses https://getbootstrap.com/docs/4.4/utilities/text/#word-break to break long URLs on the blog post show view.
2020-12-27 22:11:36 +01:00
Andy Allan
547459314b Refactor diary entry forms to use a custom form builder 2020-12-24 13:32:41 +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
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
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
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
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
4347d9d3b0 Merge remote-tracking branch 'upstream/pull/2921' into master 2020-11-13 10:49:35 +00:00
Andy Allan
78b9d92207 Prefer keyword arguments when method has optional boolean arguments 2020-11-12 11:24:44 +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
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
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
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
mmd-osm
0fb725ea61 API User details JSON format 2020-09-06 22:11:23 +02:00
Tom Hughes
9e75b8472f Convert oauth authorization form to use bootstrap 2020-09-04 00:36:43 +01:00
Tom Hughes
21adea321b Convert password reset forms to use bootstrap 2020-09-04 00:36:43 +01:00
Tom Hughes
c11142d5c0 Convert logout form to use bootstrap 2020-09-03 23:52:59 +01:00
Tom Hughes
e33848091e Convert user confirmation forms to use bootstrap 2020-09-03 23:51:23 +01:00
Tom Hughes
434b18b8ef Convert make/remove friend forms to use bootstrap 2020-09-03 23:49:32 +01:00
Tom Hughes
c597ead529 Merge remote-tracking branch 'upstream/pull/2783' 2020-08-19 17:39:18 +01:00
Tom Hughes
5c551d475f Merge remote-tracking branch 'upstream/pull/2782' 2020-08-19 17:31:56 +01:00