Tom Hughes
edddaab122
Use turbo for pagination
2024-08-20 14:44:10 +01:00
Anton Khorev
a969e08641
Use "visible" scope when finding traces
...
Allows to eliminate some :not_found branches.
2024-03-28 08:34:18 +03:00
Anton Khorev
180a61bcc3
Move trace pictures/icons into their own controllers
2024-03-27 13:25:28 +03:00
Anton Khorev
274a516bc6
Make "include" and "limit" keyword args of pagination method
2024-03-26 04:41:07 +03:00
Anton Khorev
addf99f191
Move common pagination code to mixin
2024-03-26 02:36:28 +03:00
Tom Hughes
33d292e981
Move scheduling of trace import and destruction to the model
2024-02-24 17:07:38 +00:00
Andy Allan
1700c23dd1
Prefer find_by() instead of where().first
...
These are very similar, differing only if we would expect multiple
results and the sorting is important. However, in all our cases
we're only expecting one result to be returned, and so find_by is
easier to read.
2023-10-04 17:53:58 +01:00
Anton Khorev
4ceebefefa
Move user lookup and error render to concerns
2023-08-21 17:29:55 +03:00
Tom Hughes
edfe0dde67
Disambiguate ID queries for tagged trace lists
2023-07-27 20:29:29 +01:00
Tom Hughes
c909b29c35
Replace page numbers with ID based selection for trace indexes
2023-07-23 19:28:37 +01:00
Tom Hughes
dc28f1dccc
Fix new rubocop warnings
2022-11-22 18:32:02 +00:00
Andy Allan
22946d703a
Enable the ActionOrder cop for remaining controllers
...
Where actions were reordered, the rails standard actions were
also moved to the top of each controller.
2022-11-02 11:06:00 +00:00
Tom Hughes
35cd8f80cc
Restore intended title for GPS trace view
2022-06-19 12:52:47 +01:00
Tom Hughes
b5f06e06c1
Fix rubocop Rails/TimeZone warnings
2022-03-01 22:55:10 +00:00
Tom Hughes
0410596908
Switch traces to use ActiveStorage
2021-12-16 18:45:31 +00:00
Andy Allan
3aa8292d6d
Drop the trace_use_job_queue option
...
This has been set as true by default, and in production, for many
years. I don't think there's much use in keeping the setting around
any longer.
2021-11-24 15:23:27 +00:00
Tobias Jordans
f4e998804d
Traces#index: Introduce tab navigation, fix tag-filter
...
- introduce bootstrap tabs to switch the views
- introduce `content_for :heading_class` to remove the padding below the bootstrap tabs
- update the rss-image to use a svg, adopted from https://icons.getbootstrap.com/icons/rss/ (without the outer border)
- move rss- and new-button away from the view-switching actions
- the `@tag` logic was broken. introduce new link to remove the tag-filter; the tabs keep the filter once given; use params[:tag] directly in the view
- use `&.` syntax nil-safety so we can remove `@display_name`
2021-06-16 15:55:55 +01:00
Tom Hughes
ce99bfd9ac
Remove some debug logging comitted by mistake
2020-07-07 10:37:39 +01:00
Tom Hughes
2def62ee19
Fix errors with GPX offline mode
2020-07-05 14:49:12 +01:00
Andy Allan
44c6fdc273
Use the conventional 'destroy' method name for destroying traces
2019-12-04 11:59:18 +01:00
Andy Allan
7410b59a50
Remove unused trace_optionals partial
...
Although the code to render the partial runs, `yield :optionals`
was removed from the site layout in 2013. So the code has been
ineffective since then.
2019-10-30 15:02:35 +01:00
Tom Hughes
9f57f60b87
Fix new rubocop warnings
2019-04-23 09:33:34 +01:00
Tom Hughes
141df02e67
Move status into the settings object
...
Only the very early boot code needs to look at the value
from the environment directly.
2019-03-17 11:15:34 +00:00
Tom Hughes
6600221fe3
Fix database offline mode
2019-03-17 11:15:34 +00:00
Andy Allan
d102c9aaf4
Move all settings to settings.yml
...
We leave the STATUS setting alone, since it's required before rails
boots. The test-specific settings now live in config/settings/test.yml
2019-03-13 18:06:23 +01:00
Andy Allan
5f59845575
Move the api trace methods into a separate controller under the api namespace
2019-02-28 17:12:28 +01:00
Andy Allan
581eca3bbe
Add a configuration flag for using the job queue to import traces
...
This will allow the code to be merged to master, even if osm.org
isn't ready to start using it yet.
2019-01-16 11:13:55 +01:00
Andy Allan
e59f1b6108
Sketch out how to use the jobs queue for trace insertion and deletion
...
Refs #1852
2019-01-16 10:49:11 +01:00
Andy Allan
414c4b2c36
Use CanCanCan for traces controller
2019-01-09 11:40:54 +01:00
Tom Hughes
64146b4f36
Fix Style/SafeNavigation rubocop warnings
2018-09-22 17:21:06 +01:00
Andy Allan
d0089f0ce8
Rename traces#list to traces#index
2018-08-29 17:58:37 +08:00
Andy Allan
16fef14b61
Rename traces#view to traces#show
2018-08-29 17:43:38 +08:00
Andy Allan
b745126b6e
Split out updating a trace into an update action
2018-08-29 17:31:12 +08:00
Tom Hughes
80a6e8da05
Tidy up control flow in trace creation
2018-08-29 08:34:38 +01:00
J Guthrie
07480996d7
Refactored and added new test
2018-07-26 16:27:28 +01:00
J Guthrie
a04b19a9ae
Return after rendering - stops further processing in controller
2018-07-25 02:30:59 +01:00
J Guthrie
4ae7bb4178
Switched if to unless to satisfy rubycop
2018-07-25 02:04:04 +01:00
J Guthrie
c299bd42ef
No trace description now redirects to /new
2018-07-25 01:49:51 +01:00
Andy Allan
57d3b3af55
Refactor trace creation pages
...
Split the trace creation into new and create methods, with standard resourceful routing. Provide a redirect for external requests to the old url.
2018-06-06 10:22:42 +08:00
Andy Allan
b446138aef
Rename trace_controller to traces_controller
2018-05-09 12:38:09 +08:00