Commit graph

108 commits

Author SHA1 Message Date
Tom Hughes
bb116b85df Allow third party images in user content 2017-11-23 22:39:05 +00: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
117f0e8226 Sanitize parameters for various paged views 2017-06-29 10:55:53 +01:00
Tom Hughes
ff97501ed0 Remove all use of the :text option to render
It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.
2017-06-02 19:12:05 +01:00
Tom Hughes
5b33f3f8e3 Fix rubocop warnings 2017-06-02 00:08:30 +01:00
Tom Hughes
92fe7a8506 Only create diary entries for POST requests 2017-02-09 21:07:18 +00:00
Tom Hughes
e17b89e89f Fix rubocop warnings 2016-10-20 22:35:51 +01:00
Mikel Maron
be40536440 merge upstream/master and resolve conflicts from https://github.com/openstreetmap/openstreetmap-website/pull/1318 2016-10-12 10:52:05 -04:00
Andy Allan
41e05f0929 Remove unnecessary controller references from the redirect hashes.
Rails redirect_to uses the current controller by default, so there
is no need to re-iterate this in the code when the redirect targets
the current controller.

The short-form is already used elsewhere, this just tidies up those
which were still using the long-form.
2016-10-12 14:32:49 +01:00
Mikel Maron
a32076abd6 fix rubocop warnings 2016-10-07 06:32:05 -04:00
Mikel Maron
e055eaf690 tests passing 2016-10-06 21:33:47 -04:00
Mikel Maron
3c01d2e80d more idiomatic models for diary entry subscriptions 2016-10-06 20:31:10 -04:00
Mikel Maron
44b08cc35d not api endpoints, moved to button, fixed notifier message, fixed tests 2016-10-03 22:20:04 -04:00
Mikel Maron
443080d7b0 WIP diary comment subscriptions 2016-10-03 15:04:22 -04:00
Tom Hughes
15b550182c Yet more tests... 2015-03-02 21:20:01 +00: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
360d68ea5c Replace deprecated deliver method with deliver_now 2015-01-11 12:53:06 +00:00
Tom Hughes
3a44d461b7 Fix bogus redirect on error 2013-10-15 18:18:49 +01:00
Tom Hughes
f0feca800d Replace attr_accessible with strong parameters 2013-09-21 11:35:46 +01:00
Tom Hughes
3880ac5de8 Replace :nothing => true with :text => ""
Using `:nothing => true` confusingly actually causes a single space
to be sent as the content by rails.
2013-07-19 11:14:55 +01:00
Tom Hughes
2dc7c505fd Remove remaining action cache usage and related infrastructure 2013-06-25 17:47:54 +01:00
Tom Hughes
369d5a0bfd Optimise database reads in DiaryEntry#list 2013-04-01 14:18:21 +01:00
Tom Hughes
4fd89f9f23 Improve selection logic in DiaryEntry#rss 2013-04-01 14:18:21 +01:00
Tom Hughes
703663c4a2 Add a test for commenting on diary entries 2013-02-03 15:50:09 +00:00
Tom Hughes
4c9a3d4803 Disable caching of pages with dynamic layout
Pages now feed back into the layout to set the content of the heading
block so we can't cache any page which has a layout as that would mean
the heading wouldn't appear when the cached page was used.
2013-01-14 22:30:03 +00:00
Saman Bemel-Benrud
a36f3558dd Site cleanup
I set out to do a quick and dirty typography overhaul to make things
more consistent and a bit cleaner, but I kept running into things I
didn't like, so this lead me down something of a rabbit hole of design
tweaks to the OSM site.

Goals here are to have better content hierarchy, better vertical
rhythm, more consistent UI, cleaner markup with less tables, all while
keeping the basics pretty much intact. There are a lot of things I
didn't touch even though they need to be updated (lots of tables where
stuff shouldn't be tables, mostly).

Basic overview of changes:

I added a new persistent header that helps segment pages. It's now
a lot easier to know what you're looking at. The header has a page
title, a description, plus a submenu of actions.

There is now a pattern of 20px/10px margins and padding for more
rhythm and breathing room throughout the site.

I know there are other problems here or things I've missed - would
love another set of eyes to look over this! I am still getting comfortable
working on the site - it's my first time ever digging into a ruby or rails
so I'm not familiar with the templating language yet.
2013-01-14 21:27:08 +00:00
Tom Hughes
367303f6d8 Move a chunk of non-markup ruby code from a view to the controller 2012-08-28 20:39:18 +01:00
Tom Hughes
fc7ac5d086 Don't show deleted comments in a user's diary comment list 2012-05-15 18:58:13 +01:00
Tom Hughes
58559d50da Fixed diary entry and comment hiding for mass assignment protection 2012-05-13 18:44:54 +01:00
Tom Hughes
311f7ddd6e Factor out common code for looking up users 2012-03-21 22:22:33 +00:00
Tom Hughes
a9824dbc2e Use one "no_such_user" view everywhere 2012-03-21 21:47:09 +00:00
Steve Singer
1944372af8 Add a view to show diary comments left by a user 2012-02-28 21:29:18 +00:00
Tom Hughes
3369743d6c Revert "Increase the size of the diary RSS feed temporarily"
This reverts commit ccd7882bcf.
2012-01-16 17:50:23 +00:00
Tom Hughes
ccd7882bcf Increase the size of the diary RSS feed temporarily 2012-01-14 13:36:49 +00:00
Tom Hughes
f7df396cf2 Don't cache user specific diary entry lists 2012-01-07 15:43:27 +00:00
Tom Hughes
c3f73a8028 No need to restrict friend's diary entries to public users 2012-01-07 11:54:07 +00:00
Mikel Maron
d878db0a9b Add some more social features
Add a view showing changesets by nearby users, and views showing
diary entries by friends and nearby users.
2012-01-07 11:54:07 +00:00
Tom Hughes
3227f40193 Make more use of named scopes 2011-11-14 09:42:51 +00:00
Tom Hughes
7f556f94f1 Temporary fix for postgres enums pending rails 3.0.4 2011-11-14 09:42:46 +00:00
Tom Hughes
226c41be69 Update ActiveRecord queries to use arel 2011-11-14 09:42:44 +00:00
Tom Hughes
2e2c95133b Use new ActionMail API to send emails 2011-11-14 09:42:41 +00:00
Tom Hughes
c9fa49c994 Update to rails 3 2011-11-14 09:42:40 +00:00
Tom Hughes
59a49a6ef5 Fix problems with database offline mode 2011-06-23 08:30:44 +01:00
Tom Hughes
f07819d81a Rework application configuration
Use a preinitializer to load the settings from application.yml so
that they are available as early as possible. All settings can also
be overridden using environment variables.

The ad-hoc settins in environment.rb are then moved to this new
system so we have one consistent location for settings.
2010-08-04 22:06:05 +01:00
Tom Hughes
f973bee52b Make database offline work in production 2010-06-15 10:40:47 +01:00
Tom Hughes
5a54630b57 Add support for suspended and confirmed users
Replace the existing "active" and "visible" with an enumerated status
that allows for extra cases. Currently we have "suspended" for users
who hve triggered the spam detector and "confirmed" for users that have
triggered the detector but have been confirmed as vald by an admin.
2010-05-06 17:18:34 +01:00
Tom Hughes
d907b40eab Improve page title for diary entries. Closes #2702. 2010-02-08 18:15:51 +00:00