Commit graph

53 commits

Author SHA1 Message Date
Tom Hughes
2c5e981684 Fix erblint warnings 2021-06-05 07:40:55 +01:00
Tom Hughes
0e78061cdb Merge remote-tracking branch 'upstream/pull/3029' 2021-04-29 19:42:51 +01:00
Harry Wood
95d682119a Display no diary comments message when empty
Display a 'No diary comments' message when there are no diary comments to display, rather than an empty table.
2021-04-10 00:47:20 +01:00
Tom Hughes
01b84a8107 Merge remote-tracking branch 'upstream/pull/3125' 2021-03-10 14:55:58 +00:00
Andy Allan
38ad8fbc36 Use login_path instead of explicit controller and actions
This makes future refactoring easier.
2021-03-10 14:31:55 +00:00
Andy Allan
926576881f Remove final uses of the deemphasize class 2021-03-03 15:51:11 +00:00
Andy Allan
8e02c98c3f Refactor diary comment form to use bootstrap 2021-01-20 15:38:10 +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
b5188cae08 Remove link_to_if since it's in a clause with the same condition 2021-01-06 15:24:50 +00: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
Tucker Chapman
c274d22fd6 Update translate string and only show if different from creation time 2020-11-26 22:04:54 -05:00
Tucker Chapman
f4239f8fc5 Add last updated date to diary entry page 2020-11-17 20:33:27 -05:00
Andy Allan
613b748c55 Avoid lego translations for coordinates
Use the i18n system for joining coordinate values together, while
avoiding making any changes or standardisation involving the exact
symbol used in each situation.

Refs #2732
2020-08-19 16:43:16 +02:00
Tom Hughes
c24c2e481c Merge remote-tracking branch 'upstream/pull/2667' 2020-08-05 21:50:08 +01:00
Andy Allan
1977e66ace Use bootstrap text-muted in place of custom deemphasze class
This avoids changing anything related to forms, since they will be
switched over to bootstrap separately.
2020-07-08 18:30:15 +02:00
Andy Allan
627f2493fa Refactor away from global form control styling
This enables forms to be converted one-by-one to bootstrap. Without this
refactoring, these global styles interfere with form control styling from
bootstrap.

The rearrangement of the search and directions styling is to solve CSS selector specitivity issues.
2020-07-01 17:23:02 +02:00
Tom Hughes
a13b40ace9 Fix new erblint warnings 2020-06-11 19:44:22 +01:00
François de Metz
2ea79e21a0
Add link to my diary in the diary index. 2020-05-12 11:37:43 +02:00
François de Metz
43385325a8
Refactor the link to create a new entry diary. 2020-05-12 11:27:08 +02:00
Andy Allan
b8c1bbb4f8 Remove unnecessary h() calls on model attributes
These were necessary in the rails 2.x era, but not now.
2020-03-18 14:33:30 +01:00
Andy Allan
5fdada204c Use bootstrap table striping to replace hand-cycled table stripes
This cuts down on the complexity of having to use the `cycle` function
and makes the templates easier to read. CSS-based striping has been
around for many years.

The CSS is in order to keep our custom colour for striped tables.
2020-03-18 12:14:24 +01:00
Andy Allan
f885cfe0f5 Rename form-row to standard-form-row to avoid clashing with a bootstrap class 2020-01-15 17:16:11 +01:00
Andy Allan
0a0ff5e7d6 Remove extra div wrappings from list items
These are unnecessary, and also prevent the secondary-actions vertical
border from appearing.
2020-01-10 15:53:42 +01:00
Andy Allan
bff3676d93 Avoid double-escaping display names when sent through the translation system
They are escaped properly without the h() call, and doing that just double-escapes them
2020-01-08 19:07:18 +01:00
Andy Allan
dfedf85b6c Use _html suffix to avoid using raw when displaying translated strings
This is safer than raw, since any user input is still escaped.
2019-12-20 10:29:07 +01:00
Andy Allan
13f0591605 Wrap table header rows in thead 2019-12-11 17:22:23 +01:00
Tom Hughes
936967d0cb Allow administrators to see deleted diary comments 2019-10-17 12:16:28 +01:00
Andy Allan
a7092491b0
Merge pull request #2266 from systemed/patch-2
Add user_<uid> class to diary entry div
2019-08-28 15:20:21 +02:00
Tom Hughes
f280dcb2d7 Merge remote-tracking branch 'upstream/pull/2278' 2019-06-26 13:36:44 +01:00
Andy Allan
3914050fcc Simplify partial rendering when the partial is named after the model 2019-06-26 14:13:09 +02:00
Andy Allan
df560bd71d Use the distance_in_words_ago scope for diary comments pages
Refs #2255
2019-06-19 18:04:08 +02:00
Tom Hughes
31edc7dff6 Merge remote-tracking branch 'upstream/pull/2226' 2019-06-18 21:10:07 +01:00
Richard Fairhurst
946deebf4c
Add user_<uid> class to diary entry div 2019-06-17 14:02:52 +01:00
Andy Allan
5450bade1a Use built-in form sumbit translation keys for diary comments
Also use a diary comment object as the basis for the form
2019-06-12 16:20:29 +02:00
Tom Hughes
63186dc161 Fix erblint warnings 2019-06-06 18:20:21 +01:00
Andy Allan
9e158a5d39 Show all diary comments to administrators 2019-06-06 16:03:42 +02:00
Andy Allan
fdffd22cca Allow admins to unhide diary comments, if they wish 2019-06-06 16:03:42 +02:00
Andy Allan
49fc17c6b6 Show deleted diary entries to administrators, if the user isn't also deleted
This will allow administrators to review diary entry deletions from non-spam users.
2019-06-06 15:59:47 +02:00
Andy Allan
f2f3fbb1f1 Allow administrators to unhide diary entries, if they wish 2019-06-06 15:59:47 +02:00
Andy Allan
9431b471a7 rubocop and erblint fixes 2019-05-29 17:09:51 +02:00
Andy Allan
1b1d90a0f9 Refactor diary entry form
This uses the built-in helpers for naming form elements, rather than
having to override with specific i18n labels. It also changes the label
to 'Update', and capitalizes the title on the edit page.
2019-05-29 16:09:14 +02:00
Andy Allan
b7893df84e Refactor diary entries to use create and update methods
This brings it slightly more into line with resourceful routing.
2019-05-29 15:37:23 +02:00
Andy Allan
2142ff02c2 Allow moderators to hide diary entries and comments 2019-05-15 13:40:15 +02:00
Tom Hughes
7ce40eeb38 erblint: use consistent spacing in HTML tags 2019-03-28 00:30:48 +00:00
Tom Hughes
ecd81eadbe erblint: use parentheses for nested function calls 2019-03-27 18:55:48 +00:00
Tom Hughes
3af16f6337 erblint: fix remaining single quoted strings 2019-03-27 16:15:19 +00:00