Commit graph

87 commits

Author SHA1 Message Date
Andy Allan
78b9d92207 Prefer keyword arguments when method has optional boolean arguments 2020-11-12 11:24:44 +00:00
Tom Hughes
0e2a66e8de Fix new rubocop warnings 2020-08-06 18:42:16 +01:00
Andy Allan
dad36f2fca Use a lambda in order to pass parameters in before_actions
This avoid calling methods on a new instance of the controller, and
therefore allows these methods to be marked as private.

As a bonus, rubocop can now parse them and warn when they refer to
actions that don't exist in the controller.
2019-03-20 15:08:36 +01:00
Andy Allan
1e30edba53 Use CanCanCan for browse controller 2019-01-09 10:10:12 +01:00
Tom Hughes
45c464a69a Suppress changeset pagination for inactive users
Fixes #2024
2018-10-11 09:39:56 +01:00
Tom Hughes
64146b4f36 Fix Style/SafeNavigation rubocop warnings 2018-09-22 17:21:06 +01:00
Tom Hughes
d7b43c5f17 Fix syntax error with ruby 2.5 2018-04-28 17:12:27 +01:00
Andy Allan
6f89da05d1 Use current_user to represent the currently logged in user.
This is already used by the oauth plugin, and is a general rails convention.
2017-07-12 16:10:50 +01:00
Tom Hughes
33669daefb Do more preloading in browse controller methods
Fixes #1476
2017-03-07 09:10:24 +00:00
Tom Hughes
8fe1899596 Fix rubocop warnings 2016-01-19 09:51:24 +00:00
Tom Hughes
caa1a0128a Hide hidden notes and comments correctly in the data browser 2015-08-12 17:20:30 +01:00
Tom Hughes
dbe165bbb3 Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456 Cleanup trailing whitespace 2015-02-20 08:56:16 +00:00
Tom Hughes
a6c24e3e5b Query mode doesn't need the database 2014-12-14 00:18:46 +00:00
Tom Hughes
8598db3233 Tidy up changeset comment code 2014-10-23 21:24:51 +01:00
Łukasz Gurdek
14ac1babc2 Changeset discussions
Add support for commenting on changesets with RSS feeds and email
notification of comments to other commenters and people that have
chosen to subscribe to a changeset.
2014-10-23 21:24:51 +01:00
Tom Hughes
532d108536 Make sure all pages using the map layout call require_oauth 2013-11-24 15:29:38 +00:00
John Firebaugh
954261fb1c Restore prev/next changeset by user links 2013-11-22 12:17:27 -08:00
Aaron Lidman
f45437f836 Reorder changeset detail lists
Nodes, ways, relations -> Ways, relations, nodes
2013-11-18 16:24:25 -08:00
Aaron Lidman
6c64a74a46 Improve changeset detail display 2013-11-18 15:23:48 -08:00
John Firebaugh
641ce5b640 Render correct template 2013-11-12 15:39:25 -08:00
John Firebaugh
9dd230d0bc Refactor browse templates 2013-11-12 13:22:55 -08:00
Aaron Lidman
1ae7872ed8 Update title on pushState, closes #33 2013-11-08 16:10:08 -08:00
John Firebaugh
15ff7b9843 Remove unused 2013-11-06 13:05:51 -08:00
Aaron Lidman
9f3dace353 Improve pagination 2013-11-05 12:25:54 -08:00
John Firebaugh
a56d1036d5 pushState based navigation between map-based layouts 2013-10-13 14:46:08 -07:00
John Firebaugh
4557654ba6 Simplify layouting 2013-10-13 14:46:07 -07:00
Tom Hughes
eaefb3ea73 Improve consistency of selections in the browser controller 2013-09-30 08:45:19 +01:00
Tom Hughes
536d80c2b2 Fix typo 2013-09-30 08:35:34 +01:00
Tom Hughes
554a7c9d47 Convert some deprecated methods to modern arel syntax 2013-09-29 22:50:01 +01:00
Tom Hughes
6c51b3cc0a Replace deprecated finder methods 2013-09-21 11:35:46 +01:00
Tom Hughes
e47080338a Add a title to note browse pages 2013-05-20 17:46:43 +01:00
Tom Hughes
0037502426 Merge branch 'master' into notes
Conflicts:
	Gemfile.lock
	app/views/browse/_map.html.erb
	app/views/site/index.html.erb
2012-10-13 15:55:34 +01:00
John Firebaugh
60becd1050 Remove @midnode assign
It does not appear to be necessary and no other edit links
make use of it. SiteController#edit will calculate a precise
center coordinate.
2012-09-30 12:19:15 +01:00
Tom Hughes
4d91fe3dd9 Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile
	app/helpers/application_helper.rb
	app/views/site/index.html.erb
2012-09-20 16:01:24 +01:00
Tom Hughes
3d874a5d61 Use start.html.erb views instead of _sidebar.html.erb partials 2012-08-27 21:28:41 +01:00
John Firebaugh
17b23b0756 Extract browse.js static asset 2012-08-27 20:23:24 +01:00
John Firebaugh
2feff4244f Reduce interpolation in browse/start.js.erb 2012-08-27 18:00:48 +01:00
Tom Hughes
0d3a9ed9cb Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile.lock
	app/views/browse/_map.html.erb
	app/views/user/view.html.erb
	config/locales/en.yml
	config/openlayers.cfg
	db/structure.sql
	vendor/assets/openlayers/OpenLayers.js
2012-08-22 20:52:08 +01:00
Tom Hughes
652e94485f Use browser detection to decide how many features to show
Modern browsers are quite happy showing far more than 100 features in
the data browser, so increase the limit to 2000 by default, but keep it
restricted to 500 for IE8 and 100 for older IEs.
2012-06-05 12:59:13 +01:00
Tom Hughes
52e5fa6ad7 Merge branch 'master' into openstreetbugs
Conflicts:
	app/views/browse/_map.html.erb
	app/views/site/index.html.erb
	config/initializers/mime_types.rb
	config/routes.rb
	lib/map_boundary.rb
	lib/migrate.rb
	lib/osm.rb
	vendor/assets/openlayers/OpenLayers.js
2012-01-05 20:15:53 +00:00
Tom Hughes
8ae5d94b2f Update some more queries to use AREL in place of deprecated methods 2011-11-14 09:42:51 +00:00
Tom Hughes
e3b8b89330 Mass rename of "bugs" as "notes" for increased user friendliness 2011-05-21 17:22:31 +01:00
Kai Krueger
001ff5764b Merge branch 'master' into openstreetbugs2 2011-04-19 22:00:30 -06:00
Tom Hughes
7f955a4aca Don't show user navigation links for non-public users
The changeset browser pages should not show the per-user navigation links
for changesets made by users that have not made their edits public.
2010-11-23 09:30:22 +00:00
Tom Hughes
50224b473b Merge branch 'master' into openstreetbugs
Conflicts:
	app/controllers/browse_controller.rb
2010-06-07 22:26:33 +01:00
Tom Hughes
cf682f49b3 Add a timeout to the change list pages 2010-05-21 20:21:41 +01:00
Tom Hughes
acbc99ac16 Merge branch 'master' into openstreetbugs 2010-04-19 21:30:42 +01:00