Commit graph

961 commits

Author SHA1 Message Date
Andy Allan
ae44879213 Merge branch 'master' into moderation 2018-01-21 11:20:19 +00:00
Tom Hughes
be86e4824f Convert various URLs to https 2018-01-08 20:18:21 +00:00
Andy Allan
e0faf68437 Remove new issue notifications for now
This can be re-implemented later.
2017-12-13 16:29:46 +00:00
Andy Allan
63992d83bd Store the report category. 2017-12-13 16:02:55 +00:00
Andy Allan
8dc8479e12 Re-enable issue reassigning. 2017-12-06 18:01:51 +00:00
Andy Allan
cbe707b33e Validate the assigned role, and remove the :type activrecord enum 2017-12-06 17:15:11 +00:00
Andy Allan
0df788d742 Rename 'issue_type' to 'assigned_role', set defaults in the model and test. 2017-12-06 17:15:11 +00:00
Tom Hughes
2c52c91b39 Make changeset#query preload users, tags and comments 2017-12-04 07:54:19 +00:00
Andy Allan
1956ab5913 Use a simple user_id for tables with one owning user
This is the standard way of naming in rails, and it avoids having
to tell rails which models are actually required.
2017-11-29 16:23:13 +00:00
Andy Allan
1d24228a3b Combine migrations into one
This makes it easier to review, rather than having a PR with migrations that
correct each other.
2017-11-29 16:13:32 +00:00
Andy Allan
2dd8f09395 Remove the reassign column from issue_comments
Reassigning is an effect of a controller action, not something that
should be stored in the database like this.
2017-11-29 16:05:12 +00:00
Andy Allan
fc0096289d Annotate models. 2017-11-29 12:34:04 +00:00
Andy Allan
effb1b7f41 Merge branch 'master' into moderation 2017-11-29 12:18:39 +00:00
Andy Allan
15b104f4ff Merge branch 'p' of https://github.com/jfirebaugh/openstreetmap-website into jfirebaugh-p
Refs #139
2017-11-22 10:47:18 +00:00
Tom Hughes
b6b9d543ac Fix rubocop warnings 2017-10-29 19:43:02 +00:00
Andy Allan
b2a8df0bd7 Add annotate gem and associated rake task. Annotate models. 2017-10-22 22:18:26 +01:00
Tom Hughes
8dae890a76 Fix rubocop warnings 2017-10-05 19:18:38 +01:00
Andy Allan
33c43ab0af Ensure that issue comments have associated issues and users. 2017-09-13 15:01:36 +01:00
Andy Allan
c00c515d9d Ensure report details are not blank. 2017-09-06 18:17:54 +01:00
Andy Allan
948fd8c8fa Use reports_count so that counter_cache works automatically. 2017-09-06 17:57:54 +01:00
Andy Allan
b4be5596f5 Rename xml processing methods with an update_ prefix
They behave differently from the other from_xml methods on other models.
2017-08-30 11:40:54 +01:00
Andy Allan
c647aa3d4d Refactor the from_xml methods to act on existing trace objects.
Setting the new tags with the = operator takes care of removing the
old ones, and is the same approach as taken by the tagstring= method.

Fixes #1600
2017-08-18 10:09:50 +01:00
Andy Allan
506c0b5f0d Set the reported_user in a callback
This avoids passing around the reported_user via forms. There was no
validation anywhere that the reported_user corresponded to the object
being reported. This approach removes those worries too.
2017-07-12 13:36:48 +01:00
Andy Allan
65e1dbb4a6 Rubocop autofixes. 2017-07-12 11:49:23 +01:00
Andy Allan
99df5f6179 Rename association to reported_user, for clarity 2017-07-12 11:44:05 +01:00
Andy Allan
dbd88d893f Merge branch 'master' into moderation 2017-07-12 10:16:11 +01:00
Andy Allan
396f2e28dd Rework coordinates to avoid scientific formatting of small numbers. Fixes #1509 2017-06-23 14:03:57 +01:00
Tom Hughes
fb4ea1a02a Add explicit primary key declaration for changeset subscriptions
This table has a composite primary key and although we don't really
rely on that at all rails 5.0 warns about itif you don't explcitly
declare it in order to trigger the CPK extension.
2017-06-06 22:42:25 +01:00
Tom Hughes
9b89d4eefe Remove conditions from delete_all
Passing conditions directory to delete_all is deprecated
in rails 5.0 so use a separate where instead.
2017-06-02 16:33:48 +01:00
Tom Hughes
5b33f3f8e3 Fix rubocop warnings 2017-06-02 00:08:30 +01:00
Andy Allan
4fb775d6d5 Format latitudes and longitudes as %7f in XML output
This matches the double formatting in XML from cgimap. Fixes #341.
2017-03-30 14:30:54 +01:00
Herve Saint-Amand
b69e8b5c42 Included greeting string in changeset_comment_notification email 2017-02-27 22:36:09 +00:00
Simon Poole
7f05783949 Make test for a "zero hour" block more robust 2017-02-18 17:05:36 +01:00
Simon Poole
823f6b4d36 Add functionality to return a specific message for zero hour blocks 2017-02-18 13:53:21 +01:00
Tom Hughes
f435fce007 Link GPX fixture files instead of stubbing 2017-02-05 17:26:31 +00:00
Tom Hughes
a28f264ad1 Fix rubocop warnings 2017-02-05 14:33:48 +00:00
Tom Hughes
c57d2b29fc Merge remote-tracking branch 'openstreetmap/pull/1401' 2017-02-05 13:50:07 +00:00
Tom Hughes
c8671c137a Update rubocop 2017-02-05 11:12:37 +00:00
Tom Hughes
7793cd27ab Merge remote-tracking branch 'openstreetmap/pull/1423' 2017-02-02 17:21:41 +00:00
Andy Allan
c55169659c Add a user_role factory
Naming the association in the model makes the relationship easier
to express in the factory.
2017-02-02 12:35:29 +00:00
Frederik Ramm
ad2b4fe12a Reduce maximum changeset size to 10k changes
Ten thousand changes ought to be enough for any normal mapping activity.

Automatic edits and imports are controlled by scripts anyway so it doesn't
make a difference to them as they just have to adapt the limit.

The reason for my suggestion is that large changesets are becoming
increasingly difficult to handle due to frequent timeouts when trying
to load and process them.

The changeset size limit is returned by the API in the "capabilities" request
so client software that honours that information will automatically pick up
the new limit.

Closes #1259
2017-01-31 18:15:42 +00:00
Herve Saint-Amand
e5152c3931 Move attach_project_logo to be its own before_action filter, as suggested 2017-01-16 21:21:55 +00:00
Herve Saint-Amand
1e19e80d0e Renamed @user_message_author to @author as suggested 2017-01-16 21:13:52 +00:00
Herve Saint-Amand
a0627ec0c6 Revert "Added a greeting to the changeset comment message"
This reverts commit 39c3fa427e.
2017-01-14 21:48:46 +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
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
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