Commit graph

41 commits

Author SHA1 Message Date
Tom Hughes
9d35062ba3 Add a "friendly" date/time format and use it whenever we are printing
dates and times on the web site.

Also try and improve formatting of message pages a but, and include the
image of the recipient when viewing a sent message.
2010-02-28 16:57:22 +00:00
Tom Hughes
b90567e197 Tidy up error handling in the message controller, and make it redirect to
the login page if you are logged in as the wrong user. Closes #1569.
2010-02-28 15:13:06 +00:00
Tom Hughes
3851a672e2 Ajaxify the mark read/unread function for messages so it doesn't
reload the whole page each time.
2010-02-26 16:35:36 +00:00
Ævar Arnfjörð Bjarmason
2dab83d57b use {{count}} instead of {{sent_count}} so rails plural forms will kick in 2009-10-02 10:41:47 +00:00
Ævar Arnfjörð Bjarmason
2118dd06af Link to username in "Send message to" message 2009-09-14 19:32:29 +00:00
Tom Hughes
581c243e0e Allow messages to be deleted from the outbox as well as the inbox. 2009-07-23 17:41:50 +00:00
Tom Hughes
f3bf0c8b14 Add the ability for a recipient to (logically) delete a message from
their INBOX so they no longer see it.
2009-07-23 15:22:44 +00:00
Tom Hughes
0d97737a7d Prevent message date/time from wrapping. 2009-07-23 15:07:26 +00:00
Tom Hughes
502dc65e95 Remove surplus whitespace. 2009-07-23 15:05:44 +00:00
Ævar Arnfjörð Bjarmason
2153fb6efd Fixed a bug in how fields in /message/new were being pre-filled out.
When someone went to /message/new/:user the "Subject" are would be
pre-filled out with t('message.new.title'). The problem was that the
@title template variable was being used for two purposes, to set the
HTML <title> AND to pre-fill out the subject.

We don't always want these two to be the same, but sometimes we
do. E.g. when someone replies to a diary entry and visits
/message/new/:user?title=Foo we want Foo in the <title> and in the
pre-filled out Subject, and the same goes for replying to a message.

So I've split up the @title variable into @title and @subject.
2009-07-12 16:01:49 +00:00
Thomas Wood
98a86836d2 Commit avar's patch (+ fix for user not found) to change message sending URL to be by user name rather than id.
(Closes #1920)
2009-06-19 22:33:16 +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
Andy Allan
272d73e9a7 i18n for messages 2009-05-31 15:37:18 +00:00
Shaun McDonald
2e41c35479 Adding the ability to see the min/max lat/lon for a changeset in the data browser. Adding file for the nice message that should show when a user is missing in the message controller. 2008-12-08 15:30:19 +00:00
Shaun McDonald
1a7ab3570c Deal with active record not found exceptions when creating message. Some tidying of html. For some reason in rails 2.1.2 having a comment at the end of a line, in the view, means that the closing tag needs to be on the next line. 2008-12-03 12:56:02 +00:00
Tom Hughes
e62eacd8d3 Remove bogus action attribute from the submit button - it should have
no effect as there is no such attribute defined, but Opera seems to
decide that it should post the form to that URL instead of the one
give on the form element.
2008-05-15 09:34:45 +00:00
Tom Hughes
895eb829c9 Backout message deletion functionality as it has unfortunate side effects
as it also removes the message from the sender's outbox.
2008-05-06 16:35:24 +00:00
Tom Hughes
a47fcb0857 Fix replying to diary comments, and tidy a few things up. 2008-05-05 23:01:05 +00:00
Steve Coast
ee1707a4a7 nicer reply messages, bug 529 2008-05-03 14:02:53 +00:00
Steve Coast
ee6165bf9b ability to delete messages 2008-05-03 13:25:34 +00:00
Tom Hughes
0d70728fe2 Escape user display names. 2008-03-04 16:51:13 +00:00
Steve Coast
cacf1879c3 user images 2008-02-23 15:18:59 +00:00
Tom Hughes
c3bd1f113b Tidy up message sensitisation a bit more, and add sensitisation of
information in the diary RSS feeds.
2008-01-16 10:02:42 +00:00
Tom Hughes
b416597507 Make the message reply link prefill the title with "Re: original title".
Closes #634.
2008-01-15 19:05:17 +00:00
Tom Hughes
9f909d7447 Add a few more escape calls to prevent nasty HTML being rendered. Also
switch to using sanitize() instead of h() to escape message bodies. This
is not quite as safe as there is no guarantee that the HTML scanner it
uses will find everything, but is does allow benign HTML tags to be
displayed again.
2008-01-15 18:22:08 +00:00
Tom Hughes
1e54573bae Escape message titles and bodies. This is an emergency fix as some genius
has decided to report this XSS problem to a public mailing list. Unfortunately
it means that some functionality (links in messages etc) has been lost for now.
2008-01-15 00:26:01 +00:00
Tom Hughes
2cbcabb3f6 HTML escape substituted parameter values to avoid injection attacks. 2007-11-23 00:49:55 +00:00
Tom Hughes
7b172efeb6 Don't indicate if a message has been read in the outbox view. 2007-11-21 23:54:14 +00:00
Mikel Maron
d736a158be message outbox 2007-11-21 18:24:29 +00:00
Steve Coast
2c0cd2730c a few message prettyness things 2007-09-04 14:20:42 +00:00
Tom Hughes
9fa8aab9f2 Revert SteveC's edit as blank title are now banned. 2007-09-04 14:08:17 +00:00
Steve Coast
c04e9ccf95 link to 'no subject' if message title/subject is blank 2007-09-04 13:43:31 +00:00
Tom Hughes
2e2189ecb9 Fix typo. 2007-08-22 00:20:53 +00:00
Tom Hughes
a894e75a1d Fix diary entry creation... 2007-08-22 00:19:58 +00:00
Dan Karran
9da455a322 Moving inbox styling definitions into the stylesheet. 2007-08-18 12:22:04 +00:00
Dan Karran
3c79240a6a Showing all messages in inbox, but sorting by date DESC and highlighting new ones. Adding link from message reading page back to inbox. Mark as read/unread. 2007-08-17 18:05:09 +00:00
Tom Hughes
b61e4f77e8 Improve handling of user to user messages. 2007-08-14 17:29:27 +00:00
Dan Karran
e6af088dda Seperating message receiving off into 'inbox' function. 2007-06-20 22:32:15 +00:00
Tom Hughes
aa52ebe674 User form_tag/end instead of start_form_tag/end_form_tag to avoid
deprecation warnings.
2007-06-10 23:22:56 +00:00
Nick Black
7d52305640 added messaging and friend stuff that wasn't checked in 2007-05-06 10:36:06 +00:00