diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-03-17 17:32:02 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-03-24 13:07:51 +0000 |
commit | 5cb467c469d9a34336da483e47b931c9dd5b9078 (patch) | |
tree | 88d9e7c6b62e8b74eee43c7709e81ecd6c70f2fa /app/helpers | |
parent | a00067262fd7171a39e74a4ebcd75a5758e12ee6 (diff) |
Add notices for unsubscribing from things.
These are full sentences, not composed on the fly, so should be easier
to translate.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/track_helper.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/helpers/track_helper.rb b/app/helpers/track_helper.rb index 49209d6bc..5038cf5e8 100644 --- a/app/helpers/track_helper.rb +++ b/app/helpers/track_helper.rb @@ -76,4 +76,27 @@ module TrackHelper end end + def unsubscribe_notice(track_thing) + case track_thing.track_type + when 'request_updates' + _("You are no longer following '{{link_to_request}}', a request", + :link_to_request => request_link(track_thing.info_request)) + when 'all_new_requests' + _('You are no longer following <a href="{{new_requests_url}}">new requests</a>', + :new_requests_url => request_list_path) + when 'all_successful_requests' + _('You are no longer following <a href="{{successful_requests_url}}">successful requests</a>', + :successful_requests_url => request_list_successful_path ) + when 'public_body_updates' + _("You are no longer following '{{link_to_authority}}', a public authority", + :link_to_authority => public_body_link(track_thing.public_body)) + when 'user_updates' + _("You are no longer following '{{link_to_user}}', a person", + :link_to_user => user_link(track_thing.tracked_user)) + when 'search_query' + _('You are no longer following <a href="{{search_url}}">this search</a>', + :search_url => search_path([track_thing.track_query, 'newest', 'advanced'])) + end + end + end |