Commit graph

1596 commits

Author SHA1 Message Date
Andy Allan
dfcecb0118 Remove the ObjectMetadata concern, since it's only used in tests now 2021-09-15 17:05:50 +01:00
Andy Allan
d07ce46929 Move the xml format test for old nodes to the controller test
This allows us to remove the model method
2021-09-15 17:05:34 +01:00
Andy Allan
76f1d7bc78 Use a builder to render changeset downloads 2021-09-15 16:33:04 +01:00
Tom Hughes
8a9dbc94c8 Update rubocop todo and fix new warnings 2021-09-14 20:40:36 +01:00
Tom Hughes
4389eff647 Improve testing of user details API responses 2021-08-24 18:41:07 +01:00
Andy Allan
6ab522b2b3 Convert account setting menu to tabs, and include on other pages
This makes it easier to navigate around these pages. Since each tab
corresponds to a given controller, this makes the selection of active
tabs straightforward.
2021-08-18 14:30:35 +01:00
Tom Hughes
08e2a06e41 Merge remote-tracking branch 'upstream/pull/3279' 2021-07-28 20:18:07 +01:00
Andy Allan
36f6d8d85d Fix redirect to terms path when not logged in
This was missed during #3147 since it wasn't covered by a test.
2021-07-28 16:36:13 +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
Andy Allan
95d406937e
Merge pull request #3268 from tomhughes/capitalisation
Improve capitalisation of page titles
2021-07-28 11:06:47 +01:00
Andy Allan
baee0b9a90 Enable test for showing flash message in the new language 2021-07-28 09:38:24 +01:00
Tom Hughes
abd98757b6 Improve capitalisation of page titles 2021-07-22 19:00:08 +01:00
Tom Hughes
f1935b1c57 Merge remote-tracking branch 'upstream/pull/3257' 2021-07-21 19:24:31 +01:00
Andy Allan
403c8941a6 Ensure that flash message is shown in the updated language 2021-07-21 18:58:47 +01:00
Josh Soref
8e951a8340 spelling: unknown
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-21 10:45:38 -04:00
Josh Soref
590f94f531 spelling: uniqueness
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-21 10:45:38 -04:00
Josh Soref
fc0aee74af spelling: success
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-21 10:45:38 -04:00
Josh Soref
7ff3d82c03 spelling: shouldn't
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-21 10:45:38 -04:00
Josh Soref
7c7a6b13cc spelling: nonexistent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-21 10:45:38 -04:00
Josh Soref
eee739356f spelling: modify
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-21 10:45:38 -04:00
Josh Soref
ff8e1b074a spelling: forbidden
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-21 10:45:38 -04:00
Andy Allan
37b03e47c6 Fix various code comments
These were found as part of #3233
2021-07-21 11:24:23 +01:00
Andy Allan
caf2e2a242 Move profile-related settings to their own form
Refs #3167
2021-07-14 17:45:19 +01:00
Andy Allan
2403630da8 Split user preferences into a separate page
Refs #3167
2021-07-14 17:40:20 +01:00
Tom Hughes
da546af22e Allow acls to match on parent domains 2021-07-06 10:13:33 +01:00
Tom Hughes
e4ce1c5f2f Check that the permission is non-zero
Fixes #3241
2021-07-01 16:35:29 +01:00
Tom Hughes
a32b751fed Remove some references to webmaster 2021-06-29 19:22:31 +01:00
Tom Hughes
d3c800fdb4 Fix new rubocop warnings 2021-06-29 18:29:00 +01:00
Tom Hughes
608aafbf14 Make /api/0.6/permissions work for OAuth 2 clients 2021-06-27 00:38:16 +01:00
Tom Hughes
8d76be71bb Merge remote-tracking branch 'upstream/pull/3177' 2021-06-24 08:43:18 +01:00
Andy Allan
40589960be Use paragraphs instead of line breaks, and avoid using html in translation strings 2021-06-23 20:11:19 +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
Tom Hughes
f6818bb2ed Avoid accidental locale changes in tests 2021-06-22 19:05:55 +01:00
Tom Hughes
63e4a89323 Fix new ruboop warnings 2021-06-22 18:34:15 +01:00
Tom Hughes
4a45092e27 Remove the Yahoo OpenID link as they no longer support OpenID 2021-06-17 22:33:05 +01:00
Tom Hughes
35d24fac88 Merge remote-tracking branch 'upstream/pull/3224' 2021-06-16 18:04:02 +01:00
Andy Allan
c8f0a81eb7 Rework sidebar to use padding on the sidebar_content div
This saves every header, list, paragraph etc having to sort out their own padding. The couple of instances where we want edge-to-edge can be acheived using the negative margin spacing utilities.

The padding is based on $spacer so that it can be adjusted automatically via bootstrap configuration.

This also means that we can remove many (mis-)uses of the browse-section class, which is only supposed to be for cases where there are multiple browse-sections in sequence (e.g. multiple nodes in the node history browse pages).
2021-06-16 15:45:58 +01:00
Andy Allan
408c883d24 Skip intermediate lengths when testing tag validity
It's really the upper and lower boundaries that we want to check,
and it's reasonable to assume all the intermediate values will work
fine if the boundary values are tested.

This also saves about 75% of the time taken and almost 85% of the
assertions when running all the model tests.
2021-06-16 09:53:57 +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
f064a18a16 Add tests for OAuth2 2021-05-18 12:05:33 +01:00
Tom Hughes
a71b8af4d1 Update to rails 6.1.3.2 2021-05-12 18:49:21 +01:00
Andy Allan
7158426ebb
Merge pull request #3169 from harry-wood/empty-lists
Display message when the there are no notes/comments to display
2021-04-28 10:36:09 +01:00
Tom Hughes
70d7d8d850 Fix some ruby 3 compatibility issues 2021-04-22 19:20:25 +01:00
Tom Hughes
914ec8723c Fix new rubocop warnings 2021-04-20 18:29:41 +01:00
Andy Allan
28af501924 Merge branch 'pull/3164' 2021-04-14 16:13:29 +01:00
Andy Allan
6bb18436a3 Add tests for routing and to ensure output format
This avoids the tests passing if the json output is an array of kv pairs,
instead of the desired hash of attributes.
2021-04-14 16:11:57 +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
Michal Migurski
a968c1b923 Added test for user prefs JSON response 2021-04-09 14:28:13 -07:00
Harry Wood
de8ee536b1 Display no notes message when empty
Display a 'No notes' message when there are no notes to display, rather than an empty table with pagination features.
2021-04-09 19:21:09 +01:00