Commit graph

7506 commits

Author SHA1 Message Date
Herve Saint-Amand
c94213847b Simplified the partial layout
Rather than wrap the body in a :body block, just make it the default, unnamed block, which keeps the markup more lightweight.
2017-01-13 22:43:23 +00:00
Herve Saint-Amand
75f96fcc9a Logo was being attached twice on changeset comment notifications 2017-01-13 21:45:52 +00:00
Herve Saint-Amand
7ef57b2fe8 Dressed up note comment messages 2017-01-12 23:02:57 +00:00
Herve Saint-Amand
235e77fc26 Dressed up lost password mail 2017-01-12 22:30:31 +00:00
Herve Saint-Amand
6d1c10afbc Dressed up gpx notification mails 2017-01-12 22:28:09 +00:00
Herve Saint-Amand
22f7c1f721 Dressed up friend_notification mail 2017-01-12 22:11:23 +00:00
Herve Saint-Amand
39c3fa427e Added a greeting to the changeset comment message
The greeting includes the recipient's user name (as for the message notification mail), which should increase the recipient's trust that the message isn't spam. Greetings were reused from each language's respective locale flie.
2017-01-12 21:52:17 +00:00
Herve Saint-Amand
e59d6c567b Rubocop finds 'return' statements redundant 2017-01-11 23:26:56 +00:00
Herve Saint-Amand
0449024ca0 Modify tests to search only text parts
The tests assumed that every part in the multipart emails that we send were either plain text or HTML. Now we have image attachments, against whose contents the tests were still trying to match regexes. The tests have been modified to only run regexes on the text parts of the mails.
2017-01-11 23:17:24 +00:00
Herve Saint-Amand
31778fd155 Removed unbalanced tag HTML tag 2017-01-11 22:03:00 +00:00
Herve Saint-Amand
3aa69ffbdd Dressed up a few more messages.
email_confirm, message_notification and signup_confirm now use the new templates. This fixes some, but not all, of the currently broken tests.
2017-01-09 23:42:43 +00:00
Herve Saint-Amand
417176f868 Moved message table HTMl to a partial template
Several notifications are about a message having been sent from one user to another via OSM. I've moved the code for the HTML table that holds the actual user message, with the avatar and the body text, to its own partial template, so that it can be reused. I've updated a second notifier message to the new template, diary_comment_notification.
2017-01-08 22:09:10 +00:00
Herve Saint-Amand
479a4bd0d7 First steps towards using layouts
Since all HTML mails will presumably share the same overall layout, and the markup is fairly dense, it makes sense to use Rails layouts to share the structure across mail templates. This commit moves the core structure of the HTML mail to a layout. It will need to be further refined so that notifications that involve a text message sent by another user can share the avatar-and-message-text structure.
2017-01-06 22:37:28 +00:00
Herve Saint-Amand
ac081305f2 Remove HTML markup from locale file
Rather than including HTML markup in the locale file (which also has the inconvenience of requiring both a plain-text and an HTML duplicate of the same string), move the markup to the template. Also added a helper to reduce clutter in the template slightly.
2017-01-03 22:38:58 +00:00
Herve Saint-Amand
beaa85e21c More compact image paths
Make the file paths to image assets more compact. I investigated using `image_path` but could only get it to return the path for a public URL, which is different and also includes the asset pipeline digest.
2017-01-02 23:48:49 +00:00
Herve Saint-Amand
ab9aaf7e97 Proper way to get path to small avatar
Rather than performing perilous string substitution on paths, just use the built-in way to select the small version of the avatar image file.
2017-01-02 21:35:59 +00:00
Herve Saint-Amand
7a4e13ecad Fixed quotes
Replaced single quotes with double quotes, to comply with rubocop rules.
2017-01-01 23:39:42 +00:00
Herve Saint-Amand
20a74fcbf1 Remove unused variable 2017-01-01 22:39:07 +00:00
Herve Saint-Amand
b5fd9f5fbe Use parameterised server root URL rather than hardcoded 2017-01-01 22:35:59 +00:00
Herve Saint-Amand
1d86379a5c Remove unused import 2017-01-01 22:33:22 +00:00
Herve Saint-Amand
20bd72d9e9 Move localised text to locale file
Moved a string of English text that will require translation from the HTML template to the locale I18N file.
2017-01-01 22:30:41 +00:00
Herve Saint-Amand
b5ef2be021 Better loading of attached images
Got rid of that big ugly base64 blob which was only a temporary crutch anyway. Added a png file instead. Use File.read rather than File.open for a 66% reduction in verbosity.
2017-01-01 22:11:56 +00:00
Herve Saint-Amand
5f663b765a Tweaked cell padding
Tweaked cell padding to align the top of the avatar and of the message text a bit better.
2016-12-31 00:14:24 +00:00
Herve Saint-Amand
94062a17b3 Cleaned up HTML
Removed some cargo-cult HTML attributes and CSS. Styling HTML for email clients is trickier than for browsers, I'm trying to keep the code as succinct but also as compatible as possible.
2016-12-30 23:45:32 +00:00
Herve Saint-Amand
1f0f7ba621 avatar inline attachment; text alignment 2016-12-29 23:37:39 +00:00
Herve Saint-Amand
689769cada avatar inline attachment 2016-12-29 23:37:22 +00:00
Herve Saint-Amand
45e90cfd24 reverting erroneous deletion in previous commit 2016-12-29 21:58:02 +00:00
Herve Saint-Amand
e6d19586df intial commit, for 'en' locale only, for changeset_comment_notification only, doesn't load images properly yet 2016-12-29 21:54:46 +00:00
Tom Hughes
442994d46d Add directions for straight on and slight left/right at roundabouts 2016-12-29 19:42:00 +00:00
Tom Hughes
25a5012296 Add directions for left/right turn at a roundabout 2016-12-29 19:27:14 +00:00
Niklas Laxström
f6ba70a852 Localisation updates from https://translatewiki.net. 2016-12-29 08:41:09 +01:00
Bryan Housel
245c49b499 Update to iD v2.0.2 2016-12-22 10:25:58 -05:00
Niklas Laxström
650029ac81 Localisation updates from https://translatewiki.net. 2016-12-22 07:49:25 +01:00
Tom Hughes
7b3aba29ff Use meta.wikimedia.org for wikimedia authentication 2016-12-21 20:50:15 +00:00
Tom Hughes
109e69efc1 Merge remote-tracking branch 'openstreetmap/pull/1395' 2016-12-21 11:55:19 +00:00
Andy Allan
1bea49103f Update OWG policy links. 2016-12-21 11:44:57 +00:00
Tom Hughes
69b967c9ff Add support for Wikimedia authentication
Closes #1146
2016-12-20 22:32:25 +00:00
Niklas Laxström
12964ae1e4 Localisation updates from https://translatewiki.net. 2016-12-19 07:50:54 +01:00
Tom Hughes
9badc45929 Load api fixtures in tag model tests
We still need them so we have the object to attach tags to.
2016-12-18 17:00:52 +00:00
Tom Hughes
0da97d2d3c Get rid of hardwired counts in assertions 2016-12-18 16:43:58 +00:00
Tom Hughes
970e1a99d7 Merge remote-tracking branch 'openstreetmap/pull/1367' 2016-12-18 16:29:33 +00:00
Simon Poole
f75e41eac3 Fix misleading wording
We can't provide a free unlimited API for any third-party, not just developers. The change should further make translations less bumpy.
2016-12-17 14:36:23 +01:00
Paul Norman
208e24d398 INSTALL.md grammar 2016-12-16 20:58:41 -08:00
Niklas Laxström
2898dbed23 Localisation updates from https://translatewiki.net. 2016-12-15 07:47:28 +01:00
Siebrand Mazeland
b1460f2af9 Localisation updates from https://translatewiki.net. 2016-12-06 13:32:51 +01:00
Tom Hughes
bcba0e1129 Don't collapse spaces in tag keys and values
Fixes #1386
2016-12-06 12:08:23 +00:00
Tom Hughes
b9b255fa65 Work around upcoming minitest insanity
Minitest 6 will not allow assert_equal to compare for equality
with nil and minitest 5 has already started warning about it.

That's fine if you're comparing with a nil constant, but if you're
comparing with an expression that is sometimes nil and sometimes
not nil it's an absolute pain in the rear end.
2016-12-02 22:29:44 +00:00
Tom Hughes
c8f26592a7 Fix rubocop warnings 2016-12-02 22:01:40 +00:00
Tom Hughes
0e6d4f18da Update bundle 2016-12-02 21:54:51 +00:00
Tom Hughes
c129a8eec5 Simplify monkey patch
The log method has grown new arguments which we weren't passing
on, but fortunately the exception translation is now delegated to
another method so we can patch that instead.
2016-12-02 09:42:05 +00:00