From 1b02149ba393e86b10315106cd0d6c8f39a792d1 Mon Sep 17 00:00:00 2001 From: theinterned Date: Tue, 11 Jan 2011 13:33:06 -0500 Subject: [PATCH 1/8] added report abuse to messages --- media/css/batucada.css | 29 ++++++++++------------ templates/activity/_activity_resource.html | 4 ++- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/media/css/batucada.css b/media/css/batucada.css index 61fbf9f..3fba0cf 100644 --- a/media/css/batucada.css +++ b/media/css/batucada.css @@ -993,35 +993,32 @@ header {} line-height: 1px; } - #posts .reply-to { + #posts .reply-to, + #posts .delete, + #posts .report { display: none; float: right; color: #ababab; text-decoration: none; padding-left: 20px; - background: url("/media/images/reply.icon.png") no-repeat left 1px; + left 1px; height: 16px; line-height: 16px; } + #posts .reply-to{ + background: url("/media/images/reply.icon.png") no-repeat + } #posts .delete { - display: none; - float: right; - color: #ababab; - text-decoration: none; padding-right: 7px; - height: 16px; - line-height: 16px; } - #posts .post-container:hover .reply-to { + #posts .post-container:hover .reply-to, + #posts .post-container:hover .delete, + #posts .post-container:hover .report { display: block; } - #posts .post-container:hover .delete { - display: block; - } - #posts .reply-to:hover { - color: #777; - } - #posts .delete:hover { + #posts .reply-to:hover, + #posts .delete:hover, + #posts .report:hover { color: #777; } diff --git a/templates/activity/_activity_resource.html b/templates/activity/_activity_resource.html index c516832..83dfac1 100644 --- a/templates/activity/_activity_resource.html +++ b/templates/activity/_activity_resource.html @@ -1,7 +1,9 @@ {% load l10n_tags %}
  • - + {% if user.is_authenticated %} + Report Abuse + {% endif %} From 279478c6e49fca08d3339d488fb3903b386342be Mon Sep 17 00:00:00 2001 From: theinterned Date: Tue, 11 Jan 2011 15:45:36 -0500 Subject: [PATCH 2/8] added icon to report abuse --- media/css/batucada.css | 35 ++++++++++++++++------------------- media/images/report.icon.png | Bin 0 -> 386 bytes 2 files changed, 16 insertions(+), 19 deletions(-) create mode 100644 media/images/report.icon.png diff --git a/media/css/batucada.css b/media/css/batucada.css index 3fba0cf..f85a2bf 100644 --- a/media/css/batucada.css +++ b/media/css/batucada.css @@ -992,33 +992,30 @@ header {} height: 1px; line-height: 1px; } - - #posts .reply-to, - #posts .delete, - #posts .report { - display: none; + #posts .action { + display: none; float: right; color: #ababab; text-decoration: none; padding-left: 20px; - left 1px; + margin-left: 18px; + left: 1px; height: 16px; line-height: 16px; - } - #posts .reply-to{ - background: url("/media/images/reply.icon.png") no-repeat } - #posts .delete { - padding-right: 7px; + #posts .action:hover { + color: #777; } - #posts .post-container:hover .reply-to, - #posts .post-container:hover .delete, - #posts .post-container:hover .report { - display: block; - } - #posts .reply-to:hover, - #posts .delete:hover, - #posts .report:hover { + #posts .post-container:hover .action{ + display: block; + } + #posts .reply-to{ + background: url("/media/images/reply.icon.png") 0 0 no-repeat; + } + #posts .report { + background: url("/media/images/report.icon.png") 5px 1px no-repeat + } + #posts .action:hover { color: #777; } diff --git a/media/images/report.icon.png b/media/images/report.icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6201b2ab46d8d3bcab8e05677bbf829f9f44d396 GIT binary patch literal 386 zcmV-|0e$|7P)3{edDa;a?ve&j%dE!)uAMP8Al_sB30v?5GswX{ z?7$yX%@iQcsj`We@W#Oil=sJr-Hx^7i(gU(8XSZJ=o~*sJOxvV0z4l6@ g9wS~j&A$Kx0N-_OFk)U^0{{R307*qoM6N<$f=0NY=l}o! literal 0 HcmV?d00001 From a6a288e4c6845158dedc190da16a64234a1dc73a Mon Sep 17 00:00:00 2001 From: theinterned Date: Tue, 11 Jan 2011 15:47:01 -0500 Subject: [PATCH 3/8] added report abuse link to inbox messages --- templates/drumbeatmail/inbox.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/drumbeatmail/inbox.html b/templates/drumbeatmail/inbox.html index cf17a5f..c1ac185 100644 --- a/templates/drumbeatmail/inbox.html +++ b/templates/drumbeatmail/inbox.html @@ -45,7 +45,8 @@ {% for message in inbox %}
  • {% if message.sender != user %} - {{ _('Reply') }} + {{ _('Reply') }} + Report Abuse {% endif %} {% if message.sender == user %} @@ -92,6 +93,7 @@
  • {% if reply_url %} {{ _('Reply') }} + Report Abuse {% endif %} From 408c9c2a722c6c5a25a624d21081d47b85d366dc Mon Sep 17 00:00:00 2001 From: theinterned Date: Tue, 11 Jan 2011 15:48:10 -0500 Subject: [PATCH 4/8] wrapped Report abuse in l10n func --- templates/activity/_activity_resource.html | 2 +- templates/drumbeatmail/inbox.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/activity/_activity_resource.html b/templates/activity/_activity_resource.html index 83dfac1..9ea4291 100644 --- a/templates/activity/_activity_resource.html +++ b/templates/activity/_activity_resource.html @@ -2,7 +2,7 @@
  • {% if user.is_authenticated %} - Report Abuse + {{_('Report Abuse')}} {% endif %} diff --git a/templates/drumbeatmail/inbox.html b/templates/drumbeatmail/inbox.html index c1ac185..c712ff3 100644 --- a/templates/drumbeatmail/inbox.html +++ b/templates/drumbeatmail/inbox.html @@ -46,7 +46,7 @@
  • {% if message.sender != user %} {{ _('Reply') }} - Report Abuse + {{_('Report Abuse')}} {% endif %} {% if message.sender == user %} @@ -93,7 +93,7 @@
  • {% if reply_url %} {{ _('Reply') }} - Report Abuse + {{_('Report Abuse')}} {% endif %} From 66e5747363fc6fdd05558921c7af9b4d8b4ab3a9 Mon Sep 17 00:00:00 2001 From: theinterned Date: Tue, 11 Jan 2011 20:44:16 -0500 Subject: [PATCH 5/8] added report abuse to user profiles WIP --- templates/users/profile.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/users/profile.html b/templates/users/profile.html index c67fcc3..04ac8a4 100644 --- a/templates/users/profile.html +++ b/templates/users/profile.html @@ -52,6 +52,7 @@ {% endif %} {{ _('Private Message')}} + {{_('Report Abuse')}} {% endif %} From 283a32029d77cffa17a2dab6096c3aa43217dd43 Mon Sep 17 00:00:00 2001 From: theinterned Date: Tue, 11 Jan 2011 21:41:51 -0500 Subject: [PATCH 6/8] removed report action on user --- templates/users/profile.html | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/users/profile.html b/templates/users/profile.html index 04ac8a4..c67fcc3 100644 --- a/templates/users/profile.html +++ b/templates/users/profile.html @@ -52,7 +52,6 @@ {% endif %} {{ _('Private Message')}} - {{_('Report Abuse')}} {% endif %} From 1c7745eb2c48f8bb73c5cfc707255a230f4f47cf Mon Sep 17 00:00:00 2001 From: theinterned Date: Tue, 11 Jan 2011 22:28:13 -0500 Subject: [PATCH 7/8] created a 'report abuse' endpoint stub --- apps/activity/urls.py | 4 +++- templates/activity/report_received.html | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 templates/activity/report_received.html diff --git a/apps/activity/urls.py b/apps/activity/urls.py index cbefab9..331d2a5 100644 --- a/apps/activity/urls.py +++ b/apps/activity/urls.py @@ -13,5 +13,7 @@ urlpatterns = patterns('', url(r'^projects/(?P[\w-]+)/feed$', feeds.ProjectActivityFeed(), name='activity_project_feed'), url(r'^feed$', feeds.DashboardFeed(), - name='activity_dashboard_feed'), + name='activity_dashboard_feed'), + url(r'^activity/report/$', + 'django.views.generic.simple.direct_to_template', {'template': 'activity/report_received.html'}) ) diff --git a/templates/activity/report_received.html b/templates/activity/report_received.html new file mode 100644 index 0000000..4a52667 --- /dev/null +++ b/templates/activity/report_received.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% load l10n_tags %} + +{% block title %}{{ _('Abuse Report Received') }}{% endblock %} +{% block bodyclasses %}signin report{% endblock %} +{% block body %} + +{% include "_footer.html" %} +{% endblock %} From cea5d75890994f5c99646e9a0ad9faad5675ce40 Mon Sep 17 00:00:00 2001 From: theinterned Date: Tue, 11 Jan 2011 22:48:57 -0500 Subject: [PATCH 8/8] updated report abuse links to point to activity_report url --- apps/activity/urls.py | 3 ++- templates/activity/_activity_resource.html | 2 +- templates/drumbeatmail/inbox.html | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/activity/urls.py b/apps/activity/urls.py index 331d2a5..47a0acc 100644 --- a/apps/activity/urls.py +++ b/apps/activity/urls.py @@ -15,5 +15,6 @@ urlpatterns = patterns('', url(r'^feed$', feeds.DashboardFeed(), name='activity_dashboard_feed'), url(r'^activity/report/$', - 'django.views.generic.simple.direct_to_template', {'template': 'activity/report_received.html'}) + 'django.views.generic.simple.direct_to_template', {'template': 'activity/report_received.html'}, + name='activity_report') ) diff --git a/templates/activity/_activity_resource.html b/templates/activity/_activity_resource.html index 9ea4291..dcad0ab 100644 --- a/templates/activity/_activity_resource.html +++ b/templates/activity/_activity_resource.html @@ -2,7 +2,7 @@
  • {% if user.is_authenticated %} - {{_('Report Abuse')}} + {{_('Report Abuse')}} {% endif %} diff --git a/templates/drumbeatmail/inbox.html b/templates/drumbeatmail/inbox.html index c712ff3..e2ee1cf 100644 --- a/templates/drumbeatmail/inbox.html +++ b/templates/drumbeatmail/inbox.html @@ -46,7 +46,7 @@
  • {% if message.sender != user %} {{ _('Reply') }} - {{_('Report Abuse')}} + {{_('Report Abuse')}} {% endif %} {% if message.sender == user %} @@ -93,7 +93,7 @@
  • {% if reply_url %} {{ _('Reply') }} - {{_('Report Abuse')}} + {{_('Report Abuse')}} {% endif %}