Commit graph

45 commits

Author SHA1 Message Date
Andy Allan
dfa2fd7d3d Rename note to notes in i18n lookups
Enables lazy translation lookups for most cases. Additionally, rename
keys for notes.description.* to notes.comment.* to match partial
name.
2018-04-25 14:56:20 +08:00
Andy Allan
9f84c6f46e Use user_path links. Fixes #1785 2018-03-21 11:33:45 +08:00
Tom Hughes
fe1e28b4f4 Fix more parameter sanitisation issues and add tests 2017-06-29 20:52:57 +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
425f3f309b Use created at for RSS format with note#show
This matches other formats and is also what the tests expect.
2017-02-20 08:50:56 +00:00
Tom Hughes
34c473f503 Use only_path instead of setting an explicit host 2016-11-24 20:33:36 +00:00
Andy Allan
1e3a35f971 Add missing xmlns:dc for notes rss 2016-11-24 17:47:16 +00:00
Andy Allan
968447595b Use dc:creator for note RSS feeds
The author tag is reserved for email addresses
2016-10-29 17:14:56 +02:00
Andy Allan
38e12759ea Rubocop autofixes. 2016-09-07 11:07:42 +01:00
Markus Heidelberg
166dc76ae9 Make notes GPX valid and add useful official elements
The "creator" attribute is required and "extensions" is the correct
name of this element.

Validated with SAXCount from the xerces-c package:

$ SAXCount -v=always -n -s -f notes.gpx

Original error messages:

    Error at file /home/markus/notes.gpx, line 2, char 171
      Message: no declaration found for element 'gpx'

    Error at file /home/markus/notes.gpx, line 2, char 171
      Message: attribute 'version' is not declared for element 'gpx'

After adding the "xmlns" attribute:

    Error at file /home/markus/notes.gpx, line 2, char 213
      Message: missing required attribute 'creator'

    Error at file /home/markus/notes.gpx, line 18, char 14
      Message: no declaration found for element 'extension'

    Error at file /home/markus/notes.gpx, line 26, char 7
      Message: element 'extension' is not allowed for content model '(ele?,time?,magvar?,geoidheight?,name?,cmt?,desc?,src?,link*,sym?,type?,fix?,sat?,hdop?,vdop?,pdop?,ageofdgpsdata?,dgpsid?,extensions?)'

The current errors now are caused by the missing XML schema for the
extensions.

Also add the time, name and link elements.
2015-08-10 19:11:18 +01:00
Tom Hughes
a34935df9b Fix a missing translation 2015-07-23 14:23:23 +01:00
Tom Hughes
6886a149b2 Use correct translation for new notes in RSS feed 2015-07-23 13:50:28 +01:00
Tom Hughes
965fb0b3ae Revert "Fix off-by-one error in user notes list"
This reverts commit 706454ae35.
2014-07-26 10:34:57 +01:00
Toby Murray
706454ae35 Fix off-by-one error in user notes list 2014-07-24 22:30:36 +01:00
Kai Krueger
f3d5a215ad Return "action" of a note comment in the xml formatting to
This fixes #360
2013-07-29 21:23:47 +01:00
Tom Hughes
d6d366ad2b Report reopened notes properly in the RSS feed 2013-07-03 17:42:04 +01:00
Tom Hughes
5efe07f164 Use note.closed? in a consistent way 2013-06-11 18:26:54 +01:00
Tom Hughes
1d7719e01c Make note metadata consistent in the GPX output format 2013-06-11 18:23:52 +01:00
Tom Hughes
d74d4f8d19 Add a reopen API call for notes 2013-06-10 18:52:50 +01:00
Tom Hughes
80f48e812f Make user links in note API responses use the main server name 2013-05-28 22:26:46 +01:00
Tom Hughes
fa95768ae3 Use dc:creator instead of author for the author's name
Unfortunately the braindead RSS speciifcation requires author to
be an email address, so we have to use Dublin Core metadata to
report the author name instead.
2013-05-24 09:16:28 +01:00
Tom Hughes
692d57744f Add comment numbers to GUIDs to make them unique 2013-05-24 09:11:59 +01:00
Tom Hughes
42b3f961a6 Use CDATA for note descriptions in the RSS feed 2013-05-07 11:30:13 +01:00
Tom Hughes
621cb8a1ef Fix double escaping of date markup in note feed 2013-05-07 11:23:56 +01:00
Tom Hughes
5dda4196d5 Rework the generation of descriptions in the notes RSS feed 2013-04-26 19:34:32 +01:00
Tom Hughes
6e33cf0871 Fix exception with GPX and RSS notes#index when no notes are found 2013-04-24 19:17:13 +01:00
Tom Hughes
273ae4c729 Wrap XML notes responses in an <osm> wrapper 2013-04-24 18:18:20 +01:00
Tom Hughes
36bd2468e0 Fix exeption in GeoRSS formatting for notes 2013-04-24 10:20:35 +01:00
Tom Hughes
925bd812a2 Fix exception with XML notes#index when no notes are found 2013-04-24 09:41:08 +01:00
Tom Hughes
7f83692317 Improve date display in user notes list 2013-02-03 11:10:24 +00:00
Tom Hughes
ff73d12255 Make notes RSS feeds work 2013-02-02 17:48:56 +00:00
Tom Hughes
9d3b419aad Improve styling of the per-user notes list view 2013-02-02 14:29:45 +00:00
Tom Hughes
2ef58f47a2 Improve display of anonymous note comments 2013-02-02 13:04:27 +00:00
Tom Hughes
2ddd667910 Return note comments as formatted HTML as well as text 2012-12-03 14:50:55 +00:00
Tom Hughes
9477d7a65e Include a user URL in JSON and XML responses 2012-12-03 14:50:54 +00:00
Tom Hughes
ba5107ebb5 Remove the author_name field from notes 2012-12-03 14:50:54 +00:00
Tom Hughes
5fe5777a58 Move caching of reverse geocodes to describe_location 2012-12-01 18:18:10 +00:00
Kai Krueger
0a3aba7f89 Remove nearby_place from the note model
Instead of storing the auto-generated meta information nearby_place
in the database, just look up the information on the fly when needed
and cache it for performance.
2012-12-01 18:18:09 +00:00
Tom Hughes
129d505d91 Fix formatting of comments in the notes RSS feed 2012-11-20 21:01:59 +00:00
Tom Hughes
e54f9ed6af Replace htmlize call by rich text to_html call 2012-10-15 22:36:52 +01:00
Tom Hughes
91b3d1a83f Include useful URLs in note responses 2012-10-14 13:52:58 +01:00
Tom Hughes
28b4c624b8 Use named routes in note RSS builder 2012-10-14 13:52:58 +01:00
Tom Hughes
73b59c5859 Use EJS templates for notes 2012-10-14 10:17:17 +01:00
Tom Hughes
1f06652075 Add support for creating new notes 2012-09-23 15:05:03 +01:00
Tom Hughes
c9fb146608 Restructure notes URLs according to standard rails conventions 2012-03-10 17:04:57 +00:00