Commit graph

97 commits

Author SHA1 Message Date
Tom Hughes
f5777a881f Don't cache the trace list for logged in users. 2010-01-11 00:16:21 +00:00
Tom Hughes
e29e49dc7c Add some caching for trace views. 2010-01-10 17:44:57 +00:00
Tom Hughes
e53b34b80a Make traces/mine redirect to the user's traces page instead of rendering
it itself. Also make sure the traces page for a user includes the upload
form if the requestor is logged in as that user.
2010-01-10 09:16:18 +00:00
Shaun McDonald
1df4ad819c Rather than just say public or private for each GPS trace in the list, instead state the new permission levels. Green colour means that it will be shown in the trace list to other users. Red means that other users won't see the trace in the list. Have added two new translations for the other trace permissions. 2009-12-31 00:10:10 +00:00
Tom Hughes
0f5646d7f0 Add ability to take GPX storage offline. 2009-12-12 13:06:56 +00:00
Tom Hughes
e23744bd8d Add :warning and :error flash messages which can be styled separately to
the existing :notice messages.

Also reviewd all existing flash messages and changed them to be errors or
warnings when appropriate and checked that those which are not followed by
a redirect are done as flash.now[] instead of flash[].
2009-11-01 13:07:46 +00:00
Tom Hughes
b8afd4fbf3 Fix comment typo. 2009-09-24 23:27:45 +00:00
Tom Hughes
2297dc9074 Wrap GPX API calls with the API error handler, and make sure the create
method throws on error so it can be trapped and reported. Closes #2310.
2009-09-24 23:15:35 +00:00
Tom Hughes
06a17b6bc6 Treat an explicit public=0 argument as meaning private. 2009-09-12 16:46:25 +00:00
Tom Hughes
543e8c5503 Fix backwards compatibility code to handle an old style public
attribute correctly. Closes #2242.
2009-08-31 23:28:51 +00:00
Tom Hughes
d227589a63 Merge oauth branch at r17138 to trunk. 2009-08-18 20:01:56 +00:00
Tom Hughes
9617ca2acc Identifiable traces should be trated as private in the trace list. 2009-08-13 17:59:38 +00:00
Tom Hughes
e8a2a15ea1 The "public" field no longer exists in gpx_files. 2009-08-13 17:57:14 +00:00
Tom Hughes
908a6ef409 Merge 16891:17044 from trunk. 2009-08-13 17:18:08 +00:00
Tom Hughes
565171486f Add extra visibility options for GPS traces, and enhance the API call
that returns trace data to return more information if the owner of the
trace has allowed it. Based on a patch from Matt Amos.
2009-08-13 17:06:11 +00:00
Tom Hughes
f4571eeb7c Revert r16046.
DO NOT COMMIT MAJOR ENHANCEMENTS TO TRUNK WITHOUT TALKING TO ME FIRST.
2009-06-23 02:48:38 +00:00
Ævar Arnfjörð Bjarmason
dfadcc797c Fixed up the <title>/<h2> mess in trace/edit and trace/view
* @title was never set on trace editing, and thus <h2></h2> was produced
 * Changed split 'trace.view.viewing_trace' into 'trace.view.title' and 'trace.view.heading'
 * Introduced corresponding 'trace.edit.title' and 'trace.edit.heading'
2009-06-22 23:43:53 +00:00
Matt Amos
b8f6dbd403 Adding initial version of the OAuth token authentication method. This adds basic OAuth support for registering apps, getting and revoking keys, etc... The tokens come with 6 separate permissions bits; read/write user preferences, write diaries, write API and read/write GPS traces. Needs more tests. 2009-06-22 16:54:37 +00:00
Ævar Arnfjörð Bjarmason
db51d7f3dd Added & cleaned up messages relating to a given user not existing
The following pages now have a <title> that can be set in localizations:

 * /user/USER_DOES_NOT_EXIST
 * /user/USER_DOES_NOT_EXIST/diary
 * /user/USER_DOES_NOT_EXIST/traces
 * /message/*/ID_DOES_NOT_EXIST

In addition I've cleaned up the i18n message keys of all the
''no_such_user.rhtml'' pages involved. They now all use
title/heading/body for the <title>, <h2> and <p> respectively. And the
message key {{user}} instead of {{name}}.
2009-06-06 13:15:53 +00:00
Tom Hughes
0f7301b64f Correct translation name. 2009-06-02 08:40:16 +00:00
Tom Hughes
95595ee7f0 Internationalise the trace controller. Fixes #1894. 2009-06-02 07:45:31 +00:00
Shaun McDonald
2875a2c4b3 more tranlations for validations. Bug fix for the missing translation of the gps upload 2009-06-01 18:09:24 +00:00
Tom Hughes
0e96027a20 Sort out storage and use of user preferred languages. 2009-05-31 14:55:45 +00:00
Shaun McDonald
035254c5fb Might be useful to set the locale everywhere we need the web, rather than just the diary entries. 2009-05-29 14:11:12 +00:00
Shaun McDonald
807070f818 Actually mark a trace as being public based on the saved preference, rather than simply ignoring the saved preference. 2009-05-12 15:29:27 +00:00
Tom Hughes
ab7ac69e68 Force selection to fail when no traces match the tag. 2009-04-21 21:54:44 +00:00
Tom Hughes
2201a7ff32 Don't generate an IN condition with an empty list. 2009-04-21 21:51:02 +00:00
Tom Hughes
ddba8eeff7 Add an expiry header to trace images. 2009-04-21 17:10:35 +00:00
Thomas Wood
e8c7543bdd Add condition for user not found in trace controller.
Closes #1710
2009-04-19 21:22:34 +00:00
Tom Hughes
5449cf4adc Merge 14394:14533 from trunk. 2009-04-16 21:11:12 +00:00
Tom Hughes
09fdee5493 Add a "database readonly" state that allows all writes to the database
to be suppressed.
2009-04-14 14:27:30 +00:00
Tom Hughes
1f8a68371a Merge 14059:14394 from trunk. 2009-04-08 13:53:09 +00:00
Matt Amos
afcb345014 Moved a bunch of time functions into UTC. Fixes bugs which we only see for 4 hours a year. 2009-03-29 01:31:04 +00:00
Tom Hughes
eff9fa3b00 Refactor the GPX upload to try and avoid the import daemon loading traces
which do not exist yet.
2009-03-20 00:08:53 +00:00
Thomas Wood
1522ed275c Set params to sane defaults if unset by client.
Reject creates with no file with 400, model validations will also reject with 400 (as was existing but broken behaviour)
Closes #1510
2009-01-23 19:14:21 +00:00
Thomas Wood
9bb9de0fbe Require auth on calls to /trace/create, and pass through to form if called without params. Adjust validations on traces to prevent dual error messages on description (validates_presence_of catches the empty string removed from length validation)
More changes to come for api_create
References #1510
2009-01-23 01:19:45 +00:00
Shaun McDonald
721dd9c27d resync from rails_port 11795:12304 2008-12-12 19:29:27 +00:00
Tom Hughes
9b1b6be371 Optimise lookup of traces with a given tag. 2008-12-12 15:17:14 +00:00
Shaun McDonald
55d511bf21 Remember whether the user set the public checkbox on GPX upload as a user preference. Closes #827 2008-11-18 20:22:09 +00:00
Tom Hughes
990dcedc4c Require the user to be logged in for those methods which make no
sense otherwise.
2008-11-18 17:23:40 +00:00
Tom Hughes
f77ce935a4 Fix syntax of status only renders. Closes #1345. 2008-11-18 17:19:37 +00:00
Dave Stubbs
67a50e848c more boolean correcting 2008-11-08 10:48:07 +00:00
Andy Allan
2700e5110f add fixme 2008-11-07 13:27:03 +00:00
Andy Allan
7058d836f7 use boolean flags when using boolean columns 2008-11-07 13:24:18 +00:00
Tom Hughes
fb997c0a76 Revert r11194 as it doesn't work as the trace_name member does return
the correct result until after the trace is saved.
2008-10-21 12:16:12 +00:00
Tom Hughes
b105304a1b Fix race condition adding traces. Closes #1201. 2008-10-13 23:27:49 +00:00
Tom Hughes
34189cf761 Add basic support for logically deleting a user. 2008-08-24 16:53:42 +00:00
Tom Hughes
5d5f72b927 More warning fixes. 2008-07-18 22:23:26 +00:00
Tom Hughes
2cf15b549e Add support for putting the site in an offline mode where it operates
without a database but with most features disabled.
2008-06-22 12:10:32 +00:00
Tom Hughes
74b6dabb7f Tidy up handling of unknown traces. 2008-05-06 16:57:40 +00:00