Commit graph

87 commits

Author SHA1 Message Date
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
Tom Hughes
8e9a542482 Use the right variable this time... 2010-01-27 09:07:25 +00:00
Tom Hughes
2330a1a378 Specify the user when redirecting back to a diary entry after
hiding a comment.
2010-01-27 09:02:27 +00:00
Tom Hughes
314b734aa5 Introduce some caching for diary views. 2010-01-09 16:43:38 +00:00
Tom Hughes
57a05a40fc Make diary comment creation work again. 2009-11-15 11:00:54 +00:00
Tom Hughes
634565c5d3 Add support for logical deletion of diary entries and comments. 2009-11-14 15:57:08 +00:00
Tom Hughes
43d9b32012 Remove explicit specification of I18n.local as the locale in resource
lookups - it's the default anyway.
2009-08-18 20:21:25 +00:00
Štefan Baebler
803acea032 fixing interpolation error with per language rss feeds that was introduced in [16903] 2009-08-18 19:36:58 +00:00
Ævar Arnfjörð Bjarmason
127241cdff Make the diary RSS feed translatable 2009-08-07 01:03:42 +00:00
Tom Hughes
f5e14bcc48 Don't send a noification email if somebody comments on their own diary
entry. Fixes #2053.
2009-07-11 13:24:57 +00:00
Ævar Arnfjörð Bjarmason
be57524849 Add 'diary_entry.no_such_entry.title' for diary entries that don't exist 2009-06-23 00:17:20 +00:00
Thomas Wood
2fabbed189 Autoselect new diary entry language to that of last posted entry rather than user's default language.
(Closes #1967)
2009-06-20 18:27:03 +00:00
Tom Hughes
5475a9ec35 Revert r15900 for now. 2009-06-14 09:53:42 +00:00
Štefan Baebler
2b290f4994 cleanup 2009-06-14 07:27:24 +00:00
Štefan Baebler
61123eaeb4 Added localized language names with plugin from http://github.com/grosser/i18n_data/tree/master (fixes #1946)
Diary entries in same language linked (lists and rss)
2009-06-14 07:25:08 +00:00
Thomas Wood
5123163e92 Remove superfluous "language" from diary strings - it sounds weird (other option would be to change to "the {{language}} language") 2009-06-12 18:48:36 +00:00
Štefan Baebler
98b9ce8f97 diary entries (list and rss) for a given language.
TODO: language rss link, linking the localized lists
2009-06-12 06:34:18 +00:00
Tom Hughes
2e2f212472 Rename views to rails 2 style names. 2009-06-09 20:50:14 +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
cd48e2d1f7 Remove left over code from original diary language implementation that
was stopping editing from being able to change the language.
2009-06-02 08:56:49 +00:00
Tom Hughes
1be7bb8a04 Make a few more strings translatable in the diary entry controller
and tidy up the translations for some of the partials.
2009-06-02 08:13:41 +00:00
Shaun McDonald
f3bcdd85d7 Some more i18n html titles 2009-05-31 16:51:20 +00:00