Commit graph

65 commits

Author SHA1 Message Date
Tom Hughes
f70edc02f0 Return the "large" image from the user details API call
Closes #1923
2018-07-09 20:26:37 +01:00
Tom Hughes
98de681e47 Update to rails 5.2.0 2018-06-19 00:16:24 +01:00
Tom Hughes
f7a35c5895 Fix new rubocop warnings 2018-06-18 09:00:49 +01:00
David Abián
ed1f441ef3 Concept URIs for Wikidata entities
Wikidata entities should be linked using concept URIs, which are
permanent. This is the right way of linking web resources according
to the Linked Data principles.

Closes #1884
2018-05-28 13:02:47 +01:00
Andy Allan
e1c62f1bf2 Remove if_user and similar methods
Rather than hiding features based on CSS, just avoid including them
in the output. Fixes #1862
2018-05-16 13:05:20 +08:00
Štefan Baebler
36a382bb43 Added support for 2 more secondary wikidata tag links
Listed on in https://wiki.openstreetmap.org/wiki/Key:wikidata :
* name:etymology:wikidata
* network:wikidata
2018-03-05 08:38:50 +00:00
Tom Hughes
be86e4824f Convert various URLs to https 2018-01-08 20:18:21 +00:00
Andy Allan
cb87f02642 Merge branch 'pull/843' into titles 2017-11-22 14:42:16 +00:00
Tom Hughes
b6b9d543ac Fix rubocop warnings 2017-10-29 19:43:02 +00:00
Tom Hughes
8379b65174 Improve user_image_url test
Use a user that actually has an image and updated the expect
output to match that.
2017-10-09 19:10:32 +01:00
Tom Hughes
8dae890a76 Fix rubocop warnings 2017-10-05 19:18:38 +01:00
Tom Hughes
2c9c427587 Convert @user to current_user in helpers 2017-07-27 19:27:17 +01:00
Tom Hughes
87a7829eb8 Add some tests for the user helper 2017-07-06 19:11:21 +01:00
Tom Hughes
5b33f3f8e3 Fix rubocop warnings 2017-06-02 00:08:30 +01:00
Andy Allan
86822ea225 Remove remaining references to fixtures. 2017-06-01 11:00:50 +01:00
Andy Allan
17e9bcd2d4 Use factories for nodes in browse_helper tests. 2017-03-30 13:19:24 +01:00
Andy Allan
88ca1f9ed8 Rework the changeset helper tests to use factories. 2017-03-22 11:42:29 +00:00
Tom Hughes
47a5d2f37d Add some whitespace 2017-03-10 15:34:34 +00:00
Andy Allan
5de04a8cc2 Use user factory for application_helper tests. 2017-03-10 10:53:00 +00:00
Andy Allan
5ae96d6cb7 Use user factory for note_helper tests. 2017-03-10 10:33:59 +00:00
Andy Allan
8b9ad9bf4b Use user factory for user_roles_helper test 2017-03-09 17:12:11 +00:00
Tom Hughes
9b52542e52 Use simple string matches for user_blocks_helper tests
Testing against the translations is not something we do anywhere
else is and is dangerously close to testing the helper against
itself which is a bit pointless.
2017-02-19 11:50:01 +00:00
Tom Hughes
9c926c6c71 Use the factory to create user blocks 2017-02-19 11:42:38 +00:00
Simon Poole
325cd12c24 Make rupocop happy and correct placement of include 2017-02-19 12:35:02 +01:00
Simon Poole
455e906afa Improve wording and add test 2017-02-19 11:59:34 +01:00
Tom Hughes
970e1a99d7 Merge remote-tracking branch 'openstreetmap/pull/1367' 2016-12-18 16:29:33 +00:00
Tom Hughes
c8f26592a7 Fix rubocop warnings 2016-12-02 22:01:40 +00:00
Andy Allan
3026af170a Replace fixtures with factory for node_tags 2016-10-30 18:28:01 +01:00
Andy Allan
acb7f44069 Replace fixtures with a factory for old_node_tags
Also includes a slight simplification of the old_node_tags tests.
2016-10-30 15:36:33 +01:00
Tom Hughes
224252fd83 Add test for formatting of multi-value wikidata links 2016-08-16 19:27:40 +01:00
Florian Schäfer
3251cdf5d6 Added fixes for rubocop complaints 2016-07-14 15:22:52 +02:00
Florian M. Schäfer
10cde3bb92 Link the prefixed wikidata-tags to wikidata.org
With this commit, the prefixed wikidata-tags get linked to the
corresponding wikidata.org-page in the current interface-language.

Multiple semicolon-separated wikidata-IDs are shown as multiple
semicolon-separated links to wikidata.

This commit contains also some tests for those links.
2016-07-14 15:22:52 +02:00
Simon Legner
6f144e8b7d Show ref of object when no name is present 2016-03-09 18:47:54 +00:00
Aditya Prakash
80c46f54d4 Create new translation string for deleted user 2016-02-15 22:37:54 +05:30
Aditya Prakash
341f6cd9fe Do not hyperlink profiles of deleted users 2016-02-15 20:47:53 +05:30
Tom Hughes
03356be588 Use correct title in og:title for pages with no title
Fixes #1098
2015-12-07 15:54:06 +00:00
Holger Jeromin
37a4fc6dd1 Add srcset to img tags inside picture elements
Some browsers (in particular Safari on iOS) don't support picture
yet but do support srcset on the img tag.
2015-09-15 08:48:50 +01:00
Tom Hughes
d377e8b4f2 Use picture elements to render some more graphics as SVG 2015-09-13 22:42:12 +01:00
Tom Hughes
ca213b873f More improvements to mediawiki fragment escaping
It turns out that the PHP urlencode encodes more characters than
the ruby URI.encode does by default, so specify our own characters
to encode based on http://php.net/manual/en/function.urlencode.php
with the extra exclusion of colon, which the mediawiki code reverses
after the encoding is done.

Fixes #967
2015-05-15 15:34:12 +01:00
Tom Hughes
b40353b9b0 Escape fragment identifiers in wikipedia URLs
Fixes #967
2015-05-14 20:34:25 +01:00
Tom Hughes
2af0840ff3 Fix style issues found by new rubocop version 2015-04-14 09:38:24 +01:00
Tom Hughes
e2aef40437 URI encode the X-Page-Title header
Browsers's are inconsistent in how they interpret the encoding
of a response header in an XHR request, so URI encode it so that
it simple ASCII we can then decode it again in the browser.
2015-03-17 18:49:39 +00:00
Tom Hughes
5ab7591d9c Reset locale after tests which change it finish 2015-02-28 07:38:12 +00:00
Tom Hughes
d4d1527a92 Fix rubocop warnings 2015-02-27 07:08:55 +00:00
Tom Hughes
f04211b172 Improve test coverage 2015-02-27 00:40:37 +00:00
Tom Hughes
8e404f3a46 Fix some more rubocop style issues 2015-02-20 20:39:52 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
baf10cd392 Fix rubocop lint issues 2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456 Cleanup trailing whitespace 2015-02-20 08:56:16 +00:00